今天尝试用安卓最新的Toolbar替换Actionbar,使用后发现菜单项始终无法显示。xml文件如下: google后发现是命名空间的问题,使用Toolbar后,需要在xml中定义新的命名空间,showAsAction 就可以生效了。正确的xml代码如下:
分类:
其他好文 时间:
2015-01-09 13:59:35
阅读次数:
237
1. iw dev wlan0 interface add mon_wlan0 type monitor 2. ifconfig mon_wlan0 up 3. iwconfig mon_wlan0 channel ‘X‘ 4. wireshark? base on mon_wlan0 ? Ps: check channel support or not with command "i...
分类:
其他好文 时间:
2015-01-09 12:50:43
阅读次数:
227
SublimeText多列选择(Column Selection)默认的快捷键是Ctrl+shift+up&down,但是与Yosemite的“MissionControl”、“应用程序窗口”的两个快捷键冲突了,最简单的办法就是在“偏好设置”里面关掉这两个快捷键。
分类:
其他好文 时间:
2015-01-09 10:32:04
阅读次数:
244
使用git提交比较大的文件的时候可能会出现这个错误 error: RPC failed; result=22, HTTP code = 411 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to...
分类:
其他好文 时间:
2015-01-08 20:18:38
阅读次数:
199
一开始出现这个错误的时候还感觉很奇怪,我明明在在本地中相应的库文件夹命令中输入: vim ./git/config 将文件中的 [remote “origin"]部分去掉!
分类:
Web程序 时间:
2015-01-08 17:31:43
阅读次数:
180
搭建Linux-VSFTPLinux搭建vsftp。所谓vsftp,就是verysecureFTPdaemon。在Linux上搭建FTP,可以选择proftpd、pureftpd、和vsftpd等软件。在vsftp创建虚拟的ftp用户。所谓虚拟用户,就是不在系统中存在,而且在不同的虚拟用户有不同的权限,例如UP用户只能上传,不能修改下载;D..
分类:
系统相关 时间:
2015-01-08 15:30:45
阅读次数:
196
题目:
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively...
分类:
编程语言 时间:
2015-01-08 15:29:48
阅读次数:
162
import random
#warning: x and y confusing
sx = 10
sy = 10
dfs = [[0 for col in range(sx)] for row in range(sy)]
maze = [[' ' for col in range(2*sx+1)] for row in range(2*sy+1)]
#1:up 2:down 3:left 4...
分类:
编程语言 时间:
2015-01-08 15:24:22
阅读次数:
158
在导入一个Maven项目之后发现有一个如下的错误:
Project configuration is not up-to-date with pom.xml. Run project configuration update
解决办法1:
较老的Eclipse版本:
在项目上右键——【Maven】——【Update Project Configuration……】这...
分类:
其他好文 时间:
2015-01-08 15:14:46
阅读次数:
169
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2015-01-08 13:03:40
阅读次数:
106