Howto

共 127 篇文章。

Beat MSXML's utf-16 cling

Development

Today I got in a rush to implement a XML+XSL -> HTML translation at server side. I looked at MSDN and found that there is a simple implementation which can fit my requirements, the code is the following (for some reasons I have to use ASP and not .net technologies):

阅读全文… ( 本文约 261 字,阅读大致需要 2 分钟 )

Preventing stealing links

Security

Some search engines has grabbed some of my links out (Primarily, MP3). So I put some limits there. This is because I don’t want FreeBSDChina to be a MP3 downloading site - It’s harmful for the server, and we don’t want it.

The code is the following, it’s simple and effective:

阅读全文… ( 本文约 79 字,阅读大致需要 1 分钟 )

How to call c-tor of base class in C#?

Development

Today I was consulted with the above question. In a C# program, we don’t have a “MyBase” keyword, however, we have a __base __keyword. A c-tor is a special case, in C#, the syntax is more like C++.

阅读全文… ( 本文约 106 字,阅读大致需要 1 分钟 )

How to dial PPTP vpn from a FreeBSD box?

Networking

This is useful when you want to connect remote “Local” network through a PPTP vpn. First, install the ports/net/pptpclient, by doing:

cd /usr/ports/net/pptpclient
make all install clean && rehash

阅读全文… ( 本文约 162 字,阅读大致需要 1 分钟 )

My personal mutt configuration

Cheatsheets

Mutt is a text driven Mail User Agent (MUA). It supports many useful features, including IMAP/POP3 (even TLS) support, and it is very neat.

Here is my configuration file.

阅读全文… ( 本文约 381 字,阅读大致需要 1 分钟 )

Misconfiguration of MT... :shy:

Blogging

junsu has pointed out a problem that when we click on “More…” the link will bring us to a monthly archive and not the blob we want. I have noticed the same thing and did not took my care in the past.

This is apparently a misconfiguration. In weblog configuration (Should have administration privilege to see that), you are allowed to choose “Preferred archive style”, which was mistakenly setted to “Monthly”. By setting it back to “Individual”, the problem goes away.

参与评论