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
Create an intent that can start the Speech Recognizer activity
private void display() { Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); // Start the activity, the intent will be populated with the speech text startActivityForResult(intent, REQ_CODE_SPEECH_INPUT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startVoiceRecognitionActivity()\n {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"V...
[ "0.7681994", "0.7566971", "0.7517011", "0.7464208", "0.74441344", "0.6992921", "0.69314855", "0.67240125", "0.6674867", "0.66078234", "0.6598881", "0.6492038", "0.6421468", "0.6410465", "0.63645583", "0.6360286", "0.63142073", "0.6282635", "0.6282635", "0.6282635", "0.6282635...
0.6267338
21
This callback is invoked when the Speech Recognizer returns. This is where you process the intent and extract the speech text from the intent.
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQ_CODE_SPEECH_INPUT && resultCode == RESULT_OK) { List<String> results = data.getStringArrayListExtra( RecognizerIntent.EXTRA_RESULTS); String spokenText = results.get(0); // Do something with spokenText convert.setText(spokenText); } super.onActivityResult(requestCode, resultCode, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String speak(){\n speechOutput.clear();\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Just speak norma...
[ "0.69005144", "0.6847757", "0.6728021", "0.67133653", "0.65964943", "0.6557726", "0.651447", "0.6366768", "0.6346173", "0.63148427", "0.6272908", "0.6259072", "0.6160675", "0.6092669", "0.6092373", "0.60859346", "0.60644406", "0.60412717", "0.59409976", "0.5938899", "0.592539...
0.708865
0
returns value of exp necessary to be at specified level
private int getReqExp(int level) { if (level < 2) return 0; else return (level-1)*1000 + getReqExp(level-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static int calcMaxExpForLevel(int level){\n\t\tScriptEngineManager mgr = new ScriptEngineManager();\n\t ScriptEngine engine = mgr.getEngineByName(\"JavaScript\");\n\t String maxExpGeneratorString = RacesAndClasses.getPlugin()\n\t \t\t.getConfigManager().getGeneralConfig().getConfig_mapExpPerLeve...
[ "0.7177692", "0.71483904", "0.69728893", "0.6971836", "0.6971836", "0.69617444", "0.6930821", "0.6930821", "0.6868911", "0.68251497", "0.6824218", "0.66602045", "0.6659958", "0.660855", "0.6584166", "0.65822566", "0.6562474", "0.6505539", "0.64928496", "0.6422923", "0.6421296...
0.72322196
0
Serialize this object to JSON.
public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); generator.writeEnd(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toJson() { return new Gson().toJson(this); }", "public String toJSON() {\n return new Gson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson(...
[ "0.78896964", "0.7889164", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.7881641", "0.78275806", "0.7724005", "0.76914984", "0.76226294", "0.7580174", "0.75682586", "0.75682586", "0.7562139", "0.7562139...
0.0
-1
Handle Generate QR code button tap given set preferences by user. Generates a QR code given the user data.
public void handleGenerateQrCodeButtonTap(boolean shareInsuranceInfoChecked) { if (!shareInsuranceInfoChecked) { removeInsuranceInformation(); } if (expiryDate != null) { user.setContactExpiryDate(expiryDate); } view.showProgressSpinner(); view.hidePreferencesContainer(); new Thread(new Runnable() { @Override public void run() { generateQrCode(); } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createQrCode(View view) {\n String result = getResult();\n Bitmap qrBitmap = ScannableController.createQrBitmap(ScannableController\n .createUri(result, getIntent().getStringExtra(EXPERIMENT_ID),\n ((ExperimentType) getIntent().getSerializableExtra(EXPERIMENT_TYPE)).toString(),...
[ "0.69612956", "0.60010433", "0.598688", "0.5860093", "0.5831597", "0.57686317", "0.5760307", "0.5753278", "0.57190585", "0.5714658", "0.56610805", "0.56175524", "0.5600425", "0.55974823", "0.5565859", "0.5558606", "0.5534118", "0.5534076", "0.5519697", "0.5431235", "0.5431137...
0.6715212
1
Given date details, update the expiry date.
public void handleExpiryDateChange(int year, int month, int dayOfMonth) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month, dayOfMonth); this.expiryDate = calendar.getTime(); view.setExpiryDateText(formatter.format(this.expiryDate)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExpiryDate(Date expiryDate) {\n this.expiryDate = expiryDate;\n }", "public void setExpirationDate(java.util.Date value);", "void setExpiredDate(Date expiredDate);", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public void setExpiryDate(SIPDateOrDeltaS...
[ "0.73429364", "0.7320167", "0.7250001", "0.72109133", "0.70413864", "0.7001508", "0.69626576", "0.696097", "0.69131553", "0.6901762", "0.68637866", "0.68553567", "0.67727596", "0.6749946", "0.6738907", "0.6738907", "0.666869", "0.6657647", "0.66427046", "0.6535883", "0.651678...
0.59970725
45
/ Private Functions Set the default expiry date to be 2 weeks from the current day.
private void setDefaultExpiryDate() { int twoWeeks = 14; Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.add(Calendar.DAY_OF_YEAR, twoWeeks); this.expiryDate = calendar.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "publ...
[ "0.666395", "0.6556265", "0.650057", "0.6289192", "0.6275972", "0.6244506", "0.62189686", "0.6071396", "0.5993003", "0.5986625", "0.5983848", "0.59454525", "0.5924184", "0.59222376", "0.5900566", "0.5870483", "0.58634734", "0.5832516", "0.5829329", "0.58186203", "0.5809696", ...
0.8692173
0
Removes the insurance information data from the User object.
private void removeInsuranceInformation() { //remove insurance information InsuranceCompany[] emptyInsurance = new InsuranceCompany[0]; user.setInsuranceInfo(emptyInsurance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearUser() { user_ = null;\n \n }", "private void removeSpUserInfo() {\n\t\tPreferencesHelper preferencesHelper = new PreferencesHelper(\n\t\t\t\tChangeLoginActivity.this);\n\t\tpreferencesHelper.remove(\"uid\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_EMAIL\");\n\t\tpreferencesHelp...
[ "0.6787309", "0.6520657", "0.63955885", "0.6319409", "0.6290862", "0.62463754", "0.6218243", "0.6164408", "0.6152881", "0.6126711", "0.6126416", "0.6115019", "0.60884005", "0.6026208", "0.597144", "0.595488", "0.59278834", "0.5914208", "0.58875793", "0.5869663", "0.5865271", ...
0.8460572
0
Sample Code used found here.
private Bitmap encodeToQrCode(String text) throws WriterException { BitMatrix bitMatrix; try { bitMatrix = new MultiFormatWriter().encode( text, BarcodeFormat.DATA_MATRIX.QR_CODE, QR_CODE_WIDTH, QR_CODE_WIDTH, null ); } catch (IllegalArgumentException Illegalargumentexception) { return null; } int bitMatrixWidth = bitMatrix.getWidth(); int bitMatrixHeight = bitMatrix.getHeight(); int[] pixels = new int[bitMatrixWidth * bitMatrixHeight]; for (int y = 0; y < bitMatrixHeight; y++) { int offset = y * bitMatrixWidth; for (int x = 0; x < bitMatrixWidth; x++) { pixels[offset + x] = bitMatrix.get(x, y) ? context.getResources().getColor(R.color.qrCodeBlack):context.getResources().getColor(R.color.qrCodeWhite); } } Bitmap bitmap = Bitmap.createBitmap(bitMatrixWidth, bitMatrixHeight, Bitmap.Config.ARGB_4444); bitmap.setPixels(pixels, 0, QR_CODE_WIDTH, 0, 0, bitMatrixWidth, bitMatrixHeight); return bitmap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private static void oneUserExample()\t{\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "void pramitiTechTutorials() {\n\t\n}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void grabar...
[ "0.6126603", "0.6019472", "0.59830505", "0.58835727", "0.58783144", "0.58447456", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.58070123", "0.57904613", "0.5784621", "0.5784621", "0.57809114", "0.5779958", "0.5765205", "0.57602334", "0.5729644", "0....
0.0
-1
Created by hoon on 20150523.
public interface ImageUpload { void imageUploadToServer(int selectedImageResourceId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n...
[ "0.6158396", "0.6019332", "0.5968125", "0.5950814", "0.5849458", "0.5844088", "0.583892", "0.583892", "0.58203954", "0.5779469", "0.5757364", "0.5739715", "0.57375246", "0.5709002", "0.57022876", "0.5696821", "0.56951714", "0.5687195", "0.5682111", "0.5677126", "0.5677126", ...
0.0
-1
Gets the amount value for this BuyRequestType.
public java.math.BigDecimal getAmount() { return amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public io.lightcone.data.types.Amount getAmount() {\n if (amountBuilder_ == null) {\n return amount_ == null ? io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n } else {\n return amountBuilder_.getMessage();\n }\n }", "public io.lightcone.data.types.Amount getAmount...
[ "0.70975345", "0.6922924", "0.6891456", "0.67829716", "0.6613511", "0.6610336", "0.660358", "0.6590749", "0.65846634", "0.6571641", "0.6539683", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6512505", "0.6509986", "0.6509986", ...
0.6720149
4
Sets the amount value for this BuyRequestType.
public void setAmount(java.math.BigDecimal amount) { this.amount = amount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAmount(CoreComponentTypes.apis.ebay.BasicAmountType amount) {\r\n this.amount = amount;\r\n }", "void setAmount(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount amount);", "public void setAmount (java.math.BigDecimal amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public ...
[ "0.721089", "0.7009424", "0.6986176", "0.6726511", "0.6720102", "0.66851586", "0.66851586", "0.66851586", "0.66778934", "0.66602224", "0.6659412", "0.66252947", "0.66239", "0.6598523", "0.6597726", "0.6597726", "0.65976286", "0.6592243", "0.6565609", "0.6519273", "0.64455307"...
0.6949521
3
Gets the notify_alternate value for this BuyRequestType.
public java.lang.String getNotify_alternate() { return notify_alternate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNotify_alternate(java.lang.String notify_alternate) {\n this.notify_alternate = notify_alternate;\n }", "public long getNotify() {\n\t\treturn notify;\n\t}", "public YesNoType getNotifyPi() {\n return _notifyPi;\n }", "public String getReplyingOrNotifying() {\n retur...
[ "0.68219984", "0.59484744", "0.5771115", "0.55292684", "0.52598345", "0.5251167", "0.5202958", "0.51689744", "0.51003814", "0.50717795", "0.50699955", "0.4966111", "0.49574628", "0.4893923", "0.4880327", "0.4871384", "0.4858217", "0.48261002", "0.4810386", "0.47761765", "0.47...
0.76821655
0
Sets the notify_alternate value for this BuyRequestType.
public void setNotify_alternate(java.lang.String notify_alternate) { this.notify_alternate = notify_alternate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getNotify_alternate() {\n return notify_alternate;\n }", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "public void setAlternateEmail(String altemail) { this.alternateEmail = altemail; }", "public void setAlternateEmail(String altEmail) {\r\n\t\t\tt...
[ "0.647764", "0.5757628", "0.5057839", "0.50405484", "0.49918208", "0.4800414", "0.479459", "0.4781265", "0.45647356", "0.45086545", "0.45052364", "0.44931027", "0.44670597", "0.44233158", "0.44054314", "0.43646276", "0.4355898", "0.43516126", "0.4344316", "0.43040735", "0.427...
0.7733781
0
Gets the product value for this BuyRequestType.
public java.lang.String getProduct() { return product; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getProduct() {\n return this.product;\n }", "public String getProduct() {\r\n return this.product;\r\n }", "public String getProduct() {\n return this.product;\n }", "public String product() {\n return this.product;\n }", "public String getProduct() {\n ret...
[ "0.6687642", "0.6637687", "0.6595933", "0.6594846", "0.64806753", "0.64806753", "0.6385688", "0.63631094", "0.63365126", "0.62540305", "0.6244904", "0.61209154", "0.6079951", "0.60511863", "0.6029193", "0.59895194", "0.598203", "0.59467524", "0.59228516", "0.5913308", "0.5896...
0.65246254
4
Sets the product value for this BuyRequestType.
public void setProduct(java.lang.String product) { this.product = product; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProduct(entity.APDProduct value);", "public void setProduct(String product) {\r\n this.product = product;\r\n }", "public void setProduct(Product product) {\n this.product = product;\n }", "public void setProduct(final String productValue) {\n this.product = productV...
[ "0.6897562", "0.65840465", "0.65665764", "0.65538913", "0.65293217", "0.6398831", "0.6384879", "0.6329094", "0.63207567", "0.62080616", "0.62001145", "0.6098147", "0.60488266", "0.6026849", "0.6014629", "0.5968196", "0.59532005", "0.5943104", "0.5905333", "0.5872682", "0.5861...
0.6412012
5
Gets the recipient value for this BuyRequestType.
public java.lang.String getRecipient() { return recipient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getRecipient() {\n\t\treturn this.recipient;\n\t}", "public String getRecipient() {\n\t\treturn recipient;\n\t}", "public String getRecipient()\n {\n return recipient;\n }", "public Recipient getRecipient() {\n return recipient;\n }", "public final Player getRecipient()...
[ "0.69745564", "0.6806902", "0.675803", "0.6590717", "0.65717643", "0.64004856", "0.6186232", "0.61723995", "0.61528057", "0.61124855", "0.6049564", "0.5987737", "0.5916905", "0.587432", "0.5846955", "0.56855035", "0.56751686", "0.5637597", "0.5633608", "0.5599284", "0.5597679...
0.67837477
2
Sets the recipient value for this BuyRequestType.
public void setRecipient(java.lang.String recipient) { this.recipient = recipient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecipient(Object recipient) {\n\t\tthis.recipient = recipient;\n\t}", "public void setRecipient(String recipient)\n {\n this.recipient = recipient;\n }", "public final void setRecipient(final Player newRecipient) {\n this.recipient = newRecipient;\n }", "@Override\n p...
[ "0.6463172", "0.63183033", "0.6043077", "0.6026095", "0.601419", "0.56780857", "0.5571271", "0.5540466", "0.5513089", "0.5438633", "0.5427378", "0.5380053", "0.5366168", "0.5366168", "0.53492117", "0.53469193", "0.5312567", "0.5308809", "0.5264046", "0.52440256", "0.51854414"...
0.61161643
2
Gets the reference1 value for this BuyRequestType.
public java.lang.String getReference1() { return reference1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE1_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference1() {\n return (java.lang...
[ "0.63807636", "0.6324317", "0.5833219", "0.58322334", "0.5811327", "0.5745426", "0.5736703", "0.5714592", "0.56875384", "0.5625839", "0.5420448", "0.53927726", "0.5383786", "0.5383786", "0.5330843", "0.5329601", "0.5324535", "0.5319028", "0.5318099", "0.5291184", "0.5282421",...
0.6654227
0
Sets the reference1 value for this BuyRequestType.
public void setReference1(java.lang.String reference1) { this.reference1 = reference1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public void setReference1(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE1_PROP.get(), value);\n }", "public PaymentReq...
[ "0.6233002", "0.6184544", "0.58827484", "0.56610036", "0.55275244", "0.5514409", "0.5393195", "0.531749", "0.52726513", "0.5246526", "0.5223571", "0.51098007", "0.5083537", "0.50498044", "0.5037572", "0.50311357", "0.5029166", "0.5002791", "0.49951395", "0.4979661", "0.495797...
0.67614377
0
Gets the reference2 value for this BuyRequestType.
public java.lang.String getReference2() { return reference2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getReference2() {\n return (java.lang...
[ "0.6530638", "0.65139234", "0.61904615", "0.6060776", "0.599596", "0.5990353", "0.5972128", "0.5868493", "0.56621647", "0.5658772", "0.55864954", "0.5564737", "0.55425084", "0.5535569", "0.5518709", "0.55149835", "0.5509158", "0.5504502", "0.53848803", "0.53396046", "0.533454...
0.6874003
0
Sets the reference2 value for this BuyRequestType.
public void setReference2(java.lang.String reference2) { this.reference2 = reference2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReference2(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE2_PROP.get(), value);\n }", "public void setReference2(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(REFERENCE2_PROP.get(), value);\n }", "private String ge...
[ "0.6386687", "0.6351027", "0.5978055", "0.58793443", "0.58792377", "0.578264", "0.5607895", "0.5585606", "0.54785883", "0.54274887", "0.5386256", "0.53706825", "0.53620946", "0.53329414", "0.5327392", "0.5316195", "0.53078794", "0.53041065", "0.5302646", "0.5268301", "0.52666...
0.68410563
0
Gets the target value for this BuyRequestType.
public java.lang.String getTarget() { return target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.commercetools.api.models.common.Reference getTarget() {\n return this.target;\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public String getTarget() {\n return this.target;\n }", "String getTarget() {\r\n return this.target;\r\n }", "publ...
[ "0.6326923", "0.6238926", "0.62242043", "0.6197461", "0.6173074", "0.6173074", "0.61405635", "0.61291075", "0.61291075", "0.61291075", "0.6116933", "0.61047465", "0.608058", "0.5907268", "0.589572", "0.5812598", "0.572313", "0.5710805", "0.5710805", "0.5710805", "0.5710805", ...
0.60279655
13
Sets the target value for this BuyRequestType.
public void setTarget(java.lang.String target) { this.target = target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTarget(String target) {\n this.target = target;\n }", "public void setTarget(Target target) {\n\t\tthis.target = target;\n\t}", "@JsonProperty(\"target\")\n public void setTarget(String target) {\n this.target = target;\n }", "void setTarget(java.lang.String target);", ...
[ "0.5965277", "0.5950794", "0.5926505", "0.5861267", "0.57332855", "0.5700944", "0.564761", "0.55153817", "0.54905665", "0.5485385", "0.5402549", "0.534199", "0.5318664", "0.530962", "0.5269395", "0.52522695", "0.5244681", "0.52081233", "0.52066004", "0.52004", "0.5197383", ...
0.5781623
4
Gets the type value for this BuyRequestType.
public java.lang.Integer getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getReqType()\r\n {\r\n return safeConvertInt(getAttribute(\"type\"));\r\n }", "public SupplyType getType() \r\n {\r\n assert(true);\r\n return type;\r\n }", "public final SettlementType getType() {\n return type;\n }", "@Override public io.emqx.exhook.C...
[ "0.6844408", "0.65247995", "0.6491449", "0.6379522", "0.6367049", "0.6361003", "0.63508886", "0.6336652", "0.63166916", "0.6314984", "0.6291379", "0.6287783", "0.6263207", "0.6214462", "0.6214462", "0.6214462", "0.6214462", "0.6214462", "0.6202849", "0.6198615", "0.61860216",...
0.0
-1
Sets the type value for this BuyRequestType.
public void setType(java.lang.Integer type) { this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setType(String type) {\n m_Type = type;\n }", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "public void setRequestType(RequestType requestType) {\n this.requestType = requestType;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public ...
[ "0.6566989", "0.6557141", "0.6538154", "0.65152615", "0.65152615", "0.65152615", "0.6491841", "0.64784974", "0.6474507", "0.6464416", "0.64613765", "0.6438581", "0.6438581", "0.6438581", "0.6438581", "0.6436005", "0.6417221", "0.6416179", "0.64045405", "0.64045405", "0.639905...
0.0
-1
Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MetadataType getType();", "public MetadataType getType() {\n return type;\n }", "public MilanoTypeMetadata.TypeMetadata getMetadata()\n {\n if (typeMetadata == null) {\n return null;\n }\n\n return typeMetadata;\n }", "private Metadata getMetadata(RubyModule type)...
[ "0.79712594", "0.7375215", "0.7357041", "0.7089384", "0.6734884", "0.67225796", "0.66729796", "0.65636516", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", "0.65459824", ...
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
Body of the plan execution. Starts initialization process.
@PlanBody public void body(IInternalAccess access) throws JBDIEmoException { handleExepctions(access); this.emotionalOthers = emotionalAgent.others().split(","); this.engine = (Engine) access.getComponentFeature(IInternalBDIAgentFeature.class) .getBDIModel().getCapability().getBelief("engine").getValue(access); engine.setAgentName(access.getComponentIdentifier().getName()); engine.setAgentObject(agentObject); JBDIEmo.UserPlanParams.put(engine.getAgentName(), new LinkedHashMap()); JBDIEmo.UserGoalParams.put(engine.getAgentName(), new LinkedHashMap()); agentModelMapper = new AgentModelMapper(agentObject, access); platformOtherMapper = new PlatformOtherMapper(access); mapAgentModel(); mapAgentOther(); initializeEngine(); initializeGui(); initializeEngineLogger(); MessageCenter messageCenter = new MessageCenter(access); ElementEventMonitor elementEventMonitor = new ElementEventMonitor(access, agentObject, messageCenter); elementEventMonitor.goalsAndPlansMonitoring(); elementEventMonitor.beliefMonitoring(); elementEventMonitor.beliefSetMonitoring(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}", "@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");...
[ "0.65837723", "0.6227042", "0.6147133", "0.6144586", "0.60776496", "0.6058632", "0.6005585", "0.59655154", "0.5946669", "0.5897383", "0.5896949", "0.58862484", "0.5862401", "0.58591205", "0.5845823", "0.58450335", "0.5844823", "0.58385086", "0.58313775", "0.58273476", "0.5825...
0.0
-1
Get decay time parameter from ADF if exists and set decay time in engine
private void initializeEngine() { engine.setDecayDelay(emotionalAgent.decayTimeMillis()); // Get decay steps parameter from ADF if exists and set decay steps in engine engine.setDecaySteps(emotionalAgent.decayStepsToMin()); // Set engine initialized engine.setInitialized(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}", "public void setDamping(double decay){damping = Math.exp(-decay);}", "public void setParameters( float maxAmp, float attTime, float decTime, float susLvl, float relTime, float befAmp, float aftAmp)\n\t{\n\t\tmaxAmplitude = max...
[ "0.57641625", "0.56602174", "0.56490165", "0.54765266", "0.5312449", "0.50577414", "0.49000412", "0.4893693", "0.48834017", "0.4871905", "0.4762317", "0.47567716", "0.4738494", "0.47230628", "0.47150722", "0.4623689", "0.45901003", "0.45372325", "0.45200947", "0.45098722", "0...
0.5215691
5
Create a Label control.
@Override public void start(Stage primaryStage) { Label Label1 = new Label("Output File:"); Label Label2 = new Label("Message to Encrypt:"); Label Label3 = new Label("Input File: "); Label Label4 = new Label("Decrypted Message: "); // Create a Button control. Button b1 = new Button("Encrypt"); Button b2 = new Button("Decrypt"); // Register the event handler. b1.setOnAction(new ButtonClickHandler()); b2.setOnAction(new ButtonClickHandler2()); // Put the Label and TextField in an HBox with 10 pixels of spacing. HBox h1 = new HBox(10, Label1, t1, Label2, t2, b1); HBox h2 = new HBox(10, Label3, t3, Label4, t4, b2); h1.setPadding(new Insets(10)); h2.setPadding(new Insets(10)); // Put the HBox and Button in a VBox with 10 pixels of spacing. VBox root = new VBox(10, h1, h2, Label5); root.setPadding(new Insets(10)); // Create a Scene with the VBox as its root node. Scene scene = new Scene(root); // Set the scene's alignment to center. root.setAlignment(Pos.CENTER); // Add the Scene to the Stage. primaryStage.setScene(scene); // Set the stage title. primaryStage.setTitle("TextField Demo"); // Show the window. primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}", "private Label createLabel(String text, int offset) {\n\t\tLabel label = new Label(text);\n\t\t//label.setFont(Font.font(40));\n\t\tlabel.setTextFill(Color.YELLOW);\n\t\tlabel.getTransforms().add(new Rotate(-50, 300, 400, 20, Rotat...
[ "0.81468254", "0.75340366", "0.7531787", "0.7399858", "0.72531", "0.72362477", "0.71577555", "0.7091153", "0.70452505", "0.6966546", "0.69219464", "0.69051534", "0.6894793", "0.6856519", "0.68432117", "0.68277186", "0.6798882", "0.6790861", "0.6766715", "0.67342126", "0.67247...
0.0
-1
Instantiates a new class comment plugin.
public ClassCommentPlugin() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Comment () {\n init();\n }", "public Comment() {\n\n }", "public Comments() {\n this(\"comments\", null);\n }", "Comment createComment();", "public ContactedUsComments() {\r\n }", "public DemoPluginFactory() {}", "private void addComment() {\r\n Editor classEdito...
[ "0.68254805", "0.66234654", "0.6060428", "0.60322994", "0.59286034", "0.5822423", "0.5786407", "0.5568378", "0.55682003", "0.5549591", "0.5545831", "0.5410533", "0.5375718", "0.5364023", "0.53561527", "0.5354694", "0.5345376", "0.5344995", "0.53448886", "0.5281605", "0.527089...
0.8543091
0
Getters and Setters for Attributes
public String getPassengerName() { return passengerName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Attributes getAttributes();", "IAttributes getAttributes();", "public Attributes getAttributes() { return this.attributes; }", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "public interface IAttributes {\n\n\t/***\n\t *...
[ "0.7598491", "0.7425643", "0.7374517", "0.73148316", "0.7154219", "0.67746264", "0.6763137", "0.6763137", "0.67508924", "0.6745928", "0.6727113", "0.6695269", "0.66862565", "0.66829985", "0.6657862", "0.6657862", "0.66530466", "0.6645474", "0.66409934", "0.6620024", "0.661437...
0.0
-1
Initial database creation/connection which includes table creation.
private void initDatabase() { String sql = "CREATE TABLE IF NOT EXISTS books (\n" + " ISBN integer PRIMARY KEY,\n" + " BookName text NOT NULL,\n" + " AuthorName text NOT NULL, \n" + " Price integer\n" + ");"; try (Connection conn = DriverManager.getConnection(urlPath); Statement stmt = conn.createStatement()) { System.out.println("Database connected"); stmt.execute(sql); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void go() {\n\t\tthis.conn = super.getConnection();\n\t\tcreateCustomersTable();\n\t\tcreateBankersTable();\n\t\tcreateCheckingAccountsTable();\n\t\tcreateSavingsAccountsTable();\n\t\tcreateCDAccountsTable();\n\t\tcreateTransactionsTable();\n\t\tcreateStocksTable();\n\t\tif(createAdminBanker) addAdminBanker();\n\t...
[ "0.7735962", "0.76831645", "0.7660952", "0.7579815", "0.7507845", "0.7490628", "0.7466879", "0.74283904", "0.74102867", "0.7384798", "0.7359131", "0.7336229", "0.7280565", "0.71811336", "0.7174722", "0.7108779", "0.7094366", "0.7085373", "0.7067241", "0.7063436", "0.70290947"...
0.7505181
5
Gets a connections to the database.
private Connection connect() { Connection conn = null; try { conn = DriverManager.getConnection(urlPath); } catch (SQLException e) { System.out.println(e.getMessage()); } return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Connection> getConnections(){\n\t\treturn manager.getConnectionsWith(this);\n\t}", "public Connections getConnections();", "public List<Connection> getConnections() {\n\t\treturn new ArrayList<Connection>(connectionsByUri.values());\n\t}", "public Connections getConnections() {\r\n retu...
[ "0.7995651", "0.7977267", "0.7620424", "0.72459656", "0.7230828", "0.7118988", "0.711134", "0.70824856", "0.69824666", "0.6929356", "0.685584", "0.6774656", "0.6744135", "0.6719072", "0.667557", "0.6672409", "0.6659425", "0.6633351", "0.66196704", "0.66179395", "0.6595029", ...
0.0
-1
Inserts a new book into the database
public void insertBook(int ISBN, String BookName, String AuthorName, int Price) { String sql = "INSERT INTO books (ISBN, BookName, AuthorName, Price) VALUES(?,?,?,?)"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, ISBN); pstmt.setString(2, BookName); pstmt.setString(3, AuthorName); pstmt.setInt(4, Price); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEn...
[ "0.8081809", "0.7646736", "0.7586933", "0.7568815", "0.74272364", "0.73674923", "0.73454475", "0.73454475", "0.72621614", "0.7214115", "0.7180849", "0.7150117", "0.71339583", "0.7107343", "0.70701844", "0.70696247", "0.69666964", "0.695436", "0.69352627", "0.69350374", "0.690...
0.7288705
8
Prints out every book in the database
public void listBooks() { String sql = "SELECT ISBN, BookName, AuthorName, Price FROM books"; try (Connection conn = this.connect(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(sql)) { // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book....
[ "0.7419028", "0.7321415", "0.7314236", "0.7259762", "0.72540814", "0.7217454", "0.7122926", "0.70845896", "0.7052736", "0.7039054", "0.69088125", "0.68713814", "0.6814269", "0.6787665", "0.6772188", "0.6754989", "0.67380214", "0.6629306", "0.6625538", "0.6602797", "0.65580213...
0.780829
0
Prints out every book that matches equals given values.
public void listBooksByName(String name) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE BookName = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, name); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\...
[ "0.6029367", "0.56720525", "0.5666578", "0.5603096", "0.55917144", "0.5558397", "0.5556992", "0.5511476", "0.5493243", "0.54698753", "0.5417855", "0.5350883", "0.5349979", "0.53449774", "0.5324482", "0.5313602", "0.5307809", "0.529509", "0.5294402", "0.5269696", "0.5266791", ...
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByAuthor(String name) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE AuthorName = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, name); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\...
[ "0.6029113", "0.56715435", "0.5666051", "0.5602083", "0.55897003", "0.55565816", "0.55550075", "0.55106276", "0.5492182", "0.5469197", "0.54166687", "0.535012", "0.5347257", "0.53445727", "0.5324776", "0.531375", "0.5305515", "0.5294675", "0.5293576", "0.5270972", "0.5265175"...
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByISBN(int ISBN) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, ISBN); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\...
[ "0.60284257", "0.56714505", "0.566595", "0.5602261", "0.55901307", "0.55582297", "0.55546045", "0.551109", "0.549233", "0.54683733", "0.54162264", "0.53505075", "0.5347388", "0.5344857", "0.53247803", "0.5314413", "0.5305157", "0.52941775", "0.52936643", "0.52704704", "0.5265...
0.0
-1
Prints out every book that matches equals given values.
public void listBooksByPrice(int price) { String sql = "SELECT ISBN, BookName, AuthorName, Price " + "FROM books " + "WHERE Price = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, price); ResultSet rs = pstmt.executeQuery(); // Print results while(rs.next()) { System.out.println(rs.getInt("ISBN") + "\t" + rs.getString("BookName") + "\t" + rs.getString("AuthorName") + "\t" + rs.getInt("Price")); } } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tHashSet<BookList> set = new HashSet<BookList>();\n\t\t\n\t\tBookList b1 = new BookList(101,\" Let us C\", \" Yashwant Kanetkar\", \" BPB \", 8);\n\t\tBookList b2 = new BookList(102, \" Data communication & Networking\", \" Forouzan\", \" Mc Graw Hill \", 4);\n\t\...
[ "0.60284257", "0.56714505", "0.566595", "0.5602261", "0.55901307", "0.55582297", "0.55546045", "0.551109", "0.549233", "0.54683733", "0.54162264", "0.53505075", "0.5347388", "0.5344857", "0.53247803", "0.5314413", "0.5305157", "0.52941775", "0.52936643", "0.52704704", "0.5265...
0.0
-1
Deletes a book from the database
public void removeBook(int ISBN) { String sql = "DELETE FROM books WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set value pstmt.setInt(1, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "private void deleteBook() {\n if (currentBo...
[ "0.8562235", "0.8161067", "0.81473833", "0.80585617", "0.79583687", "0.7786559", "0.77571106", "0.7714241", "0.7571642", "0.7379153", "0.73788905", "0.73781663", "0.73292595", "0.73281914", "0.71468467", "0.71249974", "0.7089395", "0.70345384", "0.70166487", "0.69691205", "0....
0.650425
45
Update a book's name
public void replaceBookName(int ISBN, String replacement) { String sql = "UPDATE books SET BookName = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBookName(java.lang.String value);", "public void setBookName(String value) {\n setAttributeInternal(BOOKNAME, value);\n }", "void update(Book book);", "private void editName() {\n Routine r = list.getSelectedValue();\n\n String s = (String) JOptionPane.showInputDialog(\...
[ "0.7836445", "0.72900933", "0.6820327", "0.677023", "0.6705612", "0.6641737", "0.66163635", "0.65651435", "0.65581065", "0.6549664", "0.64491725", "0.63907903", "0.6348466", "0.6344248", "0.6329749", "0.6285056", "0.62555915", "0.6251443", "0.6245907", "0.62364036", "0.618457...
0.6161402
23
Update a book's author
public void replaceAuthor(int ISBN, String replacement) { String sql = "UPDATE books SET AuthorName = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setString(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateAuthor(Author author);", "boolean updateAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "public void setAuthor(String author) {\r\n this.author = author;\r\n }", "public void setAuthor(String author) {\n this.author = author;\n }", "publi...
[ "0.8669274", "0.75554854", "0.71692365", "0.7123321", "0.7123321", "0.7123321", "0.7123321", "0.7123321", "0.71227884", "0.7111058", "0.70708096", "0.70123637", "0.6920894", "0.68893147", "0.6827786", "0.6746796", "0.6736455", "0.67220265", "0.6714081", "0.6685168", "0.667197...
0.0
-1
Update a book's Price
public void replacePrice(int ISBN, int replacement) { String sql = "UPDATE books SET Price = ? WHERE ISBN = ?"; try (Connection conn = this.connect(); PreparedStatement pstmt = conn.prepareStatement(sql)) { // Set values pstmt.setInt(1, replacement); pstmt.setInt(2, ISBN); pstmt.executeUpdate(); } catch (SQLException e) { System.out.println(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changePrice(Booking booking, float price);", "private void changePrice() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you'd like to change the price of:\");\n\t\tsic_idHolder = sc...
[ "0.77858925", "0.7104239", "0.7007472", "0.6964306", "0.69613314", "0.6957477", "0.69318825", "0.69238037", "0.6879426", "0.6859384", "0.68405956", "0.68293667", "0.68267816", "0.6813222", "0.6811154", "0.67902684", "0.67902684", "0.67902684", "0.67788935", "0.67788935", "0.6...
0.0
-1
Construct a linked list of strings in the Cons, based on the provided inputs.
public Cons(String first, BagOfWordsList restOfBag) { this.first = first; this.restOfBag = restOfBag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ArrayList<String> createList(String finalInput);", "public static void main(String [] args) {\n DoublyLinkedList<String> ll = new DoublyLinkedList<String>();\n\n String[] alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".split(\"\");\n\n for (String s : alphabet) {\n ll.addFirst(s);\n ...
[ "0.63416004", "0.6187919", "0.6105468", "0.6078127", "0.5869738", "0.5858476", "0.5836052", "0.5691092", "0.5601494", "0.55376905", "0.5384472", "0.53641456", "0.5313589", "0.53038234", "0.5296413", "0.525923", "0.51970077", "0.512299", "0.51208353", "0.5095321", "0.5077173",...
0.45856887
94
The BagOfWordsList is sorted in ascending order when new String is added into it. No need to override the equals() and hashcode()
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || getClass() != object.getClass()) { return false; } Cons cons = (Cons) object; return Objects.equals(first, cons.first) && Objects.equals(restOfBag, cons.restOfBag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\...
[ "0.64101285", "0.63825506", "0.60816157", "0.60138494", "0.59011227", "0.5864329", "0.58232725", "0.58006334", "0.57991374", "0.57893", "0.5780682", "0.57667774", "0.57633615", "0.5720013", "0.57182837", "0.57141167", "0.5706912", "0.56834924", "0.5648457", "0.56310713", "0.5...
0.0
-1
Combines everything! Takes input, creates puzzle, offers to change input
public static Puzzle inputToPuzzle() { Puzzle puzzle = new Puzzle(); printInitialPromptMessage(); final String choice = chooseCubeInputType(); if (choice.equals("r")) { // random set of cubes printRandomPromptMessage(); puzzle = RandomController.getRandomPuzzle(); } else { // user's choice of cubes printChoicePromptMessage(); final String[][] inputArray = takeStdInput(); puzzle = convertInputArrayToPuzzle(inputArray); } changeCubeInPuzzle(puzzle); // sc.close(); return puzzle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solvePuzzle(){\n\t\t// check to make sure pieces was set\n\t\tif(possiblePieces == null){\n\t\t\tSystem.out.println(\"PuzzleThree::solvePuzzle(): possiblePieces is not initialized!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// initialize population with random sequences\n\t\tinitializePopulation();\n\t\t\n\t...
[ "0.59938025", "0.58759165", "0.5847591", "0.57714695", "0.56474453", "0.56354797", "0.55743647", "0.5563599", "0.55104715", "0.548906", "0.5475237", "0.53420746", "0.5334746", "0.5314458", "0.5285648", "0.5285581", "0.5283299", "0.5276347", "0.5275511", "0.52598774", "0.52578...
0.58461565
3
Opens a scanner to accept user input for 8 cubes. Takes one face at a time.
public static String[][] takeStdInput() { // contains all of the faces in order of acceptance final String[] faces = new String[] { "front", "right", "back", "left", "top", "bottom" }; sc = new Scanner(System.in); // final array of colors for any given cube final String[][] inputArray = new String[Puzzle.NUM_OF_CUBES][Cube.NUM_OF_FACES]; // System.out.println(Arrays.toString(inputArray)); String[] cubeArray = new String[Cube.NUM_OF_FACES]; for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) { cubeArray = new String[Cube.NUM_OF_FACES]; System.out.println("Enter cube #" + (i + 1)); for (int j = 0; j < Cube.NUM_OF_FACES; j++) { System.out.print("Enter " + faces[j] + " face: "); cubeArray[j] = sc.nextLine(); // if input is not a proper color of misspelled, prompt again and overwrite // array entry while (!isValidString(cubeArray[j]) || containsElement(cubeArray[j], cubeArray, j)) { System.out.println("Invalid input, try again."); System.out.print("Enter " + faces[j] + " face: "); cubeArray[j] = sc.nextLine(); } inputArray[i] = cubeArray; } } return inputArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n \n Scanner myScanner;\n myScanner = new Scanner( System.in);\n System.out.print(\n \"Enter the number you would like cubed : \");\n \n //Accept user input\n \n double x = myScanner.nextDou...
[ "0.55051327", "0.5443188", "0.5383737", "0.5382062", "0.53778094", "0.52991694", "0.52833587", "0.52564585", "0.52198833", "0.5127532", "0.51260984", "0.5114973", "0.5110407", "0.5096203", "0.50833213", "0.5029808", "0.5029483", "0.5029483", "0.50232244", "0.50128704", "0.501...
0.5688804
0
Takes an input string and converts it to a Cube object
public static Cube convertInputArrayToCube(final String[] inputArr) { final Color[] faces = new Color[Cube.NUM_OF_FACES]; for (int i = 0; i < Cube.NUM_OF_FACES; i++) { switch (inputArr[i].toLowerCase()) { case "red": case "r": faces[i] = Color.RED; break; case "orange": case "o": faces[i] = Color.ORANGE; break; case "green": case "g": faces[i] = Color.GREEN; break; case "blue": case "b": faces[i] = Color.BLUE; break; case "purple": case "p": faces[i] = Color.PURPLE; break; case "white": case "w": faces[i] = Color.WHITE; break; } } return new Cube(faces[0], faces[1], faces[2], faces[3], faces[4], faces[5]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNewCube() {\n CUBE = new Cube();\n }", "public RubiksCube(String[] c){\n\t\tif(c.length == 54){\n\t\t\tString[] tab = new String[c.length];\n\t\t\tfor(int i=0; i<c.length;i++){\n\t\t\t\ttab[i] = c[i];\n\t\t\t}\n\t\t\tthis.cube = tab;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wrong...
[ "0.616775", "0.607199", "0.6008258", "0.58726525", "0.57133037", "0.56613916", "0.55549145", "0.5485664", "0.5445735", "0.53350806", "0.5309114", "0.52599645", "0.5186611", "0.5156458", "0.515106", "0.5134062", "0.5126863", "0.5103792", "0.50756055", "0.5043242", "0.50102264"...
0.6736341
0
Takes an array of string inputs, converts to cubes, converts to puzzle
public static Puzzle convertInputArrayToPuzzle(final String[][] inputArray) { final Cube[] cubes = new Cube[Puzzle.NUM_OF_CUBES]; for (int i = 0; i < Puzzle.NUM_OF_CUBES; i++) { cubes[i] = convertInputArrayToCube(inputArray[i]); } final Puzzle puzzle = new Puzzle(cubes[0], cubes[1], cubes[2], cubes[3], cubes[4], cubes[5], cubes[6], cubes[7]); return puzzle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Puzzle inputToPuzzle() {\n Puzzle puzzle = new Puzzle();\n\n printInitialPromptMessage();\n final String choice = chooseCubeInputType();\n if (choice.equals(\"r\")) { // random set of cubes\n printRandomPromptMessage();\n puzzle = RandomController.get...
[ "0.6437203", "0.5950661", "0.5807018", "0.5744243", "0.5558848", "0.54612005", "0.5420272", "0.53953975", "0.53482074", "0.5287026", "0.52760583", "0.51873827", "0.5146559", "0.51299167", "0.51206475", "0.5087676", "0.5087235", "0.5086827", "0.50793135", "0.50732887", "0.5052...
0.6898878
0
NOt the right solution some test cases failing
public static int longestCommonSubsequence(String text1, String text2) { Map<Character, List<Integer>> characterListMap = new HashMap<>(); char[] cA = text1.toCharArray(); for (int i = 0; i < cA.length; i++) { if (characterListMap.get(cA[i]) == null) { List<Integer> list = new ArrayList<>(); list.add(i); characterListMap.put(cA[i], list); } else { characterListMap.get(cA[i]).add(i); } } char[] cA2 = text2.toCharArray(); int i = 0; int prevBiggest = 0; int previndex = 0; int currBiggest = 0; while (i < cA2.length && characterListMap.get(cA2[i]) == null) { i++; } if (i < cA2.length && characterListMap.get(cA2[i]) != null) { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); i++; currBiggest++; } for (; i < cA2.length; i++) { if (characterListMap.containsKey(cA2[i])) { if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); currBiggest++; } else { previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1); if (currBiggest > prevBiggest) { prevBiggest = currBiggest; } currBiggest = 1; } } } return prevBiggest > currBiggest ? prevBiggest : currBiggest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid test() {\n\t\tassertEquals(0, solution1.solution(2147483647));\n\t\tassertEquals(1, solution1.solution(5));\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor q...
[ "0.67945635", "0.6673548", "0.6526053", "0.64741653", "0.63364255", "0.62869585", "0.6269661", "0.62342775", "0.6175088", "0.6169179", "0.6168685", "0.612659", "0.6101755", "0.6091324", "0.6085694", "0.6051291", "0.6034423", "0.60330963", "0.6028233", "0.60071576", "0.5990511...
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_student_fee, container, false); ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle("Student Fee"); rollSearchField = view.findViewById(R.id.rollSearchField); rollSearchBtn = view.findViewById(R.id.rollSearchBtn); Retrofit retrofit = new Retrofit.Builder() .baseUrl(getString(R.string.base_url_api)) .addConverterFactory(GsonConverterFactory.create()) .build(); service = retrofit.create(ApiRequest.class); rollSearchBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String roll = rollSearchField.getText().toString(); Call<StudentRollSearchResult> rollSearchResultCall = service.GetSearchRollResults(roll); rollSearchResultCall.enqueue(new Callback<StudentRollSearchResult>() { @Override public void onResponse(Call<StudentRollSearchResult> call, Response<StudentRollSearchResult> response) { if (response.isSuccessful()) { StudentRollSearchResult result = response.body(); StudentFeesAddFragment fragment = new StudentFeesAddFragment(); Bundle bundle = new Bundle(); bundle.putString("S_FNAME",result.getFname()); bundle.putString("S_LNAME",result.getLname()); bundle.putString("S_UID",result.getU_id()); bundle.putString("S_CLASS",result.getClassName()); fragment.setArguments(bundle); getFragmentManager() .beginTransaction() .replace(R.id.studentFeeMainFrame,fragment) .addToBackStack("Student_fee") .commit(); }else { Snackbar snackbar = Snackbar .make(getView(), "No student found !!", Snackbar.LENGTH_INDEFINITE); snackbar.setAction("Retry", new View.OnClickListener() { @Override public void onClick(View view) { rollSearchField.setText(""); } }); snackbar.setActionTextColor(Color.RED); snackbar.show(); } } @Override public void onFailure(Call<StudentRollSearchResult> call, Throwable t) { } }); } }); 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
Creates a new Table8.
Table8 create(Table8 table8);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TABLE createTABLE();", "Table createTable();", "FromTable createFromTable();", "public TableCreation(Table table) {\n this.table = table;\n }", "TableFull createTableFull();", "BTable createBTable();", "private void createTable() {\n table = new Table();\n table.bottom();\n ...
[ "0.683682", "0.66395456", "0.6475652", "0.64386827", "0.6387729", "0.63645387", "0.63582826", "0.6336693", "0.62032616", "0.6184819", "0.6079842", "0.60691", "0.60675025", "0.6047346", "0.6030971", "0.6028016", "0.59581476", "0.5932889", "0.5900512", "0.58935755", "0.58670545...
0.8774972
0
Finds Table8 by id.
Table8 getById(Integer table8Id) throws EntityNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object queryByID(Class<?> tableClass, Serializable id) throws Exception;", "public TapTable findOneTable(String tableName);", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttr...
[ "0.61294144", "0.60605705", "0.6005523", "0.5966283", "0.5905796", "0.58877265", "0.5845535", "0.58236706", "0.57858914", "0.57741463", "0.5763779", "0.57619715", "0.57332104", "0.5701489", "0.5681761", "0.56358284", "0.5618078", "0.56174463", "0.5604429", "0.55789036", "0.55...
0.74842954
0
Updates the information of a Table8.
Table8 update(Table8 table8) throws EntityNotFoundException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public static void updateTable()\r\n\t{\r\n\t\tfor (int i = 0; i < DataHandler.ge...
[ "0.7094524", "0.6517606", "0.6305054", "0.6152439", "0.60869193", "0.5961152", "0.5913072", "0.5910996", "0.5910083", "0.58156437", "0.58147943", "0.5749335", "0.571802", "0.57154965", "0.56980705", "0.5682249", "0.56025875", "0.55886513", "0.55508333", "0.5548806", "0.552907...
0.68956494
1
Retrieve the count of the Table8s in the repository with matching query.
long count(String query);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int findAllCount() ;", "int getCountAllRowsForTable(String tableName) throws DaoException;", "@Override\n public final long countAll(final DataTablePredicate predicate) {\n\treturn (long) getEntityManager()\n\t\t.createQuery(\"select count(*) from \"\n\t\t\t+ searchQuery)\n\t\t.setParameter(\"search\", pred...
[ "0.649454", "0.63484895", "0.63076437", "0.63055336", "0.6141365", "0.6045986", "0.5992725", "0.5953593", "0.59446704", "0.59323347", "0.58890396", "0.5882733", "0.58699197", "0.5847484", "0.58276355", "0.5801231", "0.57998556", "0.5779768", "0.5777862", "0.5777792", "0.57573...
0.60190403
7
Creates an instance of DistributionPolicyInternal class.
public DistributionPolicyInternal() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected PolicyModelGenerator() {\n // nothing to initialize\n }", "public PolicyIDImpl() {\n super();\n }", "public SubscriptionPolicies() {\n }", "public ApplicationDeltaHealthPolicy() {\n }", "public CustomerPolicyProperties() {\n }", "Policy _get_policy(int policy_type);...
[ "0.63691205", "0.61218", "0.6042891", "0.5994744", "0.5946503", "0.59229535", "0.58870167", "0.5802249", "0.57846934", "0.57824117", "0.5724974", "0.56969976", "0.56920767", "0.56137955", "0.5594282", "0.5494593", "0.5483833", "0.54561406", "0.54234874", "0.5395504", "0.53269...
0.8815513
0
Get the id property: The unique identifier of the policy.
public String getId() { return this.id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.pr...
[ "0.7271499", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.72667944", "0.6983832", "0.69068503", "0.68691343", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.6853351", "0.68461084", "0.680...
0.0
-1
Get the name property: The human readable name of the policy.
public String getName() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public String getName() {\n return getProperty(Property.NAME);\n }", "public String name() {\n return getString(FhirPropertyNames.PR...
[ "0.7881676", "0.748233", "0.7303265", "0.7152835", "0.714455", "0.71350145", "0.7126133", "0.7114432", "0.7099132", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0.7077563", "0...
0.0
-1
Set the name property: The human readable name of the policy.
public DistributionPolicyInternal setName(String name) { this.name = name; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(final java.lang.String name) {\r\n this._name = name;\r\n }", "public void setName(final java.lang.String name) {\n this.name = name;\n }", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis...
[ "0.74157476", "0.73988545", "0.7342969", "0.7342969", "0.7339894", "0.7339894", "0.7339894", "0.7339894", "0.7329436", "0.7312873", "0.7307293", "0.7307293", "0.7305418", "0.7303779", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958434", "0.72958...
0.7508567
0
Get the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy will be expired.
public Double getOfferExpiresAfterSeconds() { return this.offerExpiresAfterSeconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DistributionPolicyInternal setOfferExpiresAfterSeconds(Double offerExpiresAfterSeconds) {\n this.offerExpiresAfterSeconds = offerExpiresAfterSeconds;\n return this;\n }", "public final int getExpiresAfter() {\n return 0;\n }", "public int getExpiryTimeSecs() {\...
[ "0.80030423", "0.6980059", "0.66788596", "0.6672696", "0.64136356", "0.6271946", "0.62047327", "0.6120801", "0.60864776", "0.6057501", "0.59772843", "0.59178764", "0.59139824", "0.5810313", "0.57698494", "0.5765354", "0.57623786", "0.56798685", "0.5677895", "0.5664167", "0.56...
0.86167234
0
Set the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy will be expired.
public DistributionPolicyInternal setOfferExpiresAfterSeconds(Double offerExpiresAfterSeconds) { this.offerExpiresAfterSeconds = offerExpiresAfterSeconds; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double getOfferExpiresAfterSeconds() {\n return this.offerExpiresAfterSeconds;\n }", "public static void setExpiresSeconds(@NotNull HttpServletResponse response, int seconds) {\n Date expiresDate = DateUtils.addSeconds(new Date(), seconds);\n setExpires(response, expiresDate);\n }", "pu...
[ "0.71713877", "0.6351325", "0.60674906", "0.605106", "0.5864672", "0.55565274", "0.5414968", "0.52419186", "0.52225435", "0.52208096", "0.5213387", "0.51931673", "0.5129307", "0.50833464", "0.50634843", "0.5062021", "0.5041978", "0.50303346", "0.5022525", "0.5004959", "0.4995...
0.86710566
0
Get the mode property: Abstract base class for defining a distribution mode.
public DistributionModeInternal getMode() { return this.mode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMode()\n {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode(){\r\n\t\treturn mode;\r\n\t}", "public Mode getMode() {\n return mode;\n }", "public String getMode()...
[ "0.7595175", "0.75647604", "0.75647604", "0.75136864", "0.7501487", "0.7501039", "0.74936277", "0.74892676", "0.7480695", "0.74664044", "0.7418013", "0.7387329", "0.7376182", "0.7374875", "0.7340262", "0.73112744", "0.7243981", "0.70332074", "0.702427", "0.7010288", "0.696555...
0.83810943
0
Set the mode property: Abstract base class for defining a distribution mode.
public DistributionPolicyInternal setMode(DistributionModeInternal mode) { this.mode = mode; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMode(int mode) {\n this.mode = mode;\n }", "public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "public void setMode(int mode){\n mMode = mode;\n }", "@Override\n\tpublic void setMode(int mode) {\n\t\t\n\t}", "public void setMode(short mode)\n\t{\n\t\tthis.m...
[ "0.78229845", "0.77716047", "0.7675266", "0.7619684", "0.7565374", "0.7515391", "0.74153435", "0.7221212", "0.72163886", "0.72079015", "0.7203864", "0.71203387", "0.70548046", "0.70445883", "0.70350224", "0.6986426", "0.6965611", "0.6954364", "0.6944954", "0.69162375", "0.688...
0.7703142
2
Created by retor on 30.12.2014.
public interface MapWorkerInterface<T> { public void setupMap(SupportMapFragment fragment) throws NullPointerException; public boolean isNull(T map); public void drawMarkers(ArrayList<Bus> array); public void clearMap(); public void setupLocation(); public T getMap(); public void whatNearMe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\...
[ "0.60386944", "0.6031633", "0.5940195", "0.5878383", "0.58678967", "0.5857232", "0.5827458", "0.5797465", "0.5797465", "0.5761244", "0.57482797", "0.57318544", "0.5720876", "0.57181835", "0.57175297", "0.5692818", "0.5664328", "0.5661262", "0.5661262", "0.5661262", "0.5661262...
0.0
-1
Abstract interface for the results provided by a web search. Each result exposes a set of readonly properties. While title and summary are retrieved upon result creation, both content and links are fetched from the original document when accessing either one for the first time. The URL might be malformed.
public interface SearchResult { /** * Gets the rank of the result fetched. * * @return The rank of the result (starting with 1). */ public int getRank(); /** * Gets the title of the result fetched. * * @return The title of result. */ public String getTitle(); /** * Gets the URL that can be used for accessing the document. The URL is specifically required * when fetching the content. * * @return The URL of the result. * @throws SearchResultException The URL might be malformed. */ public URL getURL() throws SearchResultException; /** * Get a short summary of the document. This summary is usually provided by the SearchEngine * and should therefore not resolve in an exception. * * @return The summary of the result. */ public String getSummary(); /** * Retrieves the HTML content of a result. For this, a HTTP connection has to be created that * can result in connection exceptions. These exceptions are packed in abstract * "SearchResultException". The content will be plain text. * * @return The content document related to a result * @throws SearchResultException The retrieval of the document might fail. */ public String getContent() throws SearchResultException; /** * Retrieves all links of a result document. For this the content document is searched for all * links and forms. Their URLs are extracted, cleaned, and returned as a list. * * @return List of URLs of documents linked to by this document * @throws SearchResultException The document might not be available and retrieval might fail. */ public Set<String> getLinks() throws SearchResultException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms ...
[ "0.69843453", "0.6687512", "0.6659099", "0.61619014", "0.5975745", "0.596704", "0.5870744", "0.56823367", "0.56754583", "0.5657077", "0.56095403", "0.55635494", "0.552764", "0.55049795", "0.5461939", "0.5451745", "0.54315513", "0.5425314", "0.53931487", "0.53908116", "0.53876...
0.7444063
0
Gets the rank of the result fetched.
public int getRank();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getRank() {\n validify();\n return Client.INSTANCE.pieceGetRank(ptr);\n }", "long getRank();", "public int returnRank() {\n return this.data.returnRank();\n }", "public Integer getRank() {\n return this.rank;\n }", "public int getRank() {\r\n return ra...
[ "0.76271176", "0.75852746", "0.734971", "0.72456676", "0.724171", "0.7220911", "0.7212788", "0.7212788", "0.7212788", "0.71975625", "0.71965885", "0.7186311", "0.7183714", "0.7172875", "0.7156587", "0.71551615", "0.7147422", "0.7136991", "0.7134674", "0.7129345", "0.7125088",...
0.73008615
4
Gets the title of the result fetched.
public String getTitle();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "public java.lang.String getTitle();", "public java.lang.Object getTitle() {\n return title;\n }", "public java.lang.String getTitle...
[ "0.73328644", "0.73328644", "0.73328644", "0.73328644", "0.73328644", "0.7318567", "0.72408104", "0.7215073", "0.7185705", "0.7154384", "0.7143318", "0.7143318", "0.7143318", "0.7141245", "0.7129673", "0.70858157", "0.70853513", "0.7078589", "0.7072322", "0.7072322", "0.70723...
0.0
-1
Gets the URL that can be used for accessing the document. The URL is specifically required when fetching the content.
public URL getURL() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCompanyDocumentUrl() {\n\t\tString address = getProperties().getProperty(\"company.document.url\").trim();\n\t\treturn address;\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public String getURL()\n {\n return...
[ "0.73479223", "0.7328027", "0.7172091", "0.7169862", "0.71613365", "0.71142066", "0.7109426", "0.70576495", "0.70431274", "0.70183563", "0.70174485", "0.7016505", "0.70122623", "0.7008989", "0.70082486", "0.7000495", "0.69861794", "0.6923082", "0.68965334", "0.68519855", "0.6...
0.0
-1
Get a short summary of the document. This summary is usually provided by the SearchEngine and should therefore not resolve in an exception.
public String getSummary();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSummary();", "public java.lang.String getSummary(){\r\n return this.summary;\r\n }", "public String getSummary() {\r\n return summary;\r\n }", "public String getSummary() {\n return summary;\n }", "public String getSummary(org.jsoup.nodes.Document doc) {\r\...
[ "0.73094237", "0.69979596", "0.6965467", "0.6964907", "0.688864", "0.683872", "0.6825809", "0.6825809", "0.6788575", "0.6687015", "0.6633481", "0.6526694", "0.6474787", "0.64557564", "0.64269584", "0.6388454", "0.6372097", "0.6367812", "0.6325679", "0.6320674", "0.62295914", ...
0.71535534
1
Retrieves the HTML content of a result. For this, a HTTP connection has to be created that can result in connection exceptions. These exceptions are packed in abstract "SearchResultException". The content will be plain text.
public String getContent() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = new File(urlString).toURI().toURL();\n\t\t// create BufferedReader to buffer the given url's HTML so...
[ "0.5833355", "0.57878417", "0.5726819", "0.55695534", "0.550735", "0.54717994", "0.5390633", "0.5260628", "0.52547395", "0.5214685", "0.5160012", "0.5144414", "0.51191944", "0.51077956", "0.51075244", "0.5104539", "0.50978875", "0.507911", "0.50658613", "0.5063529", "0.501835...
0.69985205
0
Retrieves all links of a result document. For this the content document is searched for all links and forms. Their URLs are extracted, cleaned, and returned as a list.
public Set<String> getLinks() throws SearchResultException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> extract(Document document) {\n Elements links = document.select(\"a[href]\");\n Elements media = document.select(\"[src]\");\n Elements imports = document.select(\"link[href]\");\n\n List<String> allLinks = new ArrayList<>();\n populateLinks(allLinks, m...
[ "0.66935825", "0.6438617", "0.6364327", "0.6344232", "0.6260262", "0.6183196", "0.61403203", "0.60765153", "0.60674286", "0.59886855", "0.5974194", "0.59668213", "0.590417", "0.5898591", "0.58302724", "0.5803553", "0.57600665", "0.5759026", "0.56984115", "0.56900144", "0.5682...
0.68567795
0
Toast.makeText(MainActivity.this, "You're a budgeting star!", Toast.LENGTH_SHORT).show();
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.d(LOG_TAG, "setOnItemClickListener: position: " + position); switch(position){ case 0: Intent intent = new Intent(MainActivity.this, PieChartActivity.class); startActivity(intent); break; default: break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "public void yell(String message){\n Toast.makeText(getApplicationContext()...
[ "0.7473658", "0.727255", "0.7256138", "0.7235503", "0.72050524", "0.71986926", "0.71501714", "0.71278936", "0.7055224", "0.7023866", "0.70144767", "0.701444", "0.701444", "0.6944876", "0.6934061", "0.6933886", "0.69272786", "0.69134104", "0.69134104", "0.69085467", "0.6902131...
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.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.7249256", "0.72037125", "0.7197713", "0.7180111", "0.71107703", "0.70437056", "0.70412415", "0.7014533", "0.7011124", "0.6983377", "0.69496083", "0.69436663", "0.69371194", "0.69207716", "0.69207716", "0.6893342", "0.6886841", "0.6879545", "0.6877086", "0.68662405", "0.686...
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(); Log.d(LOG_TAG, "nav item id: " + id); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } // Activate the navigation drawer toggle if (mDrawerToggle.onOptionsItemSelected(item)) { 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.79039484", "0.78061193", "0.7765948", "0.772676", "0.76312095", "0.76217103", "0.75842994", "0.7530533", "0.748778", "0.7458179", "0.7458179", "0.7438179", "0.74213266", "0.7402824", "0.7391232", "0.73864055", "0.7378979", "0.73700106", "0.7362941", "0.73555434", "0.734530...
0.0
-1
Intent to go to form activity
public void onClickAdd(View v) { Intent intent = new Intent(this, ItemFormActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent= new Intent(MenuDemoActivity.this,FormActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\r\n\t\t\t}", "public void ShowNewTaskForm(View view)\n // //onClick ButtonNewTask...
[ "0.722217", "0.7130719", "0.7072999", "0.69961125", "0.6925536", "0.6831818", "0.6796979", "0.679104", "0.6786437", "0.674416", "0.6726762", "0.6716351", "0.66955626", "0.66638076", "0.6648729", "0.6635348", "0.6589445", "0.6589343", "0.65816396", "0.6558563", "0.6544691", ...
0.0
-1
Remove from list and memory
public void removeElement(int pos){ itemList.remove(pos); SharedPreferences sp = getSharedPreferences(MYPREFS, 0); SharedPreferences.Editor editor = sp.edit(); // Get strings from memory and parse String[] nameWords = sp.getString("name", null).split(","); String[] costWords = sp.getString("cost", null).split(","); String[] statusWords = sp.getString("status", null).split(","); String[] categWords = sp.getString("category", null).split(","); if(nameWords!=null && nameWords.length>0) { // Update budget (increase) int budget = sp.getInt("budget", 0); int budgetNew = budget + Integer.parseInt(costWords[pos]); animateCtr(budget, budgetNew, (TextView)findViewById(R.id.budgetCurrent)); // if(budget < 0){ } Log.d(LOG_TAG, "new budget: " + budgetNew); // Remove chosen item at index pos from array, then reconstruct new string String[] nameNew = ArrayUtils.remove(nameWords, pos); String[] costNew = ArrayUtils.remove(costWords, pos); String[] statusNew = ArrayUtils.remove(statusWords, pos); String[] categNew = ArrayUtils.remove(categWords, pos); Log.d(LOG_TAG, "new arrays: " + Arrays.toString(nameNew) + "\n" + Arrays.toString(costNew) + "\n" + Arrays.toString(statusNew) + "\n" + Arrays.toString(categNew)); StringBuilder bName = new StringBuilder(); StringBuilder bCost = new StringBuilder(); StringBuilder bStatus = new StringBuilder(); StringBuilder bCateg = new StringBuilder(); for (int i = 0; i < nameNew.length; i++) { bName = bName.append(nameNew[i]).append(","); bCost = bCost.append(costNew[i]).append(","); bStatus = bStatus.append(statusNew[i]).append(","); bCateg = bCateg.append(categNew[i]).append(","); } Log.d(LOG_TAG, "stringbuilder test:" + bName.toString() + " " + bCost.toString() + " " + bStatus.toString() + " " + bCateg.toString()); // Update to memory editor.clear(); editor.putString("name", bName.toString()); editor.putString("cost", bCost.toString()); editor.putString("status", bStatus.toString()); editor.putString("category", bCateg.toString()); editor.putInt("old_budget", budget); editor.putInt("budget", budgetNew); editor.commit(); } //decrementCounter(pos); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "Object remove();", "void remove();", "void remove();", "void remove();", "void remove();", ...
[ "0.763817", "0.73589957", "0.73589957", "0.73589957", "0.73589957", "0.73589957", "0.7350816", "0.73421293", "0.73421293", "0.73421293", "0.73421293", "0.73421293", "0.72674805", "0.72509617", "0.6917807", "0.6917807", "0.6917807", "0.6898356", "0.6896402", "0.6878811", "0.68...
0.0
-1
Created by Atom on 2015/8/26.
public interface UserInfoMapper { /** * 添加用户信息 * @param user 用户信息 * @return 返回影响行数 */ public int addUser(UserInfo user); /** * 获得所有用户信息 * @return 返回用户信息列表 */ public List<UserInfo> getAllUserInfo(); /** * 根据用户ID,获得用户信息 * @param userId 用户ID * @return 返回用户信息 */ public UserInfo getByUserId(Integer userId); public List<UserInfo> queryByUserAttr(UserInfo user); /** * 根据用户ID,删除用户信息 * @param userId 用户ID * @return 返回影响行数 */ public int delUser(Integer userId); /** * 更新用户信息 * @param user 更新内容 * @return 返回影响行数 */ public int updateUser(UserInfo user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.6119467", "0.60991603", "0.60301834", "0.59591293", "0.58935535", "0.58076763", "0.58076763", "0.58070344", "0.58031535", "0.57813334", "0.5753361", "0.574683", "0.5715168", "0.57124907", "0.56953275", "0.56953275", "0.56953275", "0.56953275", "0.56953275", "0.5689567", "0...
0.0
-1
Get the updated snapshot of the model
public ModelSnapshot getModel() { return model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Model getProjectSnapshot()\n\t{\n\t\treturn project.getProjectSnapshot();\n\t}", "SnapshotInner innerModel();", "Snapshot.Update update();", "Snapshot refresh();", "public Snapshot getLatestSnapshot() {\r\n return isSnapshot? null: snapshot;\r\n }", "@NonNull\n public ResultT getSnapshot(...
[ "0.72120357", "0.67437583", "0.6729368", "0.6628411", "0.66210485", "0.63490915", "0.60912466", "0.5905949", "0.58815837", "0.58177984", "0.5766412", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", "0.57434475", ...
0.70143557
1
This is the default constructor
public SelectSheetLayerPrintPanel() { super(); initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "defaultConstructor(){}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Orbiter() {\n }", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "p...
[ "0.85315686", "0.8274922", "0.75848484", "0.74773645", "0.7456932", "0.7447545", "0.7443651", "0.7441528", "0.7410326", "0.74039483", "0.7391621", "0.7377517", "0.73672515", "0.7351425", "0.73242426", "0.7324195", "0.73132765", "0.73016304", "0.7279156", "0.7262864", "0.72578...
0.0
-1
This method initializes this
private void initialize() { jLabel = new JLabel(); super.setName(aplicacion.getI18nString("SelectSheetLayerPrintPanel.Name")); java.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); this.setLayout(new GridBagLayout()); this.setSize(365, 274); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 0; gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints1.insets = new java.awt.Insets(0,34,0,0); gridBagConstraints2.gridwidth = 2; gridBagConstraints2.insets = new java.awt.Insets(0,0,0,40); this.add(jLabel, gridBagConstraints1); this.add(getJComboBox(), gridBagConstraints2); jLabel.setText(aplicacion.getI18nString("cbSheetLayer")+": "); gridBagConstraints2.gridx = 1; gridBagConstraints2.gridy = 0; gridBagConstraints2.weightx = 1.0; gridBagConstraints2.fill = java.awt.GridBagConstraints.HORIZONTAL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void init()\n\t\t{\n\t\t}", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void init() {\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected void initialize() {\n \t\n }", "@Override\r\n\tpub...
[ "0.83539504", "0.8307917", "0.8282791", "0.825615", "0.8200049", "0.8198305", "0.8149035", "0.8121817", "0.8104103", "0.81024307", "0.81024307", "0.81024307", "0.80645996", "0.8053697", "0.8036853", "0.80288565", "0.801887", "0.7991998", "0.7991998", "0.79863125", "0.79849255...
0.0
-1
This method initializes jComboBox
private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.addActionListener( new ActionListener(){ public void actionPerformed(java.awt.event.ActionEvent arg0) { Layer selected=(Layer)jComboBox.getSelectedItem(); if (selected!=null) { jLabel.setText(aplicacion.getI18nString("SelectSheetLayerPrintPanel.Generar")+" " +selected.getFeatureCollectionWrapper().size()+" "+aplicacion.getI18nString("SelectSheetLayerPrintPanel.Hojas")); } }}); } return jComboBox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "public void initialize() {\n fillCombobox();\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n ...
[ "0.8285389", "0.8276003", "0.81677395", "0.80511504", "0.79940766", "0.7863848", "0.77549857", "0.7671729", "0.7493763", "0.74187714", "0.7388828", "0.73492336", "0.73348415", "0.7289962", "0.7278249", "0.71716195", "0.71514654", "0.7146467", "0.7081788", "0.7081153", "0.7068...
0.0
-1
Linked List Constructor; done for you
public LinkedList() { this.head = null; this.tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public LinkedLists() {\n }", "public MyLinkedList() \n\t{\n\t\t\n\t}", "public MySinglyLinkedList() { }", "public MyLinkedList()\n {\n head = new Node(null, null, tail);\n tail = new Node(null, head, null);\n }", "public Li...
[ "0.81333965", "0.79533184", "0.7943607", "0.78014743", "0.77623665", "0.7725752", "0.7724612", "0.76936316", "0.7663708", "0.76490325", "0.762956", "0.7613618", "0.75954556", "0.7504373", "0.74998736", "0.7496551", "0.74932706", "0.7483972", "0.7483655", "0.74606", "0.7445159...
0.7172579
56
Adds the String to the front of the linked list.
public void addAtFront(String str) { newNode = new Node(str); next = newNode.getNext(); head = newNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pushFront(String value)\n {\n\tStringListNode node = new StringListNode(value);\n\tnode.next = head;\n\tif (null == head) {\t// the list was empty\n\t tail = node;\n\t}\n\telse {\n\t head.prev = node;\n\t}\n\thead = node;\n }", "private void addFront(String x)\n {\n head = new N...
[ "0.7769937", "0.74076176", "0.6784414", "0.6750231", "0.6658527", "0.66033924", "0.65776736", "0.6573853", "0.6556703", "0.65424347", "0.65214413", "0.6512984", "0.6505978", "0.6466021", "0.646085", "0.6428147", "0.6426474", "0.6406809", "0.63845354", "0.63611436", "0.6323537...
0.79428595
0
Adds the String to the end of the linked list.
public void addAtEnd(String str) { newNode = new Node(str); newNode = tail; tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addLast(String data){\n tail = new Node(data, null, tail);\n Node second = tail.prev;\n if(second!=null)\n second.next = tail;\n else\n head = tail;\n size++;\n }", "public void addToEnd(String value) {\n ListElement current = new Lis...
[ "0.7220628", "0.7189761", "0.7158736", "0.70235074", "0.6844065", "0.67456955", "0.66269165", "0.65441513", "0.6537735", "0.65241873", "0.65193665", "0.6487507", "0.63852984", "0.6354193", "0.6353552", "0.6353552", "0.6317358", "0.6311952", "0.63026404", "0.6240542", "0.62403...
0.76135695
0
Removes the first occurrence of the given string.
public void remove(String str) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove(String str);", "public String removeFirst() {\n\t\treturn removeAt(0);\n\t}", "@Override\n\tpublic void remove(String string) {\n\t\t\n\t}", "public static String remove(String str) {\r\n\t\t//todo\r\n\t\t\r\n\t\treturn str.substring(1,str.length()-1);\r\n\t}", "public void remove(String...
[ "0.69133186", "0.6765094", "0.6654256", "0.6642524", "0.66421634", "0.6538942", "0.6380492", "0.6328488", "0.6314184", "0.6304687", "0.6071102", "0.60691726", "0.60413045", "0.6016312", "0.6003071", "0.5971258", "0.5952691", "0.59458613", "0.592014", "0.58644927", "0.5861943"...
0.64619434
6
Retrieves, but does not remove, the head of this Linked List, or returns null if this Linked List is empty.
public String head() { if (isEmpty() == false) { return head.getData(); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n ...
[ "0.7812845", "0.7779323", "0.77451634", "0.7741718", "0.77295417", "0.76990265", "0.75954336", "0.7575094", "0.75496316", "0.75454867", "0.748388", "0.74626887", "0.7456004", "0.7456004", "0.74210525", "0.73544127", "0.73318136", "0.73193014", "0.72840977", "0.7274688", "0.71...
0.7545191
10
Retrieves, but does not remove, the tail of this Linked List, or returns null if this Linked List is empty.
public String tail() { if (isEmpty() == false) { return head.getData(); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DoublyLinkedListNode<T> getTail() {\n // DO NOT MODIFY!\n return tail;\n }", "public LinkedNode tail() {\n return tail;\n }", "public synchronized ListNode getTail() {\n\t\treturn tail;\n\t}", "Node removeLast() {\n\t\tif (isEmpty()) return null;\n\t\t\n\t\t// Is there a bet...
[ "0.7855269", "0.77741736", "0.765011", "0.76108104", "0.7602764", "0.7473138", "0.74700433", "0.74510205", "0.74510205", "0.74503905", "0.74074274", "0.74070394", "0.73696536", "0.7368949", "0.73568267", "0.731995", "0.72988486", "0.7261896", "0.72370327", "0.7236583", "0.717...
0.7756766
2
Returns the number of Strings in the Linked List.
public int size() { if (head == null) { return 0; } else { int size = 0; while (head.getNext() != null) { head = head.getNext(); size++; } return size; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize()\n\t{\n\t\t// returns n, the number of strings in the list: O(n).\n\t\tint count = 0;\n \t\tnode p = head; \n\t\twhile (p != null)\n \t\t{\n \t\tcount ++;\n \t\tp = p.next;\n \t\t}\n \t\treturn count;\n\t}", "public int len() {\n\t\tint i = 0;\n\...
[ "0.8459494", "0.79125255", "0.7575937", "0.74219346", "0.73505473", "0.72785884", "0.72497344", "0.7241363", "0.7201836", "0.71962106", "0.71903324", "0.7180206", "0.7167153", "0.7162204", "0.71449476", "0.71444017", "0.7129059", "0.700855", "0.70078", "0.699259", "0.6990248"...
0.66889435
49
Tests if this Linked List is empty.
public boolean isEmpty() { if (head == null && tail == null) { System.out.println("This list is empty"); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEmpty(){\n\t\treturn sizeOfLinkedList() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn firstNode == null; // return true if List is empty\n\t}", "public boolean isEmpty() {\n\t\tif (l.getHead() == null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isEmpty()...
[ "0.8434485", "0.8402743", "0.8381777", "0.8340763", "0.8264986", "0.8247274", "0.82348067", "0.8215994", "0.8204091", "0.8204091", "0.8203535", "0.8184972", "0.81764716", "0.81764716", "0.81764716", "0.81764716", "0.81474465", "0.81352973", "0.81349504", "0.8134667", "0.81299...
0.8126441
22
The Linked List will be empty after this call returns.
public void makeEmpty() { System.out.println("List is now empty"); head = null; tail = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public List() {\n\t\tthis.head = null; \n\t}", "public DLList() {\n head = null;\n tail = null;\n }", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "public void clearList() {\n\t\thead = n...
[ "0.7282727", "0.722934", "0.7208099", "0.7194883", "0.71841735", "0.7142583", "0.708286", "0.7028296", "0.70141137", "0.70097893", "0.69998306", "0.6966012", "0.6941022", "0.6931853", "0.69304574", "0.6911331", "0.68955564", "0.68937147", "0.6889208", "0.6888233", "0.68878055...
0.7118672
6
Creates a String that lists the nodes of the linked list. Head > A > B > C > Tail
public String toString() { if (head == null && tail == null) { return null; } else if (head.getNext() == null) { return head.getData(); } else { while (head.getNext() != null) { head = head.getNext(); System.out.println(head.getData()); } return head.getData(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n String str = head.getValue() + \"->\";\n Node holder = head.getNext();\n for (int i = 2; i < size(); i++) {\n str = str + holder.getValue() + \"->\";\n holder = holder.getNext();\n }\n str = str + tail.getValue();...
[ "0.7479141", "0.74715114", "0.7369769", "0.73284364", "0.73112285", "0.72293", "0.721401", "0.7197192", "0.7178506", "0.71568424", "0.710371", "0.7101719", "0.70737183", "0.70476294", "0.70392954", "0.7039048", "0.70304", "0.6999924", "0.6964916", "0.6954937", "0.69292206", ...
0.68227094
32
Misc Kafka client properties
private static Map<String, Object> getKafkaParams() { Map<String, Object> kafkaParams = new HashMap<>(); kafkaParams.put("bootstrap.servers", KAFKA_BROKER_LIST); kafkaParams.put("key.deserializer", StringDeserializer.class); kafkaParams.put("value.deserializer", StringDeserializer.class); kafkaParams.put("group.id", "DEFAULT_GROUP_ID"); kafkaParams.put("auto.offset.reset", "latest"); kafkaParams.put("enable.auto.commit", false); return kafkaParams; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ProducerPropsKeys {\n\n public static String KAFKA_PRODUCER_CONFIG = \"kafka.producer.config\";\n\n public static String KAFKA_MESSAGE_SCHEMA = \"kafka.message.schema\";\n\n}", "@PostConstruct\n private void init() {\n Properties props = new Properties();\n props.put(\"ora...
[ "0.647317", "0.63053274", "0.63012505", "0.62795633", "0.60965586", "0.59397477", "0.5897664", "0.58886856", "0.5884837", "0.58459073", "0.5842265", "0.5799799", "0.57763267", "0.57568854", "0.57451904", "0.5679006", "0.56752634", "0.56611", "0.56349444", "0.56177306", "0.561...
0.6518374
0
Increment count of letters the translator has been working on
public WSActionResult execute(WSContext wsContext, WSAssetTask task) { //various metadata WSUser translator = task.getTaskHistory().getLastHumanStepUser(); if(null == translator) { return new WSActionResult(WSActionResult.ERROR, "Can not determine asset's translator"); } log.info("Translator is " + translator.getFullName()); //set the translator attribute for later use, for FO only; This may be used in future enhancement; for now set all translators // String wkgroupName = task.getProject().getProjectGroup().getWorkgroup().getName(); // if(wkgroupName.startsWith("FO_")) { task.getProject().setAttribute(_mostRecentTranslatorAttr, translator.getFirstName() + " " + translator.getLastName() + " [" + translator.getUserName() + "]"); // } //obtain count attribute String attrTCount = null; try { attrTCount = Config.getTranslationsCountAttributeName(wsContext); AttributeValidator.validateAttribute(wsContext, attrTCount, ATTRIBUTE_OBJECT.USER, ATTRIBUTE_TYPE.INTEGER, translator, "0"); } catch (Exception e) { log.error(e.getLocalizedMessage()); return new WSActionResult(WSActionResult.ERROR, "Attribute " + attrTCount + " is misconfigured. " + e.getLocalizedMessage()); } int tasksTranslated; if(null == translator.getAttribute(attrTCount) || translator.getAttribute(attrTCount).length() == 0) { log.info("First time user. Set initial count of translated letters to 0"); tasksTranslated = 0; } else { tasksTranslated = WSAttributeUtils.getIntegerAttribute(this, translator, attrTCount); } if(tasksTranslated < 0) { return new WSActionResult(WSActionResult.ERROR, "Invalid number of translated letters for user " + translator.getUserName() + ": " + tasksTranslated); } translator.setAttribute(attrTCount, String.valueOf(++tasksTranslated)); return new WSActionResult(DONE, "User " + translator.getFullName() + " (" + translator.getUserName() + ") has translated " + tasksTranslated + " assets"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increment(){\n\t\twordCount += 1;\n\t}", "int getLettersCount();", "private void RecalculateCharDistribution() {\r\n\t\tMap<Character, Integer> temp = new HashMap<>();\r\n\t\tfor (String s : sameWordLength) {\r\n\t\t\tfor (int i = 0; i < s.length(); i++) {\r\n\r\n\t\t\t\tchar ch = s.charAt(i);\r\n\...
[ "0.697162", "0.6728414", "0.6674261", "0.64551663", "0.629672", "0.62330186", "0.6218747", "0.617519", "0.6140831", "0.6123992", "0.60947055", "0.6082551", "0.6078321", "0.6073166", "0.6066357", "0.60603905", "0.60595465", "0.6015088", "0.5991366", "0.597639", "0.5973664", ...
0.0
-1
Creates a new instance of Search
public Concat() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Search create(String search, SearchBuilder builder);", "public search() {\n }", "public MagicSearch createMagicSearch();", "private Search() {}", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "public SearchSettings() { }", "public Search() {\n this.timestamp...
[ "0.7994193", "0.78985566", "0.7826114", "0.77683765", "0.7609508", "0.72886056", "0.7287888", "0.7198915", "0.7125152", "0.6958173", "0.6857441", "0.68332213", "0.681801", "0.67939454", "0.6565847", "0.65158176", "0.6509529", "0.64808077", "0.64527535", "0.6366017", "0.635844...
0.0
-1
At least one parameter
@Override public boolean isValidParameterCount(int parameterCount) { return parameterCount> 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isParameterProvided();", "@Override\n\tpublic boolean isHaveParam() {\n\t\treturn param !=null;\n\t}", "boolean hasParameters();", "@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}", "public void checkParameters() {\n }", "@Override\r\n\tpublic String getFirstArg() {\n\t\...
[ "0.7287414", "0.7041593", "0.70370996", "0.6957481", "0.6687635", "0.66395694", "0.66324806", "0.66300815", "0.6625655", "0.65823215", "0.6436243", "0.6426677", "0.6334109", "0.6319348", "0.63057864", "0.62876606", "0.62323684", "0.62189126", "0.61993617", "0.61925846", "0.61...
0.6525825
10
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractRequestedElement_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRequestedElement(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\...
[ "0.5310607", "0.5306089", "0.52628917", "0.52598757", "0.5228672", "0.5226012", "0.5221519", "0.5190882", "0.5182993", "0.51598305", "0.5115175", "0.5107411", "0.5097164", "0.50773436", "0.5071172", "0.5068732", "0.50578123", "0.50355816", "0.5025367", "0.50249267", "0.501624...
0.0
-1
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractRequestedArtifact_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRequestedElement(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\...
[ "0.5310402", "0.5307975", "0.5265414", "0.5261048", "0.5227728", "0.52238125", "0.52219373", "0.51905525", "0.51829267", "0.5159131", "0.51160336", "0.51081", "0.5097817", "0.50779533", "0.5069075", "0.5068207", "0.505554", "0.50348914", "0.5024662", "0.5024629", "0.5014548",...
0.0
-1
/ ARRANGE Nothing to arrange here. / ACT & ASSERT
@Test public void extractTransferContract_null_throwIllegalArgumentException() { assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractTransferContract(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "@Override\n void invokeOperation() {\n\n AcquiredAccount from, to;\n if (fromIndex < toIndex) {\n from = acquire(fromIndex, this);\...
[ "0.53121024", "0.5306639", "0.5264639", "0.5262026", "0.522958", "0.5223873", "0.52227324", "0.5191627", "0.51833826", "0.51594484", "0.511816", "0.5108623", "0.50976366", "0.50782937", "0.50708306", "0.506787", "0.5056936", "0.5036031", "0.50245416", "0.50239813", "0.5015904...
0.0
-1