MyEclipse7.0/8.0(用Java生成)
近来学JSP+SSH,下载了MyEclipse 8.0 M1,网上找到的注册码实在不多,真的不多,就那么一个,杯具啊,要不就是注册机,无意中看到一个好东西,用Java生成注册码,原作都是谁我不知道,如果作者认为我不该把这些代码帖在这里,请告知,我马上删除。不多说,上代码:
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;
相关文档:
工欲善其事,必先利其器。熟悉开发环境可以让你更快更好更舒服地开发软件。就如同VC/.net开发人员离不开msdn,java开发人员往往也离不开java API。下面介绍下如何在Eclipse和NetBeans中导入java API。使之可以方便快速地查找,定位。
本文适合与刚刚接触Eclipse或NetBeans的java开发人员,或者是有经验的使用Ec ......
import java.io.*;
class BigInt
{
int a[];
int len;
BigInt(String str)
{
{
len=str.length();
a=new int[len];
for(int i=0;i<len;i++)
{
this.a[i]=str.charAt(i)-48;
}
&nb ......
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.huadoo.model.Area;
public class Aaaa {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
  ......
一、为代码加注释。虽然每个人都知道这点,但有时却不自觉忘了履行,今天你“忘了”加注释了吗?虽然注释对程序的功能没什么“贡献”,但过一段时间,比如说两星期之后或者更长,回过头来看看自己的代码,说不定已经记不住它是干什么的了。如果这些代码是你个人的,那还算是走运了,不幸的是,当 ......
java exception 解决方案 - 我的异常网|异常|exception 770 - java.net.unknownhostException 771 - com.ibatis.struts.BeanActionException 772 - javax.servlet.jsp.JspException:Cannot find bean under name org.apache.struts.taglib.html.BEAN 773 - java.lang.NoClassDefFoundError:org apache commons lang Unhand ......