Myeclipse 6.0代码
import java.util.*; import java.io.*;
public class bbs
{
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 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();
bbs myeclipsegen = new bbs();
String res = myeclipsegen.getSerial(userId, "20");
System.out.println("Serial:" + res);
reader.readLine();
}
catch (IOException ex)
{
}
}
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 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);
}
public bbs()
{
super();
}
}
Myeclipse 6.0代码的更多相关文章
- MyEclipse 6.5 代码自动提示功能配置教程
1. 打开MyEclipse 6.0.1,然后“window”→“Preferences” 2. 选择“java”,展开,“Editor”,选择“Content Assist”. 3. 选择“Cont ...
- MyEclipse 8.0注冊码+原版下载_Java开发软件
MyEclipse是一个十分优秀的用于开发Java, J2EE的Eclipse插件集合,MyEclipse的功能很强大,支持也十分广泛,尤其是对各种开元产品的支持十分不错.MyEclipse眼下支持J ...
- myeclipse更改后台代码不用重启tomcat的方法
myeclipse更改后台代码不用重启tomcat的方法 方法1:在WebRoot下的META-INF文件夹中新建一个名为context.xml文件,里面添加如下内容(要区分大小写): <C ...
- Myeclipse学习总结(3)——Myeclipse中的代码格式化、注释模板及保存时自动格式化
设置Myeclipse中的代码格式化.注释模板及保存时自动格式化 1:设置注释的模板: 下载此模板: codetemplates.xml This XML file does not appear ...
- 0代码隐藏GroupedTableView上边多余的间隔
0代码隐藏GroupedTableView上边多余的间隔 实现诸如支付宝的 “探索” 页面时,最简单的方案是在 Storyboard 中来一个静态 Grouped UITableViewControl ...
- 基于MyEclipse+9.0+++Tomcat+7.0的SSH+平台搭建
基于MyEclipse+9.0+++Tomcat+7.0的SSH+平台搭建 http://wenku.baidu.com/view/96fbfe0f581b6bd97f19ea1d.html 用MyE ...
- 【技术贴】解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法
[技术贴]解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法 错误是:Aborting commit: xxxxx’ remains ...
- 【技术贴】解决myeclipse SVN 提交代码 commit:remains in tree-c
[技术贴]解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法 错误是:Aborting commit: xxxxx' remains ...
- Hyperledger Fabric(v1.2.0)代码分析1——channel创建
Hyperledger Fabric(v1.2.0)代码分析1--channel创建 0. e2e_cli Hyperledger Fabric提供了一个e2e的例子,该例中创建了一个基础的区块链网络 ...
随机推荐
- HDU 2457/POJ 3691 DNA repair AC自动机+DP
DNA repair Problem Description Biologists finally invent techniques of repairing DNA that contains ...
- how to use datatables editor
Basic initialisation Editor is a Create, Read, Update and Delete (CRUD) extension forDataTables that ...
- DataTables warning requested unknown parameter
This is possibly the most cryptic warning message that DataTables will show. It is a short error mes ...
- wpa_supplicant介绍【转】
本文转载自:https://zhuanlan.zhihu.com/p/24246712 一.什么是wpa_spplicant wpa_supplicant本是开源项目源码,被谷歌修改后加入Androi ...
- Javascript 解析字符串生成 XML DOM 对象。
Javascript 接收字符串生成 XML DOM 对象.实测对 Firefox .IE6 有效.可用于解析 ajax 的服务器响应结果,也可用于解析自定义字符串.1. [代码]函数 ppt模 ...
- I.MX6 Android can-utils 移植
/******************************************************************* * I.MX6 Android can-utils 移植 * ...
- BZOJ_1415_[Noi2005]聪聪和可可_概率DP+bfs
BZOJ_1415_[Noi2005]聪聪和可可_概率DP+bfs Description Input 数据的第1行为两个整数N和E,以空格分隔,分别表示森林中的景点数和连接相邻景点的路的条数. 第2 ...
- python-----用多张图片生成视频
代码如下 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/2/19 16:42 # @Author : xiaodai # - ...
- 《Spring Boot官方指南》(二)入门
如果您刚开始接触Spring Boot,或者简称’Spring’, 这个部分对您来说非常有用.这个部分提供了“是什么?”,“怎么做?”和 “为什么?”的解释.您除了会阅读一份附带Spring Boot ...
- 11_传智播客iOS视频教程_NS前缀和@符号
NS前缀的有NSLog和NSString Cocoa就是用来开发带界面的应用程序. Foundation框架之中的类.函数绝大多数都是从NextStep来的.看到NS前缀就知道这个类是从哪里来的.是很 ...