打赏
摘要: var thread = new Thread(ThreadDo);//ThreadDo是调用COM组件的方法 thread.SetApartmentState(ApartmentState.STA); thread.IsBackgound=True; thread.Start(); 阅读全文
posted @ 2019-08-04 08:26 DanielXiaoyc 阅读(315) 评论(0) 推荐(0)
摘要: private void Do() { Task[] tasks = new Task[1]; Task task = new Task((param) => { }); tasks[0] = task; task.Start(); Task.WaitAll(tasks);//阻塞主线程 Task. 阅读全文
posted @ 2019-08-04 08:21 DanielXiaoyc 阅读(1664) 评论(0) 推荐(0)
摘要: 线程方法定义: public void ThreadDo(string param) 线程方法定义: public void ThreadDo(string param) { { } 线程方法调用: Thread thread = new Thread(() => ThreadDo("param1" 阅读全文
posted @ 2019-08-04 08:12 DanielXiaoyc 阅读(638) 评论(0) 推荐(0)
摘要: 1.创建MVC Project 或者空Project。 2.如果是空的Project,请用nuget添加Entity Framework,也可以通过命令行方式添加 Install-Package EntityFramework。 3.修改web.config中的DefaultConnection中的 阅读全文
posted @ 2019-07-13 20:54 DanielXiaoyc 阅读(156) 评论(0) 推荐(0)
摘要: 1.安装mysql 组件 pip install mysql # Database # https://docs.djangoproject.com/en/2.2/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django 阅读全文
posted @ 2019-06-23 12:02 DanielXiaoyc 阅读(125) 评论(0) 推荐(0)
摘要: 1.先安装Python,下载Python 3.7.3 2.安装虚拟环境virtualenv,用pip install virtualenv 进行安装 3.创建虚拟环境,virtualenv . 在当前目录创建虚拟环境 4.启动虚拟环境,scripts\activate ,激活当前虚拟环境,所有操作都 阅读全文
posted @ 2019-06-20 21:14 DanielXiaoyc 阅读(217) 评论(0) 推荐(0)
摘要: 效果: 代码: from wsgiref.simple_server import make_server def teacher(environ,start_response): start_response("200 OK",[('Content-Type','text/html;charset 阅读全文
posted @ 2019-06-01 10:13 DanielXiaoyc 阅读(345) 评论(0) 推荐(0)
摘要: 效果: 代码: from wsgiref.simple_server import make_server def run_server(environ,start_response): start_response("200 OK",[('Content-Type','text/html;char 阅读全文
posted @ 2019-06-01 09:39 DanielXiaoyc 阅读(125) 评论(0) 推荐(0)
摘要: 效果: 代码如下: import socket def main(): sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM) sock.bind(('localhost',8000)) print('listening....') sock. 阅读全文
posted @ 2019-06-01 09:23 DanielXiaoyc 阅读(1643) 评论(0) 推荐(0)
摘要: if object_id('##tmp1') is not null drop table #tmp1 select staffno, paydate into #tmp1 from dbo.OSS_ClockingDetail where paydate>getdate()-50 and Proc 阅读全文
posted @ 2019-05-30 11:44 DanielXiaoyc 阅读(317) 评论(0) 推荐(0)