生成MyEclipse6.5&7.5&8.0注册码的java源码
//运行后即可得到注册码
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MyEclipseKeyGen {
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;
while (i < k) {
j = abyte0[i];
if ((j >= 48) && (j <= 57)) {
j = (((j - 48) + 5) % 10) + 48;
} else if ((j >= 65) && (j <= 90)) {
j = (((j - 65) + 13) % 26) + 65;
} else if ((j >= 97) && (j <= 122)) {
j = (((j - 97) + 13) % 26) + 97;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEclipseKeyGen() {
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();
MyEclipseKeyGen myeclipsekeygen = new MyEclipseKeyGen();
String res = myeclipsekeygen.getSerial(userId, "5");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
}
}
生成MyEclipse6.5&7.5&8.0注册码的java源码的更多相关文章
- centos 7 下 rabbitmq 3.8.0 & erlang 22.1 源码编译安装
centos 7 下 rabbitmq 3.8.0 & erlang 22.1 源码编译安装 安装前请检查好erlang和rabbitmq版本是否相匹配参考:RabbitMQ Erlang V ...
- java源码——0~9十个数字不重复地使用使加法表达式成立
这个问题是在我写个的几个博客里较为复杂的一个.首先,先看看整个问题的表述. 星号表示0~9的一个数字,而且不允许重复,使得下面的加法表达式成立.输出所有结果. ※ ※ ※ ※ ※ + 2 ...
- Tomcat9.0环境搭建与源码编译
使用IntelliJ IDEA 搭建Tomcat9.0项目 准备条件: 下载源码 这里我们下载的Tomcat的源码版本是9.0.12. 下载地址: https://tomcat.apache ...
- linux设备驱动程序-i2c(0)-i2c设备驱动源码实现
(基于4.14内核版本) 为了梳理清楚linux内核中的i2c实现框架,从本文开始,博主将分几个章节分别解析i2c总线在linux内核中的形成过程.匹配过程.以及设备驱动程序源码实现. 在介绍linu ...
- qt-5.6.0 移植之qt源码编译
其实这只是给自己看的一个configure选项笔记,没有太多的东西. 首先: 下载qt5.6的源码: 地址: http://download.qt.io/archive/qt/5.6/ 下载完解压: ...
- hadoop-2.0.0-cdh4.2.1源码编译总结
经过一个星期多的努力,这两个包的编译工作总算告一段落. 首先看一下这一篇文章: 在eclipse下编译hadoop2.0源码 http://www.cnblogs.com/meibenjin/arch ...
- 2018-09-13 代码翻译尝试-使用Roaster解析和生成Java源码
此文是前文使用现有在线翻译服务进行代码翻译的体验的编程语言方面第二点的一个尝试. 参考Which framework to generate source code ? - Cleancode and ...
- CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
很高兴你能在浮躁的年代里还有兴趣阅读源代码,CesiumJS 至今已有十年以上,代码量也积累了三十多万行(未压缩状态). 我也很荣幸自己的文章能被读者看到,如果对你有帮助.有启发,点个赞就是对我最大的 ...
- 长链接生成短链接Java源码(调用百度接口)
public static DefaultHttpClient httpclient; static { httpclient = new DefaultHttpClient(); //httpcli ...
随机推荐
- UIView和CALayer有什么关系
view是对layer的一种封装,你对view的很多操作事实上是对layer的操作,之所以会出现这两个东西是因为1.view支持很多手势的交互,你所操作iphone的各种点击,拖动等等.2.layer ...
- weak属性需要在dealloc中置nil么?
出题者简介: 孙源(sunnyxx),目前就职于百度 整理者简介:陈奕龙(子循),目前就职于滴滴出行. 转载者:豆电雨(starain)微信:doudianyu 不需要. 在ARC环境无论是强指针还是 ...
- Demo_CS(移动,切换枪支,发射子弹)
using UnityEngine; using System.Collections; public class Gun : MonoBehaviour { private Animator ani ...
- sqlserver 查找某个字符在字符串中第N次出现的位置
例如:查找'A,' 在'A,B,C,D,A,B,C,D,C,D,B,A,C,E,'中第二次出现的位置怎么实现,SQL 中有这样的函数吗? SQL code /* 方法很多,这里简单写一个 返回@fin ...
- visual stduio 插件及代码生成器
下图是本人常用的visual stuido开发工具插件. 2 使用NArrange格式化代码,这个工具,可以将代码格式化,用region分隔开来. NArrange 0.2.9.0 ________ ...
- Bulk Insert 高效快速插入数据
BULK INSERT以用户指定的格式复制一个数据文件至数据库表或视图中. 语法: BULK INSERT [ [ 'database_name'.][ 'owner' ].]{ 'table_nam ...
- [Angular 2] Pipe Purity
Explaining how Pipes only change by default when your Pipe input parameters change and not when your ...
- 从零单排c++ primer(17)
(1)假设一个名字在派生类的作用域内无法正确解析,则编译器将继续在外层的基类作用域中寻找该名字的定义. (2)派生类的成员将隐藏同名的基类成员. (3)除了覆盖继承而来的虚函数之外,派生类最好不要重用 ...
- log4j 日志的初始化
log4j 不指定时,log4j 会默认进行初始化,如果想要制定log4j.properties的位置时,可以进行指定: PropertyConfigurator.configure(): 参数里面加 ...
- 10 条提升 Android 性能的建议
About the Speaker: Boris Farber 每个人都知道一个 App 的成功,更这个 App 的性能体验有着很密切的关系.但是如何让你的 App 拥有极致性能体验呢?在 Droid ...