- 博客(471)
- 资源 (8)
- 收藏
- 关注
原创 同步异步 生产者/消费者
namespace Test{ class Program { private static readonly BlockingCollection<int> ts = new System.Collections.Concurrent.BlockingCollection<int>(); static void Main...
2020-03-22 09:57:27
266
转载 鼠标右键选中行
转自:https://www.cnblogs.com/dekevin/p/3626944.html事件是 CellButtonDownprivate void HandleCellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseB...
2020-03-03 16:48:02
249
翻译 多线程中的同步 ,锁资源
// This example shows how a Mutex is used to synchronize access// to a protected resource. Unlike Monitor, Mutex can be used with// WaitHandle.WaitAll and WaitAny, and can be passed across// AppDo...
2020-03-02 13:41:48
358
原创 创建和如何查看存储过程 task_insert
https://www.jianshu.com/p/abab22348e55if(exists(select * from sys.objects where name= 'task_insert' )) drop proc task_insert go create proc task_insert( @TaskNo nvarchar(40), @TaskType ...
2020-02-27 11:06:29
284
转载 正由另一进程使用,因此该进程无法访问该文件-----解决办法总结 GDI+
原创small_Y 最后发布于2013-12-18 18:14:29 阅读数 27961 收藏展开读取文件:第一种:这是因为文件还没关闭就被操作(move/delete/rewrite等)引起的错误解决办法:可能因为某个进程还没完成就执行下一个进程,为确保操作文件的进程已经关闭,可以使用Thread.Sleep(2000),即等待2秒后再操作文件,如果还不够,可以增加到5秒...
2020-02-21 23:14:03
11331
原创 socket 一些基础类
IPAddress ipAddress=Dns.Resole("localhost").AddressList[0];IPAddress i=IPAddress.Parse("127.0.0.1");IPAddress.Parse(((IPEndPoint)tcpListener.LocalEndpoint).Address.ToString())IPEndPoint =new ...
2020-02-19 15:18:21
213
原创 SetBuffer socket
ExamplesThe following code example creates a single large buffer which can be divided up and assigned to SocketAsyncEventArgs objects for use with each socket I/O operation. This enables buffers to...
2020-02-19 11:53:54
263
原创 web service 代理
https://www.cnblogs.com/dengxinglin/p/3333531.htmlwsdl.exe /l:cs /out:D:\Proxcy_AGVDispatchService.cs http://localhost:53283/AgvDispatchService.asmx?wsdl将生成的文件拷到项目中,就只可以使用里面的方法...
2020-01-10 11:21:31
196
原创 winform 访问web service
winform 端调用using Newtonsoft.Json;using System;using System.Collections;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;u...
2020-01-08 17:26:16
263
转载 hashtable 转 json
zhuan:https://www.cnblogs.com/sntetwt/p/3500740.html代码如下:ArrayList eventList = new ArrayList(); for (int i = 0; i < 3;i++ ) { Hashtable ht ...
2020-01-07 15:42:45
2428
原创 关于C#调用WebServices的方法
关于C#调用WebServices的方法https://www.cnblogs.com/CreateFree/p/8423315.html第一种:最常见的就是直接在项目的引用中右击添加服务引用此方法用法如下:首先需要添加引用;然后需要实例化,实例化完了之后就可以通过实例化的对象调用webservices的方法;这个方法以前常用,可惜这次不行了;第二种:不用通...
2020-01-07 14:24:33
1622
原创 ajax 问题总结
1. 首先 ajax在调试时的 type,url等都是显示未定义,如果success之后 取数据未 undefined,则考虑是取数据的位置不对(考虑数组)2. console.log() ,console.log(typeof data) 方法在调试的时候会有用,可以打印出想要的数据样式3. json数组样式<!DOCTYPE html><html lang=...
2019-12-03 20:23:55
238
原创 sql 汉字简单排序
但是因为在数据库中存储顺序问题出来的结果是SQL code? 1 2 3 用电二队 用电三队 用电一队 select distinct area_name from area_addr_infoorder by charindex(substring(area_name,3,1),'一二三四')...
2019-11-02 13:35:08
526
原创 Css 居中
参考:https://www.cnblogs.com/yugege/p/5246652.html.content { /*width: 300px; height: 300px;*/ /*background: orange;*/ margin: 0 auto; /*水平居中*/ ...
2019-11-01 10:25:03
163
转载 sql 大全
转自:https://www.cnblogs.com/1234abcd/p/5530314.html返回主页 浪迹天涯芳草博客园 首页 新随笔 联系 订阅 管理随笔 - 11 文章 - 2 评论 - 0经典SQL语句大全(绝对的经典)一、基础1、说明:创建数据库CREATE DATABASE database-name 2、说明:删除数据库drop database db...
2019-10-30 20:56:05
225
原创 左链接与子查询效率比较
经测试 左链接的效率要高很多,子查询要建临时表测试转自https://bbs.csdn.net/topics/391030135?page=1create table A (id char(10),fname varchar(20))gocreate table B (id char(10),fname varchar(20))godeclare @i intset @i=0...
2019-10-26 13:48:41
3682
原创 sql 一层层传参,数据来源,与下拉列表加入数据库的值
新增,更新时页面传参:PMTemplateID#{[ID]}; SubClasses#{[SubClasses]};更新: 筛选条件:IsDel=0 and PMTemplateID={[ID]} and SubClasses={[SubClasses]}UpdateTime#select getdate();UpdateUs...
2019-10-17 19:16:43
145
原创 存储过程
select name from sys.procedures where name='UP_Sys_Oth_ChangeCompanyInfo'exec sp_helptext 'UP_Sys_Oth_ChangeCompanyInfo'/*目的:修改单位信息启用还是未启用状态前先判断该单位下是否有子单位或部门作者:时间:2017-02-14*/CREATE PROCED...
2019-10-14 09:47:14
136
原创 Aspx 前后端传参
//后台定义全局的变量 ,在Page_Load时候传参//前端用<%="后端变量"%> 取值 <script 中同样可用<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %>...
2019-10-13 17:53:43
1375
原创 DispatchProxy 代理 反射 私有方法
using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;using System.Threading.Tasks;namespace ConsoleApp1{ class Program { s...
2019-10-05 09:52:26
377
原创 web api 学习过程总结
1. 特性 [Produces("application/json")]public class AuthorsController[FormatFilter]public class ProductsController{ [Route("[controller]/[action]/{id}.{format?}")] public Prod...
2019-09-03 11:41:37
1666
原创 设计模式
文章连接:http://www.rmfusion.com/design_patterns/design_patterns_menu.htmhttps://www.dofactory.com/net/design-patterns
2019-08-09 15:13:17
130
原创 tuple, valueTuple
tuple : 引用类型valueTuple: 值类型 超过64k,不建议用结构体都是用itemN取值都是1-7 ,之后可以通过 tuple< > 扩展,rest取值 , valueTuple可以直接用itemN取值valueTuple 可以使用 var(_, X,_) 作为赋值变量,返回值可以不带valueTuple , 类似(string ...
2019-08-09 09:34:20
402
原创 全局缓存 gacutil 检测是否已安装 dll
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools用VS commandline 执行命令gacutil -l "ClassLibrary1" 检测ClassLibrary1.dll是否加入全局缓存...
2019-08-09 08:45:19
476
1
转载 中介者模式
using System;namespace MediatorPattern{ // 抽象牌友类 public abstract class AbstractCardPartner { public int MoneyCount { get; set; } protected AbstractCardPartner() ...
2019-08-07 14:34:22
181
原创 outlook2010 配置
http://help.sundns.com/project_exchange2010/2012/0927/45.html
2019-08-05 16:31:59
538
转载 卸载 安装msiexec.exe
安装程序在vs.net是自带的,尤其是在.net2005中,非常方便,界面也比2003美观了许多。但是仍然存在的不方便的地方就是没有自带卸载程序,如果要求安装的人都从控制面板中去卸载,也太费劲了,所以今天上网找了找例子,发现了一些,所以一一记述下来。方法一:利用msiexec.exe文件(一般在\winnt\system32目录下)。将该文件集成到安装文件目录中,然后选择安装项目的工程属性,找到...
2019-08-02 09:50:14
5673
转载 ConcurrentDictionary
http://dotnetpattern.com/csharp-concurrentdictionaryConcurrentDictionary is one of five collection classes introduced in .NET 4.0. It exists in System.Collections.Concurrent namespace.ConcurrentDic...
2019-07-26 08:41:36
538
转载 winform 更新
https://www.cnblogs.com/shitong/p/5764200.htmlhttps://www.cnblogs.com/OMango/p/8509436.html
2019-07-23 14:56:05
408
转载 asp.net core项目中如何使用html文件
转自:https://www.easck.com/cos/2019/0525/297095.shtml大家应该都知道,在asp.net core 项目中,使用html文件一般通过使用中间件来提供服务:打开 NuGet程序管理控制台输入install-package Microsoft.aspnetcore.staticfiles进行添加ASP.NET Core static...
2019-07-17 15:24:45
4939
2
转载 session C#
<body> <form action="Handler1.ashx" method="post"> <input type="hidden" name="_viewstate" value="a" /> <input type="hidden" name="_div" value="@n" /> ...
2019-07-17 14:42:27
263
转载 C# 后台处理 和隐藏域问题
例子: 使用hidden实现点击提交按钮数字加1 数值自增.htm 复制代码代码如下:<form action="数值自增.ashx" method="post"> <input type="hidden" name="_viewstate" value="a" /> <input type="hidden" name="_div" value="@...
2019-07-17 11:21:34
768
转载 signal 连接问题
public async Task StartConnection(){ var connection = new HubConnection("http://localhost:32986/"); var hub = connection.CreateHubProxy("MessageHub"); await connection.Start(); await...
2019-07-16 17:27:55
2712
转载 控件 异步 invoke
private void ReceiveMsg(string clientId, string message) { if (richTextBox1.InvokeRequired) { Invoke(new Action(() => { ReceiveMsg(clientId,message); }...
2019-07-16 17:23:30
341
原创 IIS 局域网配置 需要开启防火墙
3.点击网址名称,然后再点击配置文件路径打开配置文件4.添加配置在<site>节中找到当前项目的配置,添加本机内网访问地址5.关闭VS,以管理员身份重新打开关闭VS后,IIS Express应该会随之关闭,如果VS抽风导致IIS Express没自动关闭,右键手动退出即可以管理员身份运行VS,启动调试,即可看到新加的内网访问地址,并且可以内网正常访问的。不以管理员...
2019-07-12 12:30:24
503
转载 git 获取子集
http://www.360doc.com/content/18/0124/11/38701044_724667106.shtml$mkdir project_folder$cd project_folder$git init$ git remote add -f origin <url>$ git config core.sparsecheckout tru...
2019-07-05 09:36:36
251
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅