MyEclipse获取注册码
2024-08-31 04:40:56
最近刚装上MyEclipse,一直弹窗提示注册码过期,开始还能接受,到最后,每发布一个项目便弹窗提醒,顿时感觉烦了,得治理治理这个烦人的注册码,下面是一段自动生成注册名和注册码的代码,只需要直接拿来用就可以解决弹窗的烦恼。
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader; public class MyEli {
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(, );
cal.add(, -);
java.text.NumberFormat nf = new java.text.DecimalFormat("");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(
new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))
.append("").toString(); String type = "YE3MP-";
String need = new StringBuilder(userId.substring(, )).append(type)
.append("").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 = ;
ac = s.toCharArray();
j = ;
k = ac.length;
while (j < k) {
i = ( * 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 = ;
k = abyte0.length;
while (i < k) {
j = abyte0[i];
if ((j >= ) && (j <= )) {
j = (((j - ) + ) % ) + ;
} else if ((j >= ) && (j <= )) {
j = (((j - ) + ) % ) + ;
} else if ((j >= ) && (j <= )) {
j = (((j - ) + ) % ) + ;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEli() {
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();
MyEli myeclipsegen = new MyEli();
String res = myeclipsegen.getSerial(userId, "");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
} }
最新文章
- Intent传递list<;bean>;集合
- (转)IIS7 优化-网站请发并发数
- 前端js框架收藏
- 哟西,CLOUDSTACK第一步,搞定
- TypeScript 素描 - 模块解析、声明合并
- C++设计模式之装饰者模式
- PHP - 使用 Pear 进行安装和卸载包
- C++ map
- Hibernate(四):Hello World
- 51 nod 1421 最大MOD值
- 【oracle】dmp导数据库
- springMVC_10拦截器
- Python_%---format_43
- Codeforces Round #321 (Div. 2) E - Kefa and Watch
- 「ZJOI2015」地震后的幻想乡
- springboot xml声明式事务管理方案
- Python 文件 truncate() 方法
- 通过直接编码添加折线图到ChartControl
- Android组件之Service浅谈
- Nginx用户认证配置方法详解(域名/目录)
热门文章
- PAT 1109 Group Photo
- Python网络请求urllib和urllib3详解
- 利用Linux中的crontab实现分布式项目定时任务
- ES6的let和var声明变量的区别
- Python 7 列表 for 字典,嵌套
- NGINX Web Server Nginx web server
- &;lt;LeetCode OJ&;gt; 268. Missing Number
- SharePoint 2013 关闭 customErrors
- ExtJs--06--Ext.WindowGroup相关方法简单使用
- UI设计---&;gt;全心全意为人民服务的宗旨----&;gt;注重客户体验---&;gt;软件持久的生命力