Posts

How to download a file after clicking a button (Android Studio) -

i created activity in app. wanted user download .pdf file when he/she wants view guidelines. wanted implement on button. idea how properly? heres code below: public class exhibitor_registration_activity extends appcompatactivity { button buttondownload; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_exhibitor_registration_); this.settitle("buyer registration"); toolbar mytoolbar = (toolbar) findviewbyid(r.id.my_toolbar); setsupportactionbar(mytoolbar); getsupportactionbar().setdisplayhomeasupenabled(true); mytoolbar.setnavigationicon(r.drawable.ic_arrow_back_white_24dp); final button buttondownload = (button) findviewbyid(r.id.buttondownload); buttondownload.setonclicklistener(new view.onclicklistener(){ @override public void onclick(view view) { try { ...

mongodb - Azure DocumentDB | Connection Strings missing on Settings -

Image
i've noticed connection strings link missing on settings section in azure portal. i following this tutorial in order use .net mongodb driver work azure documentdb. look @ image below(from tutorial) and in azure portal not show connection strings. the connection strings option appears when configure database mongodb compatibility (which must choose when creating new database: once this, you'll have connection string option: with databases have not enabled mongodb compatibility, you're correct connection info appears under keys :

using Instamojo rest api with Spring RestTemplate class -

unable make payment request on instamojo using instamojo rest api getting bad request(400), unable identify why getting 400 error. using spring resttemplate class make post request on instamojo. below display code using: resttemplate resttemplate = new resttemplate(); map<string,object> requestbody = new hashmap<string, object>(); requestbody.put("amount", "10000.00"); requestbody.put("purpose", "just_testing_purpose"); requestbody.put("buyer_name", "adityapandey"); requestbody.put("email", "robust_aditya95@xyz.com"); requestbody.put("phone", "+919634222331"); requestbody.put("redirect_url", "www.imthebest.in"); requestbody.put("webhook", ""); requestbody.put("allow_repeated_payments", false); requestbody.put("send_email", false); requestbody.put("send_sms...

python - Formatting columns when writing to csv -

i'm trying write following list of lists columns in .csv file, using python. writelist = [['met ', '===============', 'et_miss_inv', 'et_miss_lep', 'et_miss_seed', 'met_avpt_seed'], ['photon ', '===============', 'pass1phtriggers', 'nph', 'topoetcone40_1ph', 'ptvarcone20_1ph', 'pt_1ph', 'eta_1ph', 'phi_1ph', 'dphi_1ph', 'dphi_1ph1jet', 'phi_v', 'nbaselineph', 'dphimin4_lep'], ['weight ', '===============', 'j1_bweight', 'j1_bweight', 'j1_bweight', 'j2_bweight', 'j2_bweight', 'j2_bweight', 'leptonweight', 'triggerweight'], ['hlt ', '===============', 'hlt_g120_loose', 'hlt_g140_loose', 'hlt_e20_medium', 'hlt_2e17_loose', 'hlt_mu20_iloose_l1mu15', ...

Excel hide/show rows worksheet_change not working when cell value deleted -

firstly apologies i'm complete novice this. i'm helping our hr department develop training spreadsheet , wanted include code hides rows when no training needs flagged done numerical value i.e. 9 or 10. i've got functionality work when 'delete' cell value doesn't trigger change event i.e. hiding row. i'm sure simple solution not 1 i've been able conclude based on existing posts. would appreciate anyone's on this thank-you matt private sub worksheet_change(byval target range) on error goto reset_enableevents application.enableevents = false if target.address = "$o$4" if isnumeric(target.value) if target.value >= 1 , target.value <= 8 sheets("training plan").rows("5:21").entirerow.hidden = false else if target.value < 11 , target.value >= 9 sheets("training plan").rows("5:21").entirerow.hidden = true end if end if end if end if if target.address = "$o$5" if isnumeri...

sabre - IMAP_AirSeatMapService details -

we want retrieve seat availability sabre. can not use enhancedseatmaprq not activated. documentation of few services refer imap_airseatmapservice . sabre dev studio not reflect documentation service. questions have - 1. imap_airseatmapservice available use? if yes, know related resources (wsdl/xsds) 2. alternative enhancedseatmaprq seat availability during booking process? appreciate on this. enhancedseatmaprq came replacement imap service. if not have access it, should contact sabre account manager , request it.

MongoDB driver not accessible from PHP on same server -

i'm experiencing problem mongodb php driver , it's connection actual mongodb on ubuntu 14.04 server. i've installed per instructions (through pecl, added 'extension=mongodb.so' etc), , extension installed , loaded in phpinfo latest 1.2.8 version , extension_loaded('mongodb') returns true. i'm running php 5.6.30 , mongodb version on server 3.4.2 i'm trying connect port 27020 on server (found out it's listening 0.0.0.0 address instead of 127.0.0.1 mysql). after have started mongod this mongod --port 27020 --dbpath /db/path --logpath /log/path/mongo.log.log --fork --bind_ip 0.0.0.0 and changed /etc/mongod.conf 's network interfaces to # network interfaces net: port: 27017 bindip: 0.0.0.0 but still running mongo shell mongo --port 27020 gets me this connecting to: mongodb://127.0.0.1:27020/ the problem empty object after running $client = new mongodb\driver\manager("mongodb://0.0.0.0:27020/"); and, of course,...