Posts

android - ImageView setBackgroundRessource not update even with inflate -

i'm trying update imageview gridview border, doing have xml file works : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="#158cdb" /> </shape> </item> <item android:left="3dp" android:right="3dp" android:top="3dp" android:bottom="3dp"> <shape android:shape="rectangle"> <solid android:color="#ffffff" /> </shape> </item> </layer-list> so launch activity, timer launched , after 15 secondes, try update imageview, tried code : public void highlightfooditem(int id) { imageadapter ia = (imageadapter) _grid.getadapter(); (int = 0; < ia.getcount(); i++) { view currentview...

vb.net - Visual Basic get all profiles from registry sub folder -

i trying find every sub folder of profiles program called autocad. i have managed specify specific profile, able find profiles. this have far 1 particular profile (its default profile on computers) dim readvalue2014 string = my.computer.registry.getvalue( "hkey_current_user\software\autodesk\autocad\r19.1\acad-d001:409\profiles\<<unnamed profile>>\dialogs\appload\startup", "numstartup", nothing) unnamed profile default profile. can see there other folders after need value numstartup from. so need way list of sub folders folder profiles. i assume can string other sub folders on end of list of profiles. i have no idea how this. thanks you might want use registrykey class instead of my. helper classes. registrykey softwarekey = registry.currentuser.opensubkey("software") registrykey autodeskkey = softwarekey.opensubkey("autodesk") and on... , finally: dim profilenames() string = profileskey.getsub...

rails: delayed-job progress bar -

i trying show user progress bar task running in delayed job. populating large amount of data using delayed job in database this. class importschoolsanddistricts < struct.new(:import, :content) def perform total = content.size content.each_with_index |record,index| # create records here import.update_attribute(:progress, (index + 1)/total*100) end end end end :import instance of import model attribute progress . use progress attribute display user status of job percentage. but update of progress not occurring continuously. updating twice: once @ beginning , once @ end, values getting progress 0% , 100%. since using ruby 1.9, cannot use progress_bar https://github.com/d4be4st/progress_job (requires ruby 2.0.0)

c++ - Crash cause of own template -

why program crashing when use template? i'm doing wrong? that's test program, because actual program big posting here. first qdebug test1 displayed second not. #include <qcoreapplication> #include <qdebug> #include <qmutex> class mutexlocker { public: mutexlocker(qmutex& m) : _m(m) { _m.lock(); } ~mutexlocker() { _m.unlock(); } private: qmutex& _m; }; template<typename t> class threadguard { public: threadguard() { _mutex = new qmutex(); } ~threadguard() { delete _mutex; } void set(const t& other) { mutexlocker m(*_mutex); q_unused(m); _r = other; } void set(int i, int j) { mutexlocker m(*_mutex); q_unused(m); _r[i] = j; } t r() const { mutexlocker m(*_mutex); q_unused(m); return _r; } const threadguard<t>& operator=(const t& other) { set(other); return *this; } private: threadguard(const thre...

php - Facebook V2.3 to getFriends list -

is there solution complete facebook friends list without asking app permission? submitted review many times facebook not approving. we need in 1 of our applications. as stated in facebook api documentation, can't http://webcache.googleusercontent.com/docs/graph-api/reference/v2.3/user/friends

apache pig - Pig DUMP command hangs -

this i'm trying grunt> mydata = load '/user/sunil/pigdev/player.csv' using pigstorage(',') ( id:int, name:chararray, age:int, gender:chararray, game:chararray, location:chararray); grunt> describe mydata; data: {id: int,name: chararray,age: int,gender: chararray,game: chararray,location: chararray} grunt> dump mydata; it initializes , loads everything, creates jar well(as can see in console logs). but, hangs forever below log message in console. 2015-06-10 18:32:30,163 [main] info org.apache.pig.backend.hadoop.executionengine.mapreducelayer.mapreducelauncher - 0% complete i checked log files( nodemanager , proxyserver , yarn-resourcemanager ), don't see error message. i'm using cdh version : hadoop 2.5.0-cdh5.3.0 pig version : apache pig version 0.12.0-cdh5.3.0 (rexported)

javascript - local storage not giving correct results -

i trying build post notes. reading head first series. did code. somehow it's no working. <form action="post"> <input id="note_text" type="text" placeholder="enter note"> <input type="button" id="add_button" value="add note"> </form> <ul id="postitnoteslist"> <li>this first note.</li> <li>this second note.</li> </ul> and here js window.onload=init; // add sticky page function addstickytopage(value) { var sticky = document.createelement("li"); span.setattribute("class", "sticky"); document.getelementbyid("postitnoteslist").appendchild(sticky); } // create , sticky note localstorage function createsticky() { var value = document.getelementbyid("note_text").value; var key = "sticky_" + localstorage.length; localstorage.setitem(key,...