`
anke1460
  • 浏览: 42385 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
  在ubuntu上装npm,发现老出错,结果发现是node js版本过低问题。 于是升级node js. 1. 下载最新稳定版本的 wget http://nodejs.org/dist/node-v0.4.10.tar.gz, 2. 解压,编译安装     ./configure     make      make install     在make完后,执行make install时发现。发现又出现问题,怀疑是不是中文目录的问题。     我把node-v0.4.10放在了/桌面 目录下,于是把文件放到~下。再操作一遍。更新成功。  3. 安装 npm curl h ...
有时候导入一些数据后,再执行插入时会遇到:     PGError: ERROR:  duplicate key value violates unique constraint "users_pkey"  问题。这时需要再设置sequency。   方法如下:   select setval('users_id_seq', (select max(id) + 1 from users));  
使<pre>的内容自动换行 转载请注明转自《使<pre>的内容自动换行》 <pre> 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。 <pre> 标签的一个常见应用就是用来表示计算机的源代码。 而我们经常碰到的一个问题是如果一个代码上碰到有图片或者网页地址就会使代码很长,结果会造成页面撑开或者代码超出边界。非常难受,如果用overflow:hidden那么会将原来的代码隐藏掉,用overflow:auto则会出现滚动条,代码也不方便阅读。 点击查看:http://www.css8 ...
http://snippets.dzone.com/posts/show/4541 http://www.rubyinside.com/create-a-daemon-server-in-11-lines-of-ruby-58.html   require 'socket' #abort "Usage: server_addr, server_port, cmd_str" unless ARGV.length == 3 UDP_RECV_TIMEOUT = 3 # seconds def q2cmd(server_addr, server_por ...
验证数字的正则表达式集 验证数字:^[0-9]*$验证n位的数字:^\d{n}$验证至少n位数字:^\d{n,}$验证m-n位的数字:^\d{m,n}$验证零和非零开头的数字:^(0|[1-9][0-9]*)$验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$验证有1-3位小数的正实数 ...
一个git学习教程。 url: http://progit.org/book/zh/ch2-4.html   截取一部分已备需要   撤消操作 任何时候,你都有可能需要撤消刚才所做的某些操作。接下来,我们会介绍一些基本的撤消操作相关的命令。请注意,有些操作并不总是可以撤消的,所以请务必谨慎小心,一旦失误,就有可能丢失部分工作成果。 修改最后一次提交 有时候我们提交完了才发现漏掉了几个文件没有加,或者提交信息写错了。想要撤消刚才的提交操作,可以使用 --amend 选项重新提交: $ git commit --amend 此命令将使用当前的暂存区域快照提交。如果刚才提交完没有作任 ...
http://blog.wu-boy.com/2010/04/06/2110/   先前在國外部落格發現一篇非常好用的教學:Quick Tip: How to Target IE6, IE7, and IE8 Uniquely with 4 Characters,裡面有提供一部教學影片,非常好用,也很實在,底下可以先看影片,看完大概就可以針對 IE, ...
http://www.ruby-forum.com/topic/130975
Ubuntu下砍掉僵死进程 Ubuntu下有没有办法砍掉僵死进程ps -eal | awk '{ if ($2 == "Z") {print $4}}' | sudo kill -9
I spent a couple of hours trying to figure out how to handle 404 and 500 errors in Rails. This is not simple and actually really annoying. Hopefully future versions clean this up because right now it sucks pretty badly. Anyways, I found a page on the wiki and some other blogs, but the issue was ...
在文件权限分配方面Ubuntu Linux系统做的非常的出色,通过使用Chmod命令,可以为每个用户,每个文件夹指定不同的权限,甚至可以为不同的用户组指定不同的操作权限! 指令名称 : chmod 使用权限 : 所有使用者 使用方式 : chmod [-cfv ...
Since upgrading to Rails 2.2, you might be seeing lots of messages like this: config.gem: Unpacked gem blah-1.0.0 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. Running 'rake gems:refresh_specs" takes care of most of these, and upgrading any remaining ge ...
http://www.douban.com/note/39297155/
apache 灵异事件 Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs                                                           ...
<a class="myClass" href="myURL">whatever</a> <script type="text/javascript"> function hello() {   var foo = mydocumentgetElementsByClassName("myClass")[0];   if (foo) alert(foo.innerHTML); } function mydocumentgetElementsByClassName(what) { ...
Global site tag (gtag.js) - Google Analytics