04 2015 档案
Topshelf Configuration z
摘要:Topshelf ConfigurationWhile the Quickstart gives you enough to get going, there are many more features available in Topshelf. The following details th... 阅读全文
posted @ 2015-04-24 22:05 武胜-阿伟 阅读(454) 评论(0) 推荐(0)
Aspose.Total for .NET 2015 - Unlimited License z
摘要:How to license Aspose.Total for .NET productsAdd "License.cs" [C#] OR "License.vb" [Visual Basic] to your application License.csCode:using System;usin... 阅读全文
posted @ 2015-04-22 18:14 武胜-阿伟 阅读(5640) 评论(3) 推荐(2)
Useful WCF Behaviors - IErrorHandler
摘要:Behaviors in WCF are so stinking useful, and once you get past the basics of WCF they're arguably a necessity. Microsoft has saved itself from hundred... 阅读全文
posted @ 2015-04-22 16:44 武胜-阿伟 阅读(349) 评论(0) 推荐(0)
how to do error handing with WCF by using attributes to log your errors z
摘要:There are multiple ways to do error handling in WCF as listed by Pedram Rezaei Blog.The default way that WCF allows errorsmessage to display is by set... 阅读全文
posted @ 2015-04-22 16:39 武胜-阿伟 阅读(290) 评论(0) 推荐(0)
using log4net on my project within a self-hosted WCF application z
摘要:Add reference to log4net.dll to our console service host project (our application entry point)Add the following line to the above project's AssemblyIn... 阅读全文
posted @ 2015-04-22 16:31 武胜-阿伟 阅读(305) 评论(0) 推荐(0)
屏幕  z
摘要:privatevoidFullScreen()//全屏{SizeMode=2;FormBorderStyle=FormBorderStyle.None;Left=Top=0;Width=Screen.PrimaryScreen.Bounds.Width;Height=Screen.PrimarySc... 阅读全文
posted @ 2015-04-19 20:32 武胜-阿伟 阅读(256) 评论(0) 推荐(0)
OpenSSL.Net 在生产环境中无法正常加载的原因分析与解决 z
摘要:http://blog.csdn.net/wangjia184/article/details/6990098http://www.openssl.org/在本地测试好好的代码部署到生产环境后,遇到OpenSSL.Net不能加载的错误。Could not load file or assembly ... 阅读全文
posted @ 2015-04-17 20:01 武胜-阿伟 阅读(521) 评论(0) 推荐(0)
t d x 示例z
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Runtime.InteropServices;using System.Text;namespace demo{ class Progra... 阅读全文
posted @ 2015-04-17 11:58 武胜-阿伟 阅读(1948) 评论(3) 推荐(1)
行情指标
摘要:EMA它的定义是 Y=[2*X+(N-1)*Y']/(N+1) Y'是上一个周期的计算值。这样的函数是一个递归函数,不断的调用前一个周期的值来参加计算的。我们为了加快计算的速度,没有采用递归的方式。实现的EMA是这样的 public static List EMA(this List inp... 阅读全文
posted @ 2015-04-12 22:51 武胜-阿伟 阅读(845) 评论(0) 推荐(0)
通过调用Word模板(Doc、dot)直接打印 z
摘要:通过替换模板中的指定 书签 来进行内容的替换、整合,然后直接发送到打印打印,也可以导出。即把打印出的语句换成保存函数。public static classmyPrintByOffice { public static voidbyDoc(Stringtime,Stringuid) { ... 阅读全文
posted @ 2015-04-12 15:28 武胜-阿伟 阅读(2760) 评论(0) 推荐(0)
安装字体或直接调用非注册字体 z
摘要:1.安装字体//程序直接将字体文件安装的系统中。函数声明:[DllImport("kernel32.dll", SetLastError = true)]static extern int WriteProfileString(string lpszSection, string lpszKeyNa... 阅读全文
posted @ 2015-04-12 15:27 武胜-阿伟 阅读(348) 评论(0) 推荐(0)
文件读取方法(FileHelpers) z
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using FileHelpers;using FileHelpers.DataLink;namespace ConsoleApplic... 阅读全文
posted @ 2015-04-12 15:26 武胜-阿伟 阅读(450) 评论(0) 推荐(0)
FileHelpers 用法 z
摘要:用FileHelplers导出csv数据:[DelimitedRecord(",")][IgnoreEmptyLines()][ConditionalRecord(RecordCondition.ExcludeIfMatchRegex, "^,+$")]public class FormItemEx... 阅读全文
posted @ 2015-04-12 15:14 武胜-阿伟 阅读(585) 评论(0) 推荐(0)
tdf sample
摘要:using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Text;using GearUp.Crawler.Entities;using... 阅读全文
posted @ 2015-04-11 20:25 武胜-阿伟 阅读(371) 评论(0) 推荐(0)
打开文件
摘要:FileStream fs = new FileStream(url, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);StreamReader sr = new StreamReader(fs, System.Text.Encoding.D... 阅读全文
posted @ 2015-04-11 20:13 武胜-阿伟 阅读(202) 评论(0) 推荐(0)
async/await 异步编程
摘要:前言 最近在学习Web Api框架的时候接触到了async/await,这个特性是.NET 4.5引入的,由于之前对于异步编程不是很了解,所以花费了一些时间学习一下相关的知识,并整理成这篇博客,如果在阅读的过程中发现不对的地方,欢迎大家指正。同步编程与异步编程 通常情况下,我们写的C#代码就是同... 阅读全文
posted @ 2015-04-07 11:18 武胜-阿伟 阅读(459) 评论(0) 推荐(0)
使用Topshelf创建Windows服务
摘要:本方式特点:代码简单,开源组件,Windows服务可运行多个实例Topshelf是一个开源的跨平台的服务框架,支持Windows和Mono,只需要几行代码就可以构建一个很方便使用的服务. 官方网站:http://topshelf-project.com第1步:引用程序集TopShelf.dll和lo... 阅读全文
posted @ 2015-04-06 20:51 武胜-阿伟 阅读(757) 评论(0) 推荐(0)
学习和家庭教育 z
摘要:大家好,我是王宁。今天能站在这里,纯属偶然。为什么说偶然呢?因为,南雅是个人才济济的地方,164班是一个优秀的集体。个人认为,班级前二十几名的同学,时机适宜,谁考班上第一名都有可能。妈妈对我说:考了第一名,不要有压力,这一次已证明了你有考第一名的实力。以后,出现名次上下浮动都很正常,以平常心对待。先... 阅读全文
posted @ 2015-04-03 19:37 武胜-阿伟 阅读(328) 评论(0) 推荐(0)