- 博客(37)
- 资源 (1)
- 收藏
- 关注
原创 devise rails
http://blog.blazingcloud.net/2011/01/08/devise-authentication-in-rails-3/http://stackoverflow.com/questions/4136121/rails-3-authentication-authlogic-vs-deviserailscasts
2012-08-18 20:40:55
339
原创 rails authentication session & cookie
http://railscasts.com/episodes/250-authentication-from-scratchhttp://railscasts.com/episodes/270-authentication-in-rails-3-1http://railscasts.com/episodes/274-remember-me-reset-password?autoplay
2012-08-10 10:01:39
323
原创 rails 升级
gem list -d rails sudo gem uninstall -v ##。##。##gem install rails gem cleanup
2012-08-06 21:57:38
371
原创 rubygems 中国镜像,,,悲哀
为什么有这个?由于国内网络原因(你懂的),导致 rubygems.org 存放在 Amazon S3 上面的资源文件间歇性连接失败。所以你会与遇到 gem install rack 或 bundle install 的时候半天没有响应,具体可以用 gem install rails -V 来查看执行过程。这是一个完整 rubygems.org 镜像,由 Ru
2012-08-06 21:37:22
873
转载 emacs ido mode
Using IDOTo switch between buffers, press “C-x b”, then:type some characters appearing in the buffer name, RET to visit the buffer in the front the list.use C-s (next) or C-r (previous) to move
2012-07-31 15:14:26
1027
原创 ruby 相关笔记
1. It’s worth noting that the nil object is special, in that it is the only Ruby object thatis false in a boolean context, apart from falseitself:2.we can omit the curly braces for final h
2012-07-31 09:40:08
276
原创 emacs org mode 笔记 ----- 1
Emacs org mode * Document structure** Outlines TAB to hide or show the structure** Headlines 1) * is a first level headline 2) ** is a second level headline 3) and so on ** V
2012-07-21 18:45:24
358
转载 arpspoof
Suposing we've installed a linux with dsniff tool, we have to enable routing in system's kernel:sysctl -w net.ipv4.ip_forward=1We have to create two different process for establi
2012-07-15 23:01:30
738
原创 .emacs 7-11-2012
;;yasnippet(add-to-list 'load-path "~/.emacs.d/plugins")(require 'yasnippet-bundle);;-------------rinari----------- ;; Interactively Do Things (highly recommended, but not s
2012-07-11 20:42:43
449
原创 ruby on rails
chapter 6 ----------------------------------------------autotest----------------------------------------gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'bundle exec annotate
2012-06-25 13:04:02
291
转载 debian 的网络安装
下载 debian netinstall , i386假设U盘的设备号是 /dev/sdbzcat boot.img.gz > /dev/sdb //在U盘中放入光盘镜像mount /dev/sdb /mntcp debain debian-testing-i386-bussinesscard.iso /mnt/umount /mnt
2012-06-22 09:07:36
310
转载 ruby ubuntu
If you are running an older version of ubuntu the guide below might still apply, but since the release of Ubuntu 12.04 this install has become a much simpler process. So simple in fact that you can ba
2012-06-21 20:32:14
315
转载 debian ruby 配置
apt-get updateapt-get upgrade sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev
2012-06-20 21:16:23
368
转载 Dell && Steve Jobs
各位学长,大家好!今天我这篇报告的题目,是【Michael Dell v.s. Steve Jobss】,内容,则是比较这兩位信息产业巨擘,他们的家世背景、成长过程、个人的特质发展,最后会对DELL 与APPLE兩个公司未來的展望作一个比较,这算是一个显性的目的,除了这显性目的之外,还有一个隐性的目的,让我先卖个关子,留待最后再來揭露。这一份报告,是在一个多月之前定稿的,第一次是11/16
2012-06-18 21:38:23
2337
原创 N++ ++N
很多次遇到了a[N++] 是程序无法正常运行的情况还有就是 function(N++, sdfsa)这个时候要么 使用function (N+1, sdasa)要多 多一个变量
2012-06-17 11:13:34
592
原创 何为内部排序和外部排序?
内部排序 (in memory) : 如果被排序的文件适合放在内存当中,则排序方法称为“内部排序”外部排序: 从磁带或者磁盘上对文件进行排序,称为 “外部排序”区别: 内部排序可以很容易的访问任何元素,外部排序必须顺序访元素
2012-06-14 08:03:06
1214
原创 现在正在自己啃的书,算法
http://www.amazon.cn/%E5%85%B7%E4%BD%93%E6%95%B0%E5%AD%A6-%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6%E5%9F%BA%E7%A1%80-%E6%A0%BC%E9%9B%B7%E5%8E%84%E5%A7%86/dp/B0011AC8FS/ref=lh_ni_thttp://www
2012-06-10 21:20:53
672
原创 Josephus 环
public class Josephus { public static void main(String[] args) { int M = Integer.parseInt(args[0]); int N = Integer.parseInt(args[1]); // initialize the queue Queu
2012-06-10 09:53:09
214
转载 发点牢骚! 真的觉得日本人好牛~~
http://ruby-china.org/topics/2099Emacs, 用的越久, 越来越觉的, 日本人好牛啊.Emacs 中的lisp代码, 我估计有最少三分之一的插件是日本人写的. EmacsWiki大把的日本人编写的优秀插件, 我们能用上unicode版本的Emacs23, 是日本人的功劳.我自己天天在用的大把顶级插件, 例如: auto-complete
2012-06-09 11:40:18
1269
原创 电脑crash 之后, emacs recover 未保存文件
If Emacs or the computer crashes, you can recover the files you were editing at the time of the crash from their auto-save files. To do this, start Emacs again and type the command M-x recover-session
2012-06-07 13:57:01
430
转载 0Ubuntu 系统的电驴下载软件 - mldonkey[转贴
mldonkey 是个很不错的下载软件,支持电驴、BT、HTTP等支持,且还是不断增加,什么时候要能支持迅雷就好了,呵呵。很多人安装了 mldonkey 却不知道怎么去用,实际上是很简单的。首先来了解一下mldonkey是怎样的架构。 mldonkey 有服务器端和客户端。服务器端(mldonkey-server)是用来下载的,是主要组件。客户端就很多了,因为服务器端支持好多的管理方式,如We
2012-06-06 08:17:36
481
原创 我的.emacs 2012年6月27日updated
(setq delete-auto-save-files t) ;; quit message(fset 'yes-or-no-p 'y-or-n-p);;设置有用的个人信息。这在很多地方有用(setq user-full-name "liuyao")(setq user-mail-address "liuyaouestc@163.com");;把缺省的 major mod
2012-05-29 18:59:23
292
原创 备用
http://emacser.com/emacs-gccsense.htmhttp://cx4a.org/software/gccsense/manual.html#Install_gcc-code-assisthttp://linuxers.org/article/how-install-linux-without-cddvdhttp://linuxers.org/a
2012-05-29 18:57:57
170
转载 linux Grub 修复
2007-11-30 00:52:56来自: kimi(waiting and give myself peace)一,硬盘安装 到http://mirror.lupaworld.com/archlinux/iso/latest/下载iso镜像,提取其中vmlinuz 和initrd.img到你的一个分区的根目录 进入grub,按C进入命令行模式 grub>
2012-05-17 14:43:34
285
原创 数组实现堆栈
#include #include void insert(int);void dele();void display();int s[20], item, i, n = 10;int top = -1;int main(void){ while(1){ printf("Array implementation of a
2012-05-06 14:02:41
230
原创 我看过的经典书籍
c primer plus 我的C语言入门书籍computer system: a programmer's perspective C 与底层和操作系统的深度联系expert C programming: 扫除了一些锚点let us C 这本书可以说C的traps 都可以在里面找到解答, 印度人写的The C programming Language --》 在国外的irc 上
2012-05-05 23:37:22
320
转载 c static 问题
A static variable inside a function keeps its value between invocations.A static global variable or a function is "seen" only in the file it's declared in(1) is the more foreign topic if you're a ne
2012-05-04 20:50:34
249
原创 函数指针问题
Expert C programming :英文: P79中文:P67typedef void(*ptr_to_func) (int )/* this says that ptr_to_func is a pointer to a function that takes an int argument and returns void*/sdfvoid (*signa
2012-05-04 19:07:22
244
转载 a function return a pointer , wherein a bug
点击打开链接Those are the two most common reasons for passing a pointer to a function as an argument. However, pointers can also be returned from functions. The syntax is consistent with all other decla
2012-05-04 09:25:21
308
转载 const c
const T andT const are identical. Pay attention to pointer precedence, however:char const* is a pointer to a constant char (array), whilechar* const is a constant pointer to a mutable char (arra
2012-05-03 11:05:19
216
原创 指针的大小问题
问题来源:点击打开链接Also we have learned that on different systems the size of a pointercan vary. As it turns out it is also possible that the size ofa pointer can vary depending on the data type of the obje
2012-04-24 09:11:28
398
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人