Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- object: XYZ,
- ts : new Date()
- }
- db.data.find({object : XYZ, ts : {$gt : t1, $lt : t2}})
- // first
- db.data.find({object : XYZ, ts : {$gt : new Date(/* start of day */)}}).sort({ts : 1}).limit(1)
- // last
- db.data.find({object : XYZ, ts : {$lt : new Date(/* end of day */)}}).sort({ts : -1}).limit(1)
- db.data.find({ts : timestamp})
- // Parse a n delimited file into RAM then
- // then split each line on space to into a
- // array of tokens. Return the entire array
- // as string[][]
- let readSpaceDelimFile fname =
- System.IO.File.ReadAllLines(fname)
- |> Array.map (fun line -> line.Split [|' '|])
- // Based on a two dimensional array
- // pull out a single column for bar
- // close and convert every value
- // for every row to a float
- // and return the array of floats.
- let GetArrClose(tarr : string[][]) =
- [| for aLine in tarr do
- //printfn "aLine=%A" aLine
- let closep = float(aLine.[5])
- yield closep
- |]
Add Comment
Please, Sign In to add comment