Welcom ,I hope yo will enjoy here!

2011年8月20日

sqlite3 命令行操作

摘要: 1. sqlite3 dbName.sqlite3 加载数据库,不存载就创建2. .help 帮助详解sqlite> .help.backup ?DB? FILE Backup DB (default "main") to FILE.bail ON|OFF Stop after hitting an error. Default OFF.databases List names and files of attached databases.dump ?TABLE? ... Dump the database in an SQL text format If TABL 阅读全文

posted @ 2011-08-20 23:49 北国的雨 阅读(8533) 评论(0) 推荐(0) 编辑

Rails源码分析——delegate(转载)

摘要: Delegate是一种应用composite来代替extend的机制,可以有效地降低代码的耦合性。Rails 2.2增加了delegate方法,可以十分方便地实现delegate机制。来看看源码吧:def delegate(*methods) options = methods.pop unless options.is_a?(Hash) && to = options[:to] raise ArgumentError, "Delegation needs a target. Supply an options hash with a :to key as the l 阅读全文

posted @ 2011-08-20 19:13 北国的雨 阅读(845) 评论(0) 推荐(0) 编辑

linux命令后台运行

摘要: 有两种方式: 1. command & : 后台运行,你关掉终端会停止运行 2. nohup command & : 后台运行,你关掉终端也会继续运行 一、 简介 Linux/Unix 区别于微软平台最大的优点就是真正的多用户,多任务。因此在任务管理上也有别具特色的管理思想。我们知道,在 Windows 上面,我们要么让一个程序作为服务在后台一直运行,要么停止这个服务。而不能让程序在前台后台之间切换。而 Linux 提供了 fg 和bg 命令,让你轻松调度正在运行的任务。假设你发现前台运行的一个程序需要很长的时间,但是需要干其他的事情,你就可以用 Ctrl-Z ,挂起这个程序, 阅读全文

posted @ 2011-08-20 17:54 北国的雨 阅读(200972) 评论(4) 推荐(14) 编辑

导航