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. 怎样用Google APIs和Google的应用系统进行集成(8)----怎样把Google Blogger(博客)的JSON Schema转换成XML的Schema(XSD)?

    在Google RESTFul API中,Google Blogger API(Google博客API)应该和我们的生活离得近期:由于差点儿非常多人每天都在看博客,都在写博客,都听说过博客.在前面的G ...

  2. 一个IM开源项目LiteTalk

    http://blog.csdn.net/visualwind/article/details/6086631 http://blog.sina.com.cn/s/blog_54b5ea250101n ...

  3. 欧莱雅浅谈OC中方法调用的顺序中的Category

    OC特有的分类Category,依赖于类.它可以在不改变原来的类内容的基础上,为类增加一些方法.分类的使用注意: (1)分类只能增加方法,不能增加成员变量: (2)在分类方法的实现中可以访问原来类中的 ...

  4. HDU1160 FatMouse's Speed —— DP

    题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1160 FatMouse's Speed Time Limit: 2000/1000 MS ...

  5. div+css布局教程系列1

    <!doctype html><html><head><meta charset="utf-8"><title>简单布局 ...

  6. UltraEdit mac破解版

    2018-01-17 增加18.00.0.19破解 去官网下载原载,先运行一次,再在终端里执行下面代码就可以破解完成! printf '\x31\xC0\xFF\xC0\xC3\x90' | dd s ...

  7. 软件开发-MSF方法(《构建之法》读书笔记2)

    MSF-微软解决方案框架,是一套大型系统开发指南,它描述了如何用组队模型.过程模型和应用模型来开发Client/Server结构的应用程序,是在微软的工具和技术的基础上建立并开发分布式企业系统应用的参 ...

  8. 六.OC基础--1. id和instancetype类型,2.动态类型检测,3.响应方法,构造方法,4.重写构造方法,5.自定义构造方法

    1. id和instancetype类型, id和instancetype类型区别: 1. id和instancetype都可以用来作为方法的返回值 2. id可以用来定义类型,instancetyp ...

  9. Servlet启动运行顺序

    1.web项目执行属性 启动web项目后,web容器首先回去找web.xml文件,读取这个文件. 容器会创建一个 ServletContext ( servlet 上下文),整个 web 项目的所有部 ...

  10. [Usaco2009 Dec] 过路费

    [题目链接] https://www.luogu.org/problemnew/show/P2966 [算法] SPFA最短路 时间复杂度 : O(N ^ 2) [代码] #include<bi ...