<jvm-options>-Duser.language=en</jvm-options>
<jvm-options>-Duser.region=US</jvm-options>
<jvm-options>-Duser.country=US</jvm-options>
-Duser.language=en -Duser.region=US
Archive for the ‘Uncategorized’ Category
locale
July 28, 2010windows server 2003 resource kit tools
July 28, 2010tr unicode
July 28, 2010
\u0130 = İ
\u0131 = ı
\u015E = Ş
\u015F = ş
\u00E7 = ç
\u00C7 = Ç
\u00FC = ü
\u00DC = Ü
\u00F6 = ö
\u00D6 = Ö
\u011F = ğ
\u011E = Ğ
Jar Finder
July 28, 2010package jarFinder;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.Enumeration;
import java.util.List;
import java.util.Locale;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public final class JarFinder {
private static final boolean doExactMatch = true;
private static final String keyname = “snmp”.toLowerCase();
private static final String folderName = “D:/DEV/jboss/common/lib”;
private static final String className = replaceDot(“org.jboss.tm.TransactionManagerLocator”);
private static String replaceDot(String in) {
return in.replaceAll(“\\.”, “/”) + “.class”;
}
private static String replaceSlash(String in) {
return in.replaceAll(“\\\\”, “/”);
}
public List<File> getFiles() {
DirectoryScanner ds = new DirectoryScanner(new File(folderName));
ds.addFilter(new FileFilter() {
public boolean accept(File pathname) {
return (pathname.isDirectory() || pathname.getName().endsWith(“.jar”) || pathname
.getName().endsWith(“.zip”));
}
});
List<File> files = ds.scan();
System.out.println(“Accepted file count :” + files.size());
return files;
}
public static void main1(String[] args) {
JarFinder jf = new JarFinder();
List<File> files = jf.getFiles();
String prefix = “<classpathentry kind=\”lib\” path=\””;
String suffix = “\”/>”;
for (File f : files) {
System.out.println(prefix + replaceSlash(f.getAbsolutePath()) + suffix);
}
}
public static void main(String[] args) throws IOException {
JarFinder jf = new JarFinder();
List<File> files = jf.getFiles();
JarFile jarFile = null;
int hitCount = 0;
if (doExactMatch) {
System.out.println(“Looking for : ” + className);
for (File f : files) {
jarFile = new JarFile(f);
if (jarFile.getEntry(className) != null) {
System.out.println(f.getAbsoluteFile());
hitCount++;
}
}
} else {
System.out.println(“Looking for pattern : ” + keyname);
for (File f : files) {
jarFile = new JarFile(f);
Enumeration<JarEntry> iter = jarFile.entries();
while (iter.hasMoreElements()) {
JarEntry entry = iter.nextElement();
String name = entry.getName();
if (name.toLowerCase(Locale.ENGLISH).indexOf(keyname) > 0) {
System.out.println(f.getAbsoluteFile() + ” -> ” + name);
hitCount++;
}
}
}
}
System.out.println(“Hit count : ” + hitCount);
}
}
It is possible to move Oracle index to another tablespace.
January 29, 2007It is possible to move oracle index like tables.
alter table tab move tablespace blabla;
alter index tab_index rebuild tablespace blala;
How to find readable time difference bettween Oracle date types?
January 29, 2007It is not crucial, but it is cool. This way you can find time date/time difference nicely.
SELECT
lpad(EXTRACT(HOUR FROM(dend_date – dstart_date) DAY TO SECOND),2,’0′) || ‘ hour ‘ ||
lpad(EXTRACT(MINUTE FROM(dend_date – dstart_date) DAY TO SECOND),2,’0’) || ‘ minute ‘ ||
lpad(EXTRACT(SECOND FROM(dend_date – dstart_date) DAY TO SECOND),2,’0’) || ‘ second ‘ “Interval”
FROM process_log
order by dstart_date desc;
ref::Oracle® Database SQL Reference
10g Release 2 (10.2)
B14200-02
CMD.exe pre-configuration
January 5, 2007It is well known that Oracle-sql*plus can be configured with a login.sql file preferably placed under same directory of sql*plus. But what about cmd.exe on Windows.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
if you edit AutoRun key with a file address (i prefer-> c:\initial.bat), cmd.exe executes that file firstly. this way you can configure your regular work automatically.