摘要: 1.安装Scrapyhttp://doc.scrapy.org/en/latest/topics/ubuntu.html#topics-ubuntu根据上面链接,选择自己的ubuntu版本的安装包curl -s http://archive.scrapy.org/ubuntu/archive.key | sudo apt-key add -利用这个命令添加相应的keysudo apt-get install scrapy2.创建第一个demo参照教程http://doc.scrapy.org/en/latest/intro/tutorial.html#intro-tutorial这里有一点小问 阅读全文
posted @ 2013-07-06 16:43 孤独的小马哥 阅读(166) 评论(0) 推荐(0)
摘要: cat /dev/null > ~/.local/share/recently_used.xbelrm ~/.local/share/zeitgeist/activity.sqlite还有一个ubuntu 12.04带的管理工具:Activity-log-manager。 阅读全文
posted @ 2013-07-01 16:57 孤独的小马哥 阅读(284) 评论(0) 推荐(0)
摘要: 本文仅仅讲述最最基本的环境配置过程,仅供参考。 参考:http://blog.dcxn.com/ 1.修改Gemfile,添加:gem 'ember-rails'gem 'ember-source', '1.0.0.rc5' # or the version you needgem 'handlebars-source', '1.0.0.rc4' 在config/environments/development.rb中添加:config.ember.variant = :development在config/env 阅读全文
posted @ 2013-06-15 18:27 孤独的小马哥 阅读(204) 评论(0) 推荐(0)
摘要: 问:It appears from the database error "could not open extension control file" while trying to CREATE EXTENSION [...] hstore that the extension hstore is not installed.On Ubuntu, you can install the extension by installing the postgresql-contrib package.答:sudo apt-get install postgresql-cont 阅读全文
posted @ 2013-05-26 07:35 孤独的小马哥 阅读(238) 评论(0) 推荐(0)
摘要: $ git config --global user.name "Your Name"$ git config --global user.email your.email@example.com$ git config --global credential.helper 'cache --timeout=3600" cache 密码$ git init关于ignore文件添加$ git add .$ git commit -m "Initial commit"$ git status$ git checkout -f -f强制覆盖当 阅读全文
posted @ 2013-05-22 11:02 孤独的小马哥 阅读(196) 评论(0) 推荐(0)
摘要: 各种bug,也算是吐血整理了,菜鸟一只。 主要参照:http://guides.ruby-china.org/getting_started.html。好东西。 1.安装rvm 这个版本下rvm是坏的,必须要修理:sudo apt-get --purge remove ruby-rvmsudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.shopen new terminal and validate environment is clean from old RVM settings (shoul... 阅读全文
posted @ 2013-05-14 21:15 孤独的小马哥 阅读(129) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<stdlib.h>#include<sys/wait.h>#define MAXLINE 4096int main(){ char buf[MAXLINE]; pid_t pid; int status; while(fgets(buf,MAXLINE,stdin) != NULL){ if(buf[strlen(buf) - 1] == '\n') buf[strlen(buf) - 1] = 0; if((pid = fork()) < 0){ ... 阅读全文
posted @ 2013-04-06 14:27 孤独的小马哥 阅读(485) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<stdlib.h>#include<dirent.h>int main(int argc,char **argv){ DIR *dp; struct dirent *dirp; if(argc != 2){ printf("usage:ls directory_name\n"); exit(0); } if((dp = opendir(argv[1])) == NULL){ printf("can not open\n"); exit(0); ... 阅读全文
posted @ 2013-04-06 13:55 孤独的小马哥 阅读(209) 评论(0) 推荐(0)
摘要: clock()函数的头文件是time.h,基本结构如下:clock_t start,stop;start = clock();{要计时区域}stop = clock();printf(“time is %f”,(float)(stop - start)/CLOCKS_PER_SEC);其中CLOCKS_PER_SEC是系统常量,表示系统时钟滴答数。 阅读全文
posted @ 2013-04-03 17:13 孤独的小马哥 阅读(173) 评论(0) 推荐(0)
摘要: 添加-Xcompiler-fopenmp 选项。 阅读全文
posted @ 2013-04-03 12:20 孤独的小马哥 阅读(447) 评论(0) 推荐(0)