作者归档:℃冻番茄

windows下安装免apache的svn服务器

一般情况下,如果是自己在本地架设一个svn用于本地代码的版本管理的话,就完全没必要再去安装一个apache

1,下载svn客户端 TortoiseSVN-1.4.5 

     安装完毕后需重启机器

     重启完毕,新建一个文件夹用于存放svn版本库  例如 D:\svnprojects

     在D:\svnprojects 新建一个文件夹用于存入一个项目的版本 例如 phpd 路径:D:\svnprojects\phpd

     在phpd下点右键 TortoiseSVN -> Create repository hear (在这里创建一个版本库)

     svn1.jpg

     svn2.jpg

     生成版本库所需文件!

2,下载svn-win32-1.5.4.zip 服务端
(官网下载:http://subversion.tigris.org/files/documents/15/44095/svn-win32-1.5.4.zip

     全部解压至一个文件名 例如: D:\svn 

    运行里输入命令 D:\svn\bin\svnserve.exe –service -r D:\svnprojects

    注意:运行后,请不要关闭dos窗口!关闭dos窗口即关闭svn服务器

    到这里svn已经启动了,在ie地址栏里直接输入svn://localhost/phpd 应该就可以打开svn浏览器进行浏览了,

    但是现在还没有权限进行里面文件的操作

3,设置版本库权限

     进入D:\svnprojects\phpd\conf 中,打开svnserve.conf

     查找到下面三行,去除前面的#  注意:这三行前面不能有空格
     设为匿名用户不能访问 如需访问,改回read

     anon-access = none
     auth-access = write
     password-db = passwd

     编辑 passwd 文件 
     [users] 下面左边用户右边密码 一行一个用户!

     现在已经设置好了版本库phpd的权限,当然还有详细的组权限待,请参考相关资料!

4,把svn加入windows服务 以后就可以开机启动svn server了!

在命令行里直接输入:

sc create svn binpath= "D:\svn\bin\svnserve.exe –service -r D:\svnprojects"   displayname= "SubVersion Server" depend= Tcpip start= auto

建立名为svn的windows服务

sc start svn

启动svn服务

sc delete svn  (删除svn服务!如果不需要svn成为windows服务的话,就可以删除svn的服务!) 

用jquery打造仿开心网无刷新头像上传功能

代码修改于网络上一个asp.net的仿开心网头像

增加了php上传及生成头像功能,增加ajax无刷新上传

在ie7及firefox下通过测试

演示地址:http://www.ye55.com/thumb

妈的,困死我了。改了一个晚上。因为原来的js代码全部是在$(window).load(function())里执行的,但是我为了能方便ajax调用,把全部的js分成了三部分了。分三部分时老出问题,还好都改完了。现在还没优化代码,先不管了,以后要用的时候再优化一下。睡觉去了·····

未命名.jpg

代码下载

thumb.zip

《蓝树叶》 联想到现在的网络时代

蓝树叶

     美术课上,老师教同学们画风景,要画上树、房子和小山。李丽画好了近处的房子、远处的小山。她正要画树,可是绿色铅笔找不到了。
     李丽看看旁边的林园园已经把树画好了,树叶那么绿,真惹人爱。李丽小声对林园园说:“把绿铅笔借给我用一用行吗?”林园园吞吞吐吐地说:“我还没有画完 呢。”李丽只好坐在那里看林园园画。等她画完了,李丽说:“现在可以把绿铅笔借给我了吧?”林园园说:“我怕你把笔尖弄断了。”李丽说:“我小心一点儿”
林园园从盒子里拿出绿铅笔,说:“你要注意,不要削,画的时候不要用力,不要画得太多!”李丽连忙说:“我只画树叶和小草。”林园园皱着眉头,说:“还要 画小草吗?”李丽看了看林园园,没有接她的铅笔。李丽拿起自己的蓝铅笔,用心地画着一片片树叶。林园园看见这些蓝树叶,不由得脸红了。

篇小学时的课文相信大家都很熟悉,反正我一直以来,只要一想到借东西和自私这两样生活中最常见的事物,就想到蓝树叶课文中的借绿色铅笔画树叶,从’借’又想到现在的网络时代,网络时代讲究的是共享,在计算机网络中,大量的各种各样的信息都是无私的人们奉献出来的,总之不管是‘借’还是‘共享’其实都是给予别人方便。
最近一直想用自己的所学做一个网站,现在想好了,网站名称就叫 《蓝树叶》 其主题也是共享信息,给予别人方便的同时,也分享到别人给予的方便!

快乐分享 分享快乐》

show一下我的vps

vps位于美国 固定IP(74.63.91.170)

购买些vps主要是为了学习linux服务器方面知识,并且用来放置几个小流量的企业网站

国内打开速度还行,平均ping的延迟在250ms左右

硬件:

128m内存  (最大可用内存390m)

1.2G可用CPU

软件:

ubuntu + Nginx +PHP5 +Mysql +Vsftpd

10个php-cgi线程 1个nginx线程

mysql关闭InnoDB的支持 从开机占100多m的内存降到了40m左右

占用内存76m  (128m内存还有50多m的可用内存,不过ssh看的话有390m.不知道以哪个为准了)

vps.jpg

 

nginx中SaBlog rewrite规则

 server {
     listen   80;
     server_name  www.phpd.cn *.phpd.cn;
     access_log  /var/log/nginx/phpd.access.log;
     root   /home/phpd/www;
     rewrite ^/show-([0-9]+)-([0-9]+)\.html$ /index.php?action=show&id=$1&page=$2 last;
     rewrite ^/category-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&cid=$1&page=$2 last;
     rewrite ^/archives-([0-9]+)-([0-9]+)\.html$ /index.php?action=index&setdate=$1&page=$2 last;
     rewrite ^/(archives|search|reg|login|index|links)\.html$ /index.php?action=$1 last;
     rewrite ^/(comments|tagslist|trackbacks|index)-([0-9]+)\.html$ /index.php?action=$1&page=$2 last;

     location / {
         index  index.php index.html index.htm;
     }
     location ~ \.php$ {
         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;
         fastcgi_param SCRIPT_FILENAME /home/phpd/www$fastcgi_script_name;
         include /etc/nginx/fastcgi_params;
     }
 }

通过修改nginx配置,让nginx支持thinkphp等所需的PATH_INFO

第一种,最简单的方法:

加上一句

location ~ \.php {
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME /var/www/company$fastcgi_script_name;
         fastcgi_param  PATH_INFO $fastcgi_script_name;
         include /etc/nginx/fastcgi_params;
}

第二种方法:(注意:nginx 0.5 版此方法无效)

location ~ \.php
              {
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   set $path_info "";
                   set $real_script_name $fastcgi_script_name;
                   if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
                        set $real_script_name $1;
                        set $path_info $2;
                   }
                   fastcgi_param SCRIPT_FILENAME /var/html/$real_script_name;
                   fastcgi_param SCRIPT_NAME $real_script_name;
                   fastcgi_param PATH_INFO $path_info;

                   include /etc/nginx/fastcgi_params;
              }

很搞笑<男人的经典名言>

1.没有钱,没有权,再不对你好点,你能跟我?
2.买了电脑不上宽带,就好比酒肉都准备好了却在吃饭前当了和尚。

3.天上掉钞票我不会弯腰,因为天上连馅饼都不会掉,更别说掉钞票了。
4.你给我买10条烟总比我去一次夜总会划算吧。
5.要我扫地就绝对不刷碗,要我刷碗就绝对不扫地,两样一起做?你当我是外星人啊!
6.躺在床上看电视不如在看电视时上床睡觉。
7.给我一个支点,我把邻居那小子的汽车翘到沟里去,省得他见我就按喇叭。
8.参加选美的那些女人,都找不到好男人,因为好男人都结婚了,比如我。
9.如果领导下个月再不给我加薪,我就辞职,辞职前再给他送两条中华,抽死他。
10.如果猪都会飞了,谁还买飞机?骑着猪上天不就行了。
11.我的领带又找不到了,是不是你昨天又没有找到抹布?
12.埃及,一个男人可以娶四个老婆,那得多累啊,还是中国好。
13.还是让我跪搓板吧,跪电暖气实在受不了啊!
14.就算是一只癞蛤蟆,我也决不娶母癞蛤蟆。
15.白酒一斤,我绝对没感觉,因为喝半斤就已经喝死了。
16.厕所看报纸等同于大便完了擦屁股,是一个流程,否则不叫完工。
17.儿子不听话可以适当的打打,要不就显不出老子的威严,台湾问题就是如此。
18.妈过生日,送脑白金还不如送两块大排骨煮煮吃,至少还能当下酒菜。
19.我才不去见网友,除非国家修改一夫一妻制。
20.下辈子我还找你,因为除了我,你是最傻的。

上百个让你事半功倍的jquery插件

jQuery是一个了不起的javascript库,它可以是我们用很少的几句代码就可以创建出漂亮的页面效果。从网站的方面说,这使得javascript更加有趣。

File upload-文件上传

Ajax File Upload
jQUploader
Multiple File Upload plugin
jQuery File Style
Styling an input type file
Progress Bar Plugin

Form Validation-表单验证

jQuery Validation

Auto Help
Simple jQuery form validation
jQuery XAV – form validations
jQuery AlphaNumeric
Masked Input
TypeWatch Plugin
Text limiter for form fields
Ajax Username Check with jQuery

Form – Select Box stuff-表单-选取框

jQuery Combobox
jQuery controlled dependent (or Cascadign) Select List
Multiple Selects
Select box manipulation
Select Combo Plugin
jQuery – LinkedSelect
Auto-populate multiple select boxes
Choose Plugin (Select Replacement)

Form Basics, Input Fields, Checkboxes etc.-表单的基本输入框,选择框等

jQuery Form Plugin
jQuery-Form
jLook Nice Forms
jNice
Ping Plugin
Toggle Form Text
ToggleVal
jQuery Field Plugin
jQuery Form’n Field plugin
jQuery Checkbox manipulation
jTagging
jQuery labelcheck
Overlabel
3 state radio buttons
ShiftCheckbox jQuery Plugin
Watermark Input
jQuery Checkbox (checkboxes with imags)
jQuery SpinButton Control
jQuery Ajax Form Builder
jQuery Focus Fields
jQuery Time Entry

Time, Date and Color Picker-时间、日期和颜色选取

jQuery UI Datepicker
jQuery date picker plugin
jQuery Time Picker
Time Picker
ClickPick
TimePicker
Farbtastic jQuery Color Picker Plugin
Color Picker by intelliance.fr

Rating Plugins-投票插件

jQuery Star Rating Plugin
jQuery Star Rater
Content rater with asp.net, ajax and jQuery
Half-Star Rating Plugin

Search Plugins-搜索插件

jQuery Suggest
jQuery Autocomplete
jQuery Autocomplete Mod
jQuery Autocomplete by AjaxDaddy
jQuery Autocomplete Plugin with HTML formatting
jQuery Autocompleter
AutoCompleter (Tutorial with PHP&MySQL)
quick Search jQuery Plugin

Inline Edit & Editors-嵌入的编辑器,所见即所得的编辑器

jTagEditor
WYMeditor
jQuery jFrame
Jeditable – edit in place plugin for jQuery
jQuery editable
jQuery Disable Text Select Plugin
Edit in Place with Ajax using jQuery
jQuery Plugin – Another In-Place Editor
TableEditor
tEditable – in place table editing for jQuery

Audio, Video, Flash, SVG, etc-音频,视频,flash,svg等

jMedia – accessible multi-media embedding
JBEdit – Ajax online Video Editor
jQuery MP3 Plugin
jQuery Media Plugin
jQuery Flash Plugin
Embed QuickTime
SVG Integration
jQuery Multimedia Portfolio
jQuery YouTube Plugin

Photos/Images/Galleries-照片,图像,相册等

ThickBox
jQuery lightBox plugin
jQuery Multimedia Portfolio
jQuery Image Strip
jQuery slideViewer
jQuery jqGalScroll 2.0
jQuery – jqGalViewII
jQuery – jqGalViewIII
jQuery Photo Slider
jQuery Thumbs – easily create thumbnails
jQuery jQIR Image Replacement
jCarousel Lite
jQPanView
jCarousel
Interface Imagebox
Image Gallery using jQuery, Interface & Reflactions
simple jQuery Gallery
jQuery Gallery Module
EO Gallery
jQuery ScrollShow
jQuery Cycle Plugin
jQuery Flickr
jQuery Lazy Load Images Plugin
Zoomi – Zoomable Thumbnails
jQuery Crop – crop any image on the fly
Image Reflection

Google Map-google地图

jQuery Plugin googlemaps
jMaps jQuery Maps Framework
jQmaps
jQuery & Google Maps
jQuery Maps Interface forr Google and Yahoo maps
jQuery J Maps – by Tane Piper

Games-游戏

Tetris with jQuery
jQuery Chess
Mad Libs Word Game
jQuery Puzzle
jQuery Solar System (not a game but awesome jQuery Stuff)

Tables, Grids etc.-表格,格子等

UI/Tablesorter
jQuery ingrid
jQuery Grid Plugin
Table Filter – awesome!
TableEditor
jQuery Tree Tables
Expandable “Detail” Table Rows
Sortable Table ColdFusion Costum Tag with jQuery UI
jQuery Bubble
TableSorter
Scrollable HTML Table
jQuery column Manager Plugin
jQuery tableHover Plugin
jQuery columnHover Plugin
jQuery Grid
TableSorter plugin for jQuery
tEditable – in place table editing for jQuery
jQuery charToTable Plugin
jQuery Grid Column Sizing
jQuery Grid Row Sizing

Charts, Presentation etc.-图表

Flot
jQuery Wizard Plugin
jQuery Chart Plugin
Bar Chart

Border, Corners, Background-边,角,背景

jQuery Corner
jQuery Curvy Corner
Nifty jQuery Corner
Transparent Corners
jQuery Corner Gallery
Gradient Plugin

Text and Links-文本和链接

jQuery Spoiler plugin
Text Highlighting
Disable Text Select Plugin
jQuery Newsticker
Auto line-height Plugin
Textgrad – a text gradient plugin
LinkLook – a link thumbnail preview
pager jQuery Plugin
shortKeys jQuery Plugin
jQuery Biggerlink
jQuery Ajax Link Checker
Chili jQuery code highlighter plugin
jScroller

Tooltips-提示

jQuery Plugin – Tooltip
jTip – The jQuery Tool Tip
clueTip
BetterTip
Flash Tooltips using jQuery
ToolTip

Menus, Navigations-菜单,导航

jQuery Tabs Plugin – awesome! [demo nested tabs]
another jQuery nested Tab Set example (based on jQuery Tabs Plugin)
jQuery idTabs
jdMenu – Hierarchical Menu Plugin for jQuery
jQuery SuckerFish Style
jQuery Plugin Treeview
treeView Basic
FastFind Menu
Sliding Menu
Lava Lamp jQuery Menu
jQuery iconDock
jVariations Control Panel
ContextMenu plugin
clickMenu
CSS Dock Menu
jQuery Pop-up Menu Tutorial
Sliding Menu

Accordions, Slide and Toggle stuff-幻灯、翻转

jQuery Plugin Accordion
jQuery Accordion Plugin Horizontal Way
haccordion – a simple horizontal accordion plugin for jQuery
Horizontal Accordion by portalzine.de
HoverAccordion
Accordion Example from fmarcia.info
jQuery Accordion Example
jQuery Demo – Expandable Sidebar Menu
Sliding Panels for jQuery
jQuery ToggleElements
Coda Slider
jCarousel
Accesible News Slider Plugin
Showing and Hiding code Examples
jQuery Easing Plugin
jQuery Portlets
AutoScroll
Innerfade

Drag and Drop-拖拽

UI/Draggables
EasyDrag jQuery Plugin
jQuery Portlets
jqDnR – drag, drop resize
Drag Demos

XML XSL JSON Feeds

XSLT Plugin
jQuery Ajax call and result XML parsing
xmlObjectifier – Converts XML DOM to JSON
jQuery XSL Transform
jQuery Taconite – multiple Dom updates
RSS/ATOM Feed Parser Plugin
jQuery Google Feed Plugin

Browserstuff-浏览器相关

Wresize – IE Resize event Fix Plugin
jQuery ifixpng
jQuery pngFix
Link Scrubber – removes the dotted line onfocus from links
jQuery Perciformes – the entire suckerfish familly under one roof
Background Iframe
QinIE – for proper display of Q tags in IE
jQuery Accessibility Plugin
jQuery MouseWheel Plugin

Alert, Prompt, Confirm Windows-警告,提示,确认框

jQuery Impromptu
jQuery Confirm Plugin
jqModal
SimpleModal

CSS-样式表单

jQuery Style Switcher
JSS – Javascript StyleSheets
jQuery Rule – creation/manipulation of CSS Rules
jPrintArea

DOM, Ajax and other jQuery plugins-DOm,ajax以及其他

FlyDOM
jQuery Dimenion Plugin
jQuery Loggin
Metadata – extract metadata from classes, attributes, elements
Super-tiny Client-Side Include Javascript jQuery Plugin
Undo Made Easy with Ajax
JHeartbeat – periodically poll the server
Lazy Load Plugin
Live Query
jQuery Timers
jQuery Share it – display social bookmarking icons
jQuery serverCookieJar
jQuery autoSave
jQuery Puffer
jQuery iFrame Plugin
Cookie Plugin for jQuery
jQuery Spy – awesome plugin
Effect Delay Trick
jQuick – a quick tag creator for jQuery
Metaobjects

elementReady