码迷,mamicode.com
首页 >  
搜索关键字:task    ( 7323个结果
AsyncEnumerableExtensions.cs z
public static class Extensions{public static async Task ForEachAsync(this IEnumerable collection, Func> body, IObserver observer = null){foreach (var ...
分类:其他好文   时间:2014-05-23 10:55:36    阅读次数:213
calculate the sum of some integers
DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line s...
分类:其他好文   时间:2014-05-23 06:41:47    阅读次数:298
How to cancel parallel loops in .NET C# z
Cancellation tokenParallel optionsCancellationTokenSource cancellationTokenSource = new CancellationTokenSource();Task.Factory.StartNew(() =>{ Thre...
分类:Web程序   时间:2014-05-22 16:43:14    阅读次数:332
调用录音界播放音频文件
/* 播放录音文件 */private void playMusic(File file){Intent intent = new Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(android.con...
分类:其他好文   时间:2014-05-22 15:18:27    阅读次数:269
POJ 3978(求素数)
Primes Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3204 Accepted: 1245 Description A pretty straight forward task, calculate the number of primes b...
分类:其他好文   时间:2014-05-22 09:02:28    阅读次数:517
Gradle 加载 Android 下.so文件
1.在工程下新建 jni/libs  文件夹   , jni 是和原来的libs  同级 ,将所有的.so文件放入 新建的libs文件下 2.在build.gradle 文件中新增以下内容到android{ } 下   task copyNativeLibs(type: Copy) {         from(new File(project(':HealthCare'...
分类:移动开发   时间:2014-05-22 08:50:52    阅读次数:381
51系列小型操作系统精髓 简单实现6 C语言版待改进
#include "STC12C5A.H" #define TIMER_RELOAD()  {TL0=0x00;TH0=0xC4;}//使能T/C  初始10ms #define MAX_TASKS 8 //任务槽最大个数. unsigned char idata task_stack[MAX_TASKS][2];//任务堆栈.  PC指针为16位,需2个字节。 unsi...
分类:编程语言   时间:2014-05-21 08:12:12    阅读次数:285
AsyncTask类浅析
使用AsyncTask类遵守的准则:1Task的实例必须在UIthread中创建;2Execute方法必须在UIthread中调用;3不要手动的调用onPfreexecute(),onPostExecute(result)Doinbackground(params…),onProgressupdate(progress…)这几个方法;4该task只能被执行一次,否则多次调用时将会出现..
分类:其他好文   时间:2014-05-20 20:50:16    阅读次数:469
Big Number------HDOJ杭电1212(大数运算)
Problem Description As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B. To make the problem easie...
分类:其他好文   时间:2014-05-20 14:42:07    阅读次数:324
51系列小型操作系统精髓 简单实现4
#include #define MAX_TASKS 2 //任务槽个数.必须和实际任务数一至 #define MAX_TASK_DEP 12 //最大栈深.最低不得少于2 个,保守值为12. unsigned char idata task_stack[MAX_TASKS][MAX_TASK_DEP];//任务堆栈. unsigned char idata task_sp[MA...
分类:其他好文   时间:2014-05-18 05:12:43    阅读次数:339
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!