background-foreground

iOS app applicationWillEnterForeground and it stuck for a while

时光总嘲笑我的痴心妄想 提交于 2019-12-05 18:52:11
问题 I add this function to post a notification when the app enter foreground: - (void)applicationWillEnterForeground:(UIApplication *)application { [[NSNotificationCenter defaultCenter] postNotificationName: @"UIApplicationWillEnterForegroundNotification" object: nil]; } In my own class: - (void) handleEnterForeground: (NSNotification*) sender { [self reloadTableData]; } - (void)viewDidLoad { [super viewDidLoad]; [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector

Parameter of BackgroundSubtractorMOG2

為{幸葍}努か 提交于 2019-12-03 10:09:04
问题 I have Problem understanding all Parameter of backgroundsubtractormog2. I looked in the code (located in bfgf_gaussmix2.cpp ), but don't see the connection to the mentioned paper. For exmaple is Tb = varThreshold, but what is the name of Tb in the paper? I am especially interested in the fat marked parameter. Let's start with the easy parameter [my remarks]: int nmixtures Maximum allowed number of mixture components. Actual number is determined dynamically per pixel. [set 0 for GMG] uchar

Image segmentation with maxflow

六月ゝ 毕业季﹏ 提交于 2019-12-03 08:04:21
问题 I have to do a foreground/background segmentation using maxflow algorithm in C++. (http://wiki.icub.org/iCub/contrib/dox/html/poeticon_2src_2objSeg_2src_2maxflow-v3_802_2maxflow_8cpp_source.html). I get an array of pixels from a png file according to their RBG but what are the next steps. How could I use this algorithm for my problem? 回答1: I recognize that source very well. That's the Boykov-Kolmogorov Graph Cuts library. What I would recommend you do first is read their paper. Graph Cuts is

How to properly wait for foreground/background processes in my own shell in C?

末鹿安然 提交于 2019-12-03 07:03:35
In this previous question I posted most of my own shell code. My next step is to implement foreground and background process execution and properly wait for them to terminate so they don't stay as "zombies". Before adding the possibility to run them in the background, all processes were running in the foreground. And for that, I simply called wait(NULL) after executing any process with execvp(). Now, I check for the '&' character as the last argument and if it's there, run the process in the background by not calling wait(NULL) and the process can run happily in the background will I'm

Parameter of BackgroundSubtractorMOG2

杀马特。学长 韩版系。学妹 提交于 2019-12-03 00:42:50
I have Problem understanding all Parameter of backgroundsubtractormog2 . I looked in the code (located in bfgf_gaussmix2.cpp ), but don't see the connection to the mentioned paper. For exmaple is Tb = varThreshold, but what is the name of Tb in the paper? I am especially interested in the fat marked parameter. Let's start with the easy parameter [my remarks]: int nmixtures Maximum allowed number of mixture components. Actual number is determined dynamically per pixel. [set 0 for GMG] uchar nShadowDetection The value for marking shadow pixels in the output foreground mask. Default value is 127.

Image segmentation with maxflow

无人久伴 提交于 2019-12-02 21:31:09
I have to do a foreground/background segmentation using maxflow algorithm in C++. ( http://wiki.icub.org/iCub/contrib/dox/html/poeticon_2src_2objSeg_2src_2maxflow-v3_802_2maxflow_8cpp_source.html ). I get an array of pixels from a png file according to their RBG but what are the next steps. How could I use this algorithm for my problem? I recognize that source very well. That's the Boykov-Kolmogorov Graph Cuts library. What I would recommend you do first is read their paper . Graph Cuts is an interactive image segmentation algorithm. You mark pixels in your image on what you believe belong to

How to bring chrome to foreground from a web app

守給你的承諾、 提交于 2019-12-02 13:08:23
Is there any windows apps/google chrome flags/google chrome extension/javascript methods or any other thing that would allow to bring a chrome window from background(minimized) to foreground when something happens inside a website. I do have access to the client computer, I could set chrome flags/kiosk mode or anything that would prevent it from opening to foreground if it's possible. For example I am trying to bring the window to foreground when an order comes in, through a notification (I'm using firebase messages). I tried to do window.open() in setBackgroundMessageHandler() in the service

Running celeryd_multi with supervisor

笑着哭i 提交于 2019-12-01 04:09:16
I'm working with djcelery and supervisor. I was running a celery with supervisor and everything worked fine, once I realized that I needed to change it to celery multi everything broke up. If I run celeryd_multi in a terminal it works but always run in background, like supervisor need that the command run in foreground there where the problem is. This is my celery.ini : [program:celery_{{ division }}] command = {{ virtualenv_bin_dir }}/python manage.py celeryd_multi start default mailchimp -c:mailchimp 3 -c:default 5 --loglevel=info --logfile={{ log_dir }}/celery/%n.log --pidfile={{ run_dir }}

iphone 4 sdk : detect return from background mode

孤者浪人 提交于 2019-11-28 17:15:49
How can I detect that an app has just returned from "background mode"? I mean, I don't want my app to fetch data (each 60 sec) when the user press the "home button". But, I'd like to make some "special" update the first time the app is in foreground mode. How can I detect these two events: app going to background mode app going to foreground mode Thanks in advance. François Here's how to listen for such events: // Register for notification when the app shuts down [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myFunc) name:UIApplicationWillTerminateNotification object

Use of background/foreground methods in AppDelegate

爱⌒轻易说出口 提交于 2019-11-28 16:49:58
I'm planning to implement multi-task in my app. I can see many methods here to do that in the AppDelegate like applicationWillResignActive , applicationDidEnterBackground , applicationWillEnterForeground , ... But.... I don't see the way they should be used, nor why they are not in the ViewControllers... Nor what they are here for. I mean : when the app enter in background, i don't know on which view my user is. And back, when the app comes into foreground, how would I know what to do and what I may call, to update the view for example ? I would have understood if those methods where in each