Posts

html - relative URI in sidebar with subfolders -

i have designed website subfolders , sidebar navigation menu, when enter page in subfolder, links refers current folder instead of root, using tilde doesnt resolve issue, if example type this: <a href="~/editor.aspx"> it not lookup tilde ad root folder in path , fail, if im in subfolder "articles" , on page "resume.aspx" try lookup for: http://www.website.../articles/~/editor.aspx how can correctly use root reference in <a> tag without using server.mappath on sidebar (masterpage) links? edit : happens when current folder set "articles" , click on "/register.aspx"? wont page under "articles" folder? a root-relative url starts / character.so, <a href="/editor.aspx"> fine.

swift - Referencing App Object Across Multiple Build Targets iOS -

Image
i need make several versions of ios application each different target , name. of differences between applications in applications resources , not source code. trying share source code across versions possible. my issue arises when try access application object in version not have same name original. instance, have 2 versions of application named userapp , userapp2 , following code references data store: var user = userapp.user when try run code in userapp2 target, throws error saying userapp undefined. my question is: how can make code load proper application object depending on target running? solution can used across targets without need change code. edit: userapp object xcdatamodel. the userapp class might not added in of application targets. verify target membership class.

javascript - How to slide down dynamic content using jQuery? -

i have comment system , implement "show replies (2)" slide down effect. this example of setup. <div class="comment"> <div class="main-comment"> message. <a href="#" class="show-replies">show replies (1)</a> </div> <div class="sub-comment"> funny comment there, mate. </div> </div> but because both main comment , sub comments dynamically generated using ajax, setting event handlers little tricky. how did it: $(".comment").delegate('.show-replies', 'click', function(event) { $(this).parent().next(".sub-comment").slidedown(); }); i've tried make setup simple , close real thing possible. what doing wrong , how solve it? <div class="comment"> <div class="main-comment"> message. <a href="#" class="show-replies">show replies (1)</a> ...

java - JAX-WS service deployment -

i new web service programming , trying create jax-ws web-service. have created following jax-ws web service in eclipse: creating service interface: package test; @webservice @soapbinding(style = style.rpc) public interface additionservice { @webmethod int add(int a,int b); } after 1 implementation class: package test; @webservice(endpointinterface = "test.additionservice") public class additionserviceimpl implements additionservice{ @override public int add(int a, int b) { return a+b; } } last step: using following code publishing service: package test; public class addtionservicepublisher { public static void main(string[] args) { endpoint.publish ("http://localhost:9999/ws/additionservice", new additionserviceimpl()); } } i can view wsdl using bellow local url: http://localhost:9999/ws/additionservice?wsdl but don't have server installed. how, getting published? server inbuilt eclips...

android - updating setListAdapter from AsyncTask -

i using tutorial , sourcecodes make listview in android. had implemented using tutorial during updating setlistadapter cannot update listview dynamically. have gone through many stackoverflow questions , giving adapter.notifydatasetchanged() solution. unable implement in asynctask. itemlistfragment.java public class itemlistfragment extends listfragment { @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view v = super.oncreateview(inflater, container, savedinstancestate); setlistadapter(new itemadapter(getactivity(), setarray(getactivity()))); return v; } public arraylist<item> setarray(context context) { arraylist<item> items = new arraylist<item>(); realm realm = realm.getinstance(context); realmresults<books> bs = realm.where(books.class).findall(); (int = 0; < bs.size(); i++) { bitmap url = bitmapfactory.decodefile(bs.get(i).getcover()); ...

android - SIze Imageview Placeholders -

i using recyclerview imageviews in each cell.each imageview loads images web , can square or more width height or more height width i.e sizes.i going display placeholder each image while loads in background(with progressbar).but problem dimension of images unknown , want size placeholders size of images 9gag app in placeholders size of images while loading in bacground.how achieve in android ?i don't want use wrap-content(produces jarring effect after image has been downloaded) or specific height imageviews(crops images).i using uil , planning switch fresco or picassa. if use fresco, need pass width , height of image web server, set layout params of drawee view width , height. like this: relativelayout.layoutparams draweeparams = new relativelayout.layoutparams(desiredimagewidthpixel, desiredimageheightpixel); yourdraweeview.setlayoutparams(draweeparams); from width , height of image pass web server, can calculate/...

python - Passing objects to Spark -

i try understand capabilities of spark, fail see if following possible in python. i have objects non pickable (wrapped c++ swig). have list of objects obj_list = [obj1, obj2, ...] objects have member function called .dostuff i'd parallelized following loop in spark (in order run on aws since don't have big architecture internally. use multiprocessing, don't think can send objects on network): [x.dostuff() x in obj_list] any pointers appreciated. if object's aren't picklable options pretty limited. if can create them on executor side though (frequently useful option things database connections), can parallelize regular list (e.g. maybe list of constructor parameters) , use map if dostuff function returns (picklable) values want use or foreach if dostuff function called side effects (like updating database or similar).