接触到了向左右滑动的手势,上代码。以下实现了,向左滑动时,提出向左滑动的提示,当向右滑动时,提出向右滑动的提示。- (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
Do-While while循环的另一个版本是do-while循环,它在判断条件之前,先执行一遍循环体,然后再次执行循环体,直到条件成为false. do-while循环的通过格式: do { statements } while condition 我们再用蛇和梯子...
分类:
移动开发 时间:
2014-07-06 18:18:24
阅读次数:
252
在构造函数中不要调用virtual函数,调用了也不会有预期的效果。举个例子class Transaction{ public: Transaction() { log(); } virtual void log() =0;}class BusinessTran...
分类:
编程语言 时间:
2014-07-05 20:43:00
阅读次数:
209
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
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
在某行或者某个位置,打印出“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