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. Oracle 模糊查询方法

           在这个信息量剧增的时代,怎样帮助用户从海量数据中检索到想要的数据.模糊查询是不可缺少的. 那么在Oracle中模糊查询是怎样实现的呢?   一.我们能够在where子句中使用likeke ...

  2. QC ALM 11创建域、项目和用户

    一旦HP-ALM安装,我们仅仅能继续创建域.项目和用户使用后的ALM工作.以下是步骤来创建项目.域和用户.       一.创建域 1.对于创建域,第一步是进入站点管理员页面.开展QC使用URL - ...

  3. java读取Excel表格中的数据

    1.需求 用java代码读取hello.xls表格中的数据 2.hello.xls表格 3.java代码 package com.test; import java.io.File; import j ...

  4. PHP出现Warning: A non-numeric value encountered问题的原因及解决方法

    本文介绍php出现Warning: A non-numeric value encountered问题,用实例分析出现这种错误的原因,并提供避免及解决问题的方法. <?php error_rep ...

  5. 前台传JSON到后台

    现在,有一个需求,我需要将表格中选中行的数据中的一部分传直接传到控制器中,然后保存到另外一张表中.一开始,我就想到在前台使用ajax构造json数据,然后控制器直接通过list接收. 选中界面中的行, ...

  6. java8--集合(疯狂java讲义3复习笔记)

    1.集合分四类:set,map,list,queue 位于java.util包下. 集合类和数组的区别,数组可以保存基本类型的值或者是对象的引用,而集合里只能保存对象的引用. 集合类主要由两个接口派生 ...

  7. C++的cout高阶格式化操作

    这篇文章主要讲解如何在C++中使用cout进行高级的格式化输出操作,包括数字的各种计数法(精度)输出,左或右对齐,大小写等等.通过本文,您可以完全脱离scanf/printf,仅使用cout来完成一切 ...

  8. 动态追踪技术 Dynamic Tracing

    https://openresty.org/posts/dynamic-tracing/ 工欲性能调优,必先利其器(2)- 火焰图| PingCAP https://pingcap.com/blog- ...

  9. XMU 1613 刘备闯三国之三顾茅庐(一) 【并查集】

    1613: 刘备闯三国之三顾茅庐(一) Time Limit: 1000 MS  Memory Limit: 128 MBSubmit: 99  Solved: 29[Submit][Status][ ...

  10. mongodb05---游标

    游标cursor: 通俗的说,游标不是查询结果,而是查询的返回资源,或者接口. 通过这个接口,你可以逐条读取.就像php中的fopen打开文件,得到一个资源一样, 通过资源,可以一行一行的读文件. v ...