Posts

xamarin.android - Permission Denied using Xamarin.Mobile to access contact list xamarin.form -

hey day using xamarin.mobile got error on permission denied added read_contacts in androidmanifest , add permission @ runtime. how solve this? method public async task<ienumerable<mobileusercontact>> getallcontacts() { if (_contacts != null) return _contacts; var contacts = new list<mobileusercontact>(); await _book.requestpermission().continuewith(t => { if (!t.result) { log.debug("perm", "permission denied!"); return; } foreach (var contact in _book.where(c => c.emails.any())) // filtering contact's has e-mail addresses { var firstordefault = contact.emails.firstordefault(); if (firstordefault != null) { contacts.add(new mobileusercontact() { contactfirstname = contact.firstname, ...

c understanding struct pointer -

could explain line static volatile gpio_registers* const gpio[] in code below? and syntax (volatile gpio_registers*) inside block do? // gpio hardware registers // typedef struct { uint32_t mode; uint32_t type; uint32_t speed; uint32_t push_pull; uint32_t idr; uint32_t odr; uint32_t bsrr; uint32_t lock; uint32_t alt_fn1; uint32_t alt_fn2; } gpio_registers; // ports can selected using enumeration // (port) index array. // port addresses can calculated using enum since // ports @ same offset each other. // static volatile gpio_registers* const gpio[] = { (volatile gpio_registers*)(gpio_base_addr + (port_a << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_b << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_c << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_d << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_e << 10)), (volatile gpio_registers*)(gpio_base_addr + (port_f << 1...

java.util.logging.Filter does not work when set in config-Class -

i trying set java.util.logging.filter discard logs pollute standard.out. i'am starting jvm -djava.util.logging.config.file=/path/to/my/logging.properties , in properties file config = my.package.owbdelegatehanderlogdiscarder set. when debug can see logger retrieved , filter set. isloggable method never called. any ideas? package my.package; import java.util.logging.filter; import java.util.logging.logrecord; import java.util.logging.logger; public class owbdelegatehanderlogdiscarder { /* * see org.apache.webbeans.config.owblogconst.error_0012 */ private static final string owb_log_const_error_0012 = "error_0012"; private static final string logger_name = "org.apache.webbeans.decorator.delegatehandler"; public owbdelegatehanderlogdiscarder() { logger delegatehandlerlogger = logger.getlogger(delegatehandler.class.getname()); if (delegatehandlerlogger != null) { delegatehandlerlogger.setfilter(new filter() { @overri...

xcode - DynamoDB Swift Table Scan Mapping Class -

i trying simple table scan aws , dynamodb using swift. new apple programming , not sure issue is. documentation aws sdk in objective c , examples aws give swift rubbish. the best info got question here have been trying work through it. best way make amazon aws dynamodb queries using swift? there many error 1 question break multiple questions: the first part tried class item defines mapping database "item" i have written code , errors getting underneath each line in bold: class item : nsobject, awsdynamodbmodel, awsdynamodbmodeling { 'item' not conform protocol 'awsdynamodbmodeling' var artist : string = "" var songtitle : string = "" var albumtitle : string = "" var category : string = "" var pictureurl : string = "" var songurl : string = "" var ...

jquery - Add css to class with style (url) find -

im looping through divs on specific page , url thats defined theme in 'style' attribute. if find url add css specific class. getting no errors, can take took wrong turn? code: if (top.location.pathname === '/news/') { $j("div").each(function() { if ($j(this).css('background-image') === 'http://daddykate-acc.daddykate.be/wp-content/plugins/js_composer/assets/vc/vc_gitem_image.png') { $j('.vc_gitem-zone').css('display', 'none'); } }); } little ps: $j required make code work (wp theme obligation) edit: ok, used 'settimeout' function make function run after dom loaded. working fine now, thank input ! asking background-image return somthing url("http://...") , check fails here. regex or indexof : if( top.location.pathname === '/news/' ) { $j("div").each(function() { if( $j(this).css('background-image').indexof...

send a php variable as part of an html form -

i working on website didn't create , not have full access (i can create page , add html scripts not more) trying add form send data processed third-party servlet. i trying include in form client id, saw can retrieved using php function session_id() . my question is, how send information along rest of input data. my form this: <form class="form-horizontal" action = "url" method="post" target="_blank"> <fieldset> <!-- select basic --> <div class="form-group"> <label class="col-md-4 control-label" for="selectbasic">culture</label> <div class="col-md-4"> <select id="crop" name="crop" class="form-control"> <option value="1">maïs</option> <option value="2">ble</option> </select> </div> </div> <!-- select basic --> <div clas...

Windows Services on Azure Virtual Machines with Availability Sets -

i have few (around 10) windows services on existing environment. planning migrate azure following. host our database on azure sql database. install 10 windows services in azure virtual machine. please note these windows services bulk inserts azure sql databases. take 2 instances of vm (specified in #2 above) , configure them in availability set avail sla. i have 2 questions. do need install 10 services both vms? will not reduntant running windows services in both vms? so, bulk inserts duplicated azure sql databases. please let me know if thinking in right direction or there alternate methods (like worker roles) of utilizing existing windows services on azure minimum or no changes? it looks like, got answer question. when there 2 vms in given availability set, 1 , running. other vm come picture when primary vm down. thanks, prawin