摘要: 最近在开发的过程中,我们验证图片的方法都是通过扩展名来验证,发现如果改了扩展名,就验证不了了。在网上搜索到一些方法,测试有效果。/// <summary> /// 判断文件是否为图片 /// </summary> /// <param name="path">文件的完整路径</param> /// 阅读全文
posted @ 2017-03-24 10:55 爱上-睡觉 阅读(124) 评论(0) 推荐(0) 编辑
摘要: var allowExtention = [".jpg",".bmp",".gif",".png",".jpeg"]; //允许上传文件的后缀名 var extention = importFile.value.substring($.inArray(".", importFile.value)). 阅读全文
posted @ 2017-03-15 09:59 爱上-睡觉 阅读(427) 评论(0) 推荐(0) 编辑
摘要: var applicationList = {}; $(".del-add a").each(function (index) { var picName = $(this).text(); var imgId = $(this).parents(".del-add").attr("id"); // 阅读全文
posted @ 2017-03-15 09:03 爱上-睡觉 阅读(250) 评论(0) 推荐(0) 编辑
摘要: public async Task<FileResult> DownLoad(string name) { var path = Server.MapPath("~/Templates/") + name; using (FileStream fs = new FileStream(path, Fi 阅读全文
posted @ 2017-03-15 08:59 爱上-睡觉 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 最近项目中需要使用数组,个人总结了一下. 声明 var resArr=[];或var resArr=new Arrary();添加:resArr.push(一个元素),resArr.concat(一个数组)并生成一个新的数组.删除:总是删除最后一个pop();resArr.splice(start, 阅读全文
posted @ 2017-03-08 16:19 爱上-睡觉 阅读(89) 评论(0) 推荐(0) 编辑
摘要: create Procedure GetUserAccount@UserName nchar(20),@UserID int outputasif(@UserName>5)select @UserID=COUNT(*) from usertypes where id>1elseset @UserID 阅读全文
posted @ 2017-01-17 15:00 爱上-睡觉 阅读(277) 评论(0) 推荐(0) 编辑
摘要: CREATE PROCEDURE mytestinf(ids int, out sc INT)BEGIN SELECT @scs:=count(1) from t3 where uid=ids; set sc=@scs;END; CALL mytestinf(1,@b); SELECT @b; 根据 阅读全文
posted @ 2017-01-17 14:57 爱上-睡觉 阅读(6816) 评论(0) 推荐(0) 编辑
摘要: SELECT index_type_desc,alloc_unit_type_desc,avg_fragmentation_in_percent,fragment_count,avg_fragment_size_in_pages,page_count,record_count,avg_page_sp 阅读全文
posted @ 2017-01-04 17:34 爱上-睡觉 阅读(170) 评论(0) 推荐(0) 编辑
摘要: SELECT i.name,i.type_desc,s.page_count,s.record_count,s.index_level,compressed_page_countFROM sys.indexes i JOIN sys.dm_db_index_physical_stats(DB_ID( 阅读全文
posted @ 2017-01-03 10:15 爱上-睡觉 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 查看数据库所在位置: show variables like '%datadir%'; 后面补充 阅读全文
posted @ 2016-12-28 16:06 爱上-睡觉 阅读(92) 评论(0) 推荐(0) 编辑