自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 收藏
  • 关注

原创 Docker- delete all images and containers from windows

use powershell:delete all images:docker rmi $(docker images -q)delete all containers:docker rm$(docker ps -a -q)

2019-05-05 14:24:51 400

转载 C# XmlMode convert to XElement and XElement convert to XmlNode

XmlMode convert to XElementprivate XElement GetXElement(XmlNode xmlNode) { XDocument xDoc = new XDocument(); using (XmlWriter xmlWrite = xDoc.CreateWriter()) ...

2019-04-10 10:01:44 321

原创 C# 不可变队列

using System.Threading.Tasks;using System.Net.Http;using System;using System.Linq;using System.Collections.Generic;using System.Threading.Tasks.Dataflow;using System.Collections.Immutable;name...

2019-04-02 17:12:19 173

原创 C# 不可变栈

需要引入Nuget包: Microsoft.Bcl.immutableusing System.Threading.Tasks;using System.Net.Http;using System;using System.Linq;using System.Collections.Generic;using System.Threading.Tasks.Dataflow;usin...

2019-04-02 17:07:48 178

原创 C# 数据流基础 - 创建自定义的数据流块

using System.Threading.Tasks;using System.Net.Http;using System;using System.Linq;using System.Collections.Generic;using System.Threading.Tasks.Dataflow;namespace task{ class Program...

2019-04-02 14:24:30 655

原创 C# 数据流基础 - 小例子

需要安装一个Nuget包: Microsoft.Tpl.Dataflowusing System.Threading.Tasks;using System.Net.Http;using System;using System.Linq;using System.Collections.Generic;using System.Threading.Tasks.Dataflow;...

2019-04-02 14:03:36 160

原创 C# 并行编程-小例子

using System.Threading.Tasks;using System.Net.Http;using System;using System.Linq;using System.Collections.Generic;namespace task{ class Program { static void Main...

2019-04-02 12:16:17 168

原创 C# 并发编程-任务完成时的处理

using System;using System.Threading.Tasks;using System.Windows.Forms;using System.Net.Http;using System.Collections.Generic;using System.Linq;namespace async_WhenAny{ public partial class ...

2019-04-02 11:39:29 184

原创 C# 并发编程 WhenAll()

using System;using System.Threading.Tasks;using System.Windows.Forms;using System.Net.Http;using System.Collections.Generic;using System.Linq;namespace async_WhenAny{ public partial class ...

2019-04-02 11:10:21 997

转载 C# 值参数和引用参数

https://www.cnblogs.com/liuyoung/p/7819052.html

2019-04-02 11:01:02 1257

原创 C#并发编程 whenAny()

using System;using System.Threading.Tasks;using System.Windows.Forms;using System.Net.Http;namespace async_WhenAny{ public partial class Form1 : Form { public Form1() {...

2019-04-02 10:46:45 702

原创 C# Socket 编程

Server端using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using...

2019-04-01 18:16:13 93

原创 C# 多线程编程 - 简介

线程是一个独立的运行单元,每个进程内部有多个线程,每个线程可以各自同时执行指令。每个线程有自己独立的栈,但是与进程内的其他线程共享内存。对某些程序来说,其中有一个线程是特殊的,例如用户界面程序有一个UI 线程,控制台程序有一个main 线程。每个.NET 程序都有一个线程池,线程池维护着一定数量的工作线程,这些线程等待着执行分配下来的任务。线程池可以随时监测线程的数量。配置线程池的参...

2019-04-01 17:35:51 137

原创 C# 响应式编程-简介

响应式编程基于“可观察的流”(observable stream)这一概念。你一旦申请了可观察流,就可以收到任意数量的数据项(OnNext),并且流在结束时会发出一个错误(OnError)或一个“流结束”的通知(OnCompleted)。有些可观察流是不会结束的。实际的接口就像这样:interface IObserver<in T>{void OnNext(T item);v...

2019-04-01 17:32:27 1168

原创 C# 并行编程 - 简介

如果程序中有大量的计算任务,并且这些任务能分割成几个互相独立的任务块,那就应该使用并行编程。并行编程可临时提高CPU 利用率,以提高吞吐量,若客户端系统中的CPU 经常处于空闲状态,这个方法就非常有用,但通常并不适合服务器系统。大多数服务器本身具有并行处理能力,例如ASP.NET 可并行地处理多个请求。某些情况下,在服务器系统中编写并行代码仍然有用(如果你知道并发用户数量会一直是少数)。但通常情...

2019-04-01 17:19:57 270

原创 C# 并发编程 - 基本概念

并发: 通俗理解就是可以同时做很多事。终端用户程序利用并发功能, 在输入数据库的同时响应用户输入。服务器应用利用并 发,在处理第一个请求的同时响应第二个请求。多线程: 并发的一种形式, 它采用多个线程来执行程序, 达到并发的效果。并行处理: 把正在执行的大量的任务分割成小块, 分配给多个同时运行的线程。 对应于现在的多核CPU, 在执行大量任务时,...

2019-04-01 16:51:02 323

原创 小明C#值类型与引用类型

值类型: bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, struct, uint, ulong, ushort,引用类型: class, delegate, dynamic, interface, object, string, Array

2019-03-25 15:51:14 66

原创 小明C#之冒泡排序

冒泡排序(Bubble Sort):冒泡排序算法的原理如下: 比较相邻的元素。如果第一个比第二个大,就交换他们两个。 对每一对相邻元素做同样的工作,从开始第一对到结尾的最后一对。在这一点,最后的元素应该会是最大的数。 针对所有的元素重复以上的步骤,除了最后一个。 持续每次对越来越少的元素重复上面的步骤,直到没有任何一对数字需要比较。 以下是代码实现(升序...

2019-03-25 11:17:34 226

原创 C# Writing data to Excel

using System;using System.IO;using System.Xml;using System.Xml.Linq;using System.Collections.Generic;using System.Linq;using System.Text;using Newtonsoft.Json.Linq;using Microsoft.Office.Inter...

2019-02-23 20:29:07 218

原创 C# Add element to XElement

 XElement xTotalTax = new XElement("totalTax");                    XElement xInvoiceDiscountPercent = new XElement("invoiceDiscountPercent");                    decimal dAmtIncVat = decimal.Parse(va...

2018-11-30 14:10:38 420

原创 C# lambda foreach

List&lt;XmlNode&gt; xmlItemListDictionary&lt;string, int&gt; itemQtyDic = new Dictionary&lt;string, int&gt;();xmlItemList.ForEach(x =&gt;            {                if (!string.IsNullOrEmpty(x[...

2018-11-22 15:56:11 5143

原创 C# use lambda to Group Array and select duplicated record

var serialArr = (from s in serialLotList where s["serialNo"] != null select s["serialNo"].InnerText).ToArray();var dupSeri = serialArr.GroupBy(x =&gt; x).Where(g =&gt; g.Count() &gt; 1).FirstOrDefaul...

2018-11-22 15:50:08 107

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除