Posts

iphone - MonoTouch CoolStorage OneToMany caching issue -

i'm experiencing issue coolstorage onetomany relationship being cached when reading list first time, list fails update when data changes later. when restarting app list correct, must caching issue , can't find solution in coolstorage documentation or anywhere. i've pasted unit test code below. i have game class has opponent of type person. there many games, , person can opponent many games. my person class has cslist called opponentgames, @ anytime person can 'get games person opponent'. in unit test first time reference 'person.opponentgames.count', correctly tells me there 1 game. after creating second game , adding person opponent, still reports 1 game opponentgames. if remove first count, test passes, first check result being cached , there it's not updated. i'll appreciate suggestions!! thanks. the sql (sqlite3) setup: csdatabase.executenonquery( "create table person " + "(serverid integer primary k...

box api - message: "Invalid value 'xxx'. Entity body should be a correctly nested resource attribute name/value pair" -

when try recieve list of folders message: "invalid value 'authorization=bearer xxx'. entity body should correctly nested resource attribute name/value pair". 1. url https://api.box.com/2.0/folders 2. post request 3. content-type: json or x-www-form-urlencoded 4. authorization:bearer 5iv0..... invalid value 'authorization=bearer xxx'. entity body should correctly nested resource attribute name/value pair this indicates you're sending authorization header in body of request. haven't provided context around how you're making http requests, should 'how set http headers' whatever language/module you're using see how correctly.

seek better design to have multi-dispatching with java -

in language not supporting multiple dispatching, such java, code /* example using run time type comparison via java's "instanceof" operator */ interface collideable { void collidewith(collideable other); } class asteroid implements collideable { public void collidewith(collideable other) { if (other instanceof asteroid) { system.out.println("aaaaaa"); } else if (other instanceof spaceship) { system.out.println("bbbbbb"); } else if (other instanceof plane) { system.out.println("ccccccc"); } } } class spaceship implements collideable { public void collidewith(collideable other) { if (other instanceof asteroid) { system.out.println("ddddddd"); } else if (other instanceof spaceship) { system.out.println("eeeeeee"); } else if (other instanceof plane) { system.out.println("fffffff"); } } } class plane implements col...

python - Disabling Javascript after page has been rendered in Selenium Webdriver -

i'm using python. i've seen how can disable javascript in firefox selenium? says create profile load driver profile. want disable javascript after page has been rendered means can't recreate driver. i've tried following: browser = selenium.webdriver.firefox() browser.get('http://wwwhatever.com') browser.firefox_profile.set_preference('javascript.enabled', false) browser.firefox_profile.update_preferences() but this: print browser.capabilities['javascriptenabled'] true furthermore, rest of test still acts javascript enabled. it possible quickjs extension - https://addons.mozilla.org/en-us/firefox/addon/quickjs/?src=search . extension add ctrl+q shortcut disable javascript. here code: profile = selenium.webdriver.firefoxprofile() profile.add_extension("addon-8753-latest.xpi") #quickjs extension browser = selenium.webdriver.firefox(profile) browser.get('http://wwwhatever.com') #turn of javascript, send ct...

c# - Unity Ioc Configuration Error -

i have following problem: i using ioc unity c#. case implements ioc following: using microsoft.practices.unity; using microsoft.practices.unity.configuration; namespace tanspritr.ioc { public class ioccontainer { private static readonly ioccontainer contenedor = new ioccontainer(); private readonly iunitycontainer unitycontainer; private ioccontainer() { unitycontainer = new unitycontainer(); unitycontainer.loadconfiguration("micontenedor"); } public static ioccontainer contenedor { { return contenedor; } } /// <summary> /// create instance of object implements tservicio. /// </summary> /// <typeparam name = "tservicio">type of service want resolve</typeparam> /// <returns></returns> ...

Blank Screen on Preview Sencha Architect 2 -

i created project , on first preview it's showing blank screen, simple project, no codes, steps in sequence: i add 2 form panels, named them, created add 2 buttons on mainpanel, , them created navigationview , linked mainpanel on mainnav (navigationview). here project on deposit files download

html - Text not aligned horizontally in li -

Image
hi using below code , text not getting aligned horizontally within li. html code: <body> <div id="image_header"> <img src="header.jpg" width="500" height="54" /> </div> <div id="header"> <div id="left_panel"> <h2 id="heading" align="cente">welcome <br /> center</h2> <div id="image_src" align="center"> <img src="doc_image.jpg" align="middle" /> </div> </div> <div id="right_panel"> <p><strong> xxx</strong> </p> </div> </div> <div id="footer"> <div id="left_footer"> <div id="img_left"> <img src="separator_bar.jpg"/> </div> <div>help topics &nbsp;&nbsp;&nbsp;</div> <br /> <div id="left_list"> <ul > <li...