摘要: syntaxhighlighter下载 syntaxhighlighter是一个小开源项目,它可以在网页中对各种程序源代码语法进行加亮显示。支持当前流行的各种编程语言: C#、CSS、C++、Delphi、Java、JavaScript、PHP、Python、Ruby、SQL、Visual Basi 阅读全文
posted @ 2010-02-02 14:42 Bon.Shi 阅读(763) 评论(0) 推荐(0) 编辑
摘要: 如果我们将图片以image类型存入到SQLServer中,现在我们再想办法取出来 下面这个方法就是从数据库里读取Image类型字字段,并解析好返回到页面上。 这里我们需要将该页面ASPX端的HTML元素全部清除,而在CS代码端调用这个方法,最后向页面输出Image。 private void DownloadImage(string FileID){ //省略数据库链接代码    Syste... 阅读全文
posted @ 2010-02-02 14:35 Bon.Shi 阅读(399) 评论(0) 推荐(0) 编辑
摘要: //转化字符串为十六进制编码public static String toHexString(String s) { String str=""; for (int i=0;i<s.length();i++) { int ch = (int)s.charAt(i); String s4 = Integer.toHexString(ch); str = ... 阅读全文
posted @ 2010-02-02 14:24 Bon.Shi 阅读(1965) 评论(0) 推荐(0) 编辑
摘要: import org.xml.sax.InputSource;import org.xml.sax.SAXException;//导入dom4j包,可以到官网上去下载后导入import org.dom4j.DocumentException;import org.dom4j.DocumentHelper;import org.dom4j.Element;import org.w3c.dom.Doc... 阅读全文
posted @ 2010-02-02 14:17 Bon.Shi 阅读(5818) 评论(0) 推荐(1) 编辑
摘要:   SQL注入式攻击是利用是指利用设计上的漏洞,在目标服务器上运行Sql命令以及进行其他方式的攻击 动态生成Sql命令时没有对用户输入的数据进行验证是Sql注入攻击得逞的主要原因。 比如: 如果你的查询语句是select * from admin where username='"&user&"' and password='"&p... 阅读全文
posted @ 2010-02-02 14:02 Bon.Shi 阅读(644) 评论(0) 推荐(0) 编辑
摘要: 转载一篇关于页面对象模型的文章,说得比较详细,有助理解。没事的时候就多看两遍,慢慢体会:)。 适用于:      Microsoft? ASP.NET 摘要:了解为 ASP.NET Web 页面建立的事件模型,以及 Web 页面转变为 HTML 过程中的各个阶段。ASP.NET HTTP 运行时负责管理对象管道,这些对象首先将请求的 URL 转换成 Page... 阅读全文
posted @ 2010-02-02 14:00 Bon.Shi 阅读(169) 评论(0) 推荐(0) 编辑
摘要: import rtx.RTXSvrApi;//导入RTXAPI类。public class RTXMSGDemo{ public static void main(String[] args) { String receiver = "";//接收者RTX账号 String title = "";//消息标题 String msgType = "";//消息类型,0|1,紧急或者一般 String smInfo = "";//消息内容 RTXSvrApi RtxsvrapiObj = new RTXSvrApi() 阅读全文
posted @ 2010-02-02 11:15 Bon.Shi 阅读(1635) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;class ByteArrayInputStreamDemo{ String strTmp = "BonShi"; byte b[] strTmp.getBytes(); ByteArrayInputStream in = new ByteArrayInputStram(b); for(int i=0;i<2;i++){ int c;... 阅读全文
posted @ 2010-02-02 10:40 Bon.Shi 阅读(486) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <title>标题<title> </head> <body>..........文件内容.......... </body> </html> 1.文件标题 <title>..........</title> 2.文件更新--<meta> 【1】10秒后自动更新一次 <meta http-equiv="refresh" content=10> 【2】... 阅读全文
posted @ 2010-02-02 10:38 Bon.Shi 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 计算某一月份的最大天数 Calendar time=Calendar.getInstance(); time.clear(); time.set(Calendar.YEAR,year); time.set(Calendar.MONTH,i-1);//注意,Calendar对象默认一月为0 int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//... 阅读全文
posted @ 2010-02-02 10:34 Bon.Shi 阅读(3187) 评论(0) 推荐(0) 编辑