Posts

vb.net - Boxedapp packer packed executable finds for file outside package -

i have 2 files 1 main executable , other run first one. want pack these files 1 executable, boxedapp packer or enigma virtual box main executable file searches other file outside packed exe file. tried option share virtual environment child processes did not work. way main exe made vb.net needs file in current directory. please me.

Assigning variables with dynamic names in Java -

i'd assign set of variables in java follows: int n1,n2,n3; for(int i=1;i<4;i++) { n<i> = 5; } how can achieve in java? this not how things in java. there no dynamic variables in java. java variables have declared in source code (*). period. depending on trying achieve, should use array, list or map ; e.g. int n[] = new int[3]; (int = 0; < 3; i++) { n[i] = 5; } list<integer> n = new arraylist<integer>(); (int = 1; < 4; i++) { n.add(5); } map<string, integer> n = new hashmap<string, integer>(); (int = 1; < 4; i++) { n.put("n" + i, 5); } it possible use reflection dynamically refer to variables have been declared in source code. however, only works variables class members (i.e. static , instance fields). doesn't work local variables. see @fyr's "quick , dirty" example. however doing kind of thing unnecessarily in java bad idea. inefficient, code more complicated...

java - Parsing android resources from xml -

i facing problems parsing xml-file android app. i need layout ids , color ids xml file. have no problems in reading string values dont know how convert xml layout reference layout id? help!! my xml file looks that: <program name="programname" color="@color/white" preflayoutid="@layout/pref" /> my parsing code works that. parsing of color/layout not work: xmlpullparser xmlparser = getresources().getxml(r.xml.programlist); int event = xmlparser.geteventtype(); while (event != xmlpullparser.end_document) { string name = xmlparser.getname(); switch (event) { case xmlpullparser.start_tag: { break; } case xmlpullparser.end_tag: { if(name.equals("program")) { programinfo pi = new programinfo(); pi.name = xmlparser.getattributevalue(null, "name"); // here need color.black; pi.color = integer...

guzzle - Can't install guzzlehttp for Laravel -

i using php 5.4 , have laravel 5.1 development. when try install guzzlehttp through composer laravel error php 5.4 doesn't specify requirements. tried install lowering version composer require "guzzlehttp/guzzle": "5.0" but still no luck. thank you. try, composer require "guzzlehttp/guzzle:~5.3"

javascript - Creating a sliding image gallery that does not glitch on image change -

i have created sliding image gallery , when button pushed slides picture across , updates image attribute relevant sections. works 50% of time. other times there second glitch , images go in place expected. have attached javascript methods animate method , array change method. have looked elsewhere , cannot see else similar issue or going wrong, when doesn't happen often. imagegallery.leftselect.onclick = function () { window.settimeout(imagegallery.rightclick, 250); imagegallery.animateimages('.image1', '.imageright'); imagegallery.animateimages('.imageright', '.imagenoneright'); imagegallery.animateimages('.imageleft', '.image1'); imagegallery.animateimages('.imagenoneleft', '.imageleft'); }; animateimages: function (classfrom, classto) { var classmoving = $(classfrom); var classgoingto = $(classto); classmoving.animate({ top: classgoingto.css('top'), ...

java - TabLayout get stuck with viewpager when screen orientation change -

i using design support library. i've fragment , inside fragment have fragment has view pager 3 new fragment my fragment code - <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.tablayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="@color/colorprimary" app:tabindicatorcolor="@android:color/white" app:tabindicatorheight="4dp" app:tabmode="fixed" /> <android.support.v4.view.viewpager android:id="@...

multithreading - Python - Running multiple mysql inserts without waiting for completion using a queue -

problem in basic form. have multidimensional list generating csv. have operates so: data = [['hello', 'world'],['hello','universe']] in data: try: cursor.execute("""insert mytable (word1,word2) values ('%s','%s')""" % (i[0],i[1])) cursor.execute("""insert random command here""" % ()) conn.commit() except exception: conn.rollback() this works. however, has wait response before attempts commit next one. takes fair amount of time complete going 1 @ time, hoping use queue/threading in order send multiple of these queries (10 or so) @ time while goes through list of several hundred of these. i have read several tutorials on queues , multithreading, can't wrap head around how address specific items out of list (or how queuing , multithreading work). tried below (and couple of other variations) unable comprehend how work values being...