自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

王翼鹏的博客

专注.net、java、数据库技术

  • 博客(102)
  • 资源 (3)
  • 收藏
  • 关注

原创 jquery数组求和

$.fn.sum = function (fun) { var v = 0; if ($(this).length > 0) { $(this).each(function (index, item) { if (fun != null && fun != undefined && typeof

2017-10-27 14:41:06 9142

原创 html编码

$.htmlEncode = function (str) { var div = document.createElement("div"); var text = document.createTextNode(str); div.appendChild(text); return div.innerHTML; }

2017-10-18 17:18:36 461

原创 jquery 数据校验,input只能输入浮点数

/** * 检查是否为数字 * * @param {} * str * @return {Boolean} true:数字,false:不是数字; */var isNum = function(str) { var re = /^(-?\d+)(\.\d+)?$/ return re.test(str);}/** * input校验只能输入浮点数

2017-09-14 14:57:17 2813

原创 js求两个线段的交点

function segmentsIntr(a, b, c, d){ /** 1 解线性方程组, 求线段交点. **/ // 如果分母为0 则平行或共线, 不相交 var denominator = (b.y - a.y)*(d.x - c.x) - (a.x - b.x)*(c.y - d.y); if (denominator==0) {

2017-08-30 09:10:27 5742

原创 spring mvc配置自定义错误404,500页面

web.xml里面 500 /WEB-INF/View/designPortal/CMS/500.jsp 404 /WEB-INF/View/designPortal/CMS/404.jsp500错误页面<%@ page language="java" contentType="text/html; charset=UTF-8"

2017-08-22 14:47:52 1819

原创 win10 edge浏览器去掉自动识别电话号码功能

2017-08-15 15:13:06 1243

原创 c# 使用HttpWebRequest发送http请求

private string HttpPost(string Url, string postDataStr) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); request.Method = "POST"; request.

2017-08-14 17:18:31 8336

原创 js生成四个随机字母

function getRanNum(){ var result = []; for(var i=0;i<4;i++){ var ranNum = Math.ceil(Math.random() * 25); //生成一个0到25的数字 //大写字母'A'的ASCII是65,A~Z的ASCII码就是65 + 0~25;然后

2017-08-08 17:42:25 11764

原创 将json时间类型格式化

// 对Date的扩展,将 Date 转化为指定格式的String// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)// 例子:// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02

2017-08-08 15:48:02 535

原创 图片等比例缩放

img{ width:auto; height:auto; max-width:100%; max-height:100%; }

2017-07-28 11:02:04 508

原创 js排序

function sortNumber(a,b){return a - b} var arr = new Array(6)arr[0] = "10"arr[1] = "5"arr[2] = "40"arr[3] = "25"arr[4] = "1000"arr[5] = "1"arr.sort(sortNumber) ;

2017-07-03 17:54:08 226

原创 spring mvc 动态读配置文件

package com.autohome.common;import java.io.*;import java.util.Properties;public class PropertyUtil { private static Properties props; private static void loadProps() { props = new

2017-06-29 13:40:48 829

原创 重写jquery的ajax,解决ie缓存

;(function ($) { if ($ != null && $ != undefined) { //备份jquery的ajax方法 var _ajax = $.ajax; //重写jquery的ajax方法 $.ajax = function (opt) { var data = {

2017-06-27 10:57:12 295

原创 spring mvc 在control外获取request

HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();spring mvc 在control外获取request

2017-03-21 19:03:36 970

转载 SQLSERVER数据集合的交、并、差集运算(intersect,union,except)

熟练使用SQL Server中的各种用法会给查询带来很多方便。今天就介绍一下EXCEPT和INTERSECT。注意此语法仅在SQL Server 2005及以上版本支持。EXCEPT是指在第一个集合中存在,但是不存在于第二个集合中的数据。INTERSECT是指在两个集合中都存在的数据。测试如下:[c-sharp] view plain copy

2017-01-20 14:48:04 806

原创 jquery使用post方法下载

$.download = function (url, data) { if (url && data) { var form = $(''); form.attr('action', url + "?rand=" + Math.random()); form.attr('method', 'p

2017-01-11 15:32:20 5645 1

转载 利用contentEditable属性与execCommand方法开发简洁的文本编辑器

在玉兔项目中我们的文本组件使用的contentEditable属性与execCommand方法结合开发出来的简洁文本编辑器。HTML中的contentEditable属性contentEditable属性的作用是可以打开某些元素的可编辑状态,可供选择的值有空字符串,true,false,inherit(默认)。当一个元素的contentEditable值为true时

2016-12-20 09:44:53 2822

原创 HTML 5 全局 contenteditable 属性

contenteditable 属性规定是否可编辑元素的内容。这是一段可编辑的段落。请试着编辑该文本。

2016-12-19 16:55:41 1396

转载 JQuery拖拽通过八个点改变div大小

(function($) { /** * 默认参数 */ var defaultOpts = { stage: document, //舞台 item: 'resize-item', //可缩放的类名 }; /** * 定义类 */ var ZResize = function(op

2016-12-19 10:09:35 4576 2

原创 再看case when 在row_number中的使用

SELECT tpbt.PMName, k.[ActivityName], k.[ActionerName], k.[Data],

2016-12-14 09:53:42 4448

原创 JQuery重写ajax

(function ($) { //备份jquery的ajax方法 var _ajax = $.ajax; //重写jquery的ajax方法 $.ajax = function (opt) { //备份opt中error和success方法

2016-12-14 09:13:23 1552

原创 c#异步执行一段代码

Thread th = new Thread( delegate() { try {

2016-11-10 14:05:11 1661

原创 使用SVG绘制带箭头的线

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" version="1.1"xmlns="http://www.w3.org/2000/svg"><marker id="arr

2016-10-31 11:40:10 10258 1

原创 asp.net 程序里面调用了excel组件,权限解决方案

在asp.net 程序里面调用了excel组件,但是将程序部署到iis里面会抛以下异常:检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件失败,原因是出现以下错误: 80070005 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))。解决方法:在web.co

2016-09-27 15:06:35 1570

原创 EntityFramework6写的数据访问框架之五事务

分布式事务 using (TransactionScope scope = new TransactionScope()) { try { UserDAL dal = new UserDAL(); User item =

2016-06-20 12:13:51 1946

原创 EntityFramework6写的数据访问框架之四使用

对于一个新的数据库连接,需要重写一个Basedbusing MyTest;using System;using System.Collections.Generic;using System.Configuration;using System.Data.Entity;using System.Data.Entity.ModelConfiguration.Conventions;u

2016-06-20 11:29:35 1450

原创 EntityFramework6写的数据访问框架之三DatabaseExtension

using System;using System.Collections;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.Entity;using System.Data.SqlClient;using System.Linq;using

2016-06-20 11:25:45 712

原创 EntityFramework6写的数据访问框架之二BaseDAL

using System;using System.Collections.Generic;using System.Data;using System.Data.Entity;using System.Linq;using System.Linq.Expressions;using System.Text;using LinqKit;using System.Configurat

2016-06-20 11:24:55 2760

原创 EntityFramework6写的数据访问框架之一 BaseDb

using System;using System.Collections.Generic;using System.Data.Entity;using System.Data.Entity.ModelConfiguration.Conventions;using System.Diagnostics;using System.Linq;using System.Text;name

2016-06-20 11:23:34 1373

原创 json序列化

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System.Web.Script.Serialization;namespace MxWeiXinPF.Common{ pu

2016-04-18 09:34:09 472

原创 html 文本提示值

效果如下

2016-04-15 11:01:56 818

原创 网页中引用腾讯视频

插入如下代码即可e0019fltclc&width=500&height=375&auto=0" height="375" width="500">其中红色部分为腾讯视频url中的参数http://v.qq.com/cover/n/nzech9m6grhduvo.html?vid=e0019fltclc

2016-02-26 11:26:34 3811

原创 sql server事务隔离级别

不懂原理,死记硬背吧,就是一个 对角线,级别高一级少一种并发问题。英文中文更新丢失脏读不可重复读幻读Read Uncommited读未提交不会出现会出现会出现会出现Read Commited读已提交不会出现不会出现会出现会出现R

2016-02-19 16:42:53 401

原创 sql server 复制表结构

SELECT * INTO weixinmenutmpFROM WeiXin_MenuClickEvent AS wxmce WHERE 1=2 创建新表weixinmenutmp,并且将WeiXin_MenuClickEvent的表结构复制到winxinmenutmp表中

2016-02-18 14:18:24 1144

原创 sql server 使用 top WITH TIES

使用top 10 只查出来 前10条记录使用top 10 with ties 则将和前10条记录相同的 childorderid的记录全都查出来了

2016-02-16 10:53:18 1196

转载 sql server 使用ROLLUP完成合计的统计

在生成包含小记和合计的报表时,ROLLUP运算符很有用,ROLLUP运算符生成的结果集类似于CUBE运算符所生成的结果集.ROLLUP和CUBE的区别在于:1. cube生成的结果集显示了所选列的所有组合的聚合2. rollup生成的结果集显示了所选列中值的某一个层次结构的聚合示例:Sql:With rollup:select case when

2016-02-16 10:44:43 7272

转载 sql server 使用CUBE实现合计

CUBE运算符生成的结果集是多维数据集,多维数据集是事实数据的扩展,事实数据即记录个别时间的数据,扩展建立在用户准备分析的列上,这些列被称为维,多维数据集是一个结果集,其中包含各纬度所有可能的交叉表格.CUBE运算符是在Select语句的group by子句中指定的,group by应指定维度列和关键字with cube,结果集将包括维度列中各值的所有可能组合.示例1.Sq

2016-02-16 10:40:38 4684

原创 sql server 使用over 统计百分比

SELECTdsr.ChildOrderId,count(1) AS total,100 * count(1)/sum(count(1)) OVER() AS pct,sum(count(1)) OVER() AS Sumtotal,ROW_NUMBER() OVER (ORDER BY count(1) DESC ) AS rn FROM DX_SessionRecord AS

2016-02-16 10:32:31 3012

原创 sql server备份sql

以下sql对数据库进行备份backup DATABASE CallCenter to disk='\\wangyipeng-36\back\backup3.bak'

2016-01-13 17:38:26 496

原创 css定位在屏幕固定位置

当ccs设置成如下时:style="position: fixed; top: 0px; left: 0px; height: 598px; width: 230px; z-index: 1040;"元素始终定位到屏幕的左边,并且不随这滚动条的上下左右移动而移动

2016-01-07 11:00:24 6610

Jquery实现jsonview

Jquery实现jsonview

2024-11-20

AccessDatabaseEngine2007.zip

AccessDatabaseEngine2007 适用于导入导出数据,未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序。 (System.Data)

2020-03-28

.net版微信编辑器

.net版本微信编辑器源代码,可以直接运行

2016-12-14

wireshark中文教程

wireshark是一种非常著名的 使用的抓包软件 但都是英文版的 这是一个中文使用手册

2009-07-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除