接触到了向左右滑动的手势,上代码。以下实现了,向左滑动时,提出向左滑动的提示,当向右滑动时,提出向右滑动的提示。- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the v...
分类:
其他好文 时间:
2014-07-07 08:25:17
阅读次数:
245
微软近期Open的职位:Job Title: Senior Engineering LeadDivision: Microsoft Business SolutionWork Location: Shanghai, ChinaThe Opportunity:Do you want to play a...
分类:
其他好文 时间:
2014-07-07 08:09:56
阅读次数:
340
1、消除冗余代码以及避免微妙的goto语句:通常,如果一个函数开始要分配一些资源,然后如果在中途遇到错误则要退出函数,当然,退出前要释放资源一般写法: 1 int InitSomething() 2 { 3 char* pImage = NULL; 4 char* pBitMap =...
分类:
其他好文 时间:
2014-07-05 20:22:07
阅读次数:
204
4 Work Mistakes You Don't Realize You're Making你在工作中无意间会犯的四个错误When you’re the new girl at work, you do everything in your power to stay on your best b...
分类:
其他好文 时间:
2014-07-05 18:53:56
阅读次数:
204
Determine whether an integer is a palindrome. Do this without extra space.
Some
hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the integer to string...
分类:
其他好文 时间:
2014-07-05 10:44:29
阅读次数:
227
#!/bin/bashwhiletruedo badip=$(lastb-i-a|awk‘/ssh:notty/{print$NF}‘|sort|uniq-c|awk‘($1>3){print$2}‘) foriin$badip do iptables-tfilter-IINPUT-s$i-ptcp--dport22-jDROP done :>/var/log/btmp sleep10sdone
分类:
移动开发 时间:
2014-07-04 06:22:09
阅读次数:
364
迭代对于我们搞Java的来说绝对不陌生。我们常常使用JDK提供的迭代接口进行Java集合的迭代。 Iterator iterator = list.iterator(); while(iterator.hasNext()){ String string = iterator.next(); //do...
分类:
编程语言 时间:
2014-07-03 19:06:49
阅读次数:
191
ruby on rails 修改数据库内所有用户的密码 ,全部改成1111
项目文件夹内:
rails c
User.all.each do |u|
u.password='1111'
u.password_confirmation='1111'
u.save
end...
分类:
数据库 时间:
2014-07-03 18:31:09
阅读次数:
237
在苹果的SDK中可以看到这两个都是定义的宏
NSAssert 的定义如下:
#define
NSAssert(condition, desc, ...)
do
{
__PRAGM...
分类:
其他好文 时间:
2014-07-03 16:08:07
阅读次数:
206
在某行或者某个位置,打印出“YY/MM/DDHH:MM:SS”先确定位置再输出即可注:有关时间格式到问题%Y:%B:%d%H:%M:%S定位以及光标到问题:tputcup1010tputsc,tputrc,tputcivis,tputcnorm#!/bin/sh
tputcivis
whiletrue
do
tputsc
#tputclear
tputcup1710
echo-n$(date+%Y)/$(da..
分类:
其他好文 时间:
2014-07-03 14:05:03
阅读次数:
177