home subscribe to email updates subscribe to RSS updates

用GB怎么接受UTF-8编码的URL(ASP)

赵总

提交页面是用UTF-8的,类似tijiao.php?q=%E4%BD%A0%E5%A4%A7%E7%88%B7
接受页面是GB2312的,用jieshou.asp?q=%E4%BD%A0%E5%A4%A7%E7%88%B7
怎么才能正常把UTF-8的编码转到GB2312的编码(不需要输出正常汉字,只要汉字的gb编码即可)呢?
jieshou.asp改怎么写

关于 Session.CodePage 和Response.CodePage

Defines a code page (character set) for the system running the script engine.Setting Response.CodePage explicitly affects a single page, whereas Session.CodePage affects all responses in a session.

我写的

<%@language ="vbscript" codepage="936"%>
<%
Session.codepage=65001
'Response.CodePage = 65001
Dim q:q =Request.QueryString("q")
Session.codepage=936
'Response.CodePage = 936
response.write(q)
%>

分布式版本控制系统

因为目前的项目赶时间进度,在感觉来的时候把代码带回宿舍做。
原来钟爱的svn要完成现在的需要有些难度,或者实现起来复杂,
所以就需要一款分布式版本控制系统( Distributed Revision Control ),
发现以下三个:
Git (C+Perl+sh)
http://git.or.cz/gitwiki/GitDocumentation
Mercurial ( Python+C)
http://www.selenic.com/mercurial/wiki/
Bazaar ( Python)
http://bazaar-vcs.org/Documentation
最终选择了bazaar,在windows下运行还是不错的。

Git过分依赖系统,听说有windows版本,不过在windows下运行不好。
Mercurial刚看了下,不错。有时间尝试下。
关于bazaar遗憾的就是不能像svn:keywords那样在提交的时候替换关键字,
也可能是我没有发现,不过很喜欢那个通过ftp push的功能。
Emacs默认带了bzr的,不错。

更新:
刚发现一份详细的比较文章
Distributed Version Control Systems: A Not-So-Quick Guide Through

小侄女出生

昨天零点多出生的,弟弟今天一大早打电话告诉我的,昨天我手机没电了,没开机。
错过了第一时间知道的机会。
让我给想个名字呢。
是要好好像一个。

ps:
想起来了,前段时间我做了胎梦,就是梦见生了女儿的。

天花板上面女人的尖叫声

被吵醒了,洗个澡,写下几个字,等睡意再次来临。

神啊,救救我

慈悲的你啊,如果真的存在,就请救救我。

Send Twitters from the Command Line via cUrl

下载cURL通过设置环境变量,在命令行运行。

curl -u yourusername:yourpassword -d status=”Your Message Here” http://twitter.com/statuses/update.xml

蹭饭

听说赵总晚饭要做好吃的,于是跑过去蹭饭,结果无福消受啊,把吃到肚子里的都吐到他们的马桶里了,回到宿舍的时候额头直冒虚汗….

当今十大php开发工具

有好几个工具没用过,有时间了玩下,感谢原作者的总结

1. PHPUnit

PHPUnit is a testing framework belonging to the xUnit family of testing frameworks. Use it to write and run automated tests. Start using PHPUnit

2. Selenium RC

Selenium RC can be used in conjunction with PHPUnit to create and run automated tests within a web browser. It allows tests to be run on several modern browsers and is implemented in Java, making it available to different platforms. PHPUnit and Selenium

3. PHP CodeSniffer

PHP CodeSniffer is a PHP code tokenizer, that will analyse your code and report errors and warnings based on a set of Coding Standards. Documentation

4. Phing

Phing is a project build tool and is a PHP port of the popular Java program ant. Phing can be used to automate builds, database migration, deployment and configuration of code. Documentation

5. Xdebug

Xdebug is a multi-purpose tool, providing remote debugging, stack traces, function traces, profiling and code coverage analysis. Debug clients are available in many PHP IDEs and even plugins so you can debug from everybody’s favourite editor vim. Documentation

6. PHPDocumentor

PHPDocumentor is an automated documentation tool, that allows you to write specifically formatted comments in your code, that can be brought together to created API documentation. Tutorial

7. phpUnderControl

phpUnderControl is a patch for the popular Continuous Integration tool, CruiseControl. Together with the previous six tools, phpUnderControl gives you a great overview of the current state of your application/codebase. Keep an eye out for Xinc

8. Zend Framework - or <insert your favourite framework here>

Frameworks facilitate the development of software, by allowing developers to focus on the business requirements of the software, rather than the repetitive and tedious elements of development, such as caching. There are plenty of frameworks to choose from, but I particularly like the Zend Framework. Have a read through this excellent Getting started guide

9. Subversion

Subversion is a revision control system that has superceded CVS. If you’re writing software of any kind, you shoud be using version control software.SVN Book

10. Jira

So I could have named one of many, but this is the one I’ve liked the most recently. Jira is a bug/issue tracking software package and can also help with project management in terms of goals and roadmaps. Most issue trackers link to version control repositories, such as Subversion. Only downside to Jira is that it costs for non open source projects.

I’m pleased to say that with a little bit of pushing and persuasion by myself, we are currently using all of these technologies with the exception of Jira, we have a bespoke issue tracker.

原文:more

arp -d

一同学在宿舍是很多人一起上网,有不少人用arp作恶,导致上网老是掉线。问我有什么办法吗,于是就写了下面的vbs脚本,同学说用了后聊天也不掉线了。

On Error Resume Next
Dim Times:Times=1000*60
Set WshShell = WScript.CreateObject("WScript.Shell")
Do While True
	rt =WshShell.Run("ping 192.168.1.1",0,true)
	If (rt<>0) Then
		WshShell.Run "arp -d",0
	End If
	Wscript.sleep(Times)
Loop

Porte: Sql abstraction in PHP inspired by ActiveRecords

Need to manipulate and persist your object in the database, Porte will greatly simplify your life. Porte can retrieve, search and save object without a single line of Sql. No XML or meta data configuration is required, Porte is designed to be natural and easy to use.

Project homepage and documentation is available @ http://labo.adaltas.com/en/porte.html

svn checkout http://porte.googlecode.com/svn/trunk/ porte-read-only

Next entries »