task

Need single activity in new task backstack

帅比萌擦擦* 提交于 2019-12-11 09:28:55
问题 It is nightmare when must deal with android task and launching modes(flags). Need accomplish this scenario: From background service launch Activity[1] that belongs to App[A] in new task. When user go [back] - finish activity[1] and resume whatever App was previously in foreground! If App[A] was active and running - there is no problem, [beck] close Activity[1] and resume App[A]. But if any other App[B] is in foreground at the moment when launching Activity[1] (even with the new Task) all App

What is `TaskEx.WhenAll` in the Async CTP?

自古美人都是妖i 提交于 2019-12-11 08:48:29
问题 I thought TaskEx.WhenAll would return when all the tasks gets finished which is passed within the method. So await on TaskEx.WhenAll would return the array of Return statements, such that when every object gets finished, the array will be returned. But it is not so. When I do : public async Task AsynchronousCallServerMordernParallelAsync() { List<Task<string>> lstTasks = new List<Task<string>>(); StringBuilder builder = new StringBuilder(); for (int i = 2; i <= 10; i++) { using (WebClient

Gradle delete task failing with “unable to delete file”

限于喜欢 提交于 2019-12-11 08:38:57
问题 I have the following delete task added to my build.gradle file: task cleanExtra(type: Delete) { delete '../version.properties' } clean.dependsOn(cleanExtra) Sometimes, when I call gradle clean , it will fail with "Unable to delete file: (...)/version.properties". But if I call the same clean task a second time, it will successfully delete the task. Why does this happen? Anyway to avoid it? 回答1: It sounds like JIRA issue Gradle-2244 : Unable to delete file/directory, and then a subsequent

Rails 3 and scheduling of repetitive tasks without cron

怎甘沉沦 提交于 2019-12-11 07:53:34
问题 I have a app and i am currently using delayed_job. I was wondering if there are any recommended gems that do scheduling of repetitive tasks. I want to schedule task that happen on a certain frequency to clean the database/sending emails/run other methods. I mite want to run some tasks every day or every hour. Is there any good ones out there that are fairly easy to setup and config which do not use CRON. 回答1: You can convert that repetitive work to rakes and call those rakes via cron. For

Powershell to run task sequence from software center

五迷三道 提交于 2019-12-11 07:01:54
问题 I have Windows OS image advertised in software center which I can manually hit install that reimages the system and does other configuration afterwards. I would like to automate the execution using Powershell. I am able to do do for other advertised software like notepad++, chrome, and software updates but not to OS image. Is there any way automate it at the client side using Powershell or any other script? I do not have SCCM access to push the task sequence. Thank you 回答1: Try the

iOS Running a timer within your code in the background

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:58:41
问题 So I've read that in iOS, all timers will pause when your app is running in the background. I've also read that you can run tasks in the bg using beginBackgroundTaskWithExpirationHandler (like so). What I am trying to achieve is to call a method once every 3 minutes, and another method a fixed-amount of time before the first one. I have managed to do this within one NSTimer which repeats in a way that lets me do this. It works fine but is obviously disabled (or paused) when the app is in the

How to cancel a async task that starts a process in C#?

戏子无情 提交于 2019-12-11 06:18:43
问题 Currently my code runs a checkout from svn and redirections the stdout and stderr to a textbox using two tasks as seen below. I want to be able to cancel the task immediately when a user clicks the StopButton and be able to cancel the download. I understand that if I changed my cmd.exe command to say something such as "Pause", which continues to run until a user clicks something, I can cancel this command with the StopButton. I am very new to C# and trying to understand why I can cancel that

Waiting for OpenMP task completion at implicit barriers?

雨燕双飞 提交于 2019-12-11 05:53:00
问题 If I create a bunch of OpenMP tasks and do not use taskwait , where does the program wait for that tasks completion? Consider the following example: #pragma omp parallel { #pragma omp single { for (int i = 0; i < 1000; i++) { #pragma omp task ... // e.g., call some independent function } // no taskwait here } // all the tasks completed now? } Does the program wait for task completion at the implicit barrier at the end of the single block? I assume so, but cannot find any information about

Open python file with Task scheduler

让人想犯罪 __ 提交于 2019-12-11 05:47:57
问题 I have a .py file that reads integers from a separate csv , i just cant launch it from windows task scheduler, after 2 days and much frustration im posting here. A lot of similar questions have been posted but none are answered adequately for my case. I have no problems launching other python files or exe's, the problem arises when the python file needs to read a csv. I have turned the file into a batch file, and i have also went through every possible permutation of administration and

Download BitmapImage using Task Parallel Library

随声附和 提交于 2019-12-11 05:35:11
问题 Downloading a BitmapImage from a URI on the UI thread hangs up the application. To avoid this, I'm trying to download the BitmapImage in a separate thread, would like to know if it can be made simple with TPL. My current method is the following: Task.Factory.StartNew<BitmapImage>(() => new BitmapImage(myUri) { CacheOption = BitmapCacheOption.OnLoad }, CancellationToken.None, TaskCreationOptions.None, new StaTaskScheduler(1)) .ContinueWith(t => image1.Source = t.Result, TaskScheduler