摘要:
前言 很多同学在写代码时,很喜欢使用if else if else if else if else,然后一个方法中,代码量可想而知,在互联网企业高速迭代中,此时要修改一个地方,眼泪水都能看出来,此时就应该想到23中设计模式中的状态模式。 引用 在阿里的编码规范中明确写到,【强制】避免后续代码维护困难 阅读全文
摘要:
if object_id('tempdb..#tb') is not null drop table #tbselect fworkno,convert(varchar(100),date,112) date,classes_id into #tb from ck_scheduling where date<'2012-10-07'declare @f varchar(max), @sql varchar(max)set @f = stuff(( select distinct ',[' + convert(varchar(10),date 阅读全文
摘要:
转:http://www.cnblogs.com/tonyepaper/archive/2008/03/09/1097327.html名称转注释Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get the current active model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox ... 阅读全文
摘要:
【原创手打,转载请说明出处】winform 访问局域网内文件夹,而次文件夹是只有读取权限【PS:很多政府机构就是这样,要不也不会这么麻烦不是。】而之后出现了此bug:access to the path is denied监控代码发现FileStream fileStream = File.Open(fileName, FileMode.Open)这一句代码出错,是为什么呢? 一直想不明白,只能上google查资料查了半天还是没结果,直接查Open的方法,尽然有重载,FileAccess枚举,读,写,读写FileStream fileStream = File.Open(fileName, F 阅读全文