http://blog.csdn.net/roger_ge/article/details/5552740转自csdn,实现模拟鼠标键盘系列上一篇博文中讲述了通过Socket编程从外部向Emulator发送键盘鼠标模拟事件,貌似实现细节有点复杂。其实Android还有一种更简单的模拟键盘鼠标事件的方...
分类:
移动开发 时间:
2014-05-28 23:59:43
阅读次数:
582
php执行外部命令的不少,例如:exec、shell_exec、system、popen等。我特意的讲一下popen,它跟其他函数不太一样,其他函数执行一个命令后,会等待其返回后,再向下执行,而popen则不会。所以你想用php程序并行的处理一些业务的时候,可以用popen。我举个例子,有两个php...
分类:
Web程序 时间:
2014-05-28 22:45:34
阅读次数:
346
原题地址:https://oj.leetcode.com/problems/climbing-stairs/题意:You
are climbing a stair case. It takesnsteps to reach to the top.Each time you can
either cl...
分类:
编程语言 时间:
2014-05-28 03:27:49
阅读次数:
267
这是一个清空系统日志的脚本:vim logmess_clean.sh#bin/bash
//该脚本所使用的shell解释器cd /var/log///切换到存放日志目录echo > messages//清空日志echo
"logmessages is clean"//脚本执行完成后输出“日志清空”[...
分类:
其他好文 时间:
2014-05-28 02:09:50
阅读次数:
320
很久没看APUE,今天一位朋友问道关于一个mutex的问题,又翻到了以前讨论过的东西,为了不让自己忘记,把曾经的东西总结一下。
先大体看下网上很多地方都有的关于pthread_cond_wait()的说明:条件变量
条件变量是利用线程间共享的全局变量进行同步的一种机制,主要包括两个动作:一个...
分类:
其他好文 时间:
2014-05-28 01:37:12
阅读次数:
301
一个系列三道题,我都不会做,google之答案。过了两道,第三道看不懂,放置,稍后继续。一、Best
Time to Buy and Sell Stock
I题目:一个数组表示一支股票的价格变换。要求只买卖一次,获得最大收益。思路:一开始我认为是寻找最大、最小值,但由于最大值不一定总是出现在最小值的...
分类:
其他好文 时间:
2014-05-28 01:21:52
阅读次数:
262
题目: Say you have an array for which the ith element
is the price of a given stock on day i. If you were only permitted to complete
at most one transac...
分类:
其他好文 时间:
2014-05-28 00:55:20
阅读次数:
288
题目: Say you have an array for which the ith element
is the price of a given stock on day i. Design an algorithm to find the maximum
profit. You may co...
分类:
其他好文 时间:
2014-05-28 00:53:26
阅读次数:
338
http://acm.hdu.edu.cn/showproblem.php?pid=1565
方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K
(Java/Others) Total Submissi....
分类:
其他好文 时间:
2014-05-28 00:31:16
阅读次数:
248
改脚本查看哪些ip被占用。#!/bin/bashfor i in {1..10}
//赋予i变量1-10do//干什么ping -c1 -w1 192.168.7.$i &> /dev/null //ping
192.168.7.网段 每个ip1次 显示1行全输出到无底洞if [ $? -eq 0 ...
分类:
其他好文 时间:
2014-05-28 00:04:45
阅读次数:
321