Posts

android - Setting border around Button dynamically? -

is possible set border around button dynamically in android? can use statically stroke in shape not know how code. it's deprecated in newer versions of android, use setbackgrounddrawable() call change how our buttons dynamically in code: mybutton.setbackgrounddrawable(res.getdrawable(r.drawable.btn_gray)); if define drawable has border style want should update when need to. if you're using later version of api, should able call mybutton.setbackground() instead.

Table relationship design in mysql -

i little bit confuse table relationships. wish 1 clarify, , tell me going wrong. i have 3 tables, 1 stores students basic info ---{students_info},the other stores classes---{students_class} , other stores positions ---{students_positions}. students_info st_id | f_name | l_name 1 | quinoo | mickel 2 | nunoo | gyan 3 | kwanis | nnipa students_class cl_id | class | academic_year |st_id 13 | | 2013 | 2 32 | b | 2014 | 1 73 | c | 2014 | 3 students_positions pos_id | positions | ushered_year | st_id 54 | president | 2013 | 2 34 | secretary | 2014 | 3 this have done far. friend saw tables , relationships , like, best create table contain ids column values in addition table have, wat suggested students all_std | st_id | cl_id | pos_id 01 | 1 | 32 | null 02 | 2 | 13 | 54 03 | 3 | 73 | 34 thanks helping. i don't see what's...

docusignapi - Unable to convert to PDF when creating a draft envelope and attach 2 different document types in the multi-part form -

can please confirm bug or let me know did wrong? using rest api create draft envelope 2 documents of mixed formats. first document either word, powerpoint or excel spreadsheet, , second document text file. received error "system unable convert pdf" trying convert first document. i have tried making changes following no luck added header "content-type" 2 files specify fileextension attribute in document section of xml added fileextension="" in header content-disposition 2 files also have tried following changes , working reversing sequence of document. if put text document 1st , word document 2nd, envelope created successfully. took out 2nd text document , route 1st word or excel document, envelope created. any appreciated.

sql - Alternative to MySQL LOAD LOCAL INFILE REPLACE to update a table -

if have file: 1 someval1 2 someval2 ... and table in mysql ------------- |id | value | |-----------| | 1 | null | | 2 | null | ... and goal set value in right column of table value in right column of csv file wherever id's match. can use query (but don't want to) load data local infile 'file' replace table mytable fields terminated ' ' lines terminated '\n' (id, value); the reason don't want use replace because according mysql docs, deletes entire row whenever there match on primary key (in case, 'id') , reinserts row information in file. i'm assuming means @ point in future if add column table, i'd have make sure whatever file using query contained of column values every row might updated; otherwise non-targeted columns deleted. isn't there better alternative updating table using local file 1 (or maybe more?) columns in input file contain primary keys need matched? one possible approac...

javascript - add 2 values and total them in one innerHTML -

i still learning js, , stuck once again, trying add 2 drop down menu values , total them in 1 innerhtml. i trying take value2 phones/devices (item) add value new activation (item1) drop down , total them in commission innerhtml. in js, commission line cost. i have tried adding element in cost line, , did not work. tried adding item cost line. here html , js <table width="50%" border="0"> <tr> <td width="20%"><div align="center">item</div></td> <td width="20%"><div align="center">new activation</div></td> <td width="20%"><div align="center">commission</div></td> <td width="20%"><div align="center">price</div></td> <td width="20%"><div align="center">meid</div></td> <td width="20%">...

php - WAMP icon is orange - tried skype and install apache service fixes -

Image
my wamp icon randomly orange. think change i've made computer installing windows visual studio express. i've followed on solving it... including changing skype port , installing apache service fixes: wampserver 2.1 gives orange icon after install on windows 7 it gives following... have no idea microsoft-httpapi/2.0 is... more importantly why wamp isn't running on port: other things i've tried: in system32/drivers/hosts file, change ::1 localhost 127.0.0.1 localhost , set correct way: http://forum.wampserver.com/read.php?2,70321 look in wamp apache error log: nothing any other suggestions? edit: this 1 bit me - see http://www.ferolen.com/blog/microsoft-httpapi2-0-use-port-80-cannot-start-wamp-apache/ more detail. need deactivate "web deployment agent service" (msdepsvc) service. several references service here on well, here , doesn't seem useful @ when you're using non iis stack.

javascript - Issue on Resetting Custom jQuery Spinner -

i have simple custom jquery spinner @ this demo working fine me having issue on resetting value initial. can see demo , following code able set text of #targeteg .html(targets[0]); if start + or - counter again continues before setting value counting! var targets = ["target km", "1,000 km", "3,000 km", "5,000 km", "7,000 km"]; var = 0; $("#plus").on("click", function () { if (i < 4) { $("#targeteg").html(targets[++i]); } }); $("#minus").on("click", function () { if (i > 0) { $("#targeteg").html(targets[--i]); } }); $("#resetform").on("click", function () { mapreset(); function mapreset() { $("#targeteg").html(targets[0]); } }); can please let me know how fix after resetting every thing starts beginning reloading page time. thanks just set i=0 in reset function function mapreset() { = 0; ...