posted on February 22, 2004

去网吧要办实名卡

今天萌生了去网吧玩会CS的念头,
去了结果扫兴而归.
原因是网吧都要办个什么实名卡才能上机说是上级部门的规定,每张卡工本费10元
不开心,没办还是回家上吧.

posted on February 14, 2004

Windows(2000/NT4.0)部份源码泄露

微软公司发言人汤姆·皮拉表示:“今天,我们发现Windows 2000和NT 4.0的部分源代码非法地出现在互联网上。”他警告说,任何第三方传播这些源代码都是非法的行为,微软将对此采取严肃行动。
Url
http://www.neowin.net/
 http://www.csdn.net/news/newstopic/14/14909.shtml

Windows 2000 Source Code
From: Undisclosed
Sent: Friday, February 18, 2000 12:55 PM
To: Various

/* Source Code to Windows 2000 */

#include "win31.h"
#include "win95.h"
#include "win98.h"
#include "workst~1.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#include "monopoly.h"
#define INSTALL = HARD

char make_prog_look_big[1600000];
void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_50_megabyte_swapfile();
do_nothing_loop();
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
make_futile_attempt_to_damage_Linux();
disable_Netscape();
disable_RealPlayer();
disable_Lotus_Products();
hang_system();
}

write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();

if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_3.1();
do_nothing_loop();
do_nothing_loop();
}
}

if (detect_cache())
disable_cache();

if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}

/* printf("Welcome to Windows 3.1"); */
/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
/* printf("Welcome to Windows NT 3.0"); */
/* printf("Welcome to Windows 98"); */
/* printf("Welcome to Windows NT 4.0"); */
printf("Welcome to Windows 2000");

if (system_ok())
crash(to_dos_prompt)
else
system_memory = open("a:\swp0001.swp", O_CREATE);

while(something)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
}
create_general_protection_fault();
}

http://akcom.lithiumrat.org/sillyms.txt

原来MS的同学们不喜欢写注释?

另 博客堂的讨论
链接:
http://blog.joycode.com/adam/posts/12974.aspx
http://blog.joycode.com/hxinyu/posts/12980.aspx

posted on February 12, 2004

一个不错的代码编辑工具

CrimSon Editer

http://www.crimsoneditor.com/

我用它因为它体积小 启动迅速 最大的优点是免费
支持许多常用代码的语法高亮显示.
可以在这里下载到C#的代码高亮显示文件
http://www.crimsoneditor.com/board/CrazyWWWBoard.cgi?db=user0&mode=read&num=99&page=1&ftype=6&fval=c%23&backdepth=1

还有其他好的编辑工具都列在这里了:
http://www.crimsoneditor.com/english/editors.html

posted on February 9, 2004

顺便发现一bug??

在这个http://www.cnblogs.com/huobazi/archive/2004/02/09/1053.aspx 里有一句
a.col_img_group=@gid

被DotText当成mailto 自动加上了mailto连接

posted on February 9, 2004

分页存储过程

搞了一中午终于可以用了 但不知道效率如何.郁闷的是我要用php去调用它

  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    CopyRight:   ******
    CreateData:   2004-02-09
    Language:   MS SQL SERVER 存储过程
    AuthorName:  Meibo Wu

    实现功能:   分页显示当用户选择了图片大分类时(按手机)的数据
    参数说明:   @bigtype为大分类
    @gid为传入的图片类型           
        $PageSize为每页显示的记录数量
    @pageindex为当前页码                             
    LastUpdate:            
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
CREATE procedure sms_img_page_no_smalltype
(
 @bigtype nvarchar(20),
 @gid int,
 @pagesize int,
 @pageindex int
)
as
set nocount on
 declare @LikeBigType nvarchar(20)
 declare @PageLowerBound int
 declare @PageUpperBound int
 declare @indextable table(id int identity(1,1),nid int)
  set @PageLowerBound=(@pageindex-1)*@pagesize
  set @PageUpperBound= @PageLowerBound+@pagesize
  set @LikeBigType= @bigtype+'%'
  set rowcount @PageUpperBound
 insert into @indextable(nid)
  select  a.col_id
   from web_sms_data_img as a join web_sms_data_mobile as q
   on a.col_mobile_type=q.col_mobile_type
   where
a.col_img_group=@gid
    and q.col_mobile_comment  like @LikeBigType
   order by a.col_id desc 
 /*
 select  @LikeBigType
 select * from @indextable 
 */
 select q.col_mobile_comment,
  a.col_id,
  a.col_img_hits,
  a.col_img_dir,
  a.col_img_name
  from web_sms_data_img as a join web_sms_data_mobile as q
   on a.col_mobile_type=q.col_mobile_type
    join @indextable  as p
    on a.col_id=p.nid
  where p.id>@PageLowerBound and p.id<
=@PageUpperBound
   and
a.col_img_group=@gid
   and q.col_mobile_comment like @LikeBigType
 
 order by p.id

set nocount off
GO

posted on February 4, 2004

使网页中的元素可编辑

net_lover的文章里找到了答案.

http://www.csdn.net/Develop/Read_Article.asp?Id=4405


代码如下:
<HTML>
<HEAD>
</HEAD>
<BODY>
<DIV ID="oDiv">TEST---TEST---TEST 您可以在这里编辑文字!</DIV>
<SCRIPT>
<!--
oDiv.contentEditable = true;
// -->
</SCRIPT>
</BODY>
</HTML>

posted on February 4, 2004

域名Whois信息查询(ASP.NET+C#)

去年写的了,是从点缀的博客学来的
看演示请点这里:http://www.aspxboy.com/whois.aspx
代码如下:
<% @Page Language="C#" %>
<% @Import Namespace="System.Net.Sockets" %>
<% @Import Namespace="System.Text" %>
<% @Import Namespace="System.IO" %>
<html>
<head>
<title>.Com/.Net/.Org/.Cn 域名Whois信息查询</title>
<meta name="keywords" content=".Com,.Net,.Org,.Cn 域名Whois信息查询">
<meta name="generator" content=".Com/.Net/.Org,.Cn 域名Whois信息查询">
<meta name="description" content=".Com/.Net/.Org,.Cn 域名Whois信息查询">
<style>
<!--
body,input{
        font-family: Tahoma, Verdana; color: #004080; font-size: 12px        
        }
a:link,a:visited{
        text-decoration: none; color: #004080
        }
-->
</style>
</head>
<body>
<form id="fmQuery" runat="server">
&nbsp;要查询的域名域名:
www.<asp:TextBox id="txtDomain" width="100" value="ASPXBOY.COM" runat="server" />
&nbsp; <asp:Button id="btnQuery" OnClick="btn_click"
text="查询!" runat="server" />(只能查询.Com/.Net/.Org/.Cn 域名Whois的信息)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href ="WhoisCode.htm" title="View the source code here!">源代码在这里</a>
<BR><HR width="550" height="1" align="left"><BR>
<asp:label id="lblResult" runat="server" />
</form>
</body>
</html>
<script language="C#" runat="server">
void btn_click(Object sender, EventArgs e)
{
String strServer;
String strDomain = txtDomain.Text;
String strServerCom = "whois.networksolutions.com";
String strServerCN = "whois.cnnic.net.cn";
String strResponse;
string[] arrDomain = strDomain.Split('.');
if (arrDomain[1].ToUpper()=="CN")
{
       
        strServer=strServerCN;
}
else
{
        strServer=strServerCom;
}

bool blSuccess = IsWhosisSuccess(strDomain, strServer, out strResponse);
if (blSuccess)
{
lblResult.Text = strResponse;
}
else
{
lblResult.Text = "查找失败....";
}
}
bool IsWhosisSuccess(String strDomain, String strServer,
                   out String strResponse)
{
  strResponse = "none";
  bool blSuccess = false;
  TcpClient tcpc = new TcpClient();
  try
  {
    tcpc.Connect(strServer, 43);
  }
  catch(SocketException ex)
  {
    strResponse = "连接不到该 Whois server,请稍后再试。";
    return false;
  }

  strDomain += "\r\n";
  Byte[] arrDomain = Encoding.UTF8.GetBytes(strDomain.ToCharArray());
  try
  {
        Stream s = tcpc.GetStream();
        s.Write(arrDomain, 0, strDomain.Length);
       
        StreamReader sr = new StreamReader(tcpc.GetStream(), Encoding.UTF8);
        StringBuilder strBuilder = new StringBuilder();
        string strLine = null;

        while (null != (strLine = sr.ReadLine()))
        {
                strBuilder.Append(strLine+"<br>");
        }
        tcpc.Close();
               
        blSuccess = true;
        string my="Go to Huobazi's WebSite:<a href=\"http://www.aspxboy.com\" title=\".Net男孩社区\">www.AspxBoy.Com</a><br>";
        strResponse = strBuilder.ToString()+my;  }
  catch(Exception e)
  {
        strResponse = e.ToString();
  }
  
  return blSuccess;
}
  </script>

posted on February 3, 2004

又开始吵架了


http://expert.csdn.net/Expert/topic/2697/2697501.xml?temp=.2264826

不过没有这个帖子吵的凶哦