- 博客(172)
- 资源 (2)
- 收藏
- 关注
原创 如何维修身体(转载)
转自:[url]http://www.douban.com/note/475362913/[/url]1. 灵魂是自由的,肉身是沉重的,灵魂来到肉身,是为了体验物质世界的无限可能。这是直接的结论,论证过程太长,不说了。2. 在物质世界,保护肉身是第一重要的事情,否则没得玩。3. 精神和肉身相互影响。4. 保护肉身第一种重要的事情,就是精神充沛平静,“精神内守...
2015-01-07 21:09:35
305
原创 扩展巴科斯范式与语法图
扩展巴科斯范式[url]http://zh.wikipedia.org/wiki/%E6%89%A9%E5%B1%95%E5%B7%B4%E7%A7%91%E6%96%AF%E8%8C%83%E5%BC%8F[/url]语法图[url]http://dancewithnet.com/2008/05/28/syntax-diagrams/[/url]...
2014-01-05 10:59:37
677
原创 svn resolved
[code="java"]svn st | grep ! | cut -c 9- | while read line;do svn resolved $line;done[/code]
2013-06-12 16:21:13
206
原创 xargs
svn一次添加太多文件,网络不是很稳定,提交总是超时,所以每次提交40个文件。[code="java"]svn st | grep -v ? | head -n 40 | cut -c 9- | xargs svn commit -m 'xx'[/code]...
2013-06-12 15:20:00
138
原创 Shell遍历文件夹删除匹配文件
[code="java"]#!/bin/sh list_alldir(){ for file2 in `ls -a $1` do if [ x"$file2" != x"." -a x"$file2" != x".." ];then if [ -d "$1/$file2" ] &a
2013-06-11 17:28:10
1274
原创 photo move
[code="java"]#!/bin/bashCOLOR_PHOTO_PATH="/var/www/rails/webapp/public/data/images/colors/"CHIP_COLOR_PATH="/mnt/chip/colors"cd $COLOR_PHOTO_PATHls | grep -E 'front|back' | while read line;d...
2013-06-11 17:25:36
177
原创 Ruby 搭建环境
[url]http://kidlet.sinaapp.com/blog/archives/185.html[/url][url]http://kidlet.sinaapp.com/blog/archives/205.html[/url]因为想装RVM 所以要对上述程序进行删除,其中 Ruby 和 RubyGem 均是采用从官方下载源代码进行编译安装的结果发现 官方提供的 M...
2013-06-01 11:17:00
154
原创 启LINUX防火墙后,FTP PASV不能正常登录问题
转载:http://www.cnblogs.com/redhatlinux/archive/2012/04/03/2431453.htmllinux服务器开启防火墙,常规设置在防火墙配置文件中添加21端口, FTP服务器通过port能够访问,pasv不能访问。而客户端一般是采用pasv方式连接。解决方法如下:首先要了解概念;FTP支持两种模式,一种方式叫做Standard ...
2013-05-31 15:23:55
178
原创 CentOS 5.5下FTP安装及配置(转载)
转载自http://www.blogjava.net/Alpha/archive/2012/02/02/369246.htmlCentOS 5.5下FTP安装及配置一、FTP的安装1、检测是否安装了FTP :[root@localhost ~]# rpm -q vsftpdvsftpd-2.0.5-16.el5_5.1否则显示:[root@localhost ~...
2013-05-22 11:32:28
218
原创 工作记录(待续)
1,增加一个Sql远程登录用户[code="sql"]SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;GRANT select ON endysis.* TO eshop@localhost IDENTIFIED BY 'abc';GRANT select ON ...
2013-03-14 17:00:49
144
原创 How to fix wicd 1.7.0+ds1-5 Connection Failed: Bad Password on Ubuntu 10.10 (Mav
[url]http://pc-freak.net/blog/how-to-fix-wicd-1-7-0ds1-5-connection-failed-bad-password-on-ubuntu-10-10-maverick-merkaaat/[/url]I’ve been struggling with fixing a nasty error with wicd network manag...
2012-11-04 11:44:15
170
原创 Enlarge tex memory in OSX
Enlarge expand tex latex memory in OSX Mac.Get an error like this?[quote]Here is how much of TeX's memory you used...3000001 words of memory out of 3000000Add the following lines to the fi...
2012-04-28 11:49:41
240
原创 Latex中文
导言部分[code="java"]\usepackage{CJK} \usepackage[ greek,english]{babel}\usepackage[utf8x]{inputenc}\newcommand{\zht}[1]{\begin{CJK}{UTF8}{bsmi}#1\end{CJK}}\newcommand{\zhs}[1]{\begin{CJK}{UT...
2012-04-06 16:19:19
177
原创 latex图片和表格并排
[quote]\documentclass[a4paper,10pt]{article}\usepackage[utf8x]{inputenc}\usepackage{graphicx}\usepackage{subfigure}%opening\title{}\author{}\begin{document}\makeatletter\def\@cap...
2012-03-20 14:49:55
5979
原创 calendar
[url]http://fullcalendar.vinsol.com/[/url][url]https://github.com/elevation/event_calendar[/url]
2012-02-24 11:04:36
119
原创 Toolkit
backup[code="java"]#!/bin/sh# Endysis application backup scriptRAILS_APP_PATH="/var/www/rails/webapp"BACKUP_PATH="/home/god/backup"DATE="$(date +%d-%m-%y)"YEAR="$(date +%Y)"MONTH="$(.
2012-02-15 11:16:19
153
原创 Linux下cron的使用(转载)
原文在这里:[url]http://fanqiang.chinaunix.net/system/linux/2005-06-13/3306.shtml[/url]cron是一个linux下的定时执行工具,可以在无需人工干预的情况下运行作业。由于Cron 是Linux的内置服务,但它不自动起来,可以用以下的方法启动、关闭这个服务: /sbin/service crond start...
2011-12-24 11:54:27
99
原创 ActiveRecord::Dirty
[quote]Track unsaved attribute changes.A newly instantiated object is unchanged:[/quote][code="ruby"] a=ManufacturingElement.new>> a.changed?=> false>> a.uom==> "m">> a.chan=> tr...
2011-11-21 10:29:20
131
原创 Metaprogramming Ruby
P30In a sense, the class keyword in Ruby is more like a scope operator thana class declaration.
2011-09-30 16:11:33
125
原创 <<编程之美>> 之1.2 中国象棋将帅问题
这个题目来自于《编程之美》第1.2节。题目的大致意思是说,棋盘上只有一将一帅,将帅都只能在各自的九宫格中移动,并且将帅不能对面。要求只使用一个变量输出将帅所有可能的位置组合。 对于A,B各有9个可以选择的位置.可以考虑A,B都是9进制,只要保证A,B除以9的余数不同,即使A,B不在同一纵列上就满足条件.[code="ruby"] (0..81).each do |i| ...
2011-09-30 01:40:33
133
原创 Linux Source命令及脚本的执行方式解析(转)
来源[url]http://www.51testing.com/?uid-225738-action-viewspace-itemid-206878[/url]当我修改了/etc/profile文件,我想让它立刻生效,而不用重新登录;这时就想到用source命令,如:source /etc/profile对source进行了学习,并且用它与sh 执行脚本进行了对比,现在总结一下。...
2011-09-27 19:47:31
112
原创 TinyTDS
tiny_tds[url]https://github.com/rails-sqlserver/tiny_tds[/url]freetds[url]http://www.freetds.org/[/url]
2011-09-20 09:29:27
112
原创 pandoc-ruby
[url]https://github.com/alphabetum/pandoc-ruby[/url][quote]PandocRubyWrapper for Pandoc, a Haskell library with command line tools for converting one markup format to another.Pandoc can read...
2011-09-11 11:50:30
119
原创 Rabbit MQ
Rabbit MQ[url]http://www.rabbitmq.com/[/url]bunny[url]https://github.com/ruby-amqp/bunny[/url]minion[url]https://github.com/orionz/minion[/url]amq-protocol[url]https://github.com/r...
2011-09-01 07:49:34
189
原创 Rails计算某月最后一天
经常忘记这个函数.mark下.[quote]end_of_day, end_of_month, end_of_quarter, end_of_week, end_of_year[/quote]
2011-08-12 10:46:56
246
原创 Latex shortstack
[url]http://www.emerson.emory.edu/services/latex/latex_55.html[/url][quote]\shortstack\shortstack[position]{... \\ ... \\ ...}The \shortstack command produces a stack of objects. The valid...
2011-08-11 11:05:55
1918
1
原创 常用命令
1,查看文件夹下的文件个数(当前目录的文件数)ls -l |grep "^-" | wc -l 2,grep -n "str" -r ./这是查找当前目录下以及下辖子目录下所有包含str字符串的文件,会列出文件名.以及该行的内容.以及行号 ...
2011-08-02 07:57:59
116
原创 LaTeX Spaces and Boxes
[url]http://www.personal.ceu.hu/tex/spacebox.htm[/url]
2011-08-01 14:13:37
117
原创 Latex dashed box
[code="ruby"]\documentclass[12pt]{article}\usepackage{graphics,color}\begin{document}\begin{flushleft}\begin{picture}(100,100)\dashbox{1}(100,100){a} \end{picture}\begin{picture}...
2011-08-01 10:03:19
386
原创 How to simulat javascript Event
[code="js"] if(ob.onchange)) ob.onchange(); if(ob.onclick)) ob.onclick();[/code][code="js"]/** * Event.simulate(@e...
2011-07-19 08:32:13
102
原创 API
[quote]http://dev.mysql.com/[/quote][quote]A similar MySQL extension applies to the HAVING clause. Standard SQL does not permit the HAVING clause to name any column not found in the GROUP BY clause ...
2011-06-28 17:26:56
122
原创 Erlang起步
一个小疑问。[code="ruby"]29> [H|T]="cat". "cat" 41> H. 99 42> T. "at" 43> [H]. "c" 44> ["c"]. ["c"] [/code]
2011-05-31 00:10:39
118
原创 关于浮点数精度的问题
在项目里遇到一个很诡异的问题,因为有一些浮点数的计算,总是失败,所有将出问题的变量打印到日志里。 结果如下:[quote] ====reicpe_blocked 1.9 ====real_block 1.9[/quote] 是这样的,recipe_blocked变量值是:1.9,real_block变量值是1.9,两个结果相减结果是result,但是在程序对...
2011-05-11 15:50:58
238
原创 LaTeX Spaces and Boxes
[code="java"]\makebox, \mbox \makebox[width][position]{text} \mbox {text}The \makebox command creates a box to contain the text specified. The width of the box is specified by the optional w...
2011-04-29 09:57:47
152
原创 Rails: Calling render() outside your Controllers
From:[url]http://blog.choonkeat.com/weblog/2006/08/rails-calling-r.html[/url][code="rails"]module RenderAnywhere class DummyController def logger RAILS_DEFAULT_LOG...
2011-04-28 17:15:27
282
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人