Friday, 2 December 2011
Open Command Prompt here
1.Press WIN +E, Navigate to folder then Press ALT + D to select address bar and type cmd the enter.
2.In windows explore SHIFT + mouse right click , choose "open command window here" in context menu
http://lifehacker.com/5306401/open-a-new-command-prompt-from-explorer-with-a-hotkey?utm_expid=66866090-68.hhyw_lmCRuCTCg0I2RHHtw.0
Thursday, 15 September 2011
Java File path difference between getPath(), getAbsolutePath(), and getCanonicalPath()
https://docs.oracle.com/javase/1.5.0/docs/api/java/io/File.html
public class FilePathTest { public static void main(String[] args) { try { File f = new File("test.xml"); System.out.println("----------File set to :test.xml----------"); System.out.println("getAbsolutePath:" + f.getAbsolutePath()); System.out.println("getCanonicalPath:" + f.getCanonicalPath()); System.out.println("getName:" + f.getName()); System.out.println("getPath:" + f.getPath()); System.out.println("getParent:" + f.getParent()); System.out.println("getParentFile:" + f.getParentFile()); if (f.getParentFile() != null) { System.out.println("getParentFile().getAbsolutePath():" + f.getParentFile().getAbsolutePath()); System.out.println("getParentFile().getCanonicalPath():" + f.getParentFile().getCanonicalPath()); } f = new File("D:\\eclipse-ws\\20130307_WEB\\TestJava\\test.xml"); System.out.println("\n" + "----------File set to :D:\\eclipse-ws\\20130307_WEB\\TestJava\\test.xml----------"); System.out.println("getAbsolutePath:" + f.getAbsolutePath()); System.out.println("getCanonicalPath:" + f.getCanonicalPath()); System.out.println("getName:" + f.getName()); System.out.println("getPath:" + f.getPath()); System.out.println("getParent:" + f.getParent()); if (f.getParentFile() != null) { System.out.println("getParentFile().getAbsolutePath():" + f.getParentFile().getAbsolutePath()); System.out.println("getParentFile().getCanonicalPath():" + f.getParentFile().getCanonicalPath()); System.out.println("getParentFile().getName():" + f.getParentFile().getName()); System.out.println("getParentFile().getPath():" + f.getParentFile().getPath()); System.out.println("getParentFile().getParent():" + f.getParentFile().getParent()); } f = new File("test\\..\\.\\test.xml"); System.out.println("\n" + "----------File set to :test\\..\\.\\test.xml----------"); System.out.println("getAbsolutePath:" + f.getAbsolutePath()); System.out.println("getCanonicalPath:" + f.getCanonicalPath()); System.out.println("getName:" + f.getName()); System.out.println("getPath:" + f.getPath()); System.out.println("getParent:" + f.getParent()); if (f.getParentFile() != null) { System.out.println("getParentFile().getAbsolutePath():" + f.getParentFile().getAbsolutePath()); System.out.println("getParentFile().getCanonicalPath():" + f.getParentFile().getCanonicalPath()); System.out.println("getParentFile().getName():" + f.getParentFile().getName()); System.out.println("getParentFile().getPath():" + f.getParentFile().getPath()); System.out.println("getParentFile().getParent():" + f.getParentFile().getParent()); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
-------------------OUTPUT------------------------------------ ----------File set to :test.xml---------- getAbsolutePath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getCanonicalPath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getName:test.xml getPath:test.xml getParent:null getParentFile:null ----------File set to :D:\eclipse-ws\20130307_WEB\TestJava\test.xml---------- getAbsolutePath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getCanonicalPath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getName:test.xml getPath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getParent:D:\eclipse-ws\20130307_WEB\TestJava getParentFile().getAbsolutePath():D:\eclipse-ws\20130307_WEB\TestJava getParentFile().getCanonicalPath():D:\eclipse-ws\20130307_WEB\TestJava getParentFile().getName():TestJava getParentFile().getPath():D:\eclipse-ws\20130307_WEB\TestJava getParentFile().getParent():D:\eclipse-ws\20130307_WEB ----------File set to :test\..\.\test.xml---------- getAbsolutePath:D:\eclipse-ws\20130307_WEB\TestJava\test\..\.\test.xml getCanonicalPath:D:\eclipse-ws\20130307_WEB\TestJava\test.xml getName:test.xml getPath:test\..\.\test.xml getParent:test\..\. getParentFile().getAbsolutePath():D:\eclipse-ws\20130307_WEB\TestJava\test\..\. getParentFile().getCanonicalPath():D:\eclipse-ws\20130307_WEB\TestJava getParentFile().getName():. getParentFile().getPath():test\..\. getParentFile().getParent():test\..
- getPath() :will return the absolute or relative path of the File object, depending on which it was constructed with.
- getAbsolutePath(): will return the current directory name concatenated with the file separator character and the path name of the file
- getCanonicalPath(): will return a path name with the relative references resolved.
Monday, 4 July 2011
Oracle Export : Using QUERY parameter in expdp/impdp
Oracle Export : Using QUERY parameter in expdp/impdp
expdp test/test directory=test_dir dumpfile=test.dmp query=emp:\"where salary\>10000\ order by salary" tables=emp
Easy a would be pass the query parameter through a file.
http://wiki.oracle.com/page/Oracle+export+and+import+
http://www.orafaq.com/wiki/Import_Export_FAQ
To verify user privileges:
select * from dba_sys_privs;
select * from dba_role_privs;
select * from dba_tab_privs;
select * from user_sys_privs;
select * from user_role_privs;
select * from user_tab_privs;
select * from all_sys_privs;
select * from all_role_privs;
select * from all_tab_privs;
select * from role_sys_privs;
select * from role_role_privs;
select * from role_tab_privs;
expdp test/test directory=test_dir dumpfile=test.dmp query=emp:\"where salary\>10000\ order by salary" tables=emp
Easy a would be pass the query parameter through a file.
exp test@testdb tables=test_export parfile=test_query.par
Inside of test_query.par, it contains only one parameter query:
Query=”where salary >10000 order by salary"
http://wiki.oracle.com/page/Oracle+export+and+import+
http://www.orafaq.com/wiki/Import_Export_FAQ
To verify user privileges:
select * from dba_sys_privs;
select * from dba_role_privs;
select * from dba_tab_privs;
select * from user_sys_privs;
select * from user_role_privs;
select * from user_tab_privs;
select * from all_sys_privs;
select * from all_role_privs;
select * from all_tab_privs;
select * from role_sys_privs;
select * from role_role_privs;
select * from role_tab_privs;
Tuesday, 29 March 2011
Friday, 4 March 2011
Create Mule Project with Maven
Create Mule Project with Maven
mvn org.mule.tools:mule-project-archetype:create -DartifactId=message-enricher-1 -DmuleVersion=3.1.1
or
Add "org.mule.tools" to setting.xml as pluginGroup and run following command
mvn mule-project-archetype:create -DartifactId=CES-DataX -DmuleVersion=3.1.0
mvn org.mule.tools:mule-project-archetype:create -DartifactId=message-enricher-1 -DmuleVersion=3.1.1
or
Add "
mvn mule-project-archetype:create -DartifactId=CES-DataX -DmuleVersion=3.1.0
Subscribe to:
Posts (Atom)