task

Accessing Sharepoint tasks via web services?

♀尐吖头ヾ 提交于 2019-12-24 07:35:38
问题 I've looked at a lot of the previous questions asked about sharepoint and accessing objects via web-services, and I am pretty convinced that tasks can be accessed through the Lists interface. Can anybody please verify this for me? Also, if anyone has any examples of this I would be very grateful. I'm not a Sharepoint guy but I need to connect to an instance just to retrieve task objects. 回答1: Assuming you want a code solution using Visual Studio and C# Add a web reference to your SharePoint

Android 4.0 issue with Activity Stack and Task Stack

若如初见. 提交于 2019-12-24 07:14:08
问题 I am developing an app for android 4.0. I am confuse with Task and Activity stack for Android 4.0. suppose I have activities X,Y,Z of the same app. so when i fire Home intent with flag activity_clear_task i am navigated to home which is expected. case I when I am in some other app's activity say setting-> manage application and if Home intent is fired from my activity i am able to navigate to home but when i click on menu i don't see any thing thing is the new task is started ? I cant provide

Task's continuation (built by async/await) is running on main thread in a WPF application, but on child in a console application

瘦欲@ 提交于 2019-12-24 05:56:57
问题 Assume I have a simple C# Console Application: class Program { static async void func() { Thread.CurrentThread.Name = "main"; await Task.Run(() => { Thread.CurrentThread.Name = "child"; Thread.Sleep(5000); }); Console.WriteLine("continuation is running on {0} thread", Thread.CurrentThread.Name); } static void Main(string[] args) { func(); Thread.Sleep(10000); } } When 5000 ms pass, we see the "continuation is running on child thread" message. When another 5000 ms pass, main thread finishes

What's the difference between using Task and Task<TResult> in C#

断了今生、忘了曾经 提交于 2019-12-24 05:33:11
问题 Hi I'm making some experiment to understand Tasks. Here what I stumbled upon: static void Main(string[] args) { Console.WriteLine(String.Format("Master in the thread {0}", Thread.CurrentThread.ManagedThreadId)); Task t1 = Task.Factory.StartNew(TaskDoNothing); Console.WriteLine(String.Format("Result before wait")); Task.WaitAll(t1); Console.WriteLine(String.Format("Result after wait")); Console.ReadLine(); } static void TaskDoNothing() { Console.WriteLine(String.Format("Task in the thread {0}"

What's the difference between using Task and Task<TResult> in C#

倾然丶 夕夏残阳落幕 提交于 2019-12-24 05:33:08
问题 Hi I'm making some experiment to understand Tasks. Here what I stumbled upon: static void Main(string[] args) { Console.WriteLine(String.Format("Master in the thread {0}", Thread.CurrentThread.ManagedThreadId)); Task t1 = Task.Factory.StartNew(TaskDoNothing); Console.WriteLine(String.Format("Result before wait")); Task.WaitAll(t1); Console.WriteLine(String.Format("Result after wait")); Console.ReadLine(); } static void TaskDoNothing() { Console.WriteLine(String.Format("Task in the thread {0}"

ASP.NET Web API Client ProgressMessageHandler Post Task stuck in WinForm App

吃可爱长大的小学妹 提交于 2019-12-24 04:58:11
问题 I'm using HttpClient and ProgressMessageHandler from the MS ASP.NET Web API Client Libraries. I've happily tinkered with this in a console application without issue, but now in a WinForm app, a "Post" task just gets plain old stuck on either .Wait() or .Result . Below is a complete listing of my very simple test application. Button 1 works fine, Button 2 freezes every time on the call to postTask.Result . Why? Targetting 4.0 or 4.5 makes no difference. The same code in a console application

How do I wrap a rogue function with a timeout?

旧街凉风 提交于 2019-12-24 03:14:11
问题 I've got a function in a 3rd party library that occasionally goes rogue and never returns. Something like so: // This is 3rd party function so I can't make it take a cancellation token. public void RogueFunction() { while (true) { _logger.LogInformation("sleeping..."); Thread.Sleep(100); } } I'd like to wrap it in a task with a timeout which is easy enough to do with a 'task.Wait(mills)'. While this returns control to me after the timeout, it doesn't actually kill the task. In the code below,

Does a loop with Task.Delay() create a memory leak?

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:07:49
问题 I am implementing an asynchronous buffer system where I want exactly one consumer of a queue to guarantee that items are processes in order. The consumer should check the queue periodically, process all items in it, and then "Sleep" for some interval. Task.Delay() seems perfect for such a system, since unlike Thread.Sleep() it won't consume a thread while sleeping and unlike Timer it won't launch a new thread if processing the queue items takes longer than the sleep interval. However, I'm

How do I specify “Run with highest privileges” in VBScript?

我是研究僧i 提交于 2019-12-24 02:59:28
问题 When I use the GUI Task Scheduler, I can easily check the "Run with highest privileges" checkbox. I found no such option in the VBScript command line too, however. Is there a way to do that from the VBScript? How to add this script this two feature? Example VBScript: http://msdn.microsoft.com/en-us/library/aa383665%28v%3DVS.85%29.aspx Privileges: http://msdn.microsoft.com/en-us/library/windows/desktop/aa382076%28v=vs.85%29.aspx 回答1: This VBScript code automates the SchTasks.exe program and

Task Parallelism - Task OnCompleted trigger on after all ContinueWith

为君一笑 提交于 2019-12-24 02:12:31
问题 I am facing a problem on processing the task.GetAwaiter().OnCompleted(new Action) I have a main task with multiple ContinueWith, but when i return the main task and add a delegate on the OnCompleted, it is triggered after the main task is processed and not after all the ContinueWith My question is, is there a way to know when all the continue with is finished? Here is my current code. runningTask.Start(); runningTask.GetAwaiter().OnCompleted(() => { KeyValuePair<int, Func<bool>> validator =