实现进入一个页面后触发一个的点击事件。由于safari和chrome不支持的click()所以需要对浏览器进行判断var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([\d.]+)...
分类:
其他好文 时间:
2014-06-28 12:11:27
阅读次数:
173
一.UriMatcherUriMatcher 用来匹配Uri;使用addURI向UriMatcher中注册Uri。然后使用UriMatcher判断一个uri是否存在1.创建:UriMatchermatcher=newUriMatcher(UriMatcher.NO_MATCH); 2.注册Uripr...
分类:
其他好文 时间:
2014-06-25 22:20:19
阅读次数:
204
欢迎关注我的新博客地址:http://cuipengfei.me/
实在想不到什么动词可以当做脱衣服来讲了,所以从现在开始这系列博文就叫做Desugar Scala了。除非哪天才思泉涌,又想到了新词:)
开始正文。
名字叫做unapply和unapplySeq的方法在Scala里也是有特殊含义的。
我们前面说过case class在做pattern match时很...
分类:
移动开发 时间:
2014-06-24 19:42:48
阅读次数:
265
原型函数,功能很简单,找到时钟的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
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1264题意:给出两个数列,每个数列的长度为5n,其中1-n每个数字各出现5次。求两个数列的最长公共子列。思 路:首先找出每个数字在第二个数列中出现的位置,对于第一个数列构造出一个新的数列,每...
分类:
其他好文 时间:
2014-06-23 08:07:04
阅读次数:
308
实现效果
主要代码
<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
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
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内容的简单方法,都是通过正则表达式实现的。1、获取网页中所有的图片:]*>/i', $text, $match); //打印出match print_r($match); ?>2、获取网页中的第一张图片:]*>/Ui', $text, $match);//打印出ma...
分类:
Web程序 时间:
2014-06-20 15:00:30
阅读次数:
214