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代码的更多相关文章

  1. MyEclipse 6.5 代码自动提示功能配置教程

    1. 打开MyEclipse 6.0.1,然后“window”→“Preferences” 2. 选择“java”,展开,“Editor”,选择“Content Assist”. 3. 选择“Cont ...

  2. MyEclipse 8.0注冊码+原版下载_Java开发软件

    MyEclipse是一个十分优秀的用于开发Java, J2EE的Eclipse插件集合,MyEclipse的功能很强大,支持也十分广泛,尤其是对各种开元产品的支持十分不错.MyEclipse眼下支持J ...

  3. myeclipse更改后台代码不用重启tomcat的方法

    myeclipse更改后台代码不用重启tomcat的方法   方法1:在WebRoot下的META-INF文件夹中新建一个名为context.xml文件,里面添加如下内容(要区分大小写): <C ...

  4. Myeclipse学习总结(3)——Myeclipse中的代码格式化、注释模板及保存时自动格式化

    设置Myeclipse中的代码格式化.注释模板及保存时自动格式化 1:设置注释的模板: 下载此模板:  codetemplates.xml This XML file does not appear ...

  5. 0代码隐藏GroupedTableView上边多余的间隔

    0代码隐藏GroupedTableView上边多余的间隔 实现诸如支付宝的 “探索” 页面时,最简单的方案是在 Storyboard 中来一个静态 Grouped UITableViewControl ...

  6. 基于MyEclipse+9.0+++Tomcat+7.0的SSH+平台搭建

    基于MyEclipse+9.0+++Tomcat+7.0的SSH+平台搭建 http://wenku.baidu.com/view/96fbfe0f581b6bd97f19ea1d.html 用MyE ...

  7. 【技术贴】解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法

    [技术贴]解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法 错误是:Aborting commit: xxxxx’ remains ...

  8. 【技术贴】解决myeclipse SVN 提交代码 commit:remains in tree-c

    [技术贴]解决myeclipse SVN 提交代码 commit:remains in tree-conflict错误的解决办法 错误是:Aborting commit: xxxxx' remains ...

  9. Hyperledger Fabric(v1.2.0)代码分析1——channel创建

    Hyperledger Fabric(v1.2.0)代码分析1--channel创建 0. e2e_cli Hyperledger Fabric提供了一个e2e的例子,该例中创建了一个基础的区块链网络 ...

随机推荐

  1. 安装PyQt5和Eric6

    安装官方的指引,安装起来本来是非常简单的,但是我前后折腾了两天,甚至连Eric得源码都去调试都没成功.过程如下: 在PyQt5的官网链接中下载轮子 PyQt5-5.7.1-5.7.1-cp34.cp3 ...

  2. .net面试整理

    NET程序员的层次:http://blog.csdn.net/dinglang_2009/article/details/6913852 .NET牛人应该知道些什么http://www.douban. ...

  3. 我的家乡:三河古镇已经登上央视CCTV-1新闻联播啦!

    在烟雨朦胧时走在古镇的青石街上,别有一番风味!第一幅图为央视的直播车,第二副图为漂亮的三河夜景色!

  4. Ubuntu16.04下安装Tensorflow CPU版本(图文详解)

    不多说,直接上干货! 推荐 全网最详细的基于Ubuntu14.04/16.04 + Anaconda2 / Anaconda3 + Python2.7/3.4/3.5/3.6安装Tensorflow详 ...

  5. Ctags基本配置

    一般linux系统都会自带ctags,也可输入"ctags"看有木有该命令.有的话速度配置吧,没有话yum install ctags安装吧. 打开vim 配置文件,要是没该文件就 ...

  6. XMU C语言程序设计实践(2)

    任务一:颠倒的世界 小明最近突然喜欢倒着写字,写出来的句子全是颠倒的,也就是把一句话里的字符全都逆序写,譬如“I Love This Game!”,他就偏偏要写成“!emaG sihT evoL I” ...

  7. sql server 支持中文繁体和简体

    SET ANSI_PADDING ON  INSERT INTO 表 VALUES (N'中文')

  8. 关于bitset

    https://www.zybuluo.com/ysner/note/1327705 原理 \(bitset\)的原理是将一大堆值为\(0/1\)的数压成一个数. 操作 通过\(i>>x\ ...

  9. saltstack源码-启动1

    决定看salt的源码了.干脆就从最基本的看起来,先看它的启动过程开始第一步用/etc/init.d/salt-master start 启动找到那个文件,发现有3种启动方式,suse,debian,c ...

  10. RobotFrameWork--selenium2模拟chrome的user agent

    ${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver ${opt ...