Posts

jquery - How to disable select based on other selected option? -

i have problem jquery function. want based on 1 selected option disable other select. in case, want disable select2 if option 1 select 1 chosen. use jquery function: $(document).ready(function(e) { $('.select1').change(function(e) { if ($('.select1').val()==1){ $('.select2').attr('disabled','disabled'); } else{ $('.select2').removeattr('disabled'); } }) }); but works if first select option 2(or other option form select) , reselect option 1(i suppose because use of change function). how disable select2 when default select1 set option 1??? $(document).ready(function(e) { if ($('.select1').val()==1){ $('.select2').attr('disabled','disabled'); } else{ $('.select2').removeattr('disabled'); } }) this wont work :/ it sounds want trigger 'change' event @ startup. $('.select1').trigger('change'); so, ...

libraries - Disable automatic slide. Library android-menudrawer -

i'm using library in project: android-manudrawer https://github.com/simonvt/android-menudrawer it works perfectly, problem english not good, , can not find way disable every x seconds, automatically slide. i guess parameter scroller class, can not understand code correctly. need disable automatic slide i appreciate help. regards what's undesired effect? when happen? can show code use work library? edit: the reason on method ( https://github.com/simonvt/android-menudrawer/blob/master/library/src/net/simonvt/menudrawer/menudrawer.java ) line 58: @override public void postonanimation(runnable action) { if (build.version.sdk_int >= build.version_codes.jelly_bean) { super.postonanimation(action); } else { postdelayed(action, animation_delay); } } i guess there should reason that. in case effect undesired can avoid calling commenting line 745, there's should reason why there , why there no option given user rid of it...

java - Make-shift string boolean? -

i attempting create sort of settings system project creating, have hit of problem. i'm trying use string (considering these settings must later saved text file) make-shift boolean. so, need able switch string between true , false. assumed following method work, reason sets true regardless. is, far know, place in code variable set. i have no idea why following code shouldn't work, , i've done thorough searching no avail. if("true".equals(settings[0])) settings[0] = "false"; //this *always* skipped else if("false".equals(settings[0])) settings[0] = "true";` therefore, i've come here. convert string bool , inverse result. sample string[] settings = {"true"}; boolean settingbool = !boolean.parseboolean(settings[0]); system.out.println(settingbool); output: false

wordpress - Using Google Maps with Natural Earth Data Set in Fusion Tables -

i trying create plugin wordpress takes array of country names entered in post or page creation (much tags), , generates map using google maps apiv3 of countries highlighted (using polygon data natural earth data set), coming extremely short in area of finding resources regarding how merge these 2 technologies together. i pretty familiar google maps api , how manipulate within wordpress using php , variables provided post object, can't seem figure out how merge data provided in natural earth data set. i have stumbled on these, still can't figure out. country boundries using google map api v3 google maps v3: draw german state polygons? http://www.geocodezip.com/geoxml3_test/v3_fusiontables_query_sidebarf_local.html?country=germany the last link there close want do, except multiple countries matter of adding more poi's in form of countries. can't work on site. does know of tutorials on how this? or better yet, has done type of thing success? here's...

c++ - How can I convert from a class with a 2D vector of chars to a 2D vector of another obj with a char variable? -

i'm still new apologies in advance if provide or not enough information problem. the run down this question isn't rogue game related question, little background of program does.. similar rogue game. ok, had class had member 2d char vector (the chars manipulated represent "dungeon"). worked seamlessly. wanted expand program decided create new class replace 2d vector of chars char visual representation of new class , other variables can stored along char. for simplistic sake, tried remove isn't necessary question. new class called tile - represents space being used dungeon level. tile has: a char variable called displaychar.. defaults ' ' changes represent contains (other variables..) the problems / poor guesses i'm not best @ understanding concepts of programming syntax/implementation, please don't judge. the way filled vector of chars, resized width of game board, , set ' ' since values chars i think need fill...

c++ - iostream: no such file or directory -

Image
i working qt creator on windows vista. trying compile simple ".cpp" code includes standard c++ library "iostream", this: #include <iostream> using namespace std; int main(){ cout << "thanks"; return 0; } the problem comes before compiling code, comes when qt highlights library , acknowledge me (iostream: no such file or directory). it working fine couple of days ago, installed vs-express-2012 uninstalled because, surprisingly, not work windows vista. after removal of vs-2012, c++ libraries not seen qt creator more . note can still compile , run previous written codes command-line console, means c++ libraries haven't been removed removal of vs-2012!!. in addition, previous codes (within old projects created using same qt) has no such problem (i.e.: qt identifies , sees standard libraries), , can still compile , run them using qt creator, when create new ".cpp" file within old projects : .. however, when create new ...

XCode not autogenerating Obj. C code from .h to .m source file -

i'm following nick kuh's book on how make iphone apps. i'm beginner. i'm on chapter 4. i'm stuck @ point clicked , dragged view view controller. program isn't autogenerating in .m source file (for example: not coming in .m source file @sythesize dealercard1, , on). i'm supposed write these in or should automatically me? thanks hello yes should have write these part. assuming using ui looking thing when dragged view controller? anyways in .h file need equivalent to @property (nonatomic, retain) iboutlet uiview *mydraggedview; and in .m file need @sythesize mydraggedview then need connect property view dragged onto controller. should google how there better tutorials can write right now. should hookup events objects in interface builder. anyways luck!