CentOS版本 cat /etc/centos-release CentOS Linux release 7.2.1511 (Core) 设置ulimit -c ulimited 依旧无法生成coredump文件,其中也检查了cat /proc/sys/kernel/core_pattern 及/ Read More
posted @ 2016-08-01 13:52 lingjip Views(4606) Comments(0) Diggs(0) Edit
1.Flex的二义性模式语法分析器匹配输入时匹配尽可能多的字符串如果两个模式都可以匹配的话,匹配在程序中更早出的模式。针对这一点的理解,在语法分析文件当中,token的识别,应从特殊到一般的过程来编写(同时为了可以加入日志来打印当前拆分的token来debug这种情况),例如,实现语法分析过程中,遇... Read More
posted @ 2014-06-30 17:48 lingjip Views(1470) Comments(0) Diggs(0) Edit
Spark 相关 Apache Mesos总体架构 http://dongxicheng.org/apache-mesos/meso-architecture/ Apache Spark探秘:实现Map-side Join和Reduce-side Joinhttp://dongxicheng... Read More
posted @ 2014-04-19 09:35 lingjip Views(187) Comments(0) Diggs(0) Edit
今天遇到一个程序,使用了printf输出中间的信息,我也懒得去改。由于此进程被其他进程fork之后,dup2 了标识输入输出到了/dev/null,再通过execvp装载进来。于是,为了看到输出的信息,写了一段类似如下的代码:#include #include #include #include #include int main(int argc,char* argv[]){ int fd = open("/dev/null", O_RDWR, 0); if(-1 != fd) { printf("before dup2... Read More
posted @ 2014-04-02 17:39 lingjip Views(2157) Comments(0) Diggs(0) Edit
今天将Go 的websocket集成到已有的http中时也遇到以下一个问题:其中主要是接口类型转换转载自[http://www.cnblogs.com/ghj1976/archive/2013/04/23/3037914.html]我们用Golang做网站时,必然会有这样的代码:http.Handle("/", http.FileServer(http.Dir(".")))注意这里的http.Handle( 函数的第二个参数,Golang的源码中这个函数的描述如下:// Handle registers the handler for the given Read More
posted @ 2014-03-15 22:53 lingjip Views(1550) Comments(0) Diggs(0) Edit
1.rpmbuild报error:Installed (but unpackaged) file(s) found: (编译taobao datax遇到)解决办法:找到 /usr/lib/rpm/macros 中%__check_files /usr/lib/rpm/check-files %{buildroot} 注释掉 Read More
posted @ 2014-03-13 18:26 lingjip Views(170) Comments(0) Diggs(0) Edit
1.Scan error on column index 4: converting string "" to a int: strconv.ParseInt: parsing "": invalid syntax。这是由于使用MySQL go 驱动时,对应表字段int 为空时(未填值),Scan(&intVal)时(intVal 为int类型)时会报此错。另go转换index 从0开始。2. range 使用时,注意使用的是值拷贝。 pictures := make([]Picture, 8) for index,picture := rang Read More
posted @ 2014-03-11 21:59 lingjip Views(646) Comments(0) Diggs(0) Edit
最近遇到一个莫名的问题,在HP-UX B.11.31 U ia64平台下,程序PetriService在接收到产品化退出或Ctrl-C时,程序在main函数返回后析构全局的CTQueue(继承自标准库list) 时程序core掉。 初步考虑主线程退出时,其他线程还在使用此全局变量所致。但在程序返回退出前,停掉其他线程,仍在main返回后析构时挂掉。于是将所有相当代码行注释掉,发现只要此入CTQueue就会挂掉,gdb调试,及在查看标准库list文件及CTQueue.h实现后,未发现问题。 将CTQueue改成CTQueue,发现程序依然core在CTQueue当中。 此时想起别外一个... Read More
posted @ 2014-01-08 15:37 lingjip Views(156) Comments(0) Diggs(0) Edit
在执行可执行程序时,出现动态链接库加载出错:cannot restore segment prot after reloc: Permission denied。主要是由于Linux 内核中提供的强制访问控制 (MAC)系统SELINUX的原因。解决办法:通过root身份,通过命令更改SELinux的模式。相关的命令:root身份,通过以下命令查询SELinux的模式getenforce :查询SELinux当前的模式。setenforce : 更改SELinux当前的模式。(此处使用setenforce 0)chcon:更改文件的SELinux安全级别。 Read More
posted @ 2013-11-05 16:17 lingjip Views(220) Comments(0) Diggs(0) Edit
1.warning C4996: 'setmode': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _setmode. See online help for details.增加宏定义去掉这种类似的警告:_CRT_NONSTDC_NO_DEPRECATE2. 去掉线程安全警告,定义宏:_CRT_SECURE_NO_WARNINGS Read More
posted @ 2013-10-24 09:29 lingjip Views(181) Comments(0) Diggs(0) Edit