自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(65)
  • 资源 (1)
  • 收藏
  • 关注

原创 使用 go-wkhtmltopdf 将html转pdf

GoLand IDE创建go项目这里项目名称为 toPDF添加main.go文件,添加main函数,例子来自: https://github.com/adrg/go-wkhtmltopdfpackage mainimport ( "fmt" "github.com/adrg/go-wkhtmltopdf" "log")func main(){ pdf.Init..

2018-10-25 17:05:28 5384 1

原创 Hyper-v Ubuntu 设置分辨率

Hyper-v Ubuntu 设置分辨率Hyper-v Ubuntu root账号vim设置分辨率Hyper-v Ubuntu root账号安装完ubuntu desktop版本,默认情况下,root账号是关闭的。而要修改配置需要使用root账号,所以第一步就是开启root账号。命令如下:sudo passwd root之后输入两次密码来设置vimubuntu默认并没有安装vim编辑...

2018-10-25 12:29:05 5945

原创 C#多线程整理

1. 使用Delegate只要有一个前台线程在运行,应用程序就在运行;如果有多个前台线程在运行,而Main()方法结束了,应用程序进程仍然时激活的,直到所有前台线程完成为止。1. 使用DelegateDelegate是通过线程池线程完成异步调用的,线程池线程总是后台线程。 1)通过delegate.BeginInvoke方法启动线程,通过delegate.EndIn...

2018-05-31 12:50:17 393

原创 Linux tutorial 3 - centos Shell

1. Shell的基本知识1.1 Shell具有如下功能1.2 Shell的元字符:1.3 Shell命令一般格式1.4 目录和文件名的命名规则1.5 通配符2 Linux下的文件类型2.1 硬链接(ln file1 file2,建立文件file1的硬链接file2)2.2 符号链接(又叫软链接,ln -s file1 file2,建立file1的符号链接文件file2)...

2018-05-20 18:41:42 257

原创 Linux tutorial 2 - centos 基本配置

1. Linux常识1.1 版本1.2 帮助命令:1.3 命令执行时的查找路径顺序2. 配置语言环境3. 配置时区3.1 查看日期/时间/时区:timedatectl3.2 设置日期和/或时间:timedatectl set-time3.3 查看系统支持的时区:timedatectl list-timezones | grep Asia3.4 设置时区(立即生效):ti...

2018-05-20 17:59:09 267

原创 Linux tutorial 1 - 安装centos 7 in hyper-v step by step

1.下载centos2. 创建hyper-v virtual switch(虚拟交换机)2.1 打开hyper-v管理器,右侧点“虚拟交换机管理器”2.2 创建 外部 虚拟交换机2.3 创建完成之后的效果图3. 创建虚拟机4. 安装配置虚拟机最近在使用java开发一个web服务器端的项目,本人此前主要使用vc/mfc/c#开发,java不熟仅是了解而已,但语言...

2018-05-20 15:34:02 317

原创 spring mvc - tutorial 3: utf-8编码

修改intellij IDEA的启动配置 安装目录的idea64.exe.vmoptions配置文件最后加上:-Dfile.encoding=UTF-8修改intellij IDEA编辑器的文件编码配置 打开intellij idea在其Settings/Editor/File Encodings里面修改编码为utf-8修改容器的编码配置 容器比如tomcat,编码也修改为...

2018-05-10 11:42:57 168

原创 spring mvc - tutorial 2: spring + swagger

1. Spring mvc + springfox swagger12. Spring mvc + springfox swagger22.1 新建一个简单的spring mvc restful web app2.2 添加spring配置文件2.3 配置web.xml2.4 下载swagger-ui并把dist放到项目中2.5 添加swagger configuration2....

2018-05-07 13:44:06 218

原创 spring mvc - tutorial 1:实现简单的GET、POST接口并使用Postman测试

1. intellij IDEA创建一个maven web app1.1 POM添加依赖1.2 添加spring和spring mvc配置文件1.3 配置web.xml2. 添加controller和model3. 配置tomcat运行3.1 GET方法测试3.2 POST方法测试本次尝试创建一个简单的spring mvc restful项目,尝试简单的接...

2018-05-06 18:29:25 3812

原创 Rabbit MQ - tutorial 7, Spring RabbitMQ

基本概念tutorial 7 Spring RabbitMQ(1) 项目依赖(2) applicationContext.xml & spring-mvc.xml(3) 配置web.xml 并确认是否配置成功(4) 添加spring-rabbitmq.xml(4) Producer实现(5) Consumer实现(6) Controller里面添加uri用于发送消息...

2018-04-10 11:46:12 166

原创 Rabbit MQ - tutorial 6 RPC, Remote procedure call

待定

2018-04-10 11:44:35 140

原创 Rabbit MQ - tutorial 5 Topics, Receiving messages based on a pattern

前一个例子使用的routing key是固定的,这个例子则是非固定的routing key,而binding key则使用了通配符。基本知识Toturial 5(1) Producer(2) Consumer(3) 运行结果基本知识topic exchange:和direct exchange相似,使用特定routing key发送的消息会被投递到具有与...

2018-04-10 10:42:12 155

原创 Rabbit MQ - tutorial 4 Routing, receiving messages selectively

本例在前一例的基础上,通过Routing过滤消息,只接收感兴趣的message。基本概念Tutorial 4 - 消息路由routing(1) Producer(2) Consumer(3) 运行结果基本概念binding: A binding is a relationship between an exchange and a queue.bin...

2018-04-09 22:36:19 133

原创 Rabbit MQ - tutorial 3 publish/subscribe, sending messages to many consumers at once

前面的两个例子,我们直接使用queue,实际上是通过默认的exchange来发送消息的。本例将演示使用exchange发布消息,并实现订阅。基本概念exchange分类Tutorial 3 - log订阅(1) Producer(2) Consumer(3) 运行结果基本概念queue: A queue is a buffer that store...

2018-04-09 19:07:59 183

原创 RabbitMQ - tutorial 2:task queue,distributing tasks among workers

本例说明RabbitMQ提高的处理以下3个问题的机制,并给出一个例子。consumer奔溃,如何保证消息不丢失(比如消息处理到一半,异常退出)- message acknowledgmentRabbitMQ Server挂掉,如何保证消息以及消息队列不丢失 - message durability消息处理任务繁重程度差异很大时,如何保证每个consumer均衡的承担任务而不会导致有的过重...

2018-04-06 21:24:23 195

原创 Rabbit MQ - tutorial 1:hello rabbit mq

Rabbit MQRabbitMQ是一个消息代理:它接受和转发消息。 你可以把它想象成一个邮局,RabbitMQ是邮箱,邮局和邮递员。Rabbit MQTutorial 1 - Hello Rabbit MQRabbit MQ安装Rabbit MQ Service运行实现Publisher(Publisher往Broker发送消息)实现Consumer(Consumer从Br...

2018-04-06 12:29:49 486

原创 WPF DateTimePicker

WPF没有DateTimePicker,自身的DatePicker不能选择时间。所以要自己实现。<DatePicker Height="25" Width="250" Text="2011/10/11 15:16:17"/>使用WinForm的DateTimePicker<Window x:Class="WinFormDateTimePicker.MainWindow"...xmlns:wf

2017-10-25 14:38:43 6444 1

原创 WPF Style & Template

WPF元素可以使用一个样式,通过元素的Style属性设置(Style属性在FrameworkElement中定义) Setter是Style中最重要的属性,Setter只支持依赖属性; 某些依赖属性无法使用简单的字符串设置值,这时使用嵌套元素的方法实现,比如ImageBrush;<Window.Resources><Style x:Key="bigFontButtonStyle"> <

2017-09-22 13:46:59 2720

原创 C#新特性

C#7.1C#7C#61.Read-only auto-properties 只读自动属性 以前版本:类内部可以set这两个属性public string FirstName { get; private set; }public string LastName { get; private set; }新版本:只有在构造函数里面可以设置这两个属性public string FirstName

2017-09-08 18:25:36 823

原创 Autofac tutorial 1

Autofac使用方法1).在程序启动时,创建ContainerBuilder, 2).用创建的builder注册组件(component) 3).调用builder的Build方法,保存container后续用于resolve typeIContainer Container = builder.Build();4).使用container resolve type// Create the

2017-09-04 17:31:03 265

原创 AutoMapper

AutoMapper用于两个对象间的映射,通常用于完成DTO(Data Transfer Object)和Model之间的转换。AutoMapper1.创建Mapper.Initialize(cfg => { cfg.CreateMap<Foo, FooDto>(); cfg.CreateMap<Bar, BarDto>();});var fooDto = Mapper.Map<F

2017-08-27 22:30:56 493

原创 WPF command

1. 基本知识微软预定义了5类100多个常用命令: ApplicationCommands, NavigationCommands, MediaCommands, EditingCommands and ComponentCommands.命令的好处: 1).一处定义,到处使用(menu item, toolbar, shortcut) 2).自动监听快捷键 3).根据条件自动更新UI(en

2017-08-21 14:54:34 5880 1

原创 PRISM基本知识

Prism框架是用于创建低耦合,易维护,易测试的应用的。最初由微软开发,后提交给开源社区由开源社区维护的开源项目。每个平台都有独立的版本。Prism实现了一系列的设计模式,有助于编写well-structured和可维护的XAML应用程序,包括MVVM,依赖注入,命令,EventAggregator等。Prism的核心功能是方便的在不同平台共享代码。1.Prism Key ConceptsModul

2017-08-21 14:36:49 1128

原创 window type

About Windows https://msdn.microsoft.com/en-us/library/windows/desktop/ms632597(v=vs.85).aspx About Window Classes https://msdn.microsoft.com/en-us/library/windows/desktop/ms633574(v=vs.85).aspx

2017-03-24 11:40:52 339

原创 C#基础笔记

切套类的使用There is no strong convention on using nested classes in C#, but I tend to use them when I need to define a class that is used solely by the outer class or to provide implementations of interfac

2017-02-07 16:25:02 1821

原创 书目

乔治.伽莫夫

2017-01-09 22:57:26 245

原创 读书笔记-TheDeadLine

优质管理的四大要素 1)选择正确的人 2)为他们分配正确的工作 3)保持他们的积极性 4)帮助团队凝聚起来并保持团队的凝聚力安全和变化 1)除非感到安全,否则人们就不能去迎接变化 2)在所有成功的工程中(以及在绝大多数其他有价值的工作中),变化都是基本的要素之一 3)安全感的缺乏会让人们反对变化 4)逃避风险是致命的,因为这会让你也得不到与风险同在的利益 5)人们可能会因为来自客观

2017-01-09 22:20:39 733

原创 字符集和字符编码的区别

字符集(Character Set)就是一系列的字符,无序的。 编码字符集(Coded Character Set)就是给字符集中的每个字符一个唯一的number(叫做 code point)。 编码字符集也被称为code page(Coded character sets are sometimes called code pages)。 Encoding就是把code points按某种编

2016-12-29 16:15:54 367

转载 Technical Notes by Category

https://msdn.microsoft.com/en-us/library/azt48yaw.aspx

2016-12-02 13:22:57 255

原创 MongoDB使用

1.下载https://docs.mongodb.com找对应的windows版本,直接安装2.添加环境变量D:\Program Files\MongoDB\Server\3.2\bin3.创建本地存放目录H:\MongoDB\db H:\MongoDB\log4.创建配置文件D:\Program Files\MongoDB\Server\3.2\mongod.cfg systemLog:

2016-11-08 18:37:41 282

原创 IIS发布网站

闲来无事就试了试。 1.安装IIS 为了减少出各种莫名其妙的问题,基本上都勾上了。2.创建并发布Asp.net MVC MyWeb App到本地目录 一看这个图就明白。IIS中添加刚才发布到本地的网站 见图,到这里网站就运行起来了。 这个时候用localhost + port或者IP + port在本机上就能访问了。但在局域网里,其它电脑还无法访问,还需要配置防火墙。配置

2016-11-06 19:32:12 347

原创 IJG库

网址:http://www.ijg.org/ Build过程: 1)下载源代码:http://www.ijg.org/files/jpegsr9b.zip 2)解压到:F:\IJG\jpeg-9b 3)运行vc命令提示符:Visual Studio Command Prompt (2010) 4)cd 到F:\IJG\jpeg-9b 5)执行命令:nmake -f makefile.

2016-09-21 10:53:45 1820

原创 DICOM

http://dicom.nema.org/ http://www.dicomlibrary.com/dicom/transfer-syntax/

2016-09-20 10:34:53 560

翻译 JPEG in DICOM

原文:http://www.mccauslandcenter.sc.edu/crnl/tools/jpeg-formatsIntroduction This article describes the different forms of JPEG compression specified for DICOM files, the dominant image format for medic

2016-09-20 10:31:24 1096

翻译 消息循环不会导致cup使用率过高

BOOL WINAPI GetMessage(//阻塞型函数 _Out_ LPMSG lpMsg, _In_opt_ HWND hWnd, _In_ UINT wMsgFilterMin, _In_ UINT wMsgFilterMax);while( (bRet = GetMessage( &msg, hWnd, 0, 0 )) != 0){

2016-09-10 15:48:53 270

翻译 UI Thread & Worker Thread

UI ThreadWorker Thread

2016-09-10 07:45:26 397

原创 socket网络编程基础

IP地址结果在winsock中,APP通过SOCKADDR_IN结构来指定IP和Port信息, 其中的sin_zero只充当填充项,以使SOCKADDR_IN结构和SOCKADDR结构的长度一样。 unsigned long inet_addr(const char FAR* cp)用于将一个点分IP转换成一个32位无符号长整数(按网络字节顺序)。字节顺序在computer中把IP & Port

2016-09-09 13:28:45 234

翻译 WSARecv MSG_PARTIAL

int WSARecv( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COM

2016-09-09 10:18:11 1175

翻译 message-oriented sockets & byte stream-style sockets

Message Oriented protocols send data in distinct chunks or groups. The receiver of data can determine where one message ends and another begins. Stream protocols send a continuous flow of data.Here i

2016-09-09 10:14:20 386

原创 DispatchMessage - synchronous or asynchronous

DispatchMessage is synchronous function. 下面是两个例子,用于说明为什么是同步的:给人异步的错觉,是因为唤起了一个新的消息循环while (GetMessage (&msg, NULL, 0, 0)) { if (! TranslateAccelerator (msg.hwnd, hAccelTable, &msg))

2016-08-26 16:44:25 610

rabbit mq入门例子

rabbit mq入门例子. 使用rabbit mq实现服务器连接,消息发送,接收。

2018-04-10

空空如也

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

TA关注的人

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