Posts

css - Exploding animation using css3. -

i'm new site , coding. trying find out how create exploding image on hover using css or css3. can tell me if possible. comments great. if want break multiple pieces when ‘exploding’, don't think can css3. if, on other hand, consider making large ‘exploding’, doable: img { transition: 0.5s; } img:hover { opacity: 0; transform: scale(3) rotate(10deg); } try it.                          okay, guess that's not of explosion, oh well

MySQL Trigger causing unknown system variable error on existing row -

i creating trigger in mysql , getting 'unknown system variable' on 'unique_id' row in 'pending_jobs' table. trigger code below: create trigger format_pending_jobs_unique before insert on pending_jobs each row begin set unique_id = concat(prefix_unique_id, id); end basically it's concatenating 2 rows (prefix_unique_id , id) row unique_id when new row inserted. prefix_unique_id row has default value of "sa" value of of them , id index of row auto increment. i'm new triggers , had read in post on stack overflow use := instead of = didn't fix problem. i'm using phpmyadmin , see unique_id (as prefix_unique_id , id) rows exists. great. thanks! i write trigger way: create trigger format_pending_jobs_unique before insert on pending_jobs each row set new.unique_id = concat( new.prefix_unique_id, (select auto_increment information_schema.tables table_schema=database() , table_name=...

java - Wondering what should I do if the length of an array is even -

i have written code find middle element sorted array. here part of code: java code: int[] = {1,2,3,4,5}; int x = a.length; if (x % 2 != 0){ int mid = 0 + x/2; system.out.println("the middle element : " + a[mid]); } i'm getting output wondering should write in else condition of code above? in other words, should find middle element if a.length even? possible? we can't answer you. depends on requirements. here options: return 2 middle ones. return earlier option that's in middle. throw exception method can't called on length. etc.

c++ - Memory issues with threads -

i'm working on multi-threaded server application. have struct try pass 2 threads: struct params{ safequeue<int> *mq; database *db; }; class server{ server(database *db){ dword sthread, ethread; params *p; p = new params; p->db = db; safequeue<int> *msgq = new safequeue<int>; p->mq = msgq; cout << "address of params: " << p << endl; cout << "address of safequeue: " << msgq << endl; cout << "starting server...\n"; createthread(null, 0, smtpreceiver, &p, 0, &sthread); createthread(null, 0, mqueue, &p, 0, &ethread); } } dword winapi mailqueue(lpvoid lpparam){ params *p = (params *) lpparam; safequeue<int> *msgq = p->mq; cout << "address of params: " << p << endl; cout << "address of safequeue: " << msgq << endl; cout << "queue thread...

python - extract string within string with out double quote -

this learning purpose, have following code. if wanna extract 'abcbc' out double quote? tried re.search(r'\a\"(.*?)\"',a).group() noting change. >>> = "\"abcbc\" lol" >>> re.search(r'\a"(.*?)"',a).group() '"abcbc"' also if change pattern '\a"(.*?)' should return after double quote? gives following. there wrong? >>> re.search(r'\a"(.*?)',a).group() '"' you capturing want in group, calling group() no arguments, returning entire match (group 0), not group want (which group 1). call .group(1) return first group, has want. >>> = "\"abcbc\" lol" >>> re.search(r'\a"(.*?)"',a).group(1) 'abcbc' as second question, *? non-greedy: match little can. since * allows matching zero, *? match nothing if can --- , can, since don't have after force match point....

enthought - Cannot launch Canopy in GNU/Linux (openSUSE 12.3) -

after installation, when do $ ~/canopy/canopy i traceback (most recent call last): file "/home/joon/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/__boot__.py", line 9, in <module> sys.exit(main()) file "build/bdist.linux-x86_64/egg/canopy/app/bootstrap.py", line 1335, in main file "build/bdist.linux-x86_64/egg/canopy/app/bootstrap.py", line 1315, in send_bug_report file "build/bdist.linux-x86_64/egg/canopy/feedback/data_reporter.py", line 390, in start file "/home/joon/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/enaml/core/import_hooks.py", line 131, in load_module exec code in mod.__dict__ file "/home/joon/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/canopy/feedback/data_reporter_view.enaml", line 4, in pyface.api import clipboard file "/home/joon/canopy/appdata/canopy-1.0.0.1160.rh5-x86_64/lib/python2.7/site-packages/pyface/a...

Vertical issues with YouTube modal window, CSS and HTML only -

i'm trying make modal window plays youtube video. final result should dynamically resize fill contents of viewport while respecting 16:9 aspect ratio. should stop expanding once has reached 720p. i'm running these problems: the video not respect height of viewport if width large (overflow) the video not @ vertically centered i have no idea @ how fix these. have looked hours @ many similar stack overflow questions , have not made progress. there hope? my html: <div id="youtube-overlay"> <div id="youtube-margin"> <div id="youtube-container"> <iframe class="youtube-hd" src="http://www.youtube.com/embed/novw62mwsqq?rel=0&autoplay=1&autohide=1&showinfo=0" frameborder="0" ></iframe> </div> </div> </div> my css: #youtube-overlay { background-color: rgba(0, 0, 0, .85); height: 100%; width: 100%; ...