This file has been truncated, but you can view the full file.
This file contains hidden or 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
var h$currentThread = null; | |
var h$stack = null; | |
var h$sp = 0; | |
var h$initStatic = []; | |
var h$staticThunks = {}; | |
var h$staticThunksArr = []; | |
var h$regs = []; | |
var h$r1 = 0; | |
var h$r2 = 0; | |
var h$r3 = 0; |
This file contains hidden or 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
"use strict"; | |
// I would like to export a class from Purescript like below. | |
class MyObjectFromPurescript { | |
constructor(n) { | |
this.n = n | |
} | |
getN() { | |
return this.n; |
This file contains hidden or 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
var nodes = document.querySelectorAll(".js-setLabelWidth"); | |
var elementWidths = []; | |
var widths = nodes.map(function(node) { | |
var width = getComputedStyle(node)["width"]; | |
return parseInt(width, 10); | |
}); | |
var maxWidth = (widths.reduce(Math.max, 0) + 1) / 16; |
This file contains hidden or 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
myReadPixels:: Int -> Int -> Int -> Int -> IO [Pixel] | |
myReadPixels x y w h = do | |
let arraySize = w * h * 4 | |
array <- mallocForeignPtrArray arraySize :: IO (ForeignPtr Word8) | |
let pos = Position (fromIntegral x) (fromIntegral y) | |
withForeignPtr array $ \ptr -> do | |
-- fromIntegral is needed because Position and Size store GLints not Ints | |
readPixels pos | |
(Size (fromIntegral w) (fromIntegral h)) | |
(PixelData RGBA UnsignedByte ptr) |
This file contains hidden or 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
{ | |
"Bed Capacity": { | |
"Kidney Dialysis": "7", | |
"ICCU": "0", | |
"Gynecology": "0", | |
"Cardiology": "45", | |
"Hematology": "14", | |
"PICU": "4", | |
"Chemotherapy": "0", | |
"ICU": "0", |
This file contains hidden or 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
{"Bed Capacity":{"Kidney Dialysis":"0","ICCU":"0","Gynecology":"2","Cardiology":"2","Hematology":"0","PICU":"0","Chemotherapy":"0","ICU":"4","Radiotherapy":"0","Neonatal":"4","Urology":"5","Pediatric":"0","Surgery":"35","Burns":"0","Internal Medicine":"16","Nephrology":"2","Operation Rooms":"3","Ophthalmology":"0","Chest":"0","ENT":"0","Total Beds":"79","Orthopedic":"5","Maternity":"4","Psychiatric":"0","Oncology":"0","Day Care":"0","IMU":"0"},"Activity Statistics in 2007":{"Occupancy Days/ Patient":"4","Infant Mortality":"0","Discharges":"3996","Out Patient Visits":"27238","Total Mortality":"0","Admissions":"4022","Hospitalization Days":"15003","Car Accident":"0","Emergency Room Visits":"1018","C- Section":"0","Normal Delivery":"1","Work Accident":"0","Major Operations":"476","Still Birth":"0","Bed Occupancy Rate":"1","Minor Operations":"2396","Maternal Mortality":"0"},"Human Resources":{"X-Ray Technician":"3","Specialized Doctor":"10","Dentists":"0","Physiotherapiests":"3","Administrative workers":"38","Gen |
This file contains hidden or 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 Control.Applicative | |
import Control.Monad | |
import Data.Aeson | |
import Data.Maybe | |
import qualified Data.ByteString.Lazy.Char8 as LC8 | |
import qualified Data.Map as Map | |
import Network.HTTP.Conduit | |
import Text.XML.HXT.XPath.Arrows (getXPathTrees) | |
import Text.XML.HXT.Core |
This file contains hidden or 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
module Actors where | |
import Control.Concurrent.MVar | |
import Control.Concurrent (forkIO) | |
import Control.Monad (forever, replicateM) | |
type PoolQuery a b = a -> IO b | |
type PoolActor a = MVar (PoolQuery a ()) |
This file contains hidden or 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
module DB where | |
import Control.Concurrent.MVar | |
import Control.Concurrent (forkIO) | |
import Control.Monad (forever, replicateM) | |
import Database.PostgreSQL.Simple | |
type QueryFunc a = Connection -> IO a | |
type DBActor = MVar (QueryFunc ()) |
This file contains hidden or 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
""" | |
Test: | |
Given two strings, `a` and `b`. Sort the letters in `a` by the order of letters in `b`. | |
For example: | |
a = "ssttexeste" | |
b = "test" | |
result = "ttteeesssx" | |
""" | |
def a_by_b(a, b): |