摘要: 首先添加一个.json 文件,比如 setting.json 文件内容如下,记得把文件设置为“复制到输出目录” { "ConfigSetting": { "XXXName": "Name", "XXXValue": "Value" }} 下来定义一个接受Model public class Sett 阅读全文
posted @ 2018-01-08 16:47 留云 阅读(1334) 评论(1) 推荐(0) 编辑
摘要: 在dotnet 中有topshelf 可以很方便的写windows 服务并且安装也是很方便的,命令行 运行.exe install 就直接把exe 程序安装成windows 服务。当然 代码也要做相应的修改,具体的可以参照例子。 在dotnet core 2.0 中 我们也有一个很方便的dll 来试 阅读全文
posted @ 2018-01-08 15:29 留云 阅读(3058) 评论(4) 推荐(1) 编辑
摘要: 打包文件用到了tar包,其中tar包的用法可以参考API golang提供了个函数用来遍历文件夹 filepath.Walk 函数具体描述如下: func Walk(root string, walkFn WalkFunc) error root是用遍历的文件夹 type WalkFunc type 阅读全文
posted @ 2017-06-02 11:20 留云 阅读(4115) 评论(0) 推荐(0) 编辑
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2017-05-27 17:41 留云 阅读(481) 评论(0) 推荐(0) 编辑
摘要: Roy's friends has been spying on his text messages, so Roy thought of an algorithm to encrypt text messages. Encryption Algorithm is as follows:We say 阅读全文
posted @ 2017-05-15 13:16 留云 阅读(705) 评论(0) 推荐(0) 编辑
摘要: Our friend Monk has been made teacher for the day today by his school professors . He is going to teach informatics to his colleagues as that is his f 阅读全文
posted @ 2017-05-13 11:32 留云 阅读(1201) 评论(0) 推荐(0) 编辑
摘要: You have to perform NN operations on the queue. The operations are of following type: E xE x : Enqueue xx in the queue and print the new size of the q 阅读全文
posted @ 2017-05-13 11:24 留云 阅读(1554) 评论(0) 推荐(0) 编辑
摘要: Monk's Love for Food Monk's Love for Food Our monk loves food. Hence,he took up position of a manager at Sagar,a restaurant that serves people with de 阅读全文
posted @ 2017-05-13 10:50 留云 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: 具体的题目如下:(就是将多维数组的行列互换) A multi-dimensional array is an array of arrays. 2-dimensional arrays are the most commonly used. They are used to store data i 阅读全文
posted @ 2017-05-11 16:11 留云 阅读(5437) 评论(0) 推荐(0) 编辑
摘要: 我做hackerearth上题目记录,具体的题目描述是这样的: Given the size and the elements of array A, print all the elements in reverse order. Input: First line of input contai 阅读全文
posted @ 2017-05-11 15:59 留云 阅读(8587) 评论(0) 推荐(0) 编辑
摘要: 当客户机向站点提出请求时,请求将转到代理服务器。然后,代理服务器通过防火墙中的特定通路,将客户机的请求发送到内容服务器。内容服务器再通过该通道将结果回传给代理服务器。代理服务器将检索到的信息发送给客户机,好像代理服务器就是实际的内容服务器(参见图 14-1)。如果内容服务器返回错误消息,代理服务器会先行截取该消息并更改标头中列出的任何 URL,然后再将消息发送给客户机。如此可防止外部客户机获取内部内容服务器的重定向 URL 阅读全文
posted @ 2013-12-13 10:59 留云 阅读(2469) 评论(0) 推荐(1) 编辑
摘要: 有时候在项目中我们会碰到这样的场景: 员工部门我们一般都在数据库里面存成树形结构,用的时候根据递归来加载整个部门的架构,员工存储在相应的部门,如果要获取某些部门下面的员工的时候 阅读全文
posted @ 2012-02-29 11:54 留云 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 在项目中经常用到要把sql语句放在项目中的固定文件夹,以方便部署和测试,有的时候有很多的sql文件,每次用查询管理器一个一个的执行效率是比较低的,尝试用批命令来实现,自动搜索指定文件夹中的*.sql文件,然后调用sql server 的osql 命令,指定服务器,用户名和密码以及数据库名称,这样就比较方便批量运行sql文件@echo offset dbSVR=Serverset dbUID=UserNameset dbPWD=Passwordset dbName=DBNameset scriptPath=.\Test\ 文件夹,用相对路径@echo onfor /r %scriptPath% 阅读全文
posted @ 2011-05-31 16:47 留云 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 有时候我们在项目中碰到,比如这样那样的原因(网络或者是其他的原因)导致方法调用失败,大部分的方法是在触发一次方法调用,其实我们可以通过自定义Exception,然后提供调用的方法名称和参数等等,提供一种自动的重试多次的机制。其实方法是很简单的,我们先自定义一个Exception代码如下 public class RetryException : Exception { private int RetryTimes; private string MethodName; private object[] Values; private Type ClassType; public RetryE 阅读全文
posted @ 2011-05-23 11:38 留云 阅读(1037) 评论(2) 推荐(0) 编辑
摘要: jquery 调用wcf project 最近项目中涉及到比较多的jquery调用后台的方法,开始的做法大都是新建ashx 文件,项目后期导致项目中新建了很多的ashx文件,当然也可以用webservice,或者是在web 项目中建wcf 文件,为了以后统一管理方便,打算新建wcf project ,把所有的文件放在一个统一项目中,部署一台服务器来提供统一的服务。 阅读全文
posted @ 2010-09-17 11:24 留云 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 严格的说,Session和Cookie并不是http协议的一部分。由于HTTP协议设计原则是无状态的,但是近年来出现了种种需求,其中cookie的作用就是为了解决HTTP协议无状态的缺陷所作出的努力。后来出现的session机制则是又一种在客户端与服务器之间保持状态的解决方案。 阅读全文
posted @ 2009-07-03 09:45 留云 阅读(900) 评论(0) 推荐(0) 编辑
摘要: C#多线程同步 阅读全文
posted @ 2009-06-18 15:31 留云 阅读(401) 评论(0) 推荐(0) 编辑
摘要: SQL优化-索引 阅读全文
posted @ 2009-06-18 14:36 留云 阅读(253) 评论(0) 推荐(0) 编辑
摘要: UML在关系型数据库设计中的应用 阅读全文
posted @ 2009-06-12 15:13 留云 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Web 应用的 UML 建模与 .NET 框架开发 阅读全文
posted @ 2009-06-12 15:10 留云 阅读(629) 评论(2) 推荐(0) 编辑
摘要: 系统的UML分析与设计 阅读全文
posted @ 2009-06-12 15:08 留云 阅读(696) 评论(0) 推荐(0) 编辑
摘要: asp.net Page lifeCycle 事件执行顺序 阅读全文
posted @ 2009-06-12 14:41 留云 阅读(278) 评论(0) 推荐(0) 编辑
摘要: ASP.NET 2.0 页(Page)生命周期概述 阅读全文
posted @ 2009-06-12 14:38 留云 阅读(542) 评论(0) 推荐(0) 编辑
摘要: UML--类详解 阅读全文
posted @ 2009-06-12 14:10 留云 阅读(400) 评论(0) 推荐(0) 编辑
摘要: HashTable 阅读全文
posted @ 2009-06-12 14:06 留云 阅读(2417) 评论(0) 推荐(0) 编辑
摘要: HTTP协议详解 阅读全文
posted @ 2009-06-12 14:04 留云 阅读(1989) 评论(0) 推荐(0) 编辑
摘要: 面向对象的设计原则-类设计原则 阅读全文
posted @ 2009-06-12 13:56 留云 阅读(509) 评论(1) 推荐(0) 编辑
摘要: UML--五类图 阅读全文
posted @ 2009-06-12 13:54 留云 阅读(679) 评论(0) 推荐(0) 编辑
摘要: UML的基本构造块 阅读全文
posted @ 2009-06-12 13:42 留云 阅读(3877) 评论(0) 推荐(0) 编辑
摘要: UML--类和对象 阅读全文
posted @ 2009-06-12 13:32 留云 阅读(422) 评论(0) 推荐(0) 编辑
摘要: UML的要点与应用 阅读全文
posted @ 2009-06-12 13:29 留云 阅读(328) 评论(0) 推荐(0) 编辑
摘要: php framework kohana 阅读全文
posted @ 2009-05-04 11:54 留云 阅读(607) 评论(0) 推荐(0) 编辑
摘要: php framework kohana 阅读全文
posted @ 2009-05-04 10:08 留云 阅读(554) 评论(0) 推荐(0) 编辑
摘要: donet Benchmarks 中的应用 阅读全文
posted @ 2009-03-24 15:40 留云 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Ext 2.0 的使用 阅读全文
posted @ 2007-12-28 14:14 留云 阅读(1284) 评论(0) 推荐(1) 编辑
摘要: 最近公司要用一个pdf生成相关的功能,借此机会把生成pdf的开源工具,大部分是熟悉了一下,希望对新做的人能有所帮 阅读全文
posted @ 2007-12-28 13:43 留云 阅读(1413) 评论(0) 推荐(0) 编辑
摘要: Slider 的sample 阅读全文
posted @ 2007-05-21 17:38 留云 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 介绍用Ajax.Request 实现点查询按钮的时候 弹出来一个div 层 ,下面的那层变灰,当数据树立完成以后就消失,其中用到了div z-index 和 opacit 属性,相信Ajax.Request大家已经用的很熟悉了,Ajax.Responders对象维护了一个正在运行的Ajax对象列表,在需要实现一些全局的功能时就可以使用它 ,这里用他来显示或隐藏进度条的那层div ,当然可以做的更... 阅读全文
posted @ 2007-05-21 17:33 留云 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 以前也没有写过blogs 做开发也有3个年头多了吧 ,其中对donet 的O/R 框架也有关注的比较多,从gentle.net ,ibatisnet,nhibernate.net,还有一个博客园的朋友自己开发的一些类似的框架,但是觉得我们的逻辑可能比较多,sql都是比较复 杂的,因此 我开始关注ibatisnet,以前总是觉得这个要写sql语句,并且要配置的东西比较多,如数据库配置和Mapping... 阅读全文
posted @ 2007-04-16 11:51 留云 阅读(277) 评论(1) 推荐(0) 编辑
摘要: 前几天在网上看到了有关Pythod 的东东,以前没有接触到,昨天有幸看了一下觉得 蛮有意思的。 Python语言是少有的一种可以称得上即简单又功能强大的编程语言。你将惊喜地发现Python语言是多么地简单,它注重的是如何解决问题而不是编程语言的语法和结构。 Python的官方介绍是: Python是一种简单易学,功能强大的编程语言,它有高效率的高层数据结构,简单而有效地实现面向对象编程。P... 阅读全文
posted @ 2007-04-16 11:26 留云 阅读(779) 评论(1) 推荐(0) 编辑