摘要: Question 1: Two Sum 1 class Solution { 2 public: 3 vector twoSum(vector &numbers, int target) { 4 // Start typing your C/C++ solution below 5 // DO NOT write int main() function 6 vector res; 7 vector::size_type index1, index2; 8 9 for (index1 = 0... 阅读全文
posted @ 2013-09-05 22:03 neil90 阅读(223) 评论(0) 推荐(0) 编辑
摘要: -N 在结果集中不输出列名称 阅读全文
posted @ 2012-04-03 16:43 neil90 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Ext.getCmp(String id): Ext.Componet 根据id,返回对应的组件。若找不到则返回undefined,若找到了一个类,则返回null。布局CardLayout 包含多个panel,但同一时间只显示一个panel AContaineris a special type of Component that can contain other Components.the default layout for all Containers isAuto Layout. 阅读全文
posted @ 2012-03-24 14:19 neil90 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1. JDK 安装完成后,设置环境变量JAVA_HOME, PATH, CLASSPATH;2. Tomcat 安装完成后,设置环境变量CATALINA_HOME;3. eclipse 无需安装,直接解压即可4. TomcatPlugin 解压至elipse\plugins下,启动eclipse会发现工具栏上多了tomcat的图标;设置tomcat路径即可在eclipse下使用Some Questions:javax.*.*包导入失败,可能原因是项目WEB-INFO\lib目录下没有servlet-api.jar; 阅读全文
posted @ 2012-03-23 23:04 neil90 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 光标移动w 移动至下一个单词的开头b 移动至上一个单词的开头e 移动至下一个单词的结尾ge 移动至上一个单词的结尾0 移动至一行开头$ 移动至一行结尾f{char} 移动到char上 gg 文件开头G 文件尾部 :ju 打印跳转列表CTRL-O 跳至跳转列表旧的位置CTRL-I或<Tab> 跳至跳转列表新的位置:help {subject}CTRL-D 列出所有匹配subject的帮助 阅读全文
posted @ 2012-03-12 16:46 neil90 阅读(251) 评论(0) 推荐(0) 编辑
摘要: find$ find . -name "a.c" ; 在当前目录下寻找文件a.c。如果找到,打印相对路径$ find /home/neil/src -name "*.h" -o -name "*.c" ; 在src目录下寻找所有.h或.c文件。以绝对路径打印它们ps -f 显示所有格式环境变量显示环境变量HOME$ echo $HOME设置一个新的环境变量NAME$ export NAME="hustor"显示所有环境变量$ env显示所有本地定义的Shell变量$ set清楚环境变量$ unset NAME设置只 阅读全文
posted @ 2012-03-12 14:00 neil90 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 在vim中搜索:cs find {querytype} {name}{querytype}:0 or s: Find this C symbol1 or g: Find this difinition2 or d: Find functions called by this function3 or c: Find functions calling this function4 or t: Find this text string6 or e: Find this egrep pattern7 or f: Find this file8 or i: Find files #includin 阅读全文
posted @ 2012-03-12 13:04 neil90 阅读(15223) 评论(2) 推荐(2) 编辑
摘要: 一直把sizeof当做函数来用,今天才发现它仅仅是个操作符而已。(严格来说,操作符也是函数,但是把它当做操作符来看更合适)用法:sizeof操作符的作用是返回一个对象或类型名的长度,返回值的类型为size_t(unsigned),长度的单位是字节(byte)。sizeof表达式的结果是编译时常量。有以下三种语法形式:sizeof(type name); sizeof(expr); // 获得该表达式的结果的类型长度sizeof expr; // 不计算表达式expr的值举例说明:sizeof(int); // 表达式值为4sizeof int; // 语法错误sizeof(2+0.5); // 阅读全文
posted @ 2011-03-26 20:46 neil90 阅读(1071) 评论(2) 推荐(0) 编辑