唤醒等待队列中的等待进程的函数wake_up()函数的核心实现函数是__wake_up_common()函数。__wake_up_common(wait_queue_head_t*q,intmode,intnr_exclusive,intwake_flags,void*key)参数介绍:q:是等待队列头;mode:是进程的状态模式其取值为:TASK_INTERRUPTIBLE,TASK_UNITERRUP..
分类:
其他好文 时间:
2014-10-23 06:51:54
阅读次数:
579
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
关键点:1)判断链表是否有环。
2)一个小坑在判断root和root的next是否为空上。
3)可以看为追及问题。最关键的坑在判断快走(每次走2步的节点),走1步会...
分类:
其他好文 时间:
2014-10-23 00:03:10
阅读次数:
276
下面介绍精灵、动画精灵、按钮精灵、文本的常用使用方法
一、精灵相关
1.添加精灵
//创建精灵
Sprite bar_up = new Sprite(400, 0, RegionRes.getRegion(Res.BAR_UP), getVertexBufferObjectManager());
//将精灵添加至BaseEntityGroup或其子类(如:Scene、L...
分类:
其他好文 时间:
2014-10-22 18:27:15
阅读次数:
175
Mac OS X系统图形表示方法
? = shift
? = control
? = option / alt
Home=fn + ?
End=fn + ?
Page Up=fn + ▲
Page Down=fn + ▼
删除后一个字符(普通键盘的Delete)=fn + delete
截图保存整个屏幕到桌面=shift + command + 3
保存整个屏幕到剪...
分类:
系统相关 时间:
2014-10-22 18:17:27
阅读次数:
345
在布局文件里,假设有3层 , 一层是button, textview等常见组件, 二层是嵌套的RelativeLayout, 三层是LinearLayout, 而一个触摸屏幕的事件无非就是ACTION_DOWN, ACTION_MOVE, ACTION_UP. 而手指从按下到松开离开屏幕, 其实事件分发的传递已经经过了这三层. 这里说下它的处理过程, 也算是巩固记忆了.
首先, dis...
分类:
其他好文 时间:
2014-10-22 18:14:12
阅读次数:
215
Abstract
Theexplosive scale of container CPUs needs highly efficient network virtualization
Challenge
Thenumber of container-based CPUs will be 10-100 multiples up over that ofhype...
分类:
Web程序 时间:
2014-10-22 15:55:13
阅读次数:
280
(1)配置clean up,然后执行source -> clean upwindow -> preferences -> java -> code style -> clean up -> code organize -> formatter -> remove trailing whitespac...
分类:
系统相关 时间:
2014-10-22 14:28:56
阅读次数:
392
Follow up for "Find Minimum in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Suppose a sorted array is rotated at some pivot unkno...
分类:
其他好文 时间:
2014-10-22 12:56:43
阅读次数:
223
============问题描述============ 我想在Activity里面用DrawerLayout+Fragment做抽屉菜单,然后在右侧第一个Fragment里面包含ActionBar结果项目运行后,Activity的OnCreate运行到super.onCreate(savedIns...
分类:
其他好文 时间:
2014-10-22 00:50:37
阅读次数:
149
============问题描述============ 有关actionBar自定义样式...我希望自定义ActionBar中Tab标签页标题的字体样式,应该是在style.xml中添加android:actionBarTabTextStyle样式吧?但是实际却并没有效果.PS1:style.xm...
分类:
其他好文 时间:
2014-10-22 00:42:52
阅读次数:
244