手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2009年07月25日的文章

Linux下清除.svn目录

SVN给开发带来了方便,但在导出的时候,如果选择了checkout,那么目录里是带有.svn目录的,除非是export。

如果您的项目中是checkout的,如果还要export,那就烦了一点。因为export是从服务器上导回来的。如果服务器速度慢(网上的免费SVN服务器),那就更痛苦了。因此直接删除.svn目录是最快的解决方法。

windows下面可以直接搜索.svn,然后delete就行了
linux下面怎么办?

其实更方便,只要一句话
进入项目目录后,运行 find . -name ".svn" | xargs rm -rf
然后你就会发现。.svn目录全没有了。HOHO

 

查了一下google,发现还有另外一个方法:

XML/HTML代码
  1. find -name "CVS" -exec rm -f {} \;  
  2.   
  3. 利用-name和-exec两个参数组合,可以实现批量查找删除指定文件的目的。  
  4.   
  5. 要活用find,它是很强大的。  
  6.   
  7. find [path...] [expression]  
  8.   
  9. -name pattern  
  10.     Base of file name (the path with the leading directories removed) matches shell pattern pattern. The metacharacters (`*', `?', and `[]') do not match a `.' at the start of the base name. To ignore a directory and the files under it, use -prune; see an example in the description of -path.  
  11.   
  12. -exec command ;  
  13.     Execute command; true if 0 status is returned. All following arguments to find are taken to be arguments to the command until an argument consisting of `;' is encountered. The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find. Both of these constructions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell. The command is executed in the starting directory.  

Tags: svn

js中的分号引起的语义变化

膘叔:我的JS不太好,所以觉得可以学习一下。
原文如下:
js一直以其松散而著称,然后,很多时候,然,童鞋们,不要误解松散的字面意思,松散但是其词法结构,而不是书写习惯,如果果真误解了,会将自己领入一个自己的松散编织的咒语。

上次写的那个jquery的屏蔽层的, 因为我用的
(function(){})(jquery)
方式
我后面想, 如果想再写个插件的话就要

(function(){})(jquery)

(function(){})(jquery)
 
于是,我调试了下,轰, 脚本报错 了,,,,同时我改传window的作用域来 实验
(function(scope){})(window)
(function(scope){})(window)
 
依然  “页面脚本错误”  斗大的报错信息郝然眼底
到这里,我犯了个不可饶恕的低级错误,也许这个错误同样的很多同学也会步这个后尘,细心的你发现了么,当然,也许你一眼就发现了我的问题出在哪里了,因为我这确实是犯的个低级错误!
 
js 是函数式的语言,在js中,()具有二意性,
意一为表达式中的提高优先级别 比如 (a+b)*c
     那该运算表达式优先计算a+b
意二 则为函数调用比如(function(){})()
     上面的后面()即为匿名函数(function(){})的调用
     如果上面的空匿名函数换成这样
    (function(){
          return function(){
                 alert("自由是现实的,现实是操蛋的")
          }
    })()
    首先这个匿名方法返回一个function
    如果在后面在加个() 比如这样
   (function(){
          return function(){
                 alert("自由是现实的,现实是操蛋的")
          }
    })()
    (function(){})
   后面在加一个()里面带一个匿名函数。
   系统就会把这个()当成是前面返回的那个匿名函数的调用表达式,而里面的空function(){}则被当做参数提交了。
 
   到这里,前面我不小心弄出来的那个  斗大的报错信息  恍然大悟。
 
   我一直和自己说,注重细节,细节决定成败,然而却一直都忽略了这个问题,每一句表达式后一定要加;来断句,这是个良好习惯,只是一直以来都没有引发问题而已,这里,我不得不深刻反省,犯如此之低级错误,真应该做深刻的检讨,上cctv,上新闻联播,向全国人民道歉!
 
   谁动了我的分号



-------------------------------------------------------------------------------------------
本文链接: http://www.cnblogs.com/litao229/archive/2009/07/24/1530375.html