摘要: 常用的SQL语句 一、基础 1、说明:创建数据库 CREATE DATABASE database-name 2、说明:删除数据库 drop database dbname 3、说明:备份sql server 1 创建 备份数据的 device 2 3 USE master 4 5 EXEC sp_ 阅读全文
posted @ 2019-05-28 17:23 大冉啊 阅读(355) 评论(0) 推荐(0) 编辑
摘要: int fibonacci(int n) { if(n<=0) { return = 0; } if(n==1||n==2) { return =1; } return fibonacci(n-1)+fibonacci(n-2); ) int fibonacci(int n) { if(n<=0) 阅读全文
posted @ 2019-04-12 11:28 大冉啊 阅读(113) 评论(0) 推荐(0) 编辑
摘要: webapi用的是http协议,webservice用的是soap协议 webapi无状态,相对webservice更轻量级。webapi支持如get,post等http操作 http soap关系 http:是一个客户端和服务器端请求和应答的标准(TCP)。http协议其目的是为了提供一种发布和接 阅读全文
posted @ 2019-04-09 14:10 大冉啊 阅读(270) 评论(0) 推荐(0) 编辑
摘要: public static string GetIP() { string ip; if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null) { ip = System.Web.HttpContex 阅读全文
posted @ 2019-04-04 09:51 大冉啊 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 在日常的数据库运维过程中,有时候需要将Select查询出来的数据集写入到另一个数据表中,其中一种方式是通过存储过程循环写入数据,另一种简便的方式是直接使用Insert Into语句后面跟上Select结果查询语句即可将数据写入。通过Insert Into和Select语句连用可以很快的将一个表的数据 阅读全文
posted @ 2019-04-03 20:07 大冉啊 阅读(1328) 评论(0) 推荐(0) 编辑
摘要: 消息队列 什么是消息队列# MQ全称为Message Queue 消息队列(MQ)是一种应用程序对应用程序的通信方法。MQ是消费-生产者模型的一个典型的代表,一端往消息队列中不断写入消息,而另一端则可以读取队列中的消息。消息发布者只管把消息发布到 MQ 中而不用管谁来取,消息使用者只管从 MQ 中取 阅读全文
posted @ 2019-04-03 20:02 大冉啊 阅读(129) 评论(0) 推荐(0) 编辑
摘要: /// <summary>/// Http下载文件/// </summary>public static string HttpDownloadFile(string url, string path){ // 设置参数 HttpWebRequest request = WebRequest.Cre 阅读全文
posted @ 2019-04-03 09:53 大冉啊 阅读(107) 评论(0) 推荐(0) 编辑
摘要: select top 5 * from Table_1 where Id not in (select top (5*(2-1)) Id from Table_1 order by Id)order by Id 使用 not in 数据取反(查询多少条,在第几条后面) create proc pro 阅读全文
posted @ 2019-04-02 15:41 大冉啊 阅读(135) 评论(0) 推荐(0) 编辑
摘要: <div class="text-center"> <span style="display:inline-block; position:relative;top:-30px;">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录,当前为第 @M 阅读全文
posted @ 2019-04-01 21:19 大冉啊 阅读(1021) 评论(1) 推荐(0) 编辑
摘要: 引用NuGet包《ServiceStack.Redis》 在存储Redis数据的方法里面 var client = new RedisClient("127.0.0.1",6379); if(client.ContainsKey("list") == false) { 连接数据库查询 client. 阅读全文
posted @ 2019-04-01 21:09 大冉啊 阅读(95) 评论(0) 推荐(0) 编辑