Jason Koo

      Stay hungry, Stay foolish!

导航

2013年7月4日

摘要: 存储过程用户自定义函数嵌入SQL中不能嵌入SQL中,即SQL语句中不能直接调用存储过程能嵌入SQL中返回值可以返回多个值,也可以不返回值只能返回一个值实现功能用于数据库完成特定的任务(如插入、删除),较复杂用于特定数据(选择),较简单 阅读全文

posted @ 2013-07-04 16:13 Jason Koo 阅读(188) 评论(0) 推荐(0) 编辑

2013年6月21日

摘要: 1. 截图可以在Dash主页中搜索screenshot,然后点击即可截图。2. 使用命令行打开常见的文件,可以使用下面的命令:gnome-open file2open.xxxxdg-open file2open.xxx上面两个命令都可以,其中xxx为相应文件的扩展名。3. 查看当前主机中的IP地址、子网掩码、网关以及DNS服务器可以使用如下命令:nm-tool # network manager tool如果权限不够,加sudo.4. 查看当前防火墙的规则,可以使用如下命令:sudo iptables -L -n5. 查看当前系统中的不同进程及相应进程监听的端口号,使用... 阅读全文

posted @ 2013-06-21 13:39 Jason Koo 阅读(146) 评论(0) 推荐(0) 编辑

摘要: 可以使用下面的三个命令在Ubuntu上安装Latex及相关的辅助包。sudo apt-get install texlive-latex-basesudo apt-get install texlive-sciencesudo apt-get install texlive-latex-extra也可以使用下面一个命令将其全部安装,这样会占用很多系统空间:sudo apt-get install texlive-full 阅读全文

posted @ 2013-06-21 13:35 Jason Koo 阅读(265) 评论(0) 推荐(0) 编辑

摘要: 阅读全文

posted @ 2013-06-21 13:25 Jason Koo 阅读(208) 评论(0) 推荐(0) 编辑

摘要: Published:Vol 1:Fundamental AlgorithmsVol 2:Seminumerical AlgorithmsVol 3:Sorting and SearchingWriting:Vol 4:Combinatorial AlgorithmsVol 5:SyntacticAlgorithmsFuture Plans:Vol 6:Theory of Context-free LanguagesVol 7:Compiler Techniques 阅读全文

posted @ 2013-06-21 10:57 Jason Koo 阅读(198) 评论(0) 推荐(0) 编辑

2013年6月20日

摘要: 字符串循环移位问题是面试中比较容易遇到的,就是输入一个字符串和一个整数,原地输出移位后的字符串。不同的考官可能对程序的具体要求不同,这里要求空间复杂度为O(1)。这里给出两种解答方法。(1)将移动n位看做“每次移动一位,共操作n次”,这是一种化整为零的思维方法。只要能想到这一步,相信下面的代码就不难写出了: 1 void shift_1(char* str) 2 { 3 int len = strlen(str); 4 if(len <= 1) 5 return; 6 char temp = str[len-1]; 7 for(int i=len... 阅读全文

posted @ 2013-06-20 20:42 Jason Koo 阅读(372) 评论(0) 推荐(1) 编辑

2013年6月19日

摘要: 声明:以下内容为网络整理的结果!它们用处不同,但大部分情况下可以完成相同的要求。strcpy原型:extern char *strcpy(char *dest,char *src);用法:#include <string.h>功能:把src所指由NULL结束的字符串复制到dest所指的数组中。说明:src和dest所指内存区域不可以重叠且dest必须有足够的空间来容纳src的字符串。 返回指向dest的指针。例:char a[100],b[50];strcpy(a,b);如用strcpy(b,a),要注意a中的字符串长度(第一个‘\0’之前)是否超过50位,如超过,则会造成b的内存 阅读全文

posted @ 2013-06-19 22:54 Jason Koo 阅读(269) 评论(0) 推荐(0) 编辑

2013年6月12日

摘要: In the field ofcomputer software, the termsoftware buildrefers either to the process of convertingsource codefiles into standalone software artifact(s) that can be run on a computer, or the result of doing so. One of the most important steps of a software build is thecompilationprocess wheresource c 阅读全文

posted @ 2013-06-12 21:40 Jason Koo 阅读(209) 评论(0) 推荐(0) 编辑

2013年5月19日

摘要: 1. 备份master和所有slave上的文档、程序和软件master上的目录结构:conf/dataset/hadoop/mesos/package/spark/桌面/.result/.scriptslave上的目录结构:conf/hadoop/mesos/package/spark/桌面/.result/.scriptmaster上/etc/hosts文件中的内容:127.0.0.1 localhost#127.0.1.1 master# The following lines are desirable for IPv6 capable hosts::1 i... 阅读全文

posted @ 2013-05-19 21:39 Jason Koo 阅读(825) 评论(0) 推荐(0) 编辑

2013年5月5日

摘要: 在笔试和面试中有时候会考到动态申请和释放二维数组的问题。这篇文章就简单地介绍一下在C和C++中动态申请与释放二维数组的方法。在C中动态申请二维数组的代码如下:#include <stdio.h>#include <stdlib.h> // 该头文件中包含malloc和freeint i, j;int row, col; // 定义二维数组的行和列int **a; // 定义二维数组指针scanf("%d%d", &row, &col); // 输入二维数组的行与列a = (int **) malloc(sizeof(int *) * 阅读全文

posted @ 2013-05-05 12:49 Jason Koo 阅读(185) 评论(0) 推荐(0) 编辑