正文

@echo off

:start
::启动过程,切换目录
set pwd=%cd%
cd %1
echo 工作目录是:& chdir

:input
::获取输入,根据输入进行处理
set source=:
set /p source=确定要清楚当前目录下的svn信息吗?[Y/N/Q]
set “source=%source:”=%”

if “%source%”==”y” goto clean
if “%source%”==”Y” goto clean
if “%source%”==”n” goto noclean
if “%source%”==”N” goto noclean
if “%source%”==”q” goto end
if “%source%”==”Q” goto end
goto input

:clean
::主处理过程,执行清理工作
@echo on
@for /d /r %%c in (.svn) do @if exist %%c ( rd /s /q “%%c” & echo 删除目录%%c)
@echo off
echo “当前目录下的svn信息已清除”
goto end

:noclean
::分支过程,取消清理工作
echo “svn信息清楚操作已取消”
goto end

:end
::退出程序
cd “%pwd%”
pause

来源 http://yaojialing.iteye.com/blog/1226890

文件:删除svn

html代码

<a href=”http://www.shangzh.com” class=”tooltiptitle=”老李的博客”>尚站互联首页</a>

js代码

//鼠标跟随
var x = 15;
var y = 10;
$("body").append("<div id='tooltip' style='position: absolute;border: #333 1PX solid;background: #f7f5d1;padding: 1px;color: #333;display: none;padding: 1px;'></div>");
var mytooltip = $("#tooltip");

$(".tooltip").mouseover(function (e) { //当鼠标指针从元素上移入时
   this.mytitle = this.title;
   this.title = '';
   mytooltip.html(this.mytitle).css({ "top": (e.pageY + y) + "px", "left": (e.pageX + x) + "px" }).show("fast");
}).mouseout(function () { //当鼠标指针从元素上移开时
   this.title = this.mytitle;
   mytooltip.html('');
}).mousemove(function (e) { //当鼠标指针从元素上移动时
   mytooltip.css({ "top": (e.pageY + y) + "px", "left": (e.pageX + x) + "px" });
});

在使用phpsocket.io时需要https支持,在配置的时候踩了不少坑,这里做一下笔记。

如果你的ssl比较多,当然可以用独立域名来配置phpsocket.io 那就比较简单。只需要用nginx代理ssl就可以了,配置如下

server {
listen 443;

# host name to respond to
server_name ws.example.com;

# your SSL configuration
ssl on;
ssl_certificate /etc/ssl/localcerts/ws.example.com.bundle.crt;
ssl_certificate_key /etc/ssl/localcerts/ws.example.com.key;

location / {
# switch off logging
access_log off;

# redirect all HTTP traffic to localhost:8080
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}
}

Read More →

服务器信息传输

// send to current request socket client
socket.emit(‘message’, “this is a test”);

// sending to all clients except sender
socket.broadcast.emit(‘message’, “this is a test”);

// sending to all clients in ‘game’ room(channel) except sender
socket.broadcast.to(‘game’).emit(‘message’, ‘nice game’);

// sending to all clients, include sender
io.sockets.emit(‘message’, “this is a test”);

// sending to all clients in ‘game’ room(channel), include sender
io.sockets.in(‘game’).emit(‘message’, ‘cool game’);

// sending to individual socketid
io.sockets.socket(socketid).emit(‘message’, ‘for your eyes only’);
上述集中方式为socket.io常用的数据传输方式,

io.sockets.on(‘connection’, function (socket) {

});

回调函数的socket参数为一个 client 与服务器的连接标示,不同的 client 会有不同的连接标示。

Read More →

1,从版本控制系统创建项目:

CVS -> Checkout from Version Control
2, 关联DOC文档:

右键External Librariese -> Configure PHP include paths
3, 去掉波浪线:

settings -> Editor -> Colors & Fonts -> General -> TYPO->Effects
4, 显示行号:

settings -> Editor->Appearance->Show line numbers
5,远程或本地同步文件:

Tools -> Deploments -> Configuration
6, 去掉右上角浏览器图标:

settings -> tools -> WebBrowsers
7, 添加VIM插件:

settings->editor ->plugins->browse repositories ->搜索VIM
8,启动的时候不打开工程文件

Settings->General去掉Reopen last project on startup.
9, 取消自动保存

appearance -> system settings -> save file的两个选项 去掉
10, 将编辑的文件加星号标识:

settings -> editor -> editor tabs -> 勾选 mark modifed tabs…

11, 添加扩展名高亮显示:

settings -> editor -> file types

12, 修改字体大小

settings -> editor -> colors & fonts -> Font

Read More →