Posts

Rollback is not working with spring declarative -

i'm working spring declarative approach rollback transaction on exceptions in method. method had multiple dao calls[1,2,3..] , needs maintained in single transaction. i'm trying acheive if exceptions comes in dao call[3], spring has rollback preceeding dao calls. i.e[1,2] @transactional(propagation = propagation.requires_new, readonly = true,rollbackfor=java.lang.throwable.class) public void processworkflowactionsinonetransaction(...) throws exception { // dao call 1 here.... // dao call 2 here.... // dao call 3 here....[throw exception] } the above configuration created single transaction mentioned method, not triggered rollback after exception. have attached spring logs better understanding. please me if 1 had similar issue. spring logs

ios - How to fetch bit flags predicate -

typedef ns_options(nsuinteger, listoption) { listoption1 = 1 << 0, listoption2 = 1 << 1, listoption3 = 1 << 2 }; @interface someclass : nsmanagedobject @property (nonatomic, retain) nsnumber *listoption; @end i save bit flags coredata. how make fetch predicate "someclass.listoption | listoption1" or "someclass.listoption & listoption1" nspredicate *predicate = [nspredicate predicatewithformat:@"((listoption & %llu)>0)", listoption1];

c - Why does a pointer variable when after freeing it stores the new address of its previous address stored? -

i have 2 questions. how free function in c work? how come pointer variable updates store new address? this code: #include <stdio.h> #include <stdlib.h> int main() { int a; int *p; p = (int *)malloc(sizeof(int)); *p = 10; int *q = p; printf("p:%d\n", p); printf("q:%d\n", q); printf("*p:%d\n", *p); printf("*q:%d\n", *q); free(p); printf("memory freed.\n"); p = (int *)malloc(sizeof(int)); *p = 19; printf("p:%d\n", p); printf("q:%d\n", q); printf("*p:%d\n", *p); printf("*q:%d\n", *q); } how come output this? p:2067804800 q:2067804800 *p:10 *q:10 memory freed. p:2067804800 q:2067804800 *p:19 *q:19 once call free() on malloc() -ed pointer, memory (returned pointer) free re-allocated subsequent call malloc() family. that's whole point of having free() . quoting c11 , chapter §7.22.3.3 ...

c# - Custom Startup Window unity3d For Stand alone windows -

i trying make custom startup window or before start window unity3d standalone. not know how start working on have researched got noting can point me on direction or kick start. possible have seen option in player settings--> display resolution dialog-->hidden default how dose work , how can set own window if have personal edition, can't true customized start screen, per licenses page: https://unity3d.com/get-unity . cannot turn off default unity startup screen without using professional edition. the player settings -> display resolution dialog -> hidden default options enable/disable screen allowing player set resolution before game start. allowing player can have undesired effects, depending on how you've set game's resolution. on resolution screen, can set splash image scrolling down player settings inspector bit. to make pseudo-startup screen occurs after actual unity startup not difficult. take image want startup window, put on qua...

java - Eclipse Terminate Keyboard Shortcut -

how eclipse terminate? use keyboard shortcut ctrl + f11 run program , cannot enable terminate hotkey, since in development run program 100s of times per day waste lot of time clicking red terminate square. i have looked @ previous postings of question , have gone windows --> preferences --> general --> keys , found "terminate" command: have set binding shift + ctrl + f11 , set "when" setting "in windows" . have tried various other options shortcut never works. why? addendum: unfortunately there no keyboard shortcut terminate/disconnect all option mentioned below , cannot manually set one. @ least, should able terminate launches just 1 mouse click instructions below. consider solution significant part of problem, wasting lot of time clicking red terminate square. to terminate launches: first time setup: in menus, click window > show view > other... type debug in search box , select debug > debug click ok. ...

javascript - Bootstrap data-offset-bottom -

i have problem the bootstrap affix data-offset-bottom . therefore created small example show problem. container spyed stops @ right position when scrolling jumps. https://jsfiddle.net/j68mslno/4/ @import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'); body { position: relative; color: white; } .affix { top: 50px; width: 100%; z-index: 9999 !important; } .affix ~ .container-fluid { position: relative; top: 50px; } .navbar { margin-bottom: 0px; } #section1 { padding-top: 50px; height: 500px; background-color: #1e88e5; } #section2 { padding-top: 50px; height: 500px; background-color: #673ab7; } #section3 { padding-top: 50px; height: 1500px; background-color: #ff9800; } <nav class="navbar navbar-inverse" data-spy="affix" data-offset-bottom="1500"> <div class="container-fluid"> <p> stop @ section 3 </p> <div...

how to search for a string pattern in the current file and list the occurrences with lighttable? -

i search string pattern , list of occurrences below in light-table. i can search whole work-space , list me of occurrence how do single file? in single file search, how list of occurrences after search in current file editor? the 'find bar' searches current editor tab. 'searcher', default, searches of files in current workspace. there's no way find bar, searcher, can restrict files searched 1 file – replace default <workspace> (full) path of file want search.