<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serenity &#187; 序列号</title>
	<atom:link href="http://seanchenxi.com/tag/%e5%ba%8f%e5%88%97%e5%8f%b7/feed" rel="self" type="application/rss+xml" />
	<link>http://seanchenxi.com</link>
	<description>-非淡泊无以明志，非宁静无以致远</description>
	<lastBuildDate>Wed, 16 Dec 2009 22:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MyEclipse7.0 注册码 序列号 生成</title>
		<link>http://seanchenxi.com/myeclipse70-sn-code-generator.html</link>
		<comments>http://seanchenxi.com/myeclipse70-sn-code-generator.html#comments</comments>
		<pubDate>Sun, 22 Feb 2009 15:23:40 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[MyEclipse]]></category>
		<category><![CDATA[序列号]]></category>
		<category><![CDATA[注册码]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/?p=100</guid>
		<description><![CDATA[1、建立java Project，任意取个名字就行。 2、建立一个名字为MyEclipseGen的类文件，内容见下面。 3、运行该代码，在控制台中会出现： please input register name: ×××××（你的name） 即生成序列号： 4、进入myeclipse,输入Subscriber和Subscription code即可。 MyEclipseGen类内容: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MyEclipseGen { private static final String LL = &#8220;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 [...]]]></description>
			<content:encoded><![CDATA[<p>1、建立java Project，任意取个名字就行。</p>
<p>2、建立一个名字为MyEclipseGen的类文件，内容见下面。</p>
<p>3、运行该代码，在控制台中会出现：</p>
<p>please input register name:<br />
×××××（你的name）</p>
<p>即生成序列号：</p>
<p>4、进入myeclipse,输入Subscriber和Subscription code即可。</p>
<p><span id="more-100"></span></p>
<p><strong>MyEclipseGen类内容:</strong></p>
<p>import java.io.BufferedReader;<br />
import java.io.IOException;<br />
import  java.io.InputStreamReader;</p>
<p>public class MyEclipseGen {<br />
private static final String LL = &#8220;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.&#8221;;</p>
<p>public String getSerial(String userId, String licenseNum) {<br />
java.util.Calendar cal = java.util.Calendar.getInstance();<br />
cal.add(1,  3);<br />
cal.add(6, -1);<br />
java.text.NumberFormat nf = new  java.text.DecimalFormat(&#8220;000&#8243;);<br />
licenseNum =  nf.format(Integer.valueOf(licenseNum));<br />
String verTime = new  StringBuilder(&#8220;-&#8221;).append(<br />
new  java.text.SimpleDateFormat(&#8220;yyMMdd&#8221;).format(cal.getTime()))<br />
.append(&#8220;0&#8243;).toString();<br />
String type = &#8220;YE3MP-&#8221;;<br />
String need = new  StringBuilder(userId.substring(0, 1)).append(type)<br />
.append(&#8220;300&#8243;).append(licenseNum).append(verTime).toString();<br />
String dx =  new StringBuilder(need).append(LL).append(userId)<br />
.toString();<br />
int  suf = this.decode(dx);<br />
String code = new  StringBuilder(need).append(String.valueOf(suf))<br />
.toString();<br />
return this.change(code);<br />
}</p>
<p>private int decode(String s) {<br />
int i;<br />
char[] ac;<br />
int  j;<br />
int k;<br />
i = 0;<br />
ac = s.toCharArray();<br />
j = 0;<br />
k =  ac.length;<br />
while (j &lt; k) {<br />
i = (31 * i) + ac[j];<br />
j++;<br />
}<br />
return Math.abs(i);<br />
}</p>
<p>private String change(String s) {<br />
byte[] abyte0;<br />
char[] ac;<br />
int i;<br />
int k;<br />
int j;<br />
abyte0 = s.getBytes();<br />
ac = new  char[s.length()];<br />
i = 0;<br />
k = abyte0.length;<br />
while (i &lt; k)  {<br />
j = abyte0[i];<br />
if ((j &gt;= 48) &amp;&amp; (j &lt;= 57))  {<br />
j = (((j &#8211; 48) + 5) &amp;percnt; 10) + 48;<br />
} else if ((j &gt;=  65) &amp;&amp; (j &lt;= 90)) {<br />
j = (((j &#8211; 65) + 13) &amp;percnt; 26) +  65;<br />
} else if ((j &gt;= 97) &amp;&amp; (j &lt;= 122)) {<br />
j = (((j  &#8211; 97) + 13) &amp;percnt; 26) + 97;<br />
}<br />
ac[i] = (char) j;<br />
i++;<br />
}<br />
return String.valueOf(ac);<br />
}</p>
<p>public MyEclipseGen() {<br />
super();<br />
}</p>
<p>public static void main(String[] args) {<br />
try {<br />
System.out.println(&#8220;please input register name:&#8221;);<br />
BufferedReader reader  = new BufferedReader(new InputStreamReader(<br />
System.in));<br />
String  userId = null;<br />
userId = reader.readLine();<br />
MyEclipseGen  myeclipsegen = new MyEclipseGen();<br />
String res =  myeclipsegen.getSerial(userId, &#8220;5&#8243;);<br />
System.out.println(&#8220;Serial:&#8221; +  res);<br />
reader.readLine();<br />
} catch (IOException ex) {<br />
}<br />
}<br />
}</p>
<p><strong>注：private static final String LL = &#8220;Decompiling this  copyrighted software is a violation of both your license agreement and the  Digital Millenium Copyright Act of 1998 (</strong><strong>http://www.loc.gov/copyright/legislation/dmca.pdf</strong><strong>). 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.&#8221;;<br />
此段代码常量不可变更 否则注册码无效</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/myeclipse70-sn-code-generator.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

