本篇文章通过平台总线设备模型为例,讲解总线设备驱动模型:platform_device_register的作用:1.把device放入bus的device链表2.从bus的driver链表中取出每一个driver,用bus的match函数判断driver能否支持这个device3.若可以支持,调用d...
分类:
系统相关 时间:
2014-06-27 22:38:15
阅读次数:
327
Android常用布局类整理
最近又回头做了一下android的项目,发觉越来越不从心,很多东西都忘了,简单的页面布局也很多写不出来,首先还是先整理一下一些会混淆的概念先
layout_width/layout_height的两种不同的方式
① wrap_content能包裹其中的内容即可
② fill_parent/match_parent 填满父视图的空间
Lin...
分类:
移动开发 时间:
2014-06-26 07:44:46
阅读次数:
337
一.UriMatcherUriMatcher 用来匹配Uri;使用addURI向UriMatcher中注册Uri。然后使用UriMatcher判断一个uri是否存在1.创建:UriMatchermatcher=newUriMatcher(UriMatcher.NO_MATCH); 2.注册Uripr...
分类:
其他好文 时间:
2014-06-25 22:20:19
阅读次数:
204
DescriptionThis sample uses a geoprocessing task that takes an input SQLQuery string and filters 911 calls to display only calls that match the query....
分类:
编程语言 时间:
2014-06-25 09:21:40
阅读次数:
273
欢迎关注我的新博客地址: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