Posts

c++ - lvalue required as left operand of assignment - LOBYTE / HIBYTE -

i'm receiving lvalue required left operand error on lobyte/hibyte/lodword lines in function below: typedef dword _dword; typedef byte _byte; typedef word _word; signed int __stdcall checkserial(int serial, int seriallength) { int v2; // ecx@1 int v3; // ecx@3 int v4; // ecx@5 int v5; // ecx@7 int v6; // dx@9 signed int v7; // ecx@10 char v8; // dl@11 __int16 v9; // cx@13 signed int result; // eax@21 v2 = 0; { *(_dword *)(v2 + serial) ^= 0x1234567u; *(_byte *)(v2 + serial) &= 0xeu; v2 += 4; } while ( v2 != 8 ); v3 = 0; *(_byte *)(serial + 8) += *(_byte *)(v3++ + serial); while ( v3 != seriallength ); v4 = 0; { *(_dword *)(v4 + serial) ^= 0x89abcdeu; *(_byte *)(v4 + serial) &= 0xeu; v4 += 4; } while ( v4 != 8 ); v5 = 0; *(_byte *)(serial + 9) += *(_byte *)(v5++ + serial); while ( v5 != seriallength ); lobyte(v6) = *(_byte *)(serial + 9); hibyte(v6) = *(_byte *)(serial + 8); if ( v...

ruby on rails - Deformed text in chrome -

Image
we have weird behavior in our application, sorry can't give examples it's closed. we see extremely deformed texts, example: which should have been edit columns, can see happens, when clicking inspect element, shows fine, , fixes self. few notes: we running little bit old ruby on rails (1.9.3 ruby, 3.2.17 rails). script rendered angular happen in plain hamls (but more rarely). it doesn't happen time. it's possible happens on chrome (since it's not persistent it's hard make sure didn't happen). any ideas or suggestions or event hints extremely valuable, @ complete loss here.

ios - Can't get movie to finish within loop -

i want movie play there objects in array, want make sure movie has finished playing each time. here's -simplified- code i'd expect that: - (void)loopthrougharray { [array enumerateobjectsusingblock:^(id obj, nsuinteger idx, bool *stop) { nslog (@"index = %i", idx); movieplayercontroller = [[mpmovieplayercontroller alloc] initwithcontenturl:url]; [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(movieplaybackdidfinish:) name:mpmovieplayerplaybackdidfinishnotification object:movieplayercontroller]; [movieplayercontroller play]; }]; }]; } - (void) movieplaybackdidfinish:(nsnotification*)notification { movieplayercontroller = [notification object]; [[nsnotificationcenter defaultcenter] removeobse...

rust - Can I mark a function as deprecated? -

i'd mark functions/methods deprecated. tried apply deprecated attribute: #[deprecated] fn old_way_of_doing_it() { but yields error: error: stability attributes may not used outside of standard library is there way in can have compiler warn consumer of library function deprecated? i have no experience, i'm considering experimenting compiler plugins , custom attributes, guess require consumer use plugin, maybe unreasonable (or may unreasonable amount of work me implement?) as side question out of curiosity, why deprecated attribute applicable standard library? since rust 1.9.0 (2016 may 26th) can use #[deprecated] attribute in own crates ( rfc 1270 ). syntax is: #[deprecated(since="0.5.0", note="please use `new_method` instead")] pub fn old_method() { ..; } it throw following warning whenever use old_method : <anon>:6:5: 6:15 warning: use of deprecated item: please use `new_method` instead, #[warn(deprecated)] on defa...

java - I made a function that uses graphics and I wanted to call it in the main it did not work -

the main: public class appmain { public static void main(string[] args) { // todo auto-generated method stub app a1 = new app(); jframe f2 = new jframe(); f2.getcontentpane().add(a1); f2.addwindowlistener(new windowadapter() { public void windowclosing(windowevent we) { a1.stop(); a1.destroy(); system.exit(0); } }); f2.setvisible(true); f2.setsize(200, 200); a1.setbackground(color.white); //the function //a1.drawbow(null, 40, 40, color.black); a1.drawbow(a1.getgraphics(), 40, 40, color.black); } the app class: public class app extends applet{ int x1,y1,x2,y2; public void paint(graphics g1) { g1.setpaintmode(); g1.setcolor(color.blue); g1.drawstring("hello!", 50, 50); g1.setcolor(color.red); g1.drawstring("hello!", 51, 51); g1.setcolor(color.red); g1.draw3drect(80, 70, 20, 20, tru...

hadoop - Importtsv command does not work in Hbase1.0.1.1 -

i trying import tsv file hbase table. using following command: hadoop jar /usr/local/hbase-1.0.1.1/lib/hbase-it-1.0.1.1.jar importtsv -dimporttsv.columns=hbase_row_key,a,b '-dtable_name.separator=\t' table-name /path-to-input-file it gives me following error: exception in thread "main" java.lang.classnotfoundexception: importtsv @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:425) @ java.lang.classloader.loadclass(classloader.java:358) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:274) @ org.apache.hadoop.util.runjar.run(runjar.java:214) @ org.apache.hadoop.util.runjar.main(runjar.java:136) have added guava jar...

javascript - Expanding search bar does not search after closing and reopening it, Jquery -

i'm creating expanding search bar. i'm using demo base : http://codepen.io/nikhil/pen/qcygf/ the searchbar works if open it, write in input , click on button again but if open it, write in input, close clicking outside of search bar open again; clicking on button close searchbar again. how can change code in way if close , reopen searchbar it'll search on click on button ? html: <div class="container"> <form class="searchbox"> <input type="search" placeholder="search......" name="search" class="searchbox-input" onkeyup="buttonup();" required> <input type="submit" class="searchbox-submit" value="go"> <span class="searchbox-icon">go</span> </form> detailed tutorial on thecodeblock css: body{ background:#475f77; } .container{ width:600px; margin:50px auto; } .searchbox{ po...