- 博客(91)
- 收藏
- 关注
原创 Sqlserver with的递归用法
SELECT *INTO #DiGuiFROM (SELECT 8 AS Id, 5 AS ParentId UNION SELECT 15, 5 UNION SELECT 30, 15 UNION SELECT 23, 15 UNION.
2022-03-11 14:13:59
972
原创 Sqlserver like参数化
string sql="select * from A where Title like @title"new SqlParameter("@title", "%" + Title + "%")
2022-03-11 14:12:19
499
原创 C#Parallel控制并发数量执行,并且不阻塞
List<int> listI = new List<int>(); for (int i = 0; i < 1000; i++) { listI.Add(i); } Task.Run(() => { ParallelOptions ...
2021-06-01 12:12:36
1366
原创 c#Parallel.ForEach控制线程数量
List<int> listI = new List<int>(); for (int i = 0; i < 1000; i++) { listI.Add(i); } ParallelOptions options = new ParallelOptions(); option..
2021-06-01 12:06:51
2367
原创 c#Parallel.ForEach
List<int> listI = new List<int>(); for (int i = 0; i < 1000; i++) { listI.Add(i); } Parallel.ForEach(listI, x => Dosome("Exec:" + x)); public static...
2021-06-01 12:01:02
426
原创 C#工厂方法模式
namespace 工厂方法模式{ public class Opeartion { private int _NumberA; public int NumberA { get { return _NumberA; } set { _NumberA = value; } } public int _NumberB; public int Num.
2021-04-02 17:12:52
99
原创 C#简单工厂模式
#region 具体实现 public class Operation { private double _numberA = 0; private double _numberB = 0; public double numberA { get { return _numberA; } set { _n...
2021-04-01 15:01:52
109
原创 C#依赖倒置原则
依赖倒置原则:高层模块不应该依赖低层模块,两者应该依赖抽象(抽象类,接口) class Program { static void Main(string[] args) { Moter mother = new Moter(); mother.Narrate(new Books()); mother.Narrate(new NewsPaper()); Conso
2021-03-31 11:53:44
203
原创 C#单例模式
/// <summary> /// 单例模式 /// </summary> public class Monkey { /// <summary> /// 声明一个静态的私有的当前类类型的字段 /// </summary> private static Monkey _Instance; /// <summary> ...
2021-03-30 14:20:23
221
原创 VS2019安装
地址:https://visualstudio.microsoft.com/zh-hans/thank-you-downloading-visual-studio/?sku=Enterprise&rel=16#
2021-03-23 15:48:53
94
原创 datatables设置行颜色
function DataExportDataTable() { //datatables的数据请求$('#Data_export').DataTable( {"bAutoWidth":false,"processing": true,"bProcessing": true,"sDom": 'T<"clear">lfrtip',"tableTools": {"sSwf...
2021-03-19 14:51:48
770
原创 Sqlserver查询存储过程中出现的字符
select distinct namefrom sysobjects o, syscomments swhere o.id = s.idand text like '%Factory_Invoice_No%'and o.xtype = 'P'
2021-03-19 14:40:34
286
原创 Sqlserver索引创建和删除
--查看索引--execute sp_helpindex @objname = 'Allocation_Result_Tracking';--创建复合索引--create index Index_Tracking_Ref on Allocation_Result_Tracking(Ref_Id,Ref_Type);--删除索引--drop index Allocation_Result_Tracking.Index_Tracking_Ref...
2021-03-04 17:11:25
265
1
原创 JS滚动到元素的指定位置
如果是input元素直接使用document.querySelector('#ExtendApplyOrder').focus();非Input元素tabindex必须要添加<div id="ShoppingCartListIndex" tabindex="0"></div>document.querySelector('#ShoppingCartListIndex').focus();
2021-01-20 17:46:05
414
原创 VUE监听对象加载完毕,操作DOM元素
var app = new Vue({ el: '#App', data: { ShoppingCartList: [] } }); watch: { ShoppingCartList() { this.$nextTick(() => { if (this.Shopp...
2021-01-20 17:43:37
1133
原创 Js手机号及验证码校验
$("#showTooltips").click(function() { var tel = $('#tel').val(); var code = $('#code').val(); if(!tel || !/1[2|3|4|5|6|7|8|9]\d{9}/.test(tel)) alert('请输入手机号'); else if(!code || !/\d{6}/.test(code)) alert...
2020-12-28 18:33:37
231
原创 sql语句判断数据是否在两个字段范围内
SELECT * INTO #Temp_Date FROM (SELECT Cast( '2020-01-01' AS DateTime) AS ValidationStart ,Cast('2020-04-08' AS DateTime) AS ValidationEndUNIONSELECT Cast( '2020-02-01' AS DateTime) AS ValidationSt...
2020-04-08 15:43:36
1617
原创 MySql查看和设置临时表和物理表空间
查看表空间show variables where Variable_name in ('tmp_table_size', 'max_heap_table_size');设置临时表空间(设置为3G容量)SET GLOBAL tmp_table_size=3147483648; 设置成功如下图所示,切记一定要重新关闭数据库,然后打开执行查看sql才能刷新结果...
2020-03-31 11:55:25
807
原创 Sqseverl查询存储过程内容包含的记录
select distinct namefrom sysobjects o, syscomments swhere o.id = s.idand text like '%SubsidyCriteria%'and o.xtype = 'P'
2019-09-11 17:45:00
224
原创 LINQ将DataTable转Txt保存
public static void DataTableToTxt(DataTable table) { var columns = table.Columns.Cast<System.Data.DataColumn>().Select(item => item.ColumnName); var rows = ta...
2019-06-19 15:17:55
254
转载 表单文字整体对齐
<ul> <li class="li">姓  名:<input type="text" /></li> <li class="li">手 机 号:<input type="text" /></li> <li cl...
2019-06-13 10:18:59
179
原创 ajax提交Html标签
废话不多说,看图理解---------------------js部分--------------------------------------------------后端---------------------------------
2019-03-28 17:13:35
321
原创 Jquer复制Select标签
$("#PieChannel").append($("#Channel").find("*").clone(true))
2018-12-06 15:14:33
183
原创 Sqlserver删除重复记录,保留最新(ID最大)的一条
Delete A from GIS_Mall_Info A inner join ( select MAX(id) as ID,Ref_ID from GIS_Mall_Info group by Ref_ID having count(1)>1 ) B on B.Ref_ID=A.Ref_ID and B.ID<>A.ID
2018-12-03 11:20:20
819
1
原创 DataTable通过Linq转List
DataTable dt = dao.GetAnswerInfoByQuestionId(questionId); if (dt != null && dt.Rows.Count > 0) { var rowColl = dt.Rows; return (from DataRow row
2017-09-26 15:27:42
513
原创 sqlserver导出CVS文件换行
需要处理有逗号的sql语句REPLACE(REPLACE(REPLACE(REPLACE(Comment, CHAR(13), ''), CHAR(10), ''),CHAR(9),''),',',',') as 'Comment'
2017-07-06 13:33:31
827
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人