生成myeclipse注册码的java程序代码
今晚在逛CSDN的时候发现了,有人用java写了生成myeclipse注册码的代码,所以就抄录了下来。 o(∩_∩)o 哈哈
package gggg;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MyEclipseGen {
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;
相关文档:
NVelocity是Java模板引擎Velocity的.Net版本。NVelocity目前官方版本为0.42。官方地址:http://nvelocity.sourceforge.net/,原作者已经申明不再对NVelocity做技术支持了,所以sourceforge上NVelocity版本一直是0.42不再有更新了。不过目前NVelocity已经有1.0的版本了,是由castleproject项目维护的。NVelocity.dll能在cast ......
package com;
import java.util.*;
public class WhatDay {
public static void main(String[] args) {
Calendar c = Calendar.getInstance();
c.setTime(new Date(System.currentTimeMillis()));
int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);
switch (dayOfWeek) {
ca ......
从本系列前面的文章中,您了解到反射的性能比直接访问要慢许多倍,并了解了用 Javassist 和 Apache
Byte Code Engineering Library (BCEL)进行classworking。Java 顾问 Dennis
Sosnoski 通过演示如何使用运行时 classworking,来用全速前进的生成代码取代反射代码,从而结束他的 Java 编程的动态性
系列。
既然您已经 ......
在JDK1.5之前,对高质量Java多线程并发程序设计时,为防止程序崩掉等现象的出现,比如使用wait()、notify()和synchronized等,需要考虑性能、死锁、公平性、资源管理以及如何避免线程安全性方面带来的危害等诸多因素,通常会采用一些较为复杂的安全策略,加重了程序员的开发负担。在J ......