1.信号量( 两个进程之间同步)
struct semaphore power_sem;
sema_init(&pdata->power_sem,1);
down(&pdata->power_sem);
up(&pdata->power_sem);
2.互斥量
struct mutex led_mutex;
mutex_init(&led_mutex);
m...
分类:
系统相关 时间:
2015-03-16 19:23:15
阅读次数:
237
题意:求只用乘法和除法最快多少步可以求到x^n
思路:迭代加深搜索
//Accepted 164K 1094MS C++ 840B
include
#include
#include
#include
using namespace std;
int step[100005];
int n;
int cur;
bool IDDFS(int lim,int g)
{
if(cur>li...
分类:
其他好文 时间:
2015-03-15 23:04:40
阅读次数:
157
1. 题目实现函数double Power(double base, int exponent),求base的exponent次幂。不得使用库函数,同时不需要考虑大数问题。
2. 分析首先需要确定base以及exponent的范围,因为exponent大于0不会有人和限制。此题为求数值的整数次幂,因此需要考虑其小于0的情况。...
分类:
其他好文 时间:
2015-03-15 23:02:43
阅读次数:
228
【安装后没有root用户,添加root用户如下】使用sudopasswd来设置root密码即可!一般修改为rootroot;进入后,没有root密码,需要sudopasswd来设置root密码!一般修改为rootroot;(修改时需要输入lixingxing2的密码,之后输入的(也即设置的是)是root的密码)【可能需要的问题..
分类:
系统相关 时间:
2015-03-15 19:58:25
阅读次数:
262
1, commnad文件:
--update_package=/sdcard/dload/update.zip
实际需改成你下载的包的位置
2, command写到
/cache/recovery/下面
3,执行参数STring recovery的reboot
((PowerManager)getSystemService("power")).reboot("r...
分类:
其他好文 时间:
2015-03-14 17:02:44
阅读次数:
281
Consider ann-by-nmatrixA. We defineAk=A*A* ... *A(ktimes). Here, * denotes the usual matrix multiplication.You are to write a program that computes th...
分类:
其他好文 时间:
2015-03-14 12:15:55
阅读次数:
149
Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power ...
分类:
其他好文 时间:
2015-03-14 11:04:05
阅读次数:
122
laconic、cogent、词根loquor、词根magnus、词根verbum、词根volvo的相关衍生词学习
分类:
其他好文 时间:
2015-03-13 18:23:47
阅读次数:
259
DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think...
分类:
其他好文 时间:
2015-03-12 20:49:18
阅读次数:
155
2014 物联网行业哪家强?
Power Players in the Internet of Things (物联网超级玩家)...
分类:
其他好文 时间:
2015-03-12 11:43:08
阅读次数:
376