易截截图软件、单文件、免安装、纯绿色、仅160KB

生成myeclipse注册码的java程序代码

   今晚在逛CSDN的时候发现了,有人用java写了生成myeclipse注册码的代码,所以就抄录了下来。 o(∩_∩)o 哈哈
   package gggg;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
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(1, 3);
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(0, 1)).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;


相关文档:

java 生成excel

    //** **********创建工作簿************ */
            WritableWorkbook workbook = Workbook.createWorkbook(new File("d:/test.xls"));
            /** *//** **********创建工 ......

JAVA语言学校的危险性

    上学时很多问题的答案,可以从下文找到
    JAVA语言学校的危险性
    作者:Joel Spolsky
    译者:阮一峰
    原文: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html
    译文地址:htt ......

Java如何操作Word, Excel, PDF文档?


Java如何操作Word, Excel, PDF文档?
http://www.sina.com.cn 2006年08月23日 14:55 太平洋电脑网







作者:盛忠良
 
  参考:
  http://danadler.com/jacob/
  http://jakarta.apache.org/poi/
  http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html
  http://www.c ......

Java集群之session共享解决方案

Java集群之session共享解决方案
来源:http://blog.csdn.net/crskyp/archive/2009/11/19/4836685.aspx
随着互联网的日益壮大,网站的pv和uv成线性或者指数倍的增加.单服务器单数据库早已经不能满足实际需求.比如像盛大,淘宝这样的大型网络公司,更是如此. 
    集群,也就是让一组计算机服务器协同工作 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号