using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(st...
分类:
其他好文 时间:
2014-11-15 12:54:02
阅读次数:
224
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(st...
分类:
其他好文 时间:
2014-11-15 11:28:56
阅读次数:
134
在学习了MouseArea、Text、Image这些基本组件后,我们这一章学习如何在QML中完成一些异步处理。...
分类:
其他好文 时间:
2014-11-14 21:15:07
阅读次数:
261
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks;namespace a { pub....
分类:
Web程序 时间:
2014-11-14 17:11:05
阅读次数:
198
在.net 4.0中,微软给我们提供了一个新的命名空间:System.Threading.Tasks。 一:?Parallel的使用 在Parallel下面有三个常用的方法invoke,for和forEach。 1: ?Parallel.Invoke ? ? 这是最简单,最简洁的将串...
分类:
其他好文 时间:
2014-11-14 14:25:18
阅读次数:
225
1:AsParallel(并行化) 下面我们模拟给ConcurrentDictionary灌入1500w条记录,看看串行和并行效率上的差异,注意我的老爷机是2个硬件线程。 using?System;
using?System.Threading;
using?System.Threading....
分类:
其他好文 时间:
2014-11-14 12:45:12
阅读次数:
264
这个相对于多进程更加简单,每accept一个新的连接就创建一个新的线程。代码如下: # coding: utf-8
import socket
import sys
import errno
import threading
from time import ctime class ClientTh...
分类:
编程语言 时间:
2014-11-13 23:56:05
阅读次数:
274
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
/*
****************************************
*定义了一个循环,定义了一个自定义异常类
*输出(如果输入1):
*1
*内finally
*第一级错误:自定义错误1第..
分类:
其他好文 时间:
2014-11-12 02:10:31
阅读次数:
252
创建控制器第一步:在controllers文件夹上点右键》添加》控制器,我这里选的是“MVC5控制器-空”,名称设置为:RolesAdminController.cs第二步:添加命名空间using System.Net;using System.Threading.Tasks;usingxxxx.M...
分类:
Web程序 时间:
2014-11-12 00:32:57
阅读次数:
374