Skip to content

Instantly share code, notes, and snippets.

View pscollins's full-sized avatar

Patrick Collins pscollins

View GitHub Profile
(23): {
[ 83500000, 100,
85000000, 10,
90000000, 100,
115200000, 5,
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
@pscollins
pscollins / HDF5CompoundVerifier.java
Last active August 29, 2015 14:04
getting at T.class?
public class HDF5CompoundVerifier<T> {
private final IHDF5Reader expectedReader;
private final IHDF5Reader actualReader;
private final boolean READ_LINK_TARGETS = false;
private final HDF5CompoundDSBridgeBuilder<T> expectedBridgeBuilder;
private final HDF5CompoundDSBridgeBuilder<T> actualBridgeBuilder;
private final String ROOT;
public HDF5CompoundVerifier(IHDF5Writer expectedWriter, IHDF5Writer actualWriter, Class<T> typeForBridge, String root) {
actualBridgeBuilder = new HDF5CompoundDSBridgeBuilder<>(actualWriter);
\local{
\newcommand\recel{\nonterm{recaccess}}
}{
Let
\[
\ntHash\ntPosInt (\ntSExp) := \recel
\]
in the definitions that follow.
\local{
@Before
public void setUp() throws Exception {
File file = new File(TEST_PATH);
IHDF5Writer writer = HDF5Writer.getDefaultWriter(file);
HDF5CompoundDSBridgeFactory intBuilder = new HDF5CompoundDSBridgeFactory(writer);
intBuilder.setChunkSize(5);
intBuilder.setStartSize(10);
intBuilder.setTypeFromInferred(Integer.class);
intBridge = intBuilder.build(TEST_DS);
public class HDF5CompoundDSBridgeFactory {
private HDF5CompoundType type;
private IHDF5CompoundWriter writer;
private long startSize;
private int chunkSize;
public HDF5CompoundType getType() {
return type;
}
signature WRAPPABLE = sig
datatype node' = A
end
structure CReturnTyToWrap = struct
datatype node' = A
end
functor WrapStruct(S : WRAPPABLE) = struct
while (inputScanner.hasNext()) {
Scanner currentLine = Scanner(inputScanner.nextLine());
while(currentLine.hasNextInt()){
Integer current = currentLine.nextInt();
}
}
import java.util.Scanner;
import java.util.ArrayList;
class StarMatrix {
ArrayList<ArrayList<Boolean>> stars;
public StarMatrix (Scanner inputScanner) {
stars = new ArrayList<ArrayList<Boolean>>();
String currentLine;
datatype ('a, 'b) t2
= E2
| Nd2 of 'a * ('a, 'b) t3 * ('a, 'b) t3
and ('a, 'b) t3
= E3
| Nd3 of 'b * ('a, 'b) t2 * ('a, 'b) t2 * ('a, 'b) t2
(* Collect all the items from a t2/t3 tree into a
(* In util.pml: *)
structure PArrayPair = struct
type ('a, 'b) t = ('a * 'b) parray
fun fromPairPArray (xs : ('a * 'b) parray) : ('a, 'b) t =
xs
...
end