易截截图软件、单文件、免安装、纯绿色、仅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 堆排序算法

/**
* 堆排序
*
* */
public void heapSort(double[] a){
double temp;
initCreateHeap(a);
for(int i = a.length - 1; i > 0; i --){
temp = a[0];
a[0] = a[i];
a[i] = temp;
createHeap(a, i, 0);
}
}

/**
* 将数组看成完全二叉树,建立最大堆
* */
private ......

Java 编程的动态性,第 8 部分: 用代码生成取代反射

从本系列前面的文章中,您了解到反射的性能比直接访问要慢许多倍,并了解了用 Javassist 和 Apache
Byte Code Engineering Library (BCEL)进行classworking。Java 顾问 Dennis
Sosnoski 通过演示如何使用运行时 classworking,来用全速前进的生成代码取代反射代码,从而结束他的 Java 编程的动态性
系列。
既然您已经 ......

JAVA语言学校的危险性

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

java学习站点(转载)

1、http://java.sun.com/
(英文)
Sun的Java网站,是一个应该经常去看的地方。不用多说。
2、http://www-900.ibm.com/developerWorks/cn/
IBM的developerWorks网站,英语好的直接去英文主站点看。这里不但是一个极好的面向对象的分析设计网站,也是WebServices,Java,Linux极好的网站。强烈推荐!!!
3、http://www.j ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号