The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gr...
分类:
其他好文 时间:
2014-05-07 06:10:17
阅读次数:
370
今天遇到一个问题,要做一个语音识别接口的对接,想先跑一下对方给的demo,但是发现使用了maven却没有在pom里添加依赖,不知道他那边是怎么运行的。于是想到要在pom中添加本地依赖,结果真的可以:
System Dependencies
Dependencies with the scope system are always available and are not looked...
分类:
其他好文 时间:
2014-05-07 04:16:42
阅读次数:
407
我们退出Activity可以调用:finish(),system(0),但是这些都只是单单退出单个Activity
也有人会说,直接把进程杀死,这些做法都不是很可取,其实我们翻看api可以发现,Activity
都是放入stack中管理,我们只要把stack清空了,不就完全退出了嘛。要对Activity的stack
管理,就需要了解launchMode的四种状态,这里...
分类:
移动开发 时间:
2014-05-06 23:40:01
阅读次数:
409
1、环境描述
服务器A(主) 192.85.1.175
服务器B(从) 192.85.1.176
Mysql版本:5.1.61
系统版本:System OS:ubuntu 10.10 X86
(系统安装及数据环境搭建,省略)
2. 创建同步用户:
在服务B命令行执行 :
grant replication slave on *.* to...
分类:
数据库 时间:
2014-05-06 23:02:17
阅读次数:
543
通过PHP程序完成修改Hosts文件原理如下:
1,Neil没有找到直接利用PHP修改的方法,所以首先是写一个.bat文件
2,使用system(),调用.bat完成修改Hosts的目的
代码如下:
//创建.bat
$filename = "updata.bat";//'@echo 127.0.0.1 baidu.com >>C:\Windows\System32\Drive...
1,Mysqldump的时候报错如下:2014-05-05 14:12:37 7f004a9a2700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.但是show tables我看这个表示存在的:但是show create table innodb_index_stats;报错如下:mysql> show create t...
分类:
数据库 时间:
2014-05-06 19:46:46
阅读次数:
621
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the array retur...
分类:
其他好文 时间:
2014-05-06 19:03:11
阅读次数:
365
查询注册表是否禁用USB@echooffset"str=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\USBSTOR"for/f"tokens=2*"%%ain(‘regquery"%str%"/vStart2^>nul‘)doset"a=%%b"if"%a%"=="0x4"(echoUSB已经禁用>>USB已禁用)else(echoUSB未禁用>>USB未禁用)禁用USB..
分类:
其他好文 时间:
2014-05-06 17:06:20
阅读次数:
280
今天早上在使用LoadRunner时,报了如下的错误,开始并未看错误以为是录制问题引起,就重新录制了一遍,简单施压看看错误是否还有,结果错误仍然有,如下所示:Error:Socketdescriptornotfound.Hint:theproblemmightbesolvedapplyingthefollowing:(1)UpdateRun-TimeSettingstoRu..
分类:
移动开发 时间:
2014-05-06 16:36:23
阅读次数:
611
接着上一文“vmwareworkstation9.0.2中虚拟机上网以及与宿主主机通信问题解决方案【2】”,继续完成虚拟机上网以及与宿主主机通信这一系列的博文。之前因为培训、上课和实习的事情,耽搁了很久,今晚抽点时间继续完成它。五.使用bridge方式上网的配置方法。第一步:在上图上注..
分类:
其他好文 时间:
2014-05-06 16:03:56
阅读次数:
303