Posts

android - Multiple Numbers under one contact -

Image
i have listview custom lazy adapter attached. pull contacts phone , display them in list. having issue dealing multiple numbers. if 1 contact has multiple numbers different types appear different contacts shown below: here code getting contact list: public lazyadapter getcontactlist(){ contentresolver cr = mcontext.getcontentresolver(); cursor cur = cr.query(contactscontract.contacts.content_uri, null, null, null, null); if (cur.getcount() > 0) { while (cur.movetonext()) { string id = cur.getstring(cur.getcolumnindex(contactscontract.contacts._id)); string name = cur.getstring(cur.getcolumnindex(contactscontract.contacts.display_name)); if (integer.parseint(cur.getstring(cur.getcolumnindex(contactscontract.contacts.has_phone_number))) > 0) { cursor pcur = cr.query(phone.content_uri,null,phone.contact_id +" = ?",new string[]{id}, null); ...

ember.js - Ember select for belongsTo doesn't update hasMany end -

i'm trying change belongsto using built in ember select view. however, when select box changes belongs attribute updated, not hasmany relationship. following jsbin shows behaviour http://jsbin.com/ewosiy/3/edit . in example person hasmany events , event belongsto person. if change event belongsto, event removed original person never added new person. i roll own select-box component wondered if ember select not updating both ends of relationship. thanks. in order make work, need use 'pushobject' in relation of 'person' object, need this: change select this: {{view ember.select contentbinding=controllers.application.model optionvaluepath=content.id optionlabelpath=content.fullname selectionbinding=selectedperson}} and in eventcontroller add this: selectedpersonchanged: function() { if(this.get('selectedperson')) { this.get('selectedperson.events').pushobject(this.get('content')); } }.observes(...

sql server - Make word work with html tags -

i have wysiwyg on site, , saves text database in straight text, comes it's tags, have data looks <p><strong>hello world</strong></p> in sql server database. can put data 1:1 word file fine, i'm curious if there way convert tags, without having program myself it, because that's proving more challenge. i'm working on in vb.net if answer supplied relate that, bonus. thank you. tldr: how take wysiwyg text sql server database, ms-word using vb.net? try this: save formatted text html file open html file using word save opened file .docx this make word pick formatting without showing tags. it’s not ideal solution work. now sure if have code manipulate word docs, if not suggest using open xml vs office interop assemblies

Magento sets null value for non-selected attribute value in admin. It affects the frontend display. How to deal with it? -

i've created new attribute (type: dropdown) not required field. at moment, every product shows in frontend " my attribute: n/a ". after save in product, magento write null value inside catalog_product_entity_int table attribute. but in frontend attribute appear " my attribute: no " instead of "n/a". it looks bug, since didn't touch in attribute while editing new product. is there way deal or apply rule in phtml? actually not bug. it's feature. n/a displayed when there no record in table catalog_product_entity_int attribute. when add attribute there no values attribute product, save product has attribute, null value inserted in table (as stated). no value different null value . magic happens here mage_catalog_block_product_view_attributes::getadditionaldata() . these lines interest you: if (!$product->hasdata($attribute->getattributecode())) { // no value in database $value = mage::helper('catalog...

c++ - How to use opencv cvKnearest class from delphi xe2 -

i writing image processing delphi program using opencv delphi ( https://github.com/laex/delphi-opencv ) has reference of function cvknearest . (a class containing functions written in c++) how reference functions? see branch "classes" in https://github.com/laex/delphi-opencv examples: * samples\classes\cvknearest\class_2d_point_classification.dpr * samples\classes\cvknearest\cvknearest/class_labknn.dproj

android - How do I clear notifications using ADB shell -

i know can unlock screen, pull down notifications, , press clear notifications button, there's got way clear notifications through adb , right? i'm guessing it's intent sent through 'am' command, or maybe simpler, can't seem find on net. i'm getting java code use apk . edit: should mention i'm running on 4.3, commands may vary between versions. try: adb shell service call notification 1

Checkout Android source using repo from github -

the question same checking out android source github ; answers no longer apply. links gist in blog post pointed out first answer there no longer available. can indicate how may done, if @ possible, recent versions of android (>= 4.1)? http://source.android.com/source/downloading.html you want follow this. changed method of source unfortunately.