Length of Last WordGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.I...
分类:
其他好文 时间:
2014-12-11 17:02:35
阅读次数:
133
上午跟着教程写代码的时候,因为SQL语句中多用了''导致整个类的方法不能用。debug花了很长时间,我的方法是整个逻辑流程倒推分段的方法,采用手动赋值的方式检验每个object的method是否正常工作,到最后一直试到SQL的cmd中,这才发现原来直接用SQL语句在cmd中依然返回的是empty s...
分类:
数据库 时间:
2014-12-10 15:52:43
阅读次数:
178
ios学习-delegate、传值、跳转页面1.打开xcode,然后选择ios--Application--Empty Application一个空项目。项目目录:2.输入项目名称以及选择保存路径即可。3.创建文件夹Model、Controller。4.Model文件夹创建User类:User.h ...
分类:
移动开发 时间:
2014-12-09 21:24:30
阅读次数:
196
PHP判断键值数组是否存在,使用empty或isset或array_key_exists本文目的前 几天工作中,需要频繁判断数组中的键值对是否存在,起初使用的”!empty($arr[‘key’])”来判断,觉得这样读起来比较舒服,但是写出的代 码无法通过单元测试(单元测试太好了)。排查很久,终于发...
分类:
编程语言 时间:
2014-12-09 11:56:41
阅读次数:
194
前两天够哦年公司培训,讲了编码优化。现在初步总结下:(有些不大确定的就不讲了)多次字符串拼接(特别是循环内),宜用stringBuilder.Append()方法,少用字符串+,至于string.Format()更费资源,少用。当然,如果字符串拼接量不大,3次以内,那也随便吧,为了美观string....
分类:
Web程序 时间:
2014-12-08 22:44:28
阅读次数:
353
xcode 6取消了 Empty Application 模板来创建一个工程,创建出来的有工程多了Main.storyboard,默认加载Main.storyboard,但是有很多人还想用代码来实现UI的布局,去除Main.storyboard的有三步:首先如图打开工程下面Supporting .....
分类:
其他好文 时间:
2014-12-08 19:14:15
阅读次数:
603
【题目】
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...
分类:
其他好文 时间:
2014-12-08 17:47:15
阅读次数:
167
public static string ExecuteAaptCommand(string appName, string command) { string result = string.Empty; string error = st...
分类:
Windows程序 时间:
2014-12-08 17:31:55
阅读次数:
1678
备份前的检查> show dbsMyDB 0.0625GBadmin (empty)bruce 0.0625GBlocal (empty)test 0.0625GB> use MyDBswitched to db MyDB> db.users.find(){ "_id" : ObjectId("4e...
分类:
数据库 时间:
2014-12-08 15:17:36
阅读次数:
396
Stack 从名字中可以看得出来意思是栈,
栈的特点就是先进后出,FILO.
具体使用看下面的代码:
#include
#include
using namespace std;
int main()
{
stack sc;
for(int i = 0; i
sc.push(i);
while( !sc.empty())
{
cout
sc.pop();
...
分类:
其他好文 时间:
2014-12-07 01:25:07
阅读次数:
211