内容来自百度搜索 //判断样式是否存在 function hasClass(ele, cls) { return ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)")); } //为指定的dom元素添加样式 function addC ...
分类:
Web程序 时间:
2017-11-09 19:39:51
阅读次数:
177
function Xreplace(str,length,reversed) { var re = new RegExp("\\d{1,"+length+"}","g"); ma = str.match(re); if(reversed)ma.reverse(); return ma.join("a ...
分类:
Web程序 时间:
2017-11-09 18:41:35
阅读次数:
316
这个正则表达式,我还真没有接触过,在python首次学习 //test.py 1 import re 2 3 print (re.match('www', 'www.myweb.com').span()) 4 print (re.match('com', 'www.myweb.com')) 5 6 ...
分类:
编程语言 时间:
2017-11-09 18:38:55
阅读次数:
193
//navigator.userAgent获取机型var isAndroid = navigator.userAgent.match(/android/ig); var isIos = navigator.userAgent.match(/iphone|ipod/ig); var isWeixin ... ...
分类:
移动开发 时间:
2017-11-09 17:54:29
阅读次数:
186
Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1. For ...
分类:
其他好文 时间:
2017-11-09 15:09:08
阅读次数:
155
function GetQueryString(name){ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null) ...
分类:
Web程序 时间:
2017-11-09 14:44:15
阅读次数:
187
收集整理了一些Web前端开发比较成熟的第三方插件,分享给大家。 ******************************************************************************* 一、国外插件 ace 版本:1.2.3au 官网:https://githu ...
分类:
Web程序 时间:
2017-11-09 14:30:31
阅读次数:
431
jssdkAccess.js apiSign.js 使用的时候传入appId即可 ...
分类:
微信 时间:
2017-11-08 17:33:46
阅读次数:
291
一、概述 MySQL全文检索是利用查询关键字和查询列内容之间的相关度进行检索,可以利用全文索引来提高匹配的速度。 二、语法 MATCH (col1,col2,...) AGAINST (expr [search_modifier]) search_modifier: { IN BOOLEAN MOD ...
分类:
数据库 时间:
2017-11-08 17:27:29
阅读次数:
192
DFS, my solution is to fill each edge of the square one by one. DFS to construct the 1st, then 2nd, then 3rd, then 4th. For each edge I scan all the m ...
分类:
其他好文 时间:
2017-11-08 14:50:43
阅读次数:
171