安装oracle 10g后,oracle自带的jre会影响eclipse启动
我安装的eclipse是最新版,需要jdk1.5及以上才能运行。oracle安装后会修改环境变量PATH,把它自己相关的几个目录加在最前面。
我安装的eclipse是最新版,需要jdk1.5及以上才能运行。oracle安装后会修改环境变量PATH,把它自己相关的几个目录加在最前面。
为了方便文档的管理,最近装了Atlassian的Confluence,虽说是开源项目,但是仍需购买License才能长久使用,好奇心起,在网上搜索了一下破解之法,发现大多写得模棱两可,害人不浅,最后几经折腾终于破解成功。为了给后来人提供一点儿方便,发扬互联网共享之精神,决定整理一下,破解过程如下:
1) 首先在官方网站上下载并安装了JIRA和confluence:
atlassian-jira-enterprise-3.6.5-standalone.tar.gz
confluence-2.2.10.tar.gz
2) 启动后,可以看到页面下面有一条醒目的红色提醒,说明是Evaluation版本,用admin登录在License Details页面输入官方提供的试用版的License number(可在网站上得到),此时可以正常使用了。
3) 解压confluence-2.2.10.tar.gz包,反编译下列几个文件:
confluence-2.2.10\confluence\WEB-INF\classes\com\atlassian\confluence\upgrade\impl\DefaultUpgradeManager.class(c1)
confluence-2.2.10\confluence\WEB-INF\lib\atlassian-extras-0.7.20.jar(j1)中的:
atlassian-extras-0.7.20\com\atlassian\license\DefaultLicense.class(c2)
atlassian-extras-0.7.20\com\atlassian\license\LicenseManager.class(c3)
atlassian-extras-0.7.20\com\atlassian\license\LicenseUtils.class(c4)
4) 分别得到的四个Java文件,修改其中与Expire、License等有关的方法,然后再编译得到相应的class,分别替换原来的class,然后将(c1)和(j1)拷贝到安装目录的相应位置下(替换之前最好原文件先备份)。
5) 重启服务,红色提醒不见了,登陆进去,可看到License Details页面信息更新如下:
| Organisation | KFC |
| Date Purchased | Feb 10, 3906 |
| License Type | Confluence: Commercial Server |
| Licensed Users | Unlimited |
| Support Period | Your commercial Confluence support and updates are available until Oct 10, 3911. |
| License ID | (Atlassian sales or support may ask you to provide this ID) |
| License Partner | Cocacola |
附: 上述反编译的几个文件修改之处如下(只陈列了修改的部分):
(c1):
public boolean isUpgradeAllowed()
{
return true;
}
(c2):
public boolean isExpired()
{
return false;
}
public Date getExpiryDate()
{
return null;
}
(c3):
private static final Category log = Category.getInstance("com/atlassian/license/LicenseManager");
public boolean hasValidLicense(String licenseKey)
{
return true;
}
public License getLicense(String applicationName)
{
Date dateCreated = new Date(2007, 1, 10);
Date datePurchased = new Date(2006, 1, 10);
License license = new DefaultLicense(dateCreated, datePurchased, "KFC", ConfluenceLicenseTypeStore.FULL_LICENSE, 10000, "Cocacola");
return license;
}
public License setLicense(String license, String applicationName)
{
return null;
}
public LicensePair getLicensePair(String applicationName)
{
return null;
}
(c4):
public static long getSupportPeriodEnd(License license)
{
return (new Date(2010, 9, 9)).getTime() + 0x75cd78800L;
}
public static boolean isLicenseTooOldForBuild(License license, Date buildDate)
{
return false;
}
public static boolean confirmExtendLicenseExpired(Date dateConfirmed)
{
return false;
}
public static boolean confirmExtendLicenseExpired(String dateConfirmed)
throws NumberFormatException
{
return false;
}
private static long getNewBuildWithOldLicenseExpiryDate(Date dateConfirmed)
{
return dateConfirmed.getTime() + 0x9a7ec800L;
}
public static long getNewBuildWithOldLicenseExpiryDate(String dateConfirmed)
{
return getNewBuildWithOldLicenseExpiryDate(new Date(Long.parseLong(dateConfirmed)));
}
public static long getSupportPeriodAlmostExpiredDate(License license)
{
return getSupportPeriodEnd(license) - 0xd84b1800L;
}
FROM: http://www.techonthenet.com/sql/count.php
Since the COUNT function will return the same results regardless of what NOT NULL field(s) you include as the COUNT function parameters (ie: within the brackets), you can change the syntax of the COUNT function to COUNT(1) to get better performance as the database engine will not have to fetch back the data fields.
For example, based on the example above, the following syntax would result in better performance:
SELECT department, COUNT(1) as "Number of employees"
FROM employees
WHERE salary > 25000
GROUP BY department;
Now, the COUNT function does not need to retrieve all fields from the employees table as it had to when you used the COUNT(*) syntax. It will merely retrieve the numeric value of 1 for each record that meets your criteria.
wc命令非常简单。一共有4个参数:
几点注意: