Posts

priority to index.html for index.php in .htaccess -

i trying set priority of index.php index.html (but landing page) in .htaccess file works fine but ?page_id=16 display same index.html page don't want rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d directoryindex index.html index.php rewriterule . /index.php [l] note: using wordpress. try code : rewriteengine on rewriterule ^$ /index.html [l,r=301]

javascript - Using jQuery to modify the name of a CSS class - Not working on load -

i have following code (using xslt/html) <div class="{@classname} modify""><img src="{substring-before(@image, ', ')}"/></div> the "classname" being through dynamically through cms, when there 2 options selected, segregated bunch of other characters. result end similar this: ;#class1;#class2;# what i'm trying modify class names based on set to. written following code, when entered browsers console window, works absolute charm. however, when added actual page, doesn't take effect. i'm wondering if it's priority thing or else: $('.modify').each(function(){ var newprimeitem= "primary item"; var newitem = "item"; if ( $(this).attr('class') == ";#primary;#item;# modify") { $(this).attr('class', newprimeitem);} if ( $(this).attr('class') == ";#item;# modify") { $(this).attr('class', newitem );} }); any on appreciated. ...

Release memory at Run-time in cocos2d iphone with ARC enabled -

i have enabled arc in cocos2d iphone project. facing 1 problem of elements not visible on-screen or off-screen. want release memory occupied elements @ run time.as have implemented arc in project release memory @ compile time. think should release memory @ run time memory optimization. demonstration have implemented infinite tiled map using 4 tile map object. files shown below. helloworldlayer.h #import "cocos2d.h" #import "box2d.h" #import "gles-render.h" #define ptm_ratio 32 @interface helloworldlayer : cclayer { cctmxtiledmap *map1; cctmxtiledmap *map2; cctmxtiledmap *map3; cctmxtiledmap *map4; cctmxtiledmap *defaultmap; float maptobeadded; int whichmap; cgsize screensize; int speed; bool complexmap; ccmenu *menu; } +(ccscene *) scene; @end helloworldlayer.mm #import "helloworldlayer.h" #import "appdelegate.h" #import "physicssprite.h" @implementation helloworldlayer ...

asp.net - Send parameter with accentuation c# -

i have page , in send event, need pass parameter value "name". name have accentuation and, in example name "raúl lozada" sends " ra&#250;l lozada " procedure parameter. how can correct it? in html page, loads correctly! <asp:boundfield datafield="user" headertext="user" /> sqlparameter myparam4 = ocommand.parameters.add("@user", sqldbtype.nchar); myparam4.value = row.cells[0].text; you need html unescape string, before sending db: use httputility.htmldecode : myparam4.value = httputility.htmldecode(row.cells[0].text);

javascript - ASP.NET Razor: add to Model moved List box items from another list box -

i have 2 list boxes below: @html.listbox("selectedlist",(ienumerable<selectlistitem>)viewbag.selectedlist, new { @class="listbox" , id="list2" }) <input id="btnadd" type="button" class="submit" value="add"/> <input id="btnremove" type="button" class="submit" value="remove"/> @html.listbox("nonselectedlist",(ienumerable<selectlistitem>)viewbag.nonselectedlist,new { @class="listbox" , id="list2" }) i move items between lists using add , remove buttons. working fine want add selected items model object. there way can that?

objective c - ObjCMongoDB framework and SyncServices in OSX -

i'm looking pointers on how keep coredata model in sync mongodb. i'm leveraging objcmongodb framework , can create objects in core data follows: coredataobj = [bsondecoder decodemanagedobjectwithclass:[hostname class] context:[self managedobjectcontext] data:[bson_host datavalue]]; unfortunately when re-import mongodb copy of same objects made , stored. i'm not sure if using objcmongodb framework incorrectly or if need using syncservices import data coredata model? can guide me or provide example? objcmongodb (of i'm author) performs deserialization core data, but, @ present, not deduplication or syncing. treats bson documents simple ordered dictionaries, without sense of identification attribute. in particular, treats _id other key. you can behavior want you'll need implement yourself. the easiest way implement -awakeafterusingcoder: or -aw...

c - LD_PRELOAD and clone() -

i'm using script run program ld_preload library created me intercept calls, works @ point process calls clone() , lose ability intercept what's next (the program run again without library), there way overcome this? call clone(child_stack, clone_vm | clone_fs | clone_files | clone_sighand | clone_thread | clone_sysvsem | clone_settls | clone_parent_settid | clone_child_cleartid, parent_tidptr, tls, child_tidptr) looking on parameters of clone saw there ability trace child process well, nothing pertaining preloading. i should mention i'm trying intercept calls on specific file descriptor , process clones file descriptors i'm not sure if possible want without flag clone (problem don't understand of them). update: i'm using trying log activity done qemu-dm (which run xen) #define _largefile64_source #define _gnu_source #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <dlfcn...