This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
class Main { | |
static void main(String... args) { | |
println JulianDateToJavaDate(121110) | |
} | |
public static Date JulianDateToJavaDate(Integer julianDate) { | |
Date date = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT A.JCJOBNBR,A.JCPROCESSID,TRIM( A.JCEXEHOST), B.JCPID, B.JCVERS, A.JCJOBQUE, A.JCJOBPTY, A.JCJOBSTS, A.JCENHV, A.JCUSER, A.JCJOBTYPE, A.JCSBMDATE, A.JCACTDATE, | |
--Convert JDE Submit Time hhmmss to hh:mm:ss | |
concat(concat(concat(concat( SUBSTR ((RIGHT (REPEAT ('0',6) || A.JCSBMTIME,6)),1,2),':'), SUBSTR ((RIGHT (REPEAT ('0',6) || A.JCSBMTIME,6)),3,2)),':'), SUBSTR ((RIGHT (REPEAT ('0',6) || A.JCSBMTIME,6)),5,2)) as SubTime,/*concat ss*/ | |
--Convert IBM Start Time TimeStamp to hh:mm:ss and adjust for utc | |
case when(INTEGER(SUBSTR ((RIGHT (REPEAT ('0',6) || Replace(SUBSTR (B.JCSTDTIM,12,8),'.',''),6)),1,2))>=6) | |
then concat(concat(concat(concat( INTEGER(SUBSTR ((RIGHT (REPEAT ('0',6) || Replace(SUBSTR (B.JCSTDTIM,12,8),'.',''),6)),1,2)-6),':'), SUBSTR ((RIGHT (REPEAT ('0',6) || Replace(SUBSTR (B.JCSTDTIM,12,8),'.',''),6)),3,2)),':'), SUBSTR ((RIGHT (REPEAT ('0',6) || Replace(SUBSTR (B.JCSTDTIM,12,8),'.',''),6)),5,2)) | |
else concat(concat(concat(concat( INTEGER(SUBSTR ((RIGHT (REPEAT ('0',6) || Replace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; | |
public class dateexample { | |
public static void main(String[] args) { | |
System.out.println(getdate()); | |
System.out.println(getdate(0)); | |
System.out.println(getdate(1)); | |
System.out.println(getdate(-1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ds; | |
public class BasicBinaryTree<X extends Comparable<X>> { | |
private Node root; | |
private int size; | |
public BasicBinaryTree() { | |
this.root = null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h2>The % Operator</h2> | |
<p id="demo"></p> | |
<p id="demo1"></p> | |
<p id="demo2"></p> | |
<p id="demo3"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BasicStack<X> { | |
private X[] data; | |
private int stackPointer; | |
public BasicStack() { | |
data = (X[]) new Object[1000]; | |
stackPointer = 0; | |
} | |
public void push(X newItem) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = "C:\example" | |
$out = "C:\exampleout.txt" | |
Get-ChildItem $path -Filter *.sql| % { | |
$file = $_.Name | |
" " | Out-File -Append $out | |
"-----------------------------------" | Out-File -Append $out | |
"--${file}:" | Out-File -Append $out | |
" " | Out-File -Append $out | |
Get-Content $_.FullName | % { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The parameter weekday is true if it is a weekday, and the parameter vacation is true if we are on vacation. We sleep in if it is not a weekday or we're on vacation. Return true if we sleep in. | |
public boolean sleepIn(boolean weekday, boolean vacation) { | |
return !weekday||vacation ? true: false; | |
} | |
//Given an int n, return the absolute difference between n and 21, except return double the absolute difference if n is over 21. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dirName = "<directory path>" | |
Write-Host Exporting solutions to $dirName | |
foreach ($solution in Get-SPSolution) | |
{ | |
$id = $Solution.SolutionID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
/*Tday Value as it appears in db*/ | |
lmtday as tday, | |
' 24 HR Format hh:mm:ss ' as format1, | |
/*24 Hour Time Format*/ | |
/*get Hours*/ | |
SUBSTR ((RIGHT (REPEAT ('0',6) || lmtday,6)),1,2) as HH24, | |
/*get Minutes*/ | |
SUBSTR ((RIGHT (REPEAT ('0',6) || lmtday,6)),3,2) as MM24, | |
/*get Seconds*/ |
NewerOlder