自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Heart Design

享受我的菜鸟生活

  • 博客(43)
  • 收藏
  • 关注

转载 二八原则

<br />二八原则是19世纪末20世纪初意大利经济学家帕累托提出的,这个原则很简单:<br />任何一组事物中,最重要的只占其中约20%,其余的80%虽然是多数,但是却是次要的。  比如,80%的财富掌握在20%的人手中,而剩下80%的人,只拥有那20%的财富。同样的,20%的恋情才决定了你的终身幸福,而80%的桃花,只是过眼云烟。再比如,人生中20%的时间,决定了80%的成就,而另外80%的时间,浪费在了20%的事情上。

2010-09-29 17:55:00 1120

转载 Back up MySQL command

mysqldump --opt -Q -u root -p --default-character-set=utf8 test > "/Users/Jerry/Sites/testbak.sql"test is the name of the database you want to backup.

2010-09-27 15:32:00 396

原创 Guide for Xdebug Installation on Mac OS X

Installation:PECL InstallationAs of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX. And of course on Mac.Installing with PEAR/PECL is as easy as:# pecl install xdebugbut y

2010-09-09 14:02:00 1953

原创 How to force an iframe to reload?

<br />document.getElementById('IDofYouriFrame').contentDocument.location.reload(true);

2010-08-31 15:58:00 483

原创 Looking for all keys of an multi dimensional array

<br />//Function for looking for all keys of an multi dimensional arrayfunction array_keys_multi(array $array){ $keys = array(); foreach ($array as $key => $value) { $keys[] = $key; if (is_array($array[$key])) {

2010-06-08 13:58:00 329

原创 How can I get the next auto increment value from mssql?

using @@IDENTITY which returns the last-inserted identity value But the preferable solution is to use IDENT_CURRENT(TableName) whichreturns the last identity value generated for a specified ta

2010-05-25 17:10:00 368

原创 What Column Number Is It in the EXCEL?

Excel shows you the letter for each column in the column headingsbut what if you want to know which column number it is? Go to Tools, Options, General, unchec

2010-04-13 14:29:00 530

原创 Back to Top in the web page

Back to top

2010-03-26 11:58:00 459

原创 check folder size on linux

$ du -hs /path/to/directory

2010-02-06 14:03:00 1579

原创 Regex - reverse search section

Allows letters a-z, digits, space (//040),hyphen (//-), underscore (//_) and backslash (////), everything else isremoved from the string.<?php $allowed = "/[^a-z0-9//040//.//-//_////]/i";

2010-02-04 12:52:00 515

原创 PureFtp and xinetd

Why my pure-ftpd service not start? Check service --status-all , you will see xinetd is running also. Find its pid and kill it.  Run pure-ftpd -j -lpuredb:/etc/pure-ftpd/pureftpd.pdb &service

2010-02-03 07:35:00 435

原创 IE7 CSS trouble

When you meet trouble with css style in IE7, try this. You can set different css for IE7 and the other browsers. 

2010-01-15 10:30:00 341

原创 How to get multiple select value both in javascript and php

For PHP, we must use test[] for the select name, but it doesnt work in javascript. document.form1.test is null. So we should use document.getElementById(test[]) or document.form1[test[]]. On

2009-12-22 16:20:00 1627 1

转载 Using Text Editors (Emacs, Pico, Vi)

(link : http://www.reallylinux.com/docs/editors/editor.shtml) UsingText EditorsThis list of text editors is provided to you courtesy of theReallyLinux.comstaff.  Note that in many ca

2009-11-27 10:53:00 818

原创 视频网站的一些布置细节

1. 安装软件,配置环境。   php要安装mysql扩展支持。要安装GD Library, 使用yum install php-gd.      pure-ftp要创建virtual user, 给予最小权限。 当登陆成功后,获取文件列表失败(操作超时)的时候,要考虑服务器防火墙的因素。    Enable URL rewrite: 修改httpd.conf   

2009-11-17 16:10:00 421

原创 setTimeout in JavaScript

We can use setTimeout() like this: <!--function setToRed ( ){ document.getElementById("colourButton").style.color = "#FF0000"; setTimeout ( "setToBlack()", 2000 );}function setToBlack

2009-11-11 11:48:00 454

原创 Dompdf for PHP & Replace Url to link

If you want to put some big table in the pdf file, you may got the layout messy. One way to solve the problem is to change the paper size.  In "includes/cpdf_adapter.cls.php", Change the size you used

2009-09-23 15:07:00 1741

原创 Install and configure Gnupg &amp; Use Gnupg to encrypt file in PHP

Install and configure Gnupg & Use Gnupg to encrypt file in PHPI am using FreeBSD 7.0. Now lets start to install Gnupg.First, use ports to install Gnupg. Create a directory .gnupg in /home/use

2009-09-17 14:29:00 1206

原创 BackGround image not show on IE7 issue

Today I got a background image issue. I used body {background: url(../images/bg.jpg) fixed center no-repeat}  and it worked perfect on FireFox3. While it didnt show anything on IE7. I googled a lot

2009-09-11 16:26:00 849

原创 553 Can't open that file: Permission denied

for user:chown -fR /home/abcFor grp:chgrp -fR /home/abc

2009-07-23 10:40:00 7271

原创 Clean output before downloading files

   Hummmmm, I got a big headache on downloading files for the past 3 hours.  The issue is when I downloaded the files, I cant open it correctly. Such as txt, work and excel, they just return messy co

2009-07-18 15:06:00 536

转载 Set up Rsync and Cron Job

create file sync user account(mlmsync for example)LOG ON AS mlmsync;create .ssh under user folderssh-keygen -b 1024 -t rsa -f /home/mlmsync/.ssh/id_rsa(do not enter a pass-phrase - leave it

2009-07-16 10:18:00 523

转载 File Permissions - Linux etc.

InGNU/Linux, file access is restricted. Users dont necessarily have thesame rights when it comes to deleting, executing or even reading files.In fact, every file contain data such as its owner,

2009-07-16 09:59:00 715

原创 How to pass value from Child window to Parent Window

<!--function submitWeight(){var weight = document.getElementsByName(weight)[0].value;var weight_p = document.getElementsByName(weight_p)[0].value;window.opener.document.getElementsByName

2009-07-14 12:19:00 395

原创 How to make apache start at boot time

Do thefollowing: chkconfig --list|grep http You get something like this: httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off Now do: chkconfig httpd onTh

2009-07-11 09:16:00 355

原创 Fix Rewrite not working on Apache (404 error)

I have a correct .htaccess. But it didnt work at all, and i got 404 not found error.  Fix:  Search "AllowOverride", its "None" by default. Change it to "All" then it works well. One

2009-07-08 09:43:00 378

原创 Escape both single quote and double quote in Smarty

Oddly it seems that when using {$foo|escape:quotes} Smarty will only escape single quotes instead of both single and double quotes. This is problematic with HTML attributes that need the " changed t

2009-06-25 10:58:00 815

转载 程序员创业的思索——归宿(转)

做为一个程序员,身处一个特殊的行业,每天都在不停的工作和学习,年轻时你很是了得,在你面前没有什么问题是解决不了的,职业给了你耀眼的光环,不用炫耀也很夺目,但更多已经步入三十的同仁们却告诉我们一个不可改变的事实,你今天的努力很可能与将来的前景不成正比。且不管三十岁的前景如何,我们都在向三十岁迈进,现在的你能做些什么呢,是顺其自然?还是努力改变自己的命运?站在人生的这条岔路口,我们该何去何从…

2009-06-04 11:42:00 324

原创 Work Tip - Get only date in C#

Use System.DateTime.Now.ToString("yyyyMMdd");  This is simple, but helpful.

2009-05-09 11:48:00 430

原创 There is already an open DataReader associated with this Command which must be closed first的错误解决办法

执行SqlDataReader.Read之后,如果还想用另一个SqlCommand执行Insert或者Update操作的话,会得到一个错误提示:There is already an open DataReader associated with this Command which must be closed first.解决方法是在ConnectionString中加上一个参数“Mu

2009-05-08 12:26:00 6629 3

转载 How do I load text or csv file data into SQL Server?

If you need to load data into SQL Server (e.g. from log files, csvfiles, chat transcripts etc), then chances are, youre going to bemaking good friends with the BULK INSERT command.  You canspec

2009-04-28 15:03:00 748

原创 How to find which version of SQL Server is running?

SELECT SERVERPROPERTY(productversion), SERVERPROPERTY (productlevel), SERVERPROPERTY (edition)  The result will look something like below: 9.00.3054.00 SP2 Enterprise Edition

2009-04-22 14:52:00 311

原创 Date in T-SQL

How can we only get date and change it to string format from T-SQL Date functions? I googled a lot, but no luck, i didnt get the right answer, so i wrote these by myself... Here are serveral

2009-04-03 15:22:00 461

原创 没有激情 需要励志

第一招:向前看两年第二招:少许诺,多兑现第三招:不需要钱的时候借钱第四招:分散客户第五招:不要过早地追求赢利第六招:专注自己的领域第七招:保持激情 "我选择放弃博士学位来进行创业,并不是为了钱,而是真的出于对这个行业的热爱。同时,我也并非完全不考虑钱的因素,但我始终坚信:在今天的社会中,只要你给了社会好的产品,社会一定会给你更多的回报。"         

2009-01-20 20:04:00 375

转载 How to Add Perl CGI Script Support to Your Apache Web Server on Windows

Configuring Apache1. Running Perl Scripts in a CGI directoryYou can configure Apache to treat any file in a particular directory as a CGI script. Typically, web hosts call such a directory the

2008-11-08 13:37:00 1054

原创 Resolving an unable to fork PHP warning in Windows

 SymptomsIn Windows, when trying to execute a system callfrom a PHP script, you receive a warning like "Warning: system()[function.system]: Unable to fork". A related warning message is"Warn

2008-11-06 07:14:00 1439

转载 CURL模拟访问网页

 最近在搞些有趣的东西,比如类似抓取什么的。所以用到了curl,这玩意儿不错,可以设置cookie,代理,甚至于header,referer我自己弄的获取WHOSIP的一个函数:define(NET_WORK, "http://network-tools.com/default.asp?prog=whois&host=+");/*******************************

2008-11-06 07:08:00 3224

原创 Set up your own ClipBucket on windows

 My develop environment is windowsXP(64bit), Apache 2.2, Php 5.2.6, Mysql 5.0.22.  But here it says the CB(clipbucket) only support linux. What a sadnews for windows users li

2008-11-06 07:05:00 2237 1

原创 Add foreign key

ALTER TABLE infor_per_day ADD CONSTRAINT FK_1 FOREIGN KEY ( ip_id ) REFERENCES `iptracking` ( id )

2008-10-31 14:59:00 628

转载 windows下安装使用svn管理网站开发项目

原文地址:http://techlife.blog.51cto.com/212583/94426svn是一个版本控制系统,其前身是cvs。所谓版本控制系统,就是能在一个数据库中记录开发阶段的每个开发版本,和所有文件的修改历史。这个功能是很有用的,它使得追溯代码的修改和软件的演进过程成为可能。本文仅涉及在windows本机使用svn,即数据库是保存在本机上的。这跟网络上的很多项目不同,数据库是存

2008-10-11 07:06:00 538

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除