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
/* | |
Math-Mech 2012-171 | |
Semin A | |
Tail | |
*/ | |
#include <stdio.h> | |
#include <malloc.h> | |
#include "logList.h" | |
#include <stdlib.h> |
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
/* | |
Math-Mech 2012-171 | |
Semin A | |
Tail | |
*/ | |
#include <stdio.h> | |
#include <malloc.h> | |
#include "logList.h" | |
#include <stdlib.h> |
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 Control.Concurrent.STM | |
import Control.Concurrent.STM.TSkipList -- cabal install tskiplist | |
import Prelude hiding(minimum, maximum) | |
main :: IO () | |
main = do | |
pq <- atomically $ new | |
atomically $ insert 8 80 pq -- insert the only item | |
atomically $ delete 8 pq -- remove it from skip list | |
(_, v) <- atomically $ minimum pq -- must be an error!!! | |
print v -- prints 80 |
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
name: stm-data-test | |
version: 0.1.0.0 | |
build-type: Simple | |
cabal-version: >=1.10 | |
executable stm-data-test | |
main-is: Main.hs | |
build-depends: base >=4.8 && <4.9, stm >=2.4 && <2.5, stm-data-collection == 0.1.0.0 | |
default-language: Haskell2010 |
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 Control.Monad ( forM_ ) | |
import Control.Concurrent.STM | |
import qualified Data.STM.Bag as Bag | |
import qualified Data.STM.PriorityQueue as PQ | |
pqTest :: IO () | |
pqTest = do | |
putStrLn "Start priority queue test" | |
pq <- atomically $ (PQ.new :: STM (PQ.Impl Int Int)) |
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
#!/bin/sh | |
dir=stm-data-collection-test | |
libdir=stm-data-collection | |
testdir=stm-data-test | |
cd /tmp | |
mkdir $dir | |
cd $dir |
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
javascript: | |
(function () { | |
const oldSearch = window.location.search; | |
let newSearch = | |
oldSearch.replace(/&?utm_[^=]*?=[^&]*?(?:&|$)/ig, ""); | |
if (newSearch === "?") { | |
newSearch = ""; | |
} | |
window.location.href = | |
window.location.protocol + "//" + |
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
val myStaks = object : StaksParser<List<Triple<String, String, String>>() { | |
val a = tagText("a") | |
val b = tagText("b") | |
val c = tagText("c") | |
val lst = list("el") { Triple(a(), b(), c()) } // list function now accepts the lamda that does the parsing directly | |
} | |
val lst = myStaks.lst(inp) |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Blank</title> | |
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAAAAAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAsC8qAP+EAACzh1cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAACAAAAAAAAACAAAAAAAAEiAAAAADAAAiAAAAAAMzAiAAAAAAAAMzAAAAAAAAAiMzMAAAAAAAADAzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA" rel="icon" type="image/x-icon" /> |
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
/* Obsdian styles */ | |
/* Tested on v0.14.2 */ | |
/* | |
Partially based on: | |
- https://github.com/Dmitriy-Shulha/obsidian-css-snippets | |
*/ | |
/* tags */ | |
/* ---- */ |
OlderNewer