Posts

assembly - ASM - 8086 - Using Registers and variables -

am starting grips asm programming feel missing regarding use of registers store variables. issue have instructions modify other registers internal reasons. in cases have used these registers store application logic. there golden rules how use registers? for example: following code changes dx register , wipes out current variable. mov ax, 04h mov bx, 02h mul bx i did not want nor state want dx register wiped out. what's going on here? welcome assembly language programming. short answer pick values manipulated often. rule compilers use register allocation. score usages numerically heuristic values, put best scores in registers until there no more. in 8086 assembler, have small number of registers, , many of them have special purposes. you've discovered one: mul , div implicitly use ax , dx. think of mul instruction mul dx:ax, operand , , you'll see what's going on. makes life harder, the assembly level, architecture designer doesn't care. he...

php - Magento xml importing - pictures are not imported -

i managed script importing products mapping of fields xml working.( magento xml import mapping ). i use magmi importer, here link magmi image attributes processor plugin (as discovered later) mandatory import pictures url: http://wiki.magmi.org/index.php?title=image_attributes_processor but can't import pictures (link picture in xml url). one product xml: <izdelek> <st>1</st> <izdelekid>75</izdelekid> <izdelekime>ati radeon 102 - b62902 (b)</izdelekime> <izdelekpodnaslov>256 mb, dms - 59</izdelekpodnaslov> <izdelekopis></izdelekopis> <izdelekkategorija>komponente</izdelekkategorija> <izdelekdodatenopis> grafična kartica omogoča razőirjeno namizje na dveh ekranih (dve različni sliki)! low profile - namenjena izključno sff računalnikom! </izdelekdodatenopis> <zadnja_osvezitev>16/08/2015</zadnja_osvezitev> <url>...

java - javadoc task in gradle - link to oracle's javadoc instead of displaying unlinked qualified class names everywhere -

in javadoc project generates, every time class standard java library referenced, inserts not linked qualified class name. what want have happen link being generated instead pointing oracle.com java se 8 documentation . example: static string (or link not framed version instead) instead of static java.lang.string this possible appending -link http://docs.oracle.com/javase/<javaversion>/docs/api/ command line arguments passed javadoc. refer documentation of build tool or ide on how that.

c++ - Close QTcpSocket from another thread -

i use qtcpsocket in dedicated thread. close thread, have personal slot connected disconnected signal of qtcpsocket . slot contains socket.close() instruction. class network { private: qtcpsocket *mp_socket; public: void connection() { mp_socket = new qtcpsocket(this); // move thread connect(mp_socket, signal(disconnected()), this, slot(disconnect())); } public slots: void disconnect() { mp_socket->close(); } }; here, slot works (even if socket in thread). if call disconnect slot myself, have following error : "qsocketnotifier: socket notifiers cannot disabled thread". why? thanks help. ;) ok, may need change design little. instead of moving socket new thread, make network class object derived, , move instead, , have socket parented it. previous answer revision did not work because close() not registered qt meta system, because plain virtual functio...

ios - Loading images asynchronously in UITableView with Autolayout -

i have uitableview loads images asynchronously in uitableview. images different heights, set height constraint according height of image. this works fine when use datawithcontentsofurl, freezes ui. when load asynchronously, images pile on top of each other so: http://i.stack.imgur.com/teuwk.png the code i'm using follows: nsurl * imageurl = [nsurl urlwithstring:img]; nsurlrequest* request = [nsurlrequest requestwithurl:imageurl]; cell.imageviewheightconstraint.constant=0; [nsurlconnection sendasynchronousrequest:request queue:[nsoperationqueue mainqueue] completionhandler:^(nsurlresponse * response, nsdata * data, nserror * error) { if (!error){ uiimage *imgz = [uiimage imagewithdata:data]; [cell.cellimg setbackgroundimage:imgz forstate:uicontrolstatenormal]; [cell.cellimg sizetofit]; cell.imageviewheightconstraint.constant=result.width*(imgz.size.height/imgz.size.width); [cell setneedsupdateconstraints]; } }]; [cel...

javascript - How to hide div when user clicks other place -

i need hide div id = sdwn when user clicks other place in document. <div id="sdwn" onclick="okijuyg()"> <img src="../img/lupa.png" id="ildsib" onclick="okijuyga()" > </div> <div id="atsimd"> <div class="arrow-up" id="shs"> </div> <div id="vsauceisgenius" tabindex="-1" > <img src="../img/x.png" id="ctso" href="#"> <input type="text" placeholder="people" id="imohd"> <input type="submit" value="search" id="dpmm"> <p></p> <input type="text" placeholder="hashtags" id="imohds"> <input type="submit" value="search" id="dpmmm"> </div> </div> you can use event.target check if element clicked, , if not, h...

emoji - Swift `join` hangs when joining string with country flag -

i discovered while working in swift 1.2. have reported bug. wonder why? import uikit var str = "πŸ‡¬πŸ‡§ lhr ✈️ sfo πŸ‡ΊπŸ‡Έ" ([str] nsarray).componentsjoinedbystring("") // work join("", [str]) // hangs forever apple has fix problem in swift 2.0, join replace method joinwithseparator(separator: string) -> string works fine flags. here code snippet. var str = "πŸ‡¬πŸ‡§ lhr ✈️ sfo πŸ‡ΊπŸ‡Έ" ([str] nsarray).componentsjoinedbystring("") // work [str].joinwithseparator("") output πŸ‡¬πŸ‡§ lhr ✈️ sfo πŸ‡ΊπŸ‡Έ πŸ‡¬πŸ‡§ lhr ✈️ sfo πŸ‡ΊπŸ‡Έ πŸ‡¬πŸ‡§ lhr ✈️ sfo πŸ‡ΊπŸ‡Έ