??xml version="1.0" encoding="utf-8" standalone="yes"?>国模精品娜娜一二三区,国产三级电影在线,视频国产精品http://www.aygfsteel.com/chenglu/嗯哼zh-cnMon, 16 Jun 2025 14:00:20 GMTMon, 16 Jun 2025 14:00:20 GMT60微信公共q_ PHP SDK 增强?/title><link>http://www.aygfsteel.com/chenglu/archive/2013/08/24/wechat-php-sdk-power.html</link><dc:creator>saobaolu</dc:creator><author>saobaolu</author><pubDate>Sat, 24 Aug 2013 08:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenglu/archive/2013/08/24/wechat-php-sdk-power.html</guid><description><![CDATA[     摘要: 代码改编?NetPuter 大大发布?SDKQ这?SDK 是我用过的最好的 PHP SDKQ修改了一些东西:1、增加了收到的讯息类?voice video2、收到text的时候,如果?hello2bizuser 的话Q调?onsubscribe ҎQ微?.x 以前貌似都还是发hello2bizuser 所以不得不兼容啊)Code highlighting produced by A...  <a href='http://www.aygfsteel.com/chenglu/archive/2013/08/24/wechat-php-sdk-power.html'>阅读全文</a><img src ="http://www.aygfsteel.com/chenglu/aggbug/403271.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenglu/" target="_blank">saobaolu</a> 2013-08-24 16:02 <a href="http://www.aygfsteel.com/chenglu/archive/2013/08/24/wechat-php-sdk-power.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何固定表格宽度http://www.aygfsteel.com/chenglu/archive/2010/07/06/table-width.htmlsaobaolusaobaoluTue, 06 Jul 2010 14:43:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/07/06/table-width.html如何固定表格宽度 转自http://blog.csdn.net/cjh47349038/archive/2009/04/09/4058680.aspx

<TABLE style="table-layout: auto | fixed">
auto: 默认?br /> fixed: 宽度固定,截断出的内?br />
<TABLE style="word-break: normal | break-all | keep-all">
normal: 默认?按字词截断换?br /> break-all: 截断q换?br /> keep-all: 不截断不换行

使用:style="table-layout:fixed;"
表示输出停止,停留在设定的长度?

使用:style="word-break : break-all;"
表示对超镉K?换行再l显C?

对于在英文中使用,请用style="table-layout:fixed; word-wrap:break-word"
推荐使用word-wrap:break-word;word-break:break-all;table-layout:fixed;

==============================================================================

word-wrap同word-break的区?/span>

word-wrap:
normal      Default. Content exceeds the boundaries of its container. 
break-word Content wraps to next line, and a word-break occurs when necessary. 必要时会触发word-break?/p>

word-break:
normal      Default. Allows line breaking within words. 好像是只对Asian text起作用?br /> break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text. 
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.

ȝ如下Q?br /> word-wrap是控制换行的?br /> 使用break-wordӞ是将强制换行。中文没有Q何问题,英文语句也没问题。但是对于长串的英文Q就不v作用?/span>

break-word是控制是否断词的?br /> normal是默认情况,英文单词不被拆开?br /> break-allQ是断开单词。在单词到边界时Q下个字母自动到下一行。主要解决了长串英文的问题?br /> keep-allQ是指Chinese, Japanese, and Korean不断词。即只用此时Q不用word-wrapQ中文就不会换行了。(英文语句正常。)


ie下:
使用word-wrap:break-word;所有的都正常?/p>

ff下:
如这2个都不用的话Q中文不会出M问题。英文语句也不会出问题。但是,长串英文会出问题?br /> Z解决长串英文Q一般用word-wrap:break-word;word-break:break-all;。但是,此方式会DQ普通的英文语句中的单词会被断开Qie下也是)?/p>

目前主要的问题存在于 长串英文 ?英文单词被断开。其实长串英文就是一个比较长的单词而已?br /> 卌文单词应不应该被断开那?那问题很明显了,昄不应该被断开了?br /> 对于长串英文Q就是恶意的东西Q自然不用去了。但是,也要想些办法Q不让它把容器撑大?br /> 用:overflow:auto; ie下,长串会自动折行。ff下,长串会被遮盖?/p>


所以,lgQ?span style="line-height: 21px; color: #ff0000; ">最好的方式是word-wrap:break-word;overflow:hidden;而不是word-wrap:break-word;word-break:break-all;?br /> word-wrap:break-word;overflow:auto;在ie下没有Q何问题。在ff下,长串会被遮住部分内容?/span>

另,试代码如下Q?/p>

1.htm===================================================================

<style>
.c1{ width:300px;      border:1px solid red}
.c2{ width:300px;word-wrap:break-word;      border:1px solid yellow}
.c3{ width:300px;word-wrap:break-word;word-break:break-all;      border:1px solid green}
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
.c5{ width:300px;word-break:break-all;      border:1px solid black}
.c6{ width:300px;word-break:keep-all;      border:1px solid red}
.c7{ width:300px;word-wrap:break-word;overflow:auto;      border:1px solid yellow}
</style>

.c1{ width:300px;      border:1px solid red}
<div class="c1">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c1>
This is all English. This is all English. This is all English.
</div>
<div class=c1>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c1>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
<div class="c2">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c2>
This is all English. This is all English. This is all English.
</div>
<div class=c2>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c2>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c3{ width:300px;word-wrap:break-word;word-break:break-all;      border:1px solid green}
<div class="c3">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c3>
This is all English. This is all English. This is all English.
</div>
<div class=c3>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c3>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
<div class="c4">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c4>
This is all English. This is all English. This is all English.
</div>
<div class=c4>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c4>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c5{ width:300px;word-break:break-all;      border:1px solid black}
<div class="c5">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c5>
This is all English. This is all English. This is all English.
</div>
<div class=c5>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c5>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c6{ width:300px;word-break:keep-all;      border:1px solid red}
<div class="c6">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c6>
This is all English. This is all English. This is all English.
</div>
<div class=c6>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c6>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>

<br>
.c7{ width:300px;word-wrap:break-word;overflow:auto;      border:1px solid yellow}
<div class="c7">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c7>
This is all English. This is all English. This is all English.
</div>
<div class=c7>
全是中文的情c全是中文的情况。全是中文的情况?br /> </div>
<div class=c7>
中英文؜排的情况。Chinese and English. 中英文؜排的情况。Chinese and English. 
</div>



saobaolu 2010-07-06 22:43 发表评论
]]>
键盘输入10个整敎ͼ冒排序q输出结果到文ghttp://www.aygfsteel.com/chenglu/archive/2010/06/26/SortTest.htmlsaobaolusaobaoluSat, 26 Jun 2010 01:02:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/06/26/SortTest.html 1 import java.io.*;
 2 import java.util.Scanner;
 3 public class SortTest {
 4     public static void main(String[] args) throws IOException {
 5         int temp = 0;//临时变量Q用于冒泡交?nbsp;       
 6         int[] num=new int[10];  //声明一个空的数l?nbsp; 10个长?/span>
 7         Scanner sc = new Scanner(System.in);
 8         FileOutputStream out=new FileOutputStream("1.txt");
 9         PrintStream p=new PrintStream(out);
10         //开始@环赋?/span>
11         for(int i =0;i<num.length;i++){
12             num[i]=sc.nextInt();
13         }
14         p.append("排序前ؓ:");
15         for (int i = 0; i <num.length; i++) {
16             System.out.println(num[i]);
17             p.append(num[i]+" , ");
18         }
19         // 用于排序
20         for (int i = 0; i < num.length-1; i++) {
21             for (int j = 0; j < num.length - i - 1; j++) {
22                 if (num[j] > num[j + 1]) {
23                     temp = num[j];
24                     num[j] = num[j + 1];
25                     num[j + 1= temp;
26                 }
27             }
28         }
29         //输出文g
30         p.append("\n");
31         p.append("排序后ؓ:");
32         // 循环输出
33         System.out.println("排序后ؓ:");
34         for (int i = 0; i <num.length; i++) {
35             System.out.println(num[i]);
36             p.append(num[i]+" , ");
37         }
38     
39         
40     }
41 } 最后应该把plclose了哈

saobaolu 2010-06-26 09:02 发表评论
]]>
【{】解决table不能换行的问题与CSS之自动换行ȝhttp://www.aygfsteel.com/chenglu/archive/2010/06/25/table_huanhang.htmlsaobaolusaobaoluFri, 25 Jun 2010 06:06:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/06/25/table_huanhang.html转自Qhttp://www.ry168.net/bbs/thread-226-1-1.html
table不能换行问题 一般是Q一行里面全是数字或是字母或者结有多个感叹可导?table不能换行Q中文默认的会自动换行的Q字母不能换行问题:
style="table-layout:fixed; word-break: break-all; overflow:hidden;"
复制代码在单元格属性里加入上面q句Q如Q?br /> <td style="table-layout:fixed; word-break: break-all; overflow:hidden;">
复制代码用表格做|页排版的时候,一般都能正怋用。偏偏有时会到一D连l的英文词或者一堆感叹号(!!!)把网就撑开的现象?/p>

ȝ了一下,只要在CSS中定义了如下句子Q可保网不会再被撑开了?/p>

自动换行问题,正常字符的换行是比较合理?而连l的数字和英文字W常常将容器撑大,人头?下面介绍的是CSS如何实现换行的方?/p>

对于div,p{块U元?/p>

正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定义的宽度之后自动换行

html
<div id="wrap">正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定?lt;/div>
css
#wrap{white-space:normal; width:200px; }

IE览?/p>

q箋的英文字W和阿拉伯数?使用word-wrap: break-word ;或者word-break:break-all;实现强制断行

html
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>

css
#wrap{word-break:break-all; width:200px;}
或?
#wrap{word-wrap:break-word; width:200px;}

Firefox览?br /> q箋的英文字W和阿拉伯数字的断行,Firefox的所有版本的没有解决q个问题,我们只有让超界的字符隐藏或?l容器添加滚动条

html
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>

css
#wrap{word-break:break-all; width:200px; overflow:auto;}

对于table元素
IE览?br /> 1. 使用 table-layout:fixed;强制table的宽?多余内容隐藏<table style="table-layout:fixed" width="200"><tr><td>abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss</td></tr></table>
复制代码2. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行 <table width="200" style="table-layout:fixed;"><tr><td width="25%" style="word-break : break-all; ">abcdefghigklmnopqrstuvwxyz 1234567890</td><td style="word-wrap : break-word ;">abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>
复制代码3.在td,th中嵌套div,p{采用上面提到的div,p的换行方?/p>

Firefox览?/p>

1. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行Q用overflow:hidden;隐藏出内,q里overflow:auto;无法起作?lt;table style="table-layout:fixed" width="200"><tr>

<td width="25%"  style="word-break : break-all; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td>

<td width="75%" style="word-wrap : break-word; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td>

</tr></table>
复制代码2.在td,th中嵌套div,p{采用上面提到的对付Firefox的方法?/p>

最佳CSS定义换行代码.wrap { table-layout:fixed; word-break: break-all; overflow:hidden; }
复制代码当然Q这U现象出现的几率很小Q但是不能排除网友的恶搞?



saobaolu 2010-06-25 14:06 发表评论
]]>
QQ在线状态代码详解及如何自定义在UK格图?/title><link>http://www.aygfsteel.com/chenglu/archive/2010/06/25/wp_qq.html</link><dc:creator>saobaolu</dc:creator><author>saobaolu</author><pubDate>Thu, 24 Jun 2010 23:28:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenglu/archive/2010/06/25/wp_qq.html</guid><description><![CDATA[|址是http://wp.qq.com<br /> 发现q个玩意来强大了Q就忍不住把官方的介l搬q来Q?br /> 代码样例<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000"><</span><span style="color: #000000">a href</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d</span><span style="color: #000000">"</span><span style="color: #000000">;target</span><span style="color: #000000">=</span><span style="color: #000000">_blank; onclick</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;</span><span style="color: #000000">"</span><span style="color: #000000">><</span><span style="color: #000000">img border</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">0</span><span style="color: #000000">"</span><span style="color: #000000"> SRC</span><span style="color: #000000">=</span><span style="color: #000000">'http:</span><span style="color: #008000">//</span><span style="color: #008000">wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?></a></span></div> <p>1)、sigkeyZ人鉴权keyQ请勿修改,否则无法发v临时会话?/p> <p>2)、时会话图?lt;img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?></p> <p>SRC是图标链接,自定义图标中可以替换q一部分己图片的链接Q?/p> <p>参数Q?/p> <p style="line-height: 24px">P=以冒?#8220;:”分隔多个参数</p> <p style="line-height: 24px">W一个参Cؓ版本P目前?Q?/p> <p style="line-height: 24px">W二个ؓQQ/TMLQ?/p> <p style="line-height: 24px">W三个参Cؓ囑փ风格Q支持多U状态?/p> <p style="line-height: 24px">alt是图标旁留言?/p> <p>3)、除了自定义图标需要修改时会话图标外Q其他情况下不要修改代码Q因为有可能D在不同的环境和浏览器下,无法发v临时会话?/p> <br /> <p style="font-weight: bold; font-size: 14px; margin-bottom: 3px">自定义在UK格图?/p> <p>用JS实现Q具体步骤如下:</p> <p>1) 甌代码</p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #000000"><</span><span style="color: #000000">a href</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d</span><span style="color: #000000">"</span><span style="color: #000000">; target</span><span style="color: #000000">=</span><span style="color: #000000">_blank; onclick</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;</span><span style="color: #000000">"</span><span style="color: #000000">><</span><span style="color: #000000">img border</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">0</span><span style="color: #000000">"</span><span style="color: #000000"> SRC</span><span style="color: #000000">=</span><span style="color: #000000">'http:</span><span style="color: #008000">//</span><span style="color: #008000">wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?></a></span></div> <p>2) 定义online数组Q必Lonline命名</p> <p><script>var online= new Array();</script> <p>3) 获取在线状?/p> <p><script src="http://webpresence.qq.com/getonline?Type=1&80000805:"></script></p> <p>可以获取多个Q必M冒号分隔Q以冒号l尾Q比?</p> <p><script src="http://webpresence.qq.com/getonline?Type=1&80000805:10000:123456:"></script></p> <p>online[0]=0,表示80000805ȝ</p> <p>online[1]=1,表示10000在线</p> <p>online[2]=1,表示123456在线</p> <p>填写L的先后顺序,分别对应数组online???</p> <p>4) d代码</p> <p>把SRC='http://wpa.qq.com/pa?p=1:80000805:1'替换q囄Q比?</p> <div style="border-right: #cccccc 4px solid; padding-right: 5px; border-top: #cccccc 4px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 4px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 4px solid; background-color: #eeeeee"><span style="color: #000000"><</span><span style="color: #000000">script</span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000">(online[</span><span style="color: #000000">0</span><span style="color: #000000">]</span><span style="color: #000000">==</span><span style="color: #000000">0</span><span style="color: #000000">) document.write(</span><span style="color: #000000">"</span><span style="color: #000000"><a href=</span><span style="color: #000000">"</span><span style="color: #000000">http:</span><span style="color: #008000">//</span><span style="color: #008000">sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC=<strong>'http://xxxx/outline.jpg'</strong> alt="点击q里l我发消?></a>"); </span><span style="color: #008000"><br /> </span><span style="color: #0000ff">else</span><span style="color: #000000"> document.write(</span><span style="color: #000000">"</span><span style="color: #000000"><a href=</span><span style="color: #000000">"</span><span style="color: #000000">http:</span><span style="color: #008000">//</span><span style="color: #008000">sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC=<strong>'http://xxxx/online.jpg'</strong> alt="点击q里l我发消?></a>"); </script> </span></div> <br /> 我是q样看的Q用tx的方法得到某QQh否在U,用js判断Q显Conline.jpg或者outline.jpgq两个图片,其余不变?img src ="http://www.aygfsteel.com/chenglu/aggbug/324381.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenglu/" target="_blank">saobaolu</a> 2010-06-25 07:28 <a href="http://www.aygfsteel.com/chenglu/archive/2010/06/25/wp_qq.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse6.0注册机源代码http://www.aygfsteel.com/chenglu/archive/2010/06/19/MyEclipse6_cracker.htmlsaobaolusaobaoluSat, 19 Jun 2010 14:09:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/06/19/MyEclipse6_cracker.html 

package myeclipsegen;

import java.io.*;

public class MyEclipseGen {
    
private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";
    
public String getSerial(String userId, String licenseNum) {
        java.util.Calendar cal 
= java.util.Calendar.getInstance();
        cal.add(
13);
        cal.add(
6-1);
        java.text.NumberFormat nf 
= new java.text.DecimalFormat("000");
        licenseNum 
= nf.format(Integer.valueOf(licenseNum));
        String verTime 
= new StringBuilder("-").append(new java.text.
                SimpleDateFormat(
"yyMMdd").format(cal.getTime())).append("0").
                         toString();
        String type 
= "YE3MP-";
        String need 
= new StringBuilder(userId.substring(01)).append(type).
                      append(
"300").append(licenseNum).append(verTime).toString();
        String dx 
= new StringBuilder(need).append(LL).append(userId).toString();
        
int suf = this.decode(dx);
        String code 
= new StringBuilder(need).append(String.valueOf(suf)).
                      toString();
        
return this.change(code);
    }

    
private int decode(String s) {
        
int i;
        
char[] ac;
        
int j;
        
int k;
        i 
= 0;
        ac 
= s.toCharArray();
        j 
= 0;
        k 
= ac.length;
        
while (j < k) {
            i 
= (31 * i) + ac[j];
            j
++;
        }
        
return Math.abs(i);
    }

    
private String change(String s) {
        
byte[] abyte0;
        
char[] ac;
        
int i;
        
int k;
        
int j;
        abyte0 
= s.getBytes();
        ac 
= new char[s.length()];
        i 
= 0;
        k 
= abyte0.length;
        
while (i < k) {
            j 
= abyte0[i];
            
if ((j >= 48&& (j <= 57)) {
                j 
= (((j - 48+ 5% 10+ 48;
            } 
else if ((j >= 65&& (j <= 90)) {
                j 
= (((j - 65+ 13% 26+ 65;
            } 
else if ((j >= 97&& (j <= 122)) {
                j 
= (((j - 97+ 13% 26+ 97;
            }
            ac[i] 
= (char) j;
            i
++;
        }
        
return String.valueOf(ac);
    }

    
public MyEclipseGen() {
        
super();
    }

    
public static void main(String[] args) {
        
try {
            System.out.println(
"please input register name:");
            BufferedReader reader 
= new BufferedReader(new InputStreamReader(
                    System.in));
            String userId 
= null;
            userId 
= reader.readLine();
            MyEclipseGen myeclipsegen 
= new MyEclipseGen();
            String res 
= myeclipsegen.getSerial(userId, "20");
            System.out.println(
"Serial:" + res);
            reader.readLine();
        } 
catch (IOException ex) {
        }
    }
}
Ҏ下蝲源文件和~译好的class文g?br /> /Files/chenglu/MyEclipse61Gen.zip
额,q有QMyEclipse6的下载地址是:请用迅雷下载。?a >http://downloads.myeclipseide.com/downloads/products/eworkbench/6.0.1GA/MyEclipse_6.0.1GA_E3.3.1_FullStackInstaller.exe

saobaolu 2010-06-19 22:09 发表评论
]]>
option selectD取小?/title><link>http://www.aygfsteel.com/chenglu/archive/2010/06/17/option_jsp.html</link><dc:creator>saobaolu</dc:creator><author>saobaolu</author><pubDate>Wed, 16 Jun 2010 23:12:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenglu/archive/2010/06/17/option_jsp.html</guid><description><![CDATA[先来看html代码<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #0000ff"><</span><span style="color: #800000">p</span><span style="color: #0000ff">></span><span style="color: #000000"><br />   </span><span style="color: #0000ff"><</span><span style="color: #800000">label</span><span style="color: #0000ff">></span><span style="color: #000000">选择分类</span><span style="color: #0000ff"></</span><span style="color: #800000">label</span><span style="color: #0000ff">></span><span style="color: #000000"><br />     </span><span style="color: #0000ff"><</span><span style="color: #800000">select </span><span style="color: #ff0000">name</span><span style="color: #0000ff">="classId"</span><span style="color: #0000ff">></span><span style="color: #000000"><br />       </span><span style="color: #0000ff"><</span><span style="color: #800000">option </span><span style="color: #ff0000">value</span><span style="color: #0000ff">="1"</span><span style="color: #0000ff">></span><span style="color: #000000">企业动?/span><span style="color: #0000ff"></</span><span style="color: #800000">option</span><span style="color: #0000ff">></span><span style="color: #000000"><br />       </span><span style="color: #0000ff"><</span><span style="color: #800000">option </span><span style="color: #ff0000">value</span><span style="color: #0000ff">="2"</span><span style="color: #0000ff">></span><span style="color: #000000">最新活?/span><span style="color: #0000ff"></</span><span style="color: #800000">option</span><span style="color: #0000ff">></span><span style="color: #000000"><br />     </span><span style="color: #0000ff"></</span><span style="color: #800000">select</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">p</span><span style="color: #0000ff">></span></div> 在纯struts2中获取用户选择值直?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #0000ff">private</span><span style="color: #000000"> String classId;<br />  </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setTitle(String title) {<br />   </span><span style="color: #0000ff">this</span><span style="color: #000000">.title </span><span style="color: #000000">=</span><span style="color: #000000"> title;<br />  }<br />  </span><span style="color: #0000ff">public</span><span style="color: #000000"> String getClassId() {<br />   </span><span style="color: #0000ff">return</span><span style="color: #000000"> classId;<br />  }</span></div> 可以,需要注意的是select一定要带nameQoption取到的是value<img src ="http://www.aygfsteel.com/chenglu/aggbug/323677.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenglu/" target="_blank">saobaolu</a> 2010-06-17 07:12 <a href="http://www.aygfsteel.com/chenglu/archive/2010/06/17/option_jsp.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java md5 计http://www.aygfsteel.com/chenglu/archive/2010/06/16/java_md5.htmlsaobaolusaobaoluWed, 16 Jun 2010 01:09:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/06/16/java_md5.html 

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import sun.misc.BASE64Encoder;

    
public String EncoderByMd5(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        
//定计算Ҏ
        MessageDigest md5=MessageDigest.getInstance("MD5");
        BASE64Encoder base64en 
= new BASE64Encoder();
        
//加密后的字符?/span>
        String newstr=base64en.encode(md5.digest(str.getBytes("utf-8")));
        
return newstr;
    }
 u错了Q这不是md5的算法,是md5+base64加密Q,

saobaolu 2010-06-16 09:09 发表评论
]]>
jsp判断resultset是否为空http://www.aygfsteel.com/chenglu/archive/2010/03/22/jsp-rs-null.htmlsaobaolusaobaoluMon, 22 Mar 2010 13:24:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/03/22/jsp-rs-null.html1
2if(rs.isAfterLast()==rs.isBeforeFirst()){
3    out.print("您所查找的信息不存在Q请认后再查找!");
4    }
else{
5
6}


saobaolu 2010-03-22 21:24 发表评论
]]>
[雷]蜗居版优乐美q告http://www.aygfsteel.com/chenglu/archive/2010/01/26/woju_uloveit.htmlsaobaolusaobaoluTue, 26 Jan 2010 03:17:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/01/26/woju_uloveit.html

saobaolu 2010-01-26 11:17 发表评论
]]>
Linux权限http://www.aygfsteel.com/chenglu/archive/2010/01/08/linux_permit_exchange.htmlsaobaolusaobaoluThu, 07 Jan 2010 20:36:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/01/08/linux_permit_exchange.htmlr(ReadQ读?Q对文g而言Q具有读取文件内容的权限Q对目录来说Q具有浏览目录的权限?br /> w(Write,写入)Q对文g而言Q具有新增、修Ҏ件内容的权限Q对目录来说Q具有删除、移动目录内文g的权限?br /> x(eXecuteQ执?Q对文g而言Q具有执行文件的权限Q对目录了来说该用户hq入目录的权限?br /> e.g.  -rw-r--r--
1.LW一? 后面三个三个Zl?rw-/r--/r--  (所有者权?l用h?其他用户权限)
2.解析Q所有者权限:d、写入、不可执行;本组用户权限Q读取、不可写入、不可执行;其他用户权限Q读取、不可写入、不可执行?br /> 3.两种方式去解析成数字表示法:
    3.1Qr: 对应数?  w: 对应数?  xQ对应数?Q则Q?+2+1=7/4+0+0=4/4+0+0=4Q?44权限
    3.2Q将其{换成二进制数Q有值就?Q没值就?Q则Q?10/100/100Q{换成十进Ӟ110=7/100=4/110=4Q?44权限


saobaolu 2010-01-08 04:36 发表评论
]]>
Linux(W???ȝhttp://www.aygfsteel.com/chenglu/archive/2010/01/08/linux_1to4.htmlsaobaolusaobaoluThu, 07 Jan 2010 18:45:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/01/08/linux_1to4.html阅读全文

saobaolu 2010-01-08 02:45 发表评论
]]>
html常见标签 for Ajax考试http://www.aygfsteel.com/chenglu/archive/2010/01/07/html_tags_ajax.htmlsaobaolusaobaoluThu, 07 Jan 2010 08:31:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/01/07/html_tags_ajax.html阅读全文

saobaolu 2010-01-07 16:31 发表评论
]]>
Spring的applicationContext.xml文ghttp://www.aygfsteel.com/chenglu/archive/2010/01/02/Spring_applicationContext.htmlsaobaolusaobaoluSat, 02 Jan 2010 15:42:00 GMThttp://www.aygfsteel.com/chenglu/archive/2010/01/02/Spring_applicationContext.html

Spring的applicationContext.xml文g

惛_用过Spring的程序员们都有这L感觉QSpring把逻辑层封装的太完了Q个人感觉View层封装的不是很好Q。以至于有的初学? 都不知道Spring配置文g的意思,拿来用了。所以今天我l大家详l解释一下Spring的applicationContext.xml文g? OkQ我q是通过代码加注释的方式为大家演C: 以下是详解Spring的applicationContext.xml文g代码Q?br /> <!-- 头文Ӟ主要注意一下编? -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- 建立数据?-->
 <bean >
<!-- 数据库驱动,我这里用的是Mysql数据? -->
  <property >
   <value>com.mysql.jdbc.Driver</value>
  </property>
<!-- 数据库地址Q这里也要注意一下编码,不然q可是很郁L哦! -->
  <property >
   <value>
       jdbc:mysql://localhost:3306/tie?useUnicode=true&characterEncoding=utf-8
   </value>
  </property>
<!-- 数据库的用户? -->
  <property >
   <value>root</value>
  </property>
<!-- 数据库的密码 -->
  <property >
   <value>123</value>
  </property>
 </bean>
<!-- 把数据源注入lSession工厂 -->
 <bean
  class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property >
   <ref bean="dataSource" />
  </property>
<!-- 配置映射文g -->
  <property >
   <list>
    <value>com/alonely/vo/User.hbm.xml</value>
   </list>
  </property>
 </bean>
<!-- 把Session工厂注入lhibernateTemplate -->
 <!-- 解释一下hibernateTemplateQhibernateTemplate提供了很多方便的ҎQ在执行时自动徏?HibernateCallback 对象Q例如:load()、get()、save、delete(){方法?-->
 <bean
  class="org.springframework.orm.hibernate3.HibernateTemplate">
  <constructor-arg>
   <ref local="sessionFactory" />
  </constructor-arg>
 </bean>
<!-- 把DAO注入lSession工厂 -->
 <bean >
  <property >
   <ref bean="sessionFactory" />
  </property>
 </bean>
<!-- 把Service注入lDAO -->
 <bean >
  <property >
   <ref local="userDAO" />
  </property>
 </bean>
<!-- 把Action注入lService -->
 <bean >
  <property >
   <ref bean="userService" />
  </property>
 </bean>
</beans>
以上Spring的applicationContext.xml文g我是用的SSH架构Q如果您用Spring的MVC架构Q其原理也是一L?


saobaolu 2010-01-02 23:42 发表评论
]]>
Linux下Squid代理服务器的配置(?http://www.aygfsteel.com/chenglu/archive/2009/12/18/linux_Squid.htmlsaobaolusaobaoluFri, 18 Dec 2009 00:24:00 GMThttp://www.aygfsteel.com/chenglu/archive/2009/12/18/linux_Squid.htmlLinux下Squid代理服务器的配置(?

启动squid时如果不在squid.conf中设|主机名无法启动,必须要设|visible_hostnameq个参数|本文中,讄的主机名是服务器的真实机器名powersiteQ在squid.conf中找到该ƈ修改Q?
visible_hostname linuxserver

你想让所有员工仅在上班时可上|,而且不允?92.168.1.23q台L上网Q可以加入这L配置Q?
# 以下ACLd到squid.conf的ACL配置部分
acl home_network src 192.168.1.0/24
acl business_hours time M T W H F 9:00-17:00
acl RestrictedHost src 192.168.1.23
# 这些内Ҏ加到squid.conf的http_access配置部分
http_access deny RestrictedHost
http_access allow home_network business_hours

你只惛_早晨q段旉允许员工讉KInternetQ?
# 以下ACLd到squid.conf的ACL配置部分
acl mornings time 08:00-12:00
# 这些内Ҏ加到squid.conf的http_access配置部分
http_access allow mornings

Squid支持从外部读取包含有web站点或域名的文gq行ACL限制。在下面的例子中创徏了两个文Ӟ/etc/squid/allowed-sites.squid?etc/squid/restricted-sites.squidQ很明显Q一个是允许讉K的站ҎӞ另一个是限制讉K站点文g?
# vi /etc/squid/allowed-sites.squid
www.163.com
www.yahoo.cn

# vi /etc/squid/restricted-sites.squid
www.sex.com
sex.com
然后配置在工作时间允许或限制讉K的目标站点,以下的ACL配置和前面的略微不同Q?
#
# 以下ACLd到squid.conf的ACL配置部分
#
acl home_network src 192.168.1.0/24
acl business_hours time M T W H F 9:00-17:00
acl GoodSites dstdomain "/etc/squid/allowed-sites.squid"
acl BadSites dstdomain "/etc/squid/restricted-sites.squid"

#
# 这些内Ҏ加到squid.conf的http_access配置部分
#
http_access deny BadSites
http_access allow home_network business_hours GoodSites

ҎIP地址限制Web讉K
q个ACL讉K控制列表可以限制整个一个网D,功能q是很强的?
#
# 以下ACLd到squid.conf的ACL配置部分
#
acl home_network src 192.168.1.0/255.255.255.0
然后dhttp_access允许q个ACLQ?
#
# 这些内Ҏ加到squid.conf的http_access配置部分
#
http_access allow home_network

讄Squid为透明代理
如果客户端连接网l,需要在览器设|Squid代理服务器,q是件比较麻烦的工作Q而且代理服务器的地址或端口更换,每台服务器都必须重新讄才能生效Q想解决q个问题Q可以用透明代理的方法。透明代理是使用iptables防火墙将squid?128端口的请求全部{发到HTTP?0端口Q从而实现透明代理?
2.6内核版本之上Q新版本的squid只需要修Ҏ如下的内容即可。默认是“http_port 3128”Q要其改ؓ“http_port 3128 transparent”的Ş式:
另外q要配置iptables防火?br /> 在下面两个例子中Q作为防火墙的服务器有两块网卡,q接Internet的eth0和连接内|的eth1Q同旉火墙也是内网的网兟?
如果Squid服务器和防火墙在一台服务器上,那么所有的HTTP80端口的请求将转发到Squid服务的配|端?128上?
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -A INPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -i eth1 -p tcp --dport 3128
iptables -A OUTPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -o eth0 -p tcp --dport 80
iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -i eth0 -p tcp --sport 80
iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -o eth1 -p tcp --sport 80
如果Squid服务器和防火墙在不同的服务器上,iptables的规则将有所不同Q?
iptables -t nat -A PREROUTING -i eth1 -s ! 192.168.1.100 -p tcp --dport 80 -j DNAT --to 192.168.1.100:3128
iptables -t nat -A POSTROUTING -o eth1 -s 192.168.1.0/24 -d 192.168.1.100 -j SNAT --to 192.168.1.1
iptables -A FORWARD -s 192.168.1.0/24 -d 192.168.1.100 -i eth1 -o eth1 -m state
--state NEW,ESTABLISHED,RELATED -p tcp --dport 3128 -j ACCEPT
iptables -A FORWARD -d 192.168.1.0/24 -s 192.168.1.100 -i eth1 -o eth1 -m state --state ESTABLISHED,RELATED -p tcp --sport 3128 -j ACCEPT

Squid的密码验?br /> 1Q?创徏密码文g。密码和用户名存攑֜/etc/squid/squid_passwd文g中,q要将q个文g的权限设|ؓ其它用户只读?
# touch /etc/squid/squid_passwd
# chmod o+r /etc/squid/squid_passwd
Q?Q用htpasswdd用户Qƈ讄密码。添加用户不需要对squidq行重启操作Q我创徏的用户名是www
# htpasswd /etc/squid/squid_passwd www
New password:
Re-type password for user www
#
Q?Q找到ncsa_auth命o的具体位|,后面的配|需要用到绝对\?
# which ncsa_auth
/usr/sbin/ncsa_auth
Q?Q?然后我们p在squid.conf文g中定义验证程序了Q创建名为ncsa_users的ACLq加入关键字REQUIRED来强制让Squid使用NCSA验证Ҏ?
#
# 在squid.conf的auth_param部分d下列内容
#
auth_param basic program /usr/sbin/ncsa_auth /etc/squid/squid_passwd

#
# 以下ACLd到squid.conf的ACL配置部分
#
acl ncsa_users proxy_auth REQUIRED

#
# 这些内Ҏ加到squid.conf的http_access配置部分
#
http_access allow ncsa_users



saobaolu 2009-12-18 08:24 发表评论
]]>
վ֩ģ壺 | | ̩| ʡ| | ϰ| մ| | | ɽ| | ̨| | Զ| | | ȫ| | | ɽ| | | | | | | ͼ| | ij| פ| | ƽ| | ԣ| Ȩ| ƽ| Ͽ| | | ̩| ʯ|