码迷,mamicode.com
首页 >  
搜索关键字:match    ( 5193个结果
chrome 模拟点击
实现进入一个页面后触发一个的点击事件。由于safari和chrome不支持的click()所以需要对浏览器进行判断var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)...
分类:其他好文   时间:2014-06-28 12:11:27    阅读次数:173
UriMatcher 和 ContentUris 的用法
一.UriMatcherUriMatcher 用来匹配Uri;使用addURI向UriMatcher中注册Uri。然后使用UriMatcher判断一个uri是否存在1.创建:UriMatchermatcher=newUriMatcher(UriMatcher.NO_MATCH); 2.注册Uripr...
分类:其他好文   时间:2014-06-25 22:20:19    阅读次数:204
Desugar Scala(15) -- unapply和unapplySeq方法
欢迎关注我的新博客地址:http://cuipengfei.me/   实在想不到什么动词可以当做脱衣服来讲了,所以从现在开始这系列博文就叫做Desugar Scala了。除非哪天才思泉涌,又想到了新词:) 开始正文。 名字叫做unapply和unapplySeq的方法在Scala里也是有特殊含义的。 我们前面说过case class在做pattern match时很...
分类:移动开发   时间:2014-06-24 19:42:48    阅读次数:265
一个简单的判断抢购时间是否到达的js函数
原型函数,功能很简单,找到时钟的id,计算数值,到达抢购时间时执行任务。 function nwt() {var str=$('#deal_expiry_timer_e3cdcd2a').text(); var out=str.match(/\d+/g);console.log(out);var h=parseInt(out[0]),m=parseInt(out[1]),s=parseInt(o...
分类:Web程序   时间:2014-06-24 17:56:43    阅读次数:229
如何实现底部工具栏的位置在屏幕底部
一个垂直方向的LinearLayout,包含两个View。下面一个View(工具栏)固定在屏幕底部,上面的View占据剩余的屏幕空间。<LinearLayoutandroid:orientation="vertical"android:id="@+id/vertical_layout"android:layout_width="match_parent"android:layout_height="match_paren..
分类:其他好文   时间:2014-06-24 16:57:06    阅读次数:199
BZOJ 1264 基因匹配Match(LCS转化LIS)
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1264题意:给出两个数列,每个数列的长度为5n,其中1-n每个数字各出现5次。求两个数列的最长公共子列。思 路:首先找出每个数字在第二个数列中出现的位置,对于第一个数列构造出一个新的数列,每...
分类:其他好文   时间:2014-06-23 08:07:04    阅读次数:308
赵雅智_Android案例_刮刮乐
实现效果 主要代码 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:lay...
分类:移动开发   时间:2014-06-22 15:08:24    阅读次数:314
android基础之LinearLayout布局
LinearLayout布局:<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"androi..
分类:移动开发   时间:2014-06-21 19:17:45    阅读次数:239
用PHP将Unicode 转化为UTF-8
functionunescape($str) {$str= rawurldecode($str);preg_match_all("/(?:%u.{4})|&#x.{4};|&#\d+;|.+/U",$str,$r);$ar= $r[0];//print_r($ar);foreach($aras$k=...
分类:Web程序   时间:2014-06-20 22:45:44    阅读次数:265
php获取网页中图片与DIV内容实例
分享下php获取网页中图片、DIV内容的简单方法,都是通过正则表达式实现的。1、获取网页中所有的图片:]*>/i', $text, $match); //打印出match print_r($match); ?>2、获取网页中的第一张图片:]*>/Ui', $text, $match);//打印出ma...
分类:Web程序   时间:2014-06-20 15:00:30    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!