Sunday, February 26, 2017
Saturday, February 25, 2017
Sample window power shell script to print using foreach loop
if($args){
foreach($i in $args){
write-host "Printing" $i
}
}
Execution:
./script1.ps1 "sachin" "ganguly" "dravid"
foreach($i in $args){
write-host "Printing" $i
}
}
Execution:
./script1.ps1 "sachin" "ganguly" "dravid"
Sample Window Power Shell Script to get win32_share object by name using command line arguments
if($args){
$name = $args
get-wmiobject win32_share -filter "name='$name'"
}
$name = $args
get-wmiobject win32_share -filter "name='$name'"
}
Friday, February 24, 2017
How to get file name without extension from a file name
String fileName = "jasmine.jpeg";
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
How to get file extension from a file name
String fileName = "jasmine.jpeg";
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
String fileNameWithoutExtension = fileName.split("\\.")[0];
String extension = fileName.split("\\.")[1];
System.out.println("File Name Without Extension: "+fileNameWithoutExtension);
System.out.println("Extension: "+extension);
Where should custom sql in Liferay go in a maven build?
It should be under src/main/resources/custom-sql/default.xml because custom-sql/default.xml will come under web-inf/classes folder of project
Subscribe to:
Posts (Atom)