为你推荐

选择生成日报表,月报表,年报表

传入参数:@Type:类型,是哪一种报表,有year,month,day三种@Time:时间 根据Type参数分别获取Time的月份数据,日期数据declare@Typenvarchar(20)='year';declare@TimeDateTime=getdate();SELECTdistinctcase@...

SqlBulkCopy 批量导入数据 转换表字段类型

在使用SqlBulkCopy导入数据时,要有一个跟数据库里面同样的DataTable要赋值表名要求每个列跟数据库中列同名,并且列的类型要赋值跟数据库中列的类型对应的NET类型要求数据库中为Null的数据,赋值DBNull.Value代码:[AcceptVerbs(HttpVerbs.Post)]publicJsonRe...

反射调用发生错误信息 LoadNeither

错误信息:Servicecannotbestarted.System.Reflection.TargetInvocationException:Exceptionhasbeenthrownbythetargetofaninvocation.--->System.InvalidOperationException:...

MVC 返回对象换成json

错误界面:这个就是返回对象没有转换成json就是要再返回的头部添加application/json代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Net.Http;usingSystem.Net.Http.Forma...

WebApi Session支持

代码:WebApiConfigusingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Net.Http;usingSystem.Web.Http;usingSystem.Configuration;usingMicrosoft.O...
代码星球·2020-08-09

HBuilder 获取通话记录 (Android)

代码:Date.prototype.Format=function(fmt){varo={"M+":this.getMonth()+1,//月份"d+":this.getDate(),//日"h+":this.getHours()%12==0?12:this.getHours()%12,//小时"H+":this.ge...

HBuilder 获取通讯录

代码:varcontent="";functiongetCallLog(){try{plus.contacts.getAddressBook(plus.contacts.ADDRESSBOOK_PHONE,function(addressbook){addressbook.find(["displayName","ph...
代码星球·2020-08-09

设置WebApi里面命名空间参数

在这种情况下:如果没有特别处理,会报:所以要像MVC中的控制器一下配置一个命名空间参数,webapi里面没有自带这个功能代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web.Http;usingSystem.Web...

AngularJs angular.element

当导入jquery时,angular.element查询出来的是个jquery对象,也可以使用jquery的方式来查询html:varnode=document.getElementById("AttendanceManager");varele=angular.element(node);console.dir(el...
代码星球·2020-08-09

远程数据库迁移数据

代码:--创建链接服务器execsp_addlinkedserver'ITSV','','SQLOLEDB','192.168.1.72'execsp_addlinkedsrvlogin'ITSV','false',null,'sa','!QAZ2wsx'--查询示例insertinto[AutoData].[dbo]...

AngularJs 控制台

在控制台查看$scope对象html:通过控制器里面的一个元素来获取这个控制器的$scopevarnode=document.getElementById("NewsVote");varele=angular.element(node).scope();console.dir(ele);结果:发现可以获取作用域用控制器...
代码星球·2020-08-09

AngularJs 表单提交按钮状态

表单属性:$invalid:未经过验证的表单,就是表单里面信息通过验证就为false,没有通过为true$valid:经过验证的表单,表单里信息验证通过为true,反之为false$dirty:修改的表单,就是表单的信息经过修改的为true,反之为false一般表单验证是否通过用<inputtype="submi...

我的第一个Windows服务

代码:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Diagnostics;usingSystem.IO;usingSystem.Linq;usingSystem.S...

限流

 常用的限流算法有两种:漏桶算法和令牌桶算法 令牌桶算法:1.按特定的速率向令牌桶投放令牌2. 根据预设的匹配规则先对报文进行分类,不符合匹配规则的报文不需要经过令牌桶的处理,直接发送;3. 符合匹配规则的报文,则需要令牌桶进行处理。当桶中有足够的令牌则报文可以被继续发送下去,同...
代码星球·2020-08-09

修改以及设计好的表

1.修改表字段useEntranceVista;altertableRy_Stay_Infoaltercolumnwzanvarchar(50)altertableRy_Stay_Infoaltercolumnwzbnvarchar(50)2.添加主键添加主键之前先要让该字段不能为空useEveryTouch;alte...
代码星球·2020-08-09