Posts

Does Matlab execute a callback when a plot is zoomed/resized/redrawn? -

in matlab, update data plotted in set of axes when user zooms plot window. example, suppose want plot particular function defined analytically. update plot window additional data when user zooms traces, can examine function arbitrary resolution. does matlab provide hooks update data when view changes? (or when redrawn?) yes, does. zoom mode object has following callbacks: buttondownfilter actionprecallback actionpostcallback the latter 2 executed either before or after zoom function. set update function in actionpostcallback , you'd update plot according new axes limits (the handle axes passed second input argument callback).

java - Posting updates to "a" wall -

i have facebook 'like' application - virtual white board multiple 'teams' share 'wall' common project. there 9-12 entities capture data. i'm trying have user's homepage display update of activities have happened since past login - how facebook posts notifications: "[user] has done [some activity] on [some entity] - 20 minutes ago" where [...] clickable links , activities (rather only) crud. i'll have persist these updates. i'm using mysql backend db , thought of having update table per project store activities. seems there needs 1 trigger per table , redundant. more it's difficult nail down tabular schema update table since there many different entities. the constraint use mysql i'm open other options of "how" achieve functionality. any ideas? ps: using jquery + rest + restlet + glassfish + mysql + java it doesn't have handled @ database level. can have transaction logging service call in ...

python - pymysql fetchall() results as dictionary? -

is there way results fetchall() dictionary using pymysql? pymysql includes dictcursor . think want. here's how use it: import pymysql connection = pymysql.connect(db="test") cursor = connection.cursor(pymysql.cursors.dictcursor) cursor.execute("select ...") https://github.com/pymysql/pymysql/blob/master/pymysql/tests/test_dictcursor.py

Efficient pagination with MySQL -

i'm trying speed pagination of data on site. i'd use following query, when explain says needs scan on 40,000 rows: select `item`.`id`, `user`.`id` `items` `item` left join `users` `user` on (`item`.`submitter_id` = `user`.`id`) `item`.`made_popular` < "2010-02-08 22:05:05" , `item`.`removed` != 1 order `item`.`made_popular` desc limit 26 but if add lower bound "made_popular" field needs scan 99 rows (the number of items between 2 dates). select `item`.`id`, `user`.`id` `items` `item` left join `users` `user` on (`item`.`submitter_id` = `user`.`id`) `item`.`made_popular` < "2010-02-08 22:05:05" , `item`.`made_popular` > "2010-02-07 22:05:05" , `item`.`removed` != 1 order `item`.`made_popular` desc limit 26 both queries use index have on "made_popular" column. in both cases shouldn't need scan 26 rows, assuming there no "removed" items? guess solution go second que...

C -> sizeof string is always 8 -

#include "usefunc.h" //don't worry -> lib wrote int main() { int i; string given[4000], longest = "a"; //declared new typdef. equivalent 2d char array given[0] = "a"; printf("please enter words separated rets...\n"); (i = 1; < 4000 && !stringequal(given[i-1], "end"); i++) { given[i] = getline(); /* if (sizeof(given[i]) > sizeof(longest)) { longest = given[i]; } */ printf("%lu\n", sizeof(given[i])); //this returns eight!!! } printf("%s", longest); } why return 8??? there no string data type in c. c++? or string typedef? assuming string typedef char * , want strlen , not sizeof . 8 getting sizeof size of pointer (to first character in string).

xcode - iOS remote provisioning? -

right now, way can test app on device physically plug laptop, , build/deploy xcode directly it. there way can remotely without physically plugging device mac? to second moshe , clay said, can use number of services provide over-the-air distribution. testflight fully-featured service provides team , beta campaign management in addition over-the-air distribution. hosted service there no setup. hockey similar in execution , great job well. haven't used hockey, can't speak it's full feature set. full disclosure, 1 of mobile devs on testflight.

java - Ehcache write-behind caching thread-priority -

i'm trying use ehcache write-behind caching write batches of transactions database. need write-behind cache dump transactions @ 5 second intervals (or more often). i must missing something, because try might, won't work. set write-behind caching, , put load onto server. thousands, , hundreds of thousands of transactions later, , after waiting several minutes, there still nothing in database. isn't until shut down load on server cache begins writing database. is problem thread-priority? there way modify ehcache perform db writes when server under load? here configuration: <cache name="server.db.model.request" maxelementsinmemory="10000" eternal="false" timetoidleseconds="5" timetoliveseconds="5" overflowtodisk="false" memorystoreevictionpolicy="fifo"> <cachewriter writemode="write_behind" maxwritedelay="5" ratelimitpersecond="5" writecoalesc...