㈠ 网站源码放入WORD文档问题
<!--#include file="include/conn1.asp" -->
<% dim schoolname,address,postmode,email,phone,bbs,sql,ntext,dday
timeset="0"
startime=timer()
if session("schoolname")="" then
set bbs=conn.execute("select * from school where used=true")
schoolname=bbs("schoolname")
address=bbs("address")
postmode=bbs("postmode")
email=bbs("email")
phone=bbs("phone")
session("schoolname")=schoolname
session("address")=address
session("email")=email
session("phone")=phone
session("postmode")=postmode
set bbs=nothing
else
schoolname=session("schoolname")
address=session("address")
postmode=session("postmode")
email=session("email")
phone=session("phone")
end if
%>
<html>
<head>
<title><%=schoolname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="include/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff" background="images/bg.gif" leftmargin="0" topmargin="0">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/spacer.gif" width="256" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="296" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="226" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td><img name="top_r1_c1" src="images/top_r1_c1.jpg" width="256" height="156" border="0" alt=""></td>
<td><img name="top_r1_c2" src="images/top_r1_c2.jpg" width="296" height="156" border="0" alt=""></td>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="226" height="156">
<param name="movie" value="images/top.swf">
<param name="quality" value="high">
<embed src="images/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="226" height="156"></embed>
</object></td>
<td><img src="images/spacer.gif" width="1" height="156" border="0" alt=""></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="ha">
<tr>
<td><img src="images/menu.jpg" width="778" height="60" border="0" usemap="#Map"></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/2/spacer.gif" width="55" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="133" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="39" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="41" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="291" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="41" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="153" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="25" height="1" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="5"><img name="top1_r1_c1" src="images/2/top1_r1_c1.gif" width="559" height="48" border="0" alt=""></td>
<td><img name="top1_r1_c6" src="images/2/top1_r1_c6.gif" width="41" height="48" border="0" alt=""></td>
<td colspan="2"><img name="top1_r1_c7" src="images/2/top1_r1_c7.gif" width="178" height="48" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="48" border="0" alt=""></td>
</tr>
<tr>
<td colspan="4"><img name="top1_r2_c1" src="images/2/top1_r2_c1.gif" width="268" height="11" border="0" alt=""></td>
<td rowspan="4" valign="middle" bgcolor="#FFFFFF">
<table width="99%" border="0" cellspacing="0" cellpadding="2">
<% sql="select top 6 id,title,addtime from article where boardid=1 and ifshow=1 order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
ntext=rs("title")
if len(ntext)>12 then
ntext=mid(ntext,1,12)&"...."
end if
dday=day(rs("addtime"))
if cint(dday)<10 then dday="0"&dday%>
<tr>
<td width="5%"><div align="center"><img src="images/arrow02.gif" width="4" height="7"></div></td>
<td width="67%"><a href="main/shownews.asp?id=<%=rs("id")%>"><font size="2" class="text"><%=ntext%></font></a></td>
<td width="28%"><font size="2">【<%=month(rs("addtime"))%>月<%=dday%>日】</font></td>
</tr>
<% rs.movenext
loop
rs.close %>
</table>
<div align="right"><font size="2"><a href="main/news.asp" target="_blank">更多>></a></font>
</div></td>
<td rowspan="7"><img name="top1_r2_c6" src="images/2/top1_r2_c6.gif" width="41" height="190" border="0" alt=""></td>
<% sql="select * from article where boardid=4 and ifshow=1 order by id desc"
set rs=conn.execute(sql)%>
<td rowspan="5" bgcolor="#FFFFFF"> <marquee direction="up" height="140" onMouseOver=this.stop(); onMouseOut=this.start(); scrollamount=2>
<font color="#0000FF" size="2"><strong><%=rs("title")%></strong></font><br>
<br>
<font size="2"><%=rs("content")%></font><br>
<br>
<font size="2"><strong><font color="#0033FF">发布时间:</font></strong><font color="#CC0000"><%=month(rs("addtime"))%>月<%=day(rs("addtime"))%>日</font></font>
</marquee></td>
<% rs.close %>
<td rowspan="9"><img name="top1_r2_c8" src="images/2/top1_r2_c8.gif" width="25" height="330" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="11" border="0" alt=""></td>
</tr>
<% sql=" select * from picnews where ifshow=1 order by picid desc"
set rs=conn.execute(sql)
ntext=rs("pictitle")
if len(ntext)>8 then
ntext=mid(ntext,1,8)&"...."
end if %>
<tr>
<td rowspan="8"><img name="top1_r3_c1" src="images/2/top1_r3_c1.gif" width="55" height="319" border="0" alt=""></td>
<td bgcolor="#FFFFFF"><div align="center"><a href="<%=rs("picurl")%>" target="_blank"><img src="admin/<%=rs("imgurl")%>" border="0"></a></div></td>
<td rowspan="6" colspan="2"><img name="top1_r3_c3" src="images/2/top1_r3_c3.gif" width="80" height="179" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="98" border="0" alt=""></td>
</tr>
<tr>
<td><img name="top1_r4_c2" src="images/2/top1_r4_c2.gif" width="133" height="15" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="15" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="3" bgcolor="#FFFFFF"><div align="center"><font size="2"><a href="<%=rs("picurl")%>" target="_blank"><%=rs("pictitle")%></a></font></div></td>
<td><img src="images/2/spacer.gif" width="1" height="16" border="0" alt=""></td>
</tr>
<% rs.close %>
<tr>
<td rowspan="3"><img name="top1_r6_c5" src="images/2/top1_r6_c5.gif" width="291" height="50" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="5" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><img name="top1_r7_c7" src="images/2/top1_r7_c7.gif" width="153" height="45" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="6" border="0" alt=""></td>
</tr>
<tr>
<td><img name="top1_r8_c2" src="images/2/top1_r8_c2.gif" width="133" height="39" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="39" border="0" alt=""></td>
</tr>
<tr>
<td><img name="top1_r9_c2" src="images/2/top1_r9_c2.gif" width="133" height="119" border="0" alt=""></td>
<td rowspan="2"><img name="top1_r9_c3" src="images/2/top1_r9_c3.gif" width="39" height="140" border="0" alt=""></td>
<td colspan="4" bgcolor="#FFFFFF"><iframe src="scroll.htm" name="I3" width="99%" marginwidth="1" height="110" marginheight="1" scrolling="No" frameborder="0" id="I3"></iframe></td>
<td><img src="images/2/spacer.gif" width="1" height="119" border="0" alt=""></td>
</tr>
<tr>
<td><img name="top1_r10_c2" src="images/2/top1_r10_c2.gif" width="133" height="21" border="0" alt=""></td>
<td colspan="4"><img name="top1_r10_c4" src="images/2/top1_r10_c4.gif" width="526" height="21" border="0" alt=""></td>
<td><img src="images/2/spacer.gif" width="1" height="21" border="0" alt=""></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29"><img src="images/1/spacer.gif" width="29" height="1" border="0" alt=""></td>
<td width="36"><img src="images/1/spacer.gif" width="36" height="1" border="0" alt=""></td>
<td width="151"><img src="images/1/spacer.gif" width="151" height="1" border="0" alt=""></td>
<td width="36"><img src="images/1/spacer.gif" width="36" height="1" border="0" alt=""></td>
<td width="233"><img src="images/1/spacer.gif" width="233" height="1" border="0" alt=""></td>
<td width="42"><img src="images/1/spacer.gif" width="42" height="1" border="0" alt=""></td>
<td width="223"><img src="images/1/spacer.gif" width="223" height="1" border="0" alt=""></td>
<td width="28"><img src="images/1/spacer.gif" width="28" height="1" border="0" alt=""></td>
<td width="20"><img src="images/1/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="8"><img name="n4a_r1_c1" src="images/1/4a_r1_c1.gif" width="778" height="45" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="45" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="8"><img name="n4a_r2_c1" src="images/1/4a_r2_c1.gif" width="29" height="355" border="0" alt=""></td>
<td colspan="2" rowspan="4" valign="middle" bgcolor="#FFFFFF">
<table width="99%" border="0" cellspacing="0" cellpadding="2">
<% sql="select top 6 id,title from article where boardid=18 and ifshow=1 order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
ntext=rs("title")
if len(ntext)>10 then
ntext=mid(ntext,1,10)&"...."
end if
%>
<tr>
<td width="9%"><div align="center"><img src="images/arrow02.gif" width="4" height="7"></div></td>
<td width="91%"><a href="main/shownews.asp?id=<%=rs("id")%>"><font size="2" class="text"><%=ntext%></font></a></td>
</tr>
<% rs.movenext
loop
rs.close %>
</table>
<br>
<div align="right"><font size="2">更多>> </font></div></td>
<td rowspan="5"><img name="n4a_r2_c4" src="images/1/4a_r2_c4.gif" width="36" height="217" border="0" alt=""></td>
<td rowspan="3" valign="top" background="images/1/4a_r2_c5.gif"> 汉沽区第一幼儿园,始建于1960年,前身为
“天津市汉沽区幼儿园”。1980年,更名为“汉沽区第一幼儿园”。园所占地面积4799平方米,园舍建筑面积2244平方米。全园共有9个教学班,教职工35人,是天津市一级园。<br>
多年来,汉沽一幼坚持“一切为了孩子,服务于家长,服务于社会”的办园宗旨,坚持走“科学管理,科研兴园”之路,始终走在......<br>
<span class="text"><font size="2"> <a href="main/info.asp" target="_blank">更多</a>>></font></span></td>
<td colspan="3"><img name="n4a_r2_c6" src="images/1/4a_r2_c6.gif" width="293" height="18" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="7"><img name="n4a_r3_c6" src="images/1/4a_r3_c6.gif" width="42" height="337" border="0" alt=""></td>
<td valign="bottom" bgcolor="#FFFFFF"> <table width="99%" border="0" cellspacing="0" cellpadding="2">
<% sql="select top 4 id,title from article where classid=5 and ifshow=1 order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
ntext=rs("title")
if len(ntext)>12 then
ntext=mid(ntext,1,12)&"...."
end if
%>
<tr>
<td width="9%"><div align="center"><img src="images/arrow02.gif" width="4" height="7"></div></td>
<td width="91%"><a href="main/showqh.asp?id=<%=rs("id")%>"><font size="2" class="text"><%=ntext%></font></a></td>
</tr>
<% rs.movenext
loop
rs.close %>
</table>
<br> <div align="right"><font size="2">更多>></font></div></td>
<td rowspan="7"><img name="n4a_r3_c8" src="images/1/4a_r3_c8.gif" width="28" height="337" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="119" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><img name="n4a_r4_c7" src="images/1/4a_r4_c7.gif" width="223" height="43" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="37" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><img name="n4a_r5_c5" src="images/1/4a_r5_c5.gif" width="233" height="43" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="6" border="0" alt=""></td>
</tr>
<tr>
<% dim picurl,gamesurl
sql="select id,picurl,gamesurl from games where ifhead=1 and ifshow=1 order by id desc"
set rs=conn.execute(sql)
picurl=rs("picurl")
gamesurl=rs("gamesurl")
picurl=replace(picurl,"uploadimage","admin/uploadimage")
gamesurl=replace(gamesurl,"uploadimage","admin/uploadimage") %>
<td colspan="2"><img name="n4a_r6_c2" src="images/1/4a_r6_c2.gif" width="187" height="37" border="0" alt=""></td>
<td rowspan="2" bgcolor="#FFFFFF"><div align="center"><a href="<%=gamesurl%>" target="_blank"><img src="<%=picurl%>" width="200" height="120" border="0"></a></div></td>
<td><img src="images/1/spacer.gif" width="1" height="37" border="0" alt=""></td>
</tr>
<% rs.close %>
<tr>
<td rowspan="3"><img name="n4a_r7_c2" src="images/1/4a_r7_c2.gif" width="36" height="138" border="0" alt=""></td>
<td colspan="3" rowspan="2" bgcolor="#FFFFFF"><iframe src="scroll2.htm" name="I4" width="99%" marginwidth="1" height="110" marginheight="1" scrolling="No" frameborder="0" id="I4"></iframe></td>
<td><img src="images/1/spacer.gif" width="1" height="110" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><img name="n4a_r8_c7" src="images/1/4a_r8_c7.gif" width="223" height="28" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="8" border="0" alt=""></td>
</tr>
<tr>
<td colspan="3"><img name="n4a_r9_c3" src="images/1/4a_r9_c3.gif" width="420" height="20" border="0" alt=""></td>
<td><img src="images/1/spacer.gif" width="1" height="20" border="0" alt=""></td>
</tr>
</table>
<% dim length,cc,path,vtop,vip,vips,vtoday,vyesterday,vstarttime,vtodaytime,vsaveips,vmax,vmaxtime
sql="select * from counter where used=1"
rs.open sql,conn,1,2
length=rs("lengh")
path=rs("path")
' 网页立即过期,防止漏统计
Response.Expires = -1
' 检查客户端IP
vip=Request.ServerVariables("Remote_Addr")
'如果已经存在统计数据
vtop=rs("number")
vips=rs("vips")
vtoday=rs("vtoday")
vyesterday=rs("vyesterday")
vstarttime=rs("vstartime")
vtodaytime=rs("vtodaytime")
vsaveips=rs("vsaveips")
vmax=rs("vmax")
vmaxtime=rs("vmaxtime")
'向现有数据中追加值
vtop=vtop+1
if instr(vsaveips,"#" & vip & "#")=false then
vips=vips+1
if cdate(vtodaytime)=date() then
vtoday=vtoday+1
else
vyesterday=vtoday
vtoday=1
vtodaytime=date()
end if
if clng(vtoday)>clng(vmax) then
vmax=vtoday
vmaxtime=date()
end if
vsaveips=left(vsaveips,len(vsaveips)-1)
vsaveips=right(vsaveips,len(vsaveips)-1)
howip=split(vsaveips,"#")
if ubound(howip) < 40 then
vsaveips="#" & vsaveips & "#" & vip & "#"
else
vsaveips=replace("#" & vsaveips,"#" & howip(0) & "#","#") & "#" & vip & "#"
end if
'写入数据文件
'写入数据库
end if
' 关闭数据对象
rs.close
'将数据写入数据库
sql="select * from counter where used=1"
rs.open sql,conn,1,2
rs("number")=vtop
rs("vips")=vips
rs("vtoday")=vtoday
rs("vyesterday")=vyesterday
rs("vtodaytime")=vtodaytime
rs("vmax")=vmax
rs("vmaxtime")=vmaxtime
rs("vsaveips")=vsaveips
rs.update
rs.close
set conn=nothing
%>
<table width="778" height="140" border="0" align="center" cellpadding="0" cellspacing="0" background="images/end.gif">
<tr>
<td width="268" height="120">
<div align="center"><span class="ha"><font color="#0000FF" size="2" face="宋体">网站访问量:</font></span>
<br>
<% cc=length-len(vtop)
for i=1 to cc %><img src="<%=path%>/0.gif"><% next %>
<% for i=1 to len(vtop)%><img src="<%=path%>/<%=mid(vtop,i,1)%>.gif"><% next %>
</div></td><% endtime=timer() %>
<td width="510"> <div align="center" class="ha"><font color="#FFFFFF" size="2" face="宋体"><font color="#FF6600">学校名称:</font><font color="#0000FF"><%=schoolname%> <font color="#FF6600">电话:</font><%=phone%><br>
<font color="#FF6600">地址:</font><%=address%> <font color="#FF6600">邮政编码:</font><%=postmode%> <br>
<font color="#FF6600">页面运行时间:</font><%=FormatNumber((endtime-startime)*1000,3)%><font color="#FF6600">毫秒 </font></font></font></div>
<div align="left"><font color="#0000FF" size="2"></font></div></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="16,8,116,40" href="main/info.asp" target="_blank">
<area shape="rect" coords="144,9,242,41" href="main/news.asp" target="_blank">
<area shape="rect" coords="274,9,374,42" href="main/teacher.asp" target="_blank">
<area shape="rect" coords="401,8,503,42" href="main/huodong.asp" target="_blank">
<area shape="rect" coords="534,8,632,41" href="main/jtsh.asp" target="_blank">
<area shape="rect" coords="665,8,762,41" href="bbs/index.asp" target="_blank">
</map>
</body>
</html>
㈡ 用java做一个网页(注册页)
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新用户注册</title>
<script language="javascript" src="js/send_request.js"></script>
<script language="javascript">
function refreshImage(){
document.getElementById("image").src = "image.jsp";
}
function checkInput(){
var f = document.forms[0];
var usernamePatrn = /^[a-zA-Z]{4,12}$/;
if(!usernamePatrn.exec(f.username.value)){
alert("输入用户名不合法,请重新输入!");
f.username.select;
f.username.focus();
return false;
}
var passwordPatrn = /^(\w){6,12}$/;
if(!passwordPatrn.exec(f.password.value)){
alert("密码不符合要求,请重新输入!");
f.passowrd.focus();
return false;
}
if(f.password.value != f.passwordverify.value){
alert("两次密码输入不一样,请重新输入!");
f.password.focus();
return false;
}
document.getElementById("info").innerHTML = "正在处理。。。请等待。。。";
send_request("get","private/register1.jsp?userName="+f.username.value+"&password="+f.password.value+
"&checkCode="+f.check.value,null,"text",callback);
}
function callback(){
if(http_request.readyState == 4){
if(http_request.status == 200){
var result = http_request.responseText;
if(result == 1){
alert("注册成功!点击确定后进入主界面!");
window.location="mainPage.html";
}
else alert(result);
}
else{
alert("页面异常");
alert(http_request.status);
}
}
}
</script>
</head>
<body>
<form action="" name="form1"method="post">
<table width="100%">
<tr align="center">
<td align="right">用户名:</td>
<td align="left"><input type="text" size="12" maxlength="12" id="username" name="username" />
(2-12字符, 必须全为英文字母)</td>
</tr>
<tr>
<td></td>
<td align="left"><label id="info" style="color:#0033FF"></td>
</tr>
<tr>
<td align="right">密码:</td>
<td align="left"><input type="password" size="12" maxlength="12" id="password" />(4-12字符)</td>
</tr>
<tr>
<td align="right">密码确认:</td>
<td align="left"><input type="password" size="12" maxlength="12" id="passwordverify" />(4-12字符)</td>
</tr>
<tr>
<td align="right"><img src="image.jsp" id="image" /></td>
<td align="left"><input type="button" value="看不清楚,换个验证码" onclick="javascript:refreshImage();" /></td>
</tr>
<tr>
<td align="right">请输入验证码:</td>
<td align="left"><input type="text" size="12" maxlength="12" id="check" name="check" /></td>
</tr>
<tr>
<td align="right"><input type="button" value="提交" onclick="javascript:checkInput();" /></td>
<td align="left"><input type="reset" value="取消" /></td>
</tr>
</table>
</form>
</body>
</html>
ajax的
下面是image.jsp
<%@ page contentType="image/jpeg" import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*" %>
<%!
Color getRandColor(Random random,int fc,int bc)
{
if(fc>255) fc=255;
if(bc>255) bc=255;
int r=fc+random.nextInt(bc-fc);
int g=fc+random.nextInt(bc-fc);
int b=fc+random.nextInt(bc-fc);
return new Color(r,g,b);
}
%>
<%
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
// 设置图片的长宽
int width=176, height=30;
//设置备选汉字,剔除一些不雅的汉字
String base = "\u7684\u4e00\u4e86\u662f\u6211\u4e0d\u5728\u4eba\u4eec\u6709\u6765\u4ed6\u8fd9\u4e0a\u7740\u4e2a\u5730\u5230\u5927"+
"\u91cc\u8bf4\u5c31\u53bb\u5b50\u5f97\u4e5f\u548c\u90a3\u8981\u4e0b\u770b\u5929\u65f6\u8fc7\u51fa\u5c0f\u4e48\u8d77"+
"\u90fd\u628a\u597d\u8fd8\u591a\u6ca1\u4e3a\u53c8\u53ef\u5bb6\u5b66\u53ea\u4ee5\u4e3b\u4f1a\u6837\u5e74\u60f3\u751f\u540c\u8001\u4e2d\u5341"+
"\u4ece\u81ea\u9762\u524d\u5934\u9053\u5b83\u540e\u7136\u8d70\u5f88\u50cf\u89c1\u4e24\u7528\u5979\u56fd\u52a8\u8fdb\u6210\u56de\u4ec0\u8fb9"+
"\u4f5c\u5bf9\u5f00\u800c\u5df1\u4e9b\u73b0\u5c71\u6c11\u5019\u7ecf\u53d1\u5de5\u5411\u4e8b\u547d\u7ed9\u957f\u6c34\u51e0\u4e49\u4e09\u58f0"+
"\u4e8e\u9ad8\u624b\u77e5\u7406\u773c\u5fd7\u70b9\u5fc3\u6218\u4e8c\u95ee\u4f46\u8eab\u65b9\u5b9e\u5403\u505a\u53eb\u5f53\u4f4f\u542c\u9769"+
"\u6253\u5462\u771f\u5168\u624d\u56db\u5df2\u6240\u654c\u4e4b\u6700\u5149\u4ea7\u60c5\u8def\u5206\u603b\u6761\u767d\u8bdd\u4e1c\u5e2d\u6b21"+
"\u4eb2\u5982\u88ab\u82b1\u53e3\u653e\u513f\u5e38\u6c14\u4e94\u7b2c\u4f7f\u5199\u519b\u5427\u6587\u8fd0\u518d\u679c\u600e\u5b9a\u8bb8"+
"\u5feb\u660e\u884c\u56e0\u522b\u98de\u5916\u6811\u7269\u6d3b\u90e8\u95e8\u65e0\u5f80\u8239\u671b\u65b0\u5e26\u961f\u5148\u529b\u5b8c\u5374"+
"\u7ad9\u4ee3\u5458\u673a\u66f4\u4e5d\u60a8\u6bcf\u98ce\u7ea7\u8ddf\u7b11\u554a\u5b69\u4e07\u5c11\u76f4\u610f\u591c\u6bd4\u9636\u8fde\u8f66"+
"\u91cd\u4fbf\u6597\u9a6c\u54ea\u5316\u592a\u6307\u53d8\u793e\u4f3c\u58eb\u8005\u5e72\u77f3\u6ee1\u65e5\u51b3\u767e\u539f\u62ff\u7fa4\u7a76"+
"\u5404\u516d\u672c\u601d\u89e3\u7acb\u6cb3\u6751\u516b\u96be\u65e9\u8bba\u5417\u6839\u5171\u8ba9\u76f8\u7814\u4eca\u5176\u4e66\u5750\u63a5"+
"\u5e94\u5173\u4fe1\u89c9\u6b65\u53cd\u5904\u8bb0\u5c06\u5343\u627e\u4e89\u9886\u6216\u5e08\u7ed3\u5757\u8dd1\u8c01\u8349\u8d8a\u5b57\u52a0"+
"\u811a\u7d27\u7231\u7b49\u4e60\u9635\u6015\u6708\u9752\u534a\u706b\u6cd5\u9898\u5efa\u8d76\u4f4d\u5531\u6d77\u4e03\u5973\u4efb\u4ef6"+
"\u611f\u51c6\u5f20\u56e2\u5c4b\u79bb\u8272\u8138\u7247\u79d1\u5012\u775b\u5229\u4e16\u521a\u4e14\u7531\u9001\u5207\u661f\u5bfc\u665a\u8868"+
"\u591f\u6574\u8ba4\u54cd\u96ea\u6d41\u672a\u573a\u8be5\u5e76\u5e95\u6df1\u523b\u5e73\u4f1f\u5fd9\u63d0\u786e\u8fd1\u4eae\u8f7b\u8bb2"+
"\u519c\u53e4\u9ed1\u544a\u754c\u62c9\u540d\u5440\u571f\u6e05\u9633\u7167\u529e\u53f2\u6539\u5386\u8f6c\u753b\u9020\u5634\u6b64\u6cbb\u5317"+
"\u5fc5\u670d\u96e8\u7a7f\u5185\u8bc6\u9a8c\u4f20\u4e1a\u83dc\u722c\u7761\u5174\u5f62\u91cf\u54b1\u89c2\u82e6\u4f53\u4f17\u901a\u51b2\u5408"+
"\u7834\u53cb\u5ea6\u672f\u996d\u516c\u65c1\u623f\u6781\u5357\u67aa\u8bfb\u6c99\u5c81\u7ebf\u91ce\u575a\u7a7a\u6536\u7b97\u81f3"+
"\u653f\u57ce\u52b3\u843d\u94b1\u7279\u56f4\u5f1f\u80dc\u6559\u70ed\u5c55\u5305\u6b4c\u7c7b\u6e10\u5f3a\u6570\u4e61\u547c\u6027\u97f3\u7b54"+
"\u54e5\u9645\u65e7\u795e\u5ea7\u7ae0\u5e2e\u5566\u53d7\u7cfb\u4ee4\u8df3\u975e\u4f55\u725b\u53d6\u5165\u5cb8\u6562\u6389\u5ffd\u79cd\u88c5"+
"\u9876\u6025\u6797\u505c\u606f\u53e5\u533a\u8863\u822c\u62a5\u53f6\u538b\u6162\u53d4\u80cc\u7ec6";
//备选汉字的长度
int length = base.length();
//创建内存图像
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// 获取图形上下文
Graphics g = image.getGraphics();
//创建随机类的实例
Random random = new Random();
// 设定图像背景色(因为是做背景,所以偏淡)
g.setColor(getRandColor(random,200,250));
g.fillRect(0, 0, width, height);
//备选字体
String[] fontTypes = {"\u5b8b\u4f53","\u65b0\u5b8b\u4f53","\u9ed1\u4f53","\u6977\u4f53","\u96b6\u4e66"};
int fontTypesLength = fontTypes.length;
//在图片背景上增加噪点
g.setColor(getRandColor(random,160,200));
g.setFont(new Font("Times New Roman",Font.PLAIN,14));
for (int i=0;i<6;i++)
{
g.drawString("*********************************************",0,5*(i+2));
}
//取随机产生的认证码(6个汉字)
//保存生成的汉字字符串
String sRand="";
for (int i=0;i<4;i++)
{
int start = random.nextInt(length);
String rand=base.substring(start,start+1);
sRand+=rand;
//设置字体的颜色
g.setColor(getRandColor(random,10,150));
//设置字体
g.setFont(new Font(fontTypes[random.nextInt(fontTypesLength)],Font.BOLD,18 + random.nextInt(6)));
//将此汉字画到图片上
g.drawString(rand,24*i+ 10 + random.nextInt(8),24);
}
session.setAttribute("rand",sRand);
g.dispose();
ImageIO.write(image, "JPEG", response.getOutputStream());
%>
㈢ MacBook Pro ME665CH/A 支持音频源码输出吗
貌似有一次装完win7啥驱动都没装的时候,看到插耳机的孔里面有红光发出来。不知道是不是所谓的饮品源码输出。
㈣ 网页复制的新问题
很多资料性的网络文章,往往在网页禁止使用“复制”、“粘贴”命令。
破解方法很简单: 单击IE浏览器的“工具”——“internet选项”——“安全”,将其中的“internet”的安全级别设为最高级别,“确定”后刷新网页即可。
安全级别最高的时候,一切控件和脚本均不能运行,再厉害的网页限制手段统统全部作废。
===================
写网址。
㈤ 按键精灵怎么改键
按键精灵改键方法步骤如下:
1、在按键精灵界面,点击要修改热键脚本的【属性】;
㈥ 如何在 linux 下调试动态链接库
大家都知道在 Linux 可以用 gdb 来调试应用程序,当然前提是用 gcc 编译程序时要加上
-g 参数。
我这篇文章里将讨论一下用 gdb 来调试动态链接库的问题。
首先,假设我们准备这样的一个动态链接库:
QUOTE:
库名称是: ggg
动态链接库文件名是: libggg.so
头文件是: get.h
提供这样两个函数调用接口:
int get ();
int set (int a);
要生成这样一个动态链接库,我们首先编写这样一个头文件:
[Copy to clipboard]
CODE:
/************关于本文档********************************************
*filename: get.h
*purpose: 一个动态链接库头文件示例
*tided by: zhoulifa() 周立发 ()
Linux 爱好者 Linux 知识传播者 SOHO 族 开发者 最擅长 C 语言
*date time: 2006-11-15 21:11:54
*Note: 任何人可以任意复制代码并运用这些文档,当然包括你的商业用途
* 但请遵循 GPL
*Hope:希望越来越多的人贡献自己的力量,为科学技术发展出力
* 科技站在巨人的肩膀上进步更快!感谢有开源前辈的贡献!
*感谢 提供原始代码,
我在他的基础上整理了此文
*********************************************************************/
int get ();
int set (int a);
然后准备这样一个生成动态链接库的源文件:
[Copy to clipboard]
CODE:
/************关于本文档********************************************
*filename: get.cpp
*purpose: 一个动态链接库源文件示例
*tided by: zhoulifa() 周立发 ()
Linux 爱好者 Linux 知识传播者 SOHO 族 开发者 最擅长 C 语言
*date time:2006-11-15 21:11:54
*Note: 任何人可以任意复制代码并运用这些文档,当然包括你的商业用途
* 但请遵循 GPL
*Hope:希望越来越多的人贡献自己的力量,为科学技术发展出力
* 科技站在巨人的肩膀上进步更快!感谢有开源前辈的贡献!
*感谢 提供原始代码,
我在他的基础上整理了此文
*********************************************************************/
#include <stdio.h>
#include "get.h"
static int x=0;
int get ()
{
printf ("get x=%d\n", x);
return x;
}
int set (int a)
{
printf ("set a=%d\n", a);
x = a;
return x;
}
然后我们用 GNU 的 C/C++ 编译器来生成动态链接库,编译命令如下:
QUOTE:
g++ get.cpp -shared -g -DDEBUG -o
libggg.so
这样我们就准备好了动态链接库了,下面我们编写一个应用程序来调用此动态链接库,源代码如下:
[Copy to clipboard]
CODE:
/************关于本文档********************************************
*filename: pk.cpp
*purpose: 一个调用动态链接库的示例
*tided by: zhoulifa() 周立发 ()
Linux 爱好者 Linux 知识传播者 SOHO 族 开发者 最擅长 C 语言
*date time:2006-11-15 21:11:54
*Note: 任何人可以任意复制代码并运用这些文档,当然包括你的商业用途
* 但请遵循 GPL
*Hope:希望越来越多的人贡献自己的力量,为科学技术发展出力
* 科技站在巨人的肩膀上进步更快!感谢有开源前辈的贡献!
*感谢 提供原始代码,
我在他的基础上整理了此文
*********************************************************************/
#include <stdio.h>
#include "get.h"
int main (int argc, char** argv)
{
int a = 100;
int b = get ();
int c = set (a);
int d = get ();
printf ("a=%d,b=%d,c=%d,d=%d\n",a,b,c,d);
return 0;
}
编译此程序用下列命令,如果已经把上面生成的 libggg.so 放到了库文件搜索路径指定的文件目录,比如 /lib 或 /usr/lib 之类的,就用下面这条命令:
QUOTE:
g++ pk.cpp -o app -Wall -g -lggg
否则就用下面这条命令:
QUOTE:
g++ pk.cpp -o app -Wall -g -lggg -L`pwd`
下面我们就开始调试上面命令生成的 app 程序吧。如果已经把上面生成的 libggg.so 放到了库文件搜索路径指定的文件目录,比如 /lib或 /usr/lib 之类的,调试就顺利完成,如下
:
QUOTE:
./app
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation,Inc.
GDB is free software, covered by the GNU
General Public License, and you are
welcome to change it and/or distribute
copies of it under certain conditions.
Type "show ing" to see theconditions.
There is absolutely no warranty for GDB.
Type "show warranty" for details.This GDB was configured as "i486-linux-
gnu"...Using host libthread_db library"/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) b main /* 这是在程序的 main 处设置断点 */
Breakpoint 1 at 0x804853c: file pk.cpp,line 7.
(gdb) b set /* 这是在程序的 set 处设置断点 */
Function "set" not defined.
Make breakpoint pending on future shared
library load? (y or [n]) y /* 这里必须选择 y 调试程序才会跟踪到动态链接库内部去
*/Breakpoint 2 (set) pending.
(gdb) run /* 开始运行我们的程序,直到遇见断点时暂停 */
Starting program: /data/example/c/app
Breakpoint 3 at 0xb7f665f8: file get.cpp,line 11.
Pending breakpoint "set" resolved
Breakpoint 1, main (argc=1,argv=0xbf990504) at pk.cpp:7
7 int a = 100;
(gdb) n /* 继续执行程序的下一行代码
*/
8 int b = get ();
(gdb) n /* 程序执行到了我们断点所在的动态链接库了 */
get x=0
9 int c = set (a);(gdb) n
Breakpoint 3, set (a=100) at get.cpp:11
11 printf ("set a=%d\n", a);
(gdb) list /* 查看当前代码行周围的代码,证明我们已经跟踪到动态链接库的源代码里面了 */
6 printf ("get x=%d\n", x);
7 return x;
8 }
9 int set (int a)
10 {
11 printf ("set a=%d\n", a);
12 x = a;
13 return x;
14 }
(gdb) n
set a=100
12 x = a;(gdb) n
13 return x;(gdb) n
14 }
(gdb) n
main (argc=1, argv=0xbf990504) at
pk.cpp:10
10 int d = get ();
(gdb) n
get x=100
11 printf ("a=%d,b=%d,c=%
d,d=%d\n",a,b,c,d);
(gdb) n
a=100,b=0,c=100,d=100
12 return 0;
(gdb) c
Continuing.
Program exited normally.
(gdb) quit /* 程序顺利执行结束 */#
如果我们没有把动态链接库放到指定目录,比如/lib里面,调试就会失败,过程如下:
QUOTE:
# gdb ./app
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation,
Inc.
GDB is free software, covered by the GNU
General Public License, and you arewelcome to change it and/or distribute
copies of it under certain conditions.
Type "show ing" to see theconditions.
There is absolutely no warranty for GDB.
Type "show warranty" for details.
This GDB was configured as "i486-linux-
gnu"...Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x804853c: file pk.cpp,
line 7.
(gdb) b set
Function "set" not defined.
Make breakpoint pending on future shared
library load? (y or [n]) y
Breakpoint 2 (set) pending.
(gdb) run /* 虽然调试操作都一样,但程序执行失败 */
Starting program: /data/example/c/app
/data/example/c/app: error while loading
shared libraries: libggg.so: cannot open
shared object file: No such file or
directory
Program exited with code 0177.
(gdb) quit
#
本次实验的环境是:
CPU:AMD Athlon(tm) 64 Processor 3000+
内存:512M
OS:Ubuntu GNU/Linux 6.06 dapper LTS
gcc:gcc 版本 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
break(b) 行号:在某一行设置断点
break 函数名:在某个函数开头设置断点
break...if...:设置条件断点
continue(或c):从当前位置开始连续而非单步执行程序
delete breakpoints:删除所有断点
delete breakpoints n:删除序号为n的断点
disable breakpoints:禁用断点
enable breakpoints:启用断点
info(或i) breakpoints:参看当前设置了哪些断点
run(或r):从开始连续而非单步执行程序
display 变量名:跟踪查看一个变量,每次停下来都显示它的值
undisplay:取消对先前设置的那些变量的跟踪
㈦ 修改网站视频源码地址
在视频下方由一个:把视频贴到Blog或BBS上
点一下 下面出来两个代码
空间代码是下面那个 复制就行了
㈧ 我使用的是大连联通ADSL宽带,它强行推送广告,查看源代码如下,这段代码经过加密了,谁能告知一个解密的
不是你的问题 是的连接线的问题 这个要电信局的人来了拿测试机测试 才知道 有可能是你的电话线 连接猫的那根线不好 也有可能是电信局 分配你的IP 不好~~也可能是到期了啊~~~另外楼主你要确定是69多少~~~~还有要确定是网通还是电信~~~~也许我OUT了~~~你就是传说中的双线?
另外送上:
你连接宽带时如果出错的话,就是你无法连到网络上时,系统会按照netcfg.hlp给你提供一些错误信息.如下:
600 某操作处于挂起状态。
601 检测到一个无效端口句柄。
602 指定端口已经打开。
603 呼叫方缓冲区太小。
604 指定了错误的信息。
605 无法设置端口信息。
606 无法连接指定端口。
607 检测到无效事件。
608 指定了一个不存在的设备。
609 设备类型不存在。
610 缓冲区无效。
611 路由不可用。
612 路由没有分配。
613 指定了无效的压缩。
614 缓冲区不足。
615 没有找到端口。
616 某异步请求处于挂起状态。
617 端口或设备已经断开。
618 端口没有打开。
619 不能建立到远程计算机的连接,因此用于此连接的端口已关闭。
620 没有端点。
621 无法打开电话簿文件。
622 无法加载电话簿文件。
623 无法找到电话簿项。
624 无法写入电话簿文件。
625 在电话簿中发现的无效信息。
626 无法加载字符串。
627 无法找到键。
628 在连接完成之前,连接被远程计算机终止。
629 数据链接被远程计算机终止。
630 由于硬件失败,端口断开连接。
631 用户已断开端口连接。
632 结构大小不正确。
633 端口已经在使用或没有为“远程访问”拨出配置端口。
634 无法在远程网络注册计算机。
635 未知错误。
636 错误的设备连接到端口。
637 字符串无法转换。
638 请求超时。
639 没有可用的异步网络。
640 发生 NetBIOS 错误。
641 服务器无法分配支持客户端所需的 NetBIOS 资源。
642 已在远程网络上注册了一个 NetBIOS 名称。
643 服务器上的网络适配器出现故障。
644 将无法接收网络弹出式消息。
645 内部身份验证错误。
646 不允许此帐户在一天的这一时间段登录。
647 本帐户已禁用。
648 密码已过期。
649 帐户没有“远程访问”的权限。
650 “远程访问”服务器没有响应。
651 调制解调器(或其他设备)报告了一个错误。
652 设备响应无法识别。
653 没有在设备 .INF 文件部分发现设备所必需的宏。
654 设备 .INF 文件部分中的命令或响应引用到未定义的宏。
655 在设备 .INF 文件部分未发现 <message> 宏。
656 在设备 .INF 文件部分中的 <defaultoff> 宏含有未定义的宏。
657 无法打开设备 .INF 文件。
658 设备 .INF 文件或媒体 .INI 文件中的设备名太长。
659 媒体 .INI 文件引用了未知的设备名。
660 设备 .INF 文件不包含对该命令的响应。
661 设备 .INF 文件缺少一条命令。
662 试图设置一个没有列在设备 .INF 文件部分的宏。
663 媒体 .INI 文件引用了未知的设备类型。
664 无法分配内存。
665 端口不是为“远程访问”配置的。
666 调制解调器(或其他设备)不起作用。
667 无法读取媒体 .INI 文件。
668 连接已除去。
669 媒体 .INI 文件中的用法参数无效。
670 不能从媒体 .INI 文件中读取部分名称。
671 不能从媒体 .INI 文件中读取设备类型。
672 不能从媒体 .INI 文件中读取设备名称。
673 不能从媒体 .INI 文件中读取使用方法。
674 不能从媒体 .INI 文件中读取最大连接 BPS 速率。
675 不能从媒体 .INI 文件中读取最大载波 BPS 速率。
676 线路忙。
677 人工应答而不是调制解调器应答。
678 远程计算机没有响应。
679 无法检测载波。
680 没有拨号音。
681 设备报告的常见错误。
691 拒绝访问,因为用户名和/或密码在域中无效。
692 端口或连接的设备内的硬件故障。
695 未启动状态机器。
696 已启动状态机器。
697 响应循环未完成。
699 设备响应引起缓冲区溢出。
700 设备 .INF 文件中的扩展命令太长。
701 设备移动到 COM 驱动程序不支持的 BPS 速率。
703 连接需要用户信息,但应用程序不允许用户交互。
704 回拨号码无效。
705 授权状态无效。
707 出现与 X.25 协议有关的错误。
708 本帐户已过期。
709 在域中修改密码的错误。
710 与调制解调器通信时检测到串口超载错误。
711 在此计算机上的配置错误阻止此连接。
712 Biplex 端口正在初始化。等几秒钟再重拨。
713 没有活动的 ISDN 线路可用。
714 没有足够的 ISDN 通道可用于呼叫。
715 电话线质量太差而产生了太多的错误。
716 “远程访问 IP”配置不能用。
717 在“远程访问 IP”地址的静态池中没有可用的 IP 地址。
718 因为远程计算机没有及时反应,此连接已被终止。
719 PPP 已被远程计算机终止。
720 无法建立与远程计算机的连接。可能需要更改此连接的网络设置。
721 远程计算机没响应。
722 PPP 数据包无效。
723 电话号码(包含前缀及后缀在内)太长。
726 不能同时将 IPX 协议用于多个端口的拨出。
728 找不到连接到“远程访问”的 IP 适配器。
729 只有在安装了 IP 协议之后,才能使用 SLIP。
731 未配置协议。
732 PPP 协商没有会合。
733 不能完成到远程计算机的连接。
734 PPP 链接控制协议被终止。
735 请求的地址被服务器拒绝。
736 远程计算机终止了控制协议。
737 检测到环回。
738 服务器没指定地址。
739 远程服务器不能使用加密的密码。
740 为“远程访问”配置的 TAPI 设备无法初始化或没有正确安装。
741 本地计算机不支持加密。
742 远程服务器不支持加密。
743 远程服务器要求加密。
752 处理脚本时遇到语法错误。