Posts

Any PHP Rest framework similar to Recess? -

i spend few days recess , impressed framework. disappointed see lack of support, community involvement , involvement developers. , need not mention documentation! i wondering if there other rad rest framework recess out there. know many 'big - fat' frameworks zend, cakephp etc support rest.. looking simple , rad. slim framework by far sophisticated , feature-rich restful framework i've found, , it's light , easy use

xaml - WPF GroupBox header Alignment issue -

how can align groupbox header center rather default left positioning. i read in many post 1 can use template have no idea such thing. please let me know how can header @ center. thanks !! yes, you'll have modify template. for center-alignment see this answer thomas levesque right-alignment see this answer mihir gokani uploaded sample project containing both center-alignment , right-alignment here: http://www.mediafire.com/?hd2vbwr97ep7yis center-alignment using same approach thomas usable this <groupbox header="centered header" style="{staticresource centeredheadergroupboxstyle}" .../> centeredheadergroupboxstyle <local:centerbordergapmaskconverter x:key="centerbordergapmaskconverter"/> <style x:key="centeredheadergroupboxstyle" targettype="{x:type groupbox}"> <setter property="borderbrush" value="#d5dfe5"/> <setter prop...

How can I remove relative path components but leave symlinks alone in Perl? -

i need perl remove relative path components linux path. i've found couple of functions want, but: file::spec->rel2abs little. not resolve ".." directory properly. cwd::realpath much. resolves symbolic links in path, not want. perhaps best way illustrate how want function behave post bash log fixpath hypothetical command gives desired output: '/tmp/test'$ mkdir -p a/b/c1 a/b/c2 '/tmp/test'$ cd '/tmp/test/a'$ ln -s b link '/tmp/test/a'$ ls b link '/tmp/test/a'$ cd b '/tmp/test/a/b'$ ls c1 c2 '/tmp/test/a/b'$ fixpath . # rel2abs works here ===> /tmp/test/a/b '/tmp/test/a/b'$ fixpath .. # realpath works here ===> /tmp/test/a '/tmp/test/a/b'$ fixpath c1 # rel2abs works here ===> /tmp/test/a/b/c1 '/tmp/test/a/b'$ fixpath ../b # realpath works here ===> /tmp/test/a/b '/tmp/test/a/b'$ fixpath ../link/c1 # neither 1 works here ===> /tmp/test/a/link/c1 '/...

html - Can the select option value be of different types? -

i want know practice select option values. example <select name="select"> <option value="0-9">sample</option> <option value="a-z">sample</option> <option value="this sample value">sample</option> <option value="this-is-sample-value">sample</option> <option value="this_is_sample_value">sample</option> <option value="this & | sample ** value">sample</option> </select> i'm little bit confused here. select value same input text , textarea there no limits real type of data can set in value attribute of option element. characters special meaning in html do, of course, need represented appropriate entities ( & &amp; example (although 1 in question meets "followed space character" exception rule)). the attribute defined containing cdata: <!element option - o (#pcdata) ...

C Segmentation fault when adding hash node -

i have structure of type: struct hashnode_s { struct hashnode_s *next; char *key; valuetype tag; union { int integervalue; char *stringvalue; } u; int isincycle; }; and when add item of type string, have can, code is int hashtbl_insertstring(hashtbl *hashtbl, const char *key, const char *value) { struct hashnode_s *node; hash_size hash; hash = searchforhashindex(hashtbl, key,value); if(hash == -1) { hash=hashtbl->hashfunc(key); } /* adding first node if not applicable (this based on value string)*/ if(hashtbl->nodes[hash]== null) { node = malloc(sizeof(struct hashnode_s)); node->key = key; node->tag = stringconst; node->u.stringvalue = value; node->next = null; hashtbl->nodes[hash] = node; } else { node = hashtbl->nodes[hash]; if(node->next ==null) { struct hashno...

java - merge sorting of 2 unsorted arrays -

is following implemetation correct merge sort? public int [] merge_srt(int [] ary){ if(ary.length==1) return ary; int mid = (int)ary.length/2; int a1[] = merge_srt(arrays.copyofrange(ary, 0, mid)); int a2[] = merge_srt(arrays.copyofrange(ary, mid+1, ary.length-1)); return mergea(a1,a2); } public int[] mergea(int[] a1,int [] a2){ // merge 2 array , reurn 1 sorted array } change if (ary.length == 1) return ary; to if (ary.length <= 1) return ary;

sharepoint - Problem with pageviewer webpart in sharepoint2010 -

i using pageviewer webpart display .htm page present in document library in sharepoint 2010. it asking me download page instead of diplaying in page but in moss 2007 working fine(i mean displaying in page) please suggest me solution thanks in advance. sp2010 has restrictions on displaying or opening files. that, need go central administration , check "browser file handling" "permissive" web application's general settings. i think you.