September 15, 2004

Convert String to C++ String

Convert string to C++ string. You can select to convert to HTML outside tag string.

Download file ConvertStringForCpp.rar now

For example:

<html>
<head>
<title>aaa</title>
<meta http-equiv=\\"Content-Type\\" content=\\"text/html; charset=gb2312\\">
</head>
<body bgcolor=\\"#FFFFFF\\" text=\\"#000000\\">
&amp;&lt;&gt;abc
</body>
</html>

to C++:

"<html>\r\n"
"<head>\r\n"
"<title>aaa</title>\r\n"
"<meta http-equiv=\\\\\\"Content-Type\\\\\\" content=\\\\\\"text/html; charset=gb2312\\\\\\">\r\n"
"</head>\r\n"
"<body bgcolor=\\\\\\"#FFFFFF\\\\\\" text=\\\\\\"#000000\\\\\\">\r\n"
"&amp;&lt;&gt;abc \r\n"
"</body>\r\n"
"</html>"

to C++ with HTML outside tage complied:

"&lt;html&gt;\r\n"
"&lt;head&gt;\r\n"
"&lt;title&gt;aaa&lt;/title&gt;\r\n"
"&lt;meta http-equiv=\\\\\\"Content-Type\\\\\\" content=\\\\\\"text/html; charset=gb2312\\\\\\"&gt;\r\n"
"&lt;/head&gt;\r\n"
"&lt;body bgcolor=\\\\\\"#FFFFFF\\\\\\" text=\\\\\\"#000000\\\\\\"&gt;\r\n"
"&amp;amp;&amp;lt;&amp;gt;abc \r\n"
"&lt;/body&gt;\r\n"
"&lt;/html&gt;"

Posted by md at 07:46 PM | Comments (0)

July 28, 2004

How Does Google Track Clicks

The report was originally posted on SAC forum.

Google utilizes a new way to track clicks without bringing additional options to the url.

Put following scripts into each pages
<script>

<!--

function clk(ss) {if(document.images){

(new Image()).src="http://www.xxx.com/insert.php?root=";+ss;}return
true;}

//-->

</script>

and each url in the page should as following:
<a href="http://aaaaaaaa"; onmousedown="return clk('page1')">

Posted by md at 01:59 AM | Comments (0)

July 08, 2004

Earth Attack 2004, A Java Plane Game, Released as Open Source

Earth Attack 2004 was first developed in May 1998, which uses pure object-oriented programming skills. It provides a good example for java plane games. User can use "ASDW" to control the main plane to fly left, down, right and up. The key "," is used to fire. I am willing to add more features in the near future.

EarthAttack2004.gif

Click here to play online now.

Source codes:
Download source files (24.8KB)

Posted by md at 12:35 AM | Comments (0)

July 07, 2004

HBQ 2004, A Reversi (Othello) Game, Released as Open Source

HBQ 2004 enables user play famous game Reversi (Othello) with computer AI. It was first developed in July 2000. Now it was wrapped and released as Open Source software. The AI of computer is so high that it is hard to be defeated. So if you lose, don't cry. :)

AIwin.gif

Download the binary executable program

Download the source files (Visual Studio.net 2003 project)

Not familiar with Reversi (Othello)? Here is a useful how to play page from Yahoo.

Posted by md at 07:16 AM | Comments (0)