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
let result = test parserStream video | |
let moov = List.find(function | MOOV(x) -> true | _ -> false) result | |
let sttsElements = | |
match moov with | |
| MOOV(l) -> | |
List.filter (function | TRAK(_) -> true | _ -> false) l | |
|> List.map (function | TRAK(l) -> l) | |
|> List.collect id |
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
module x | |
let list = [-1;0;1;2;3;4;5;6;7;8;9] |> List.toArray | |
let target = [1;2;3] |> List.toArray | |
let nope = [4;1;2] |> List.toArray | |
/// <summary> | |
/// Sequenes are basically IEnumerable, so you can't do structural equality on them | |
/// this is why they are converted to an F# list before doing comparison, otherwise | |
/// their references are compared |
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 StreamUtil<T>{ | |
public static <T> Stream<T> ofIterable(Iterable<T> iter){ | |
Iterator<T> iterator = iter.iterator(); | |
Stream.Builder<T> builder = Stream.builder(); | |
while(iterator.hasNext()){ | |
builder.add(iterator.next()); | |
} |
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
open System | |
type Percent = double | |
type Money = double | |
type Nth = int | |
type ProductType = | |
| Apple | |
| Orange | |
| Poo |
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
module Foo where | |
import Control.Monad | |
import Common.Utils | |
import Data.List | |
import Data.Maybe | |
newtype Price = Price { getPrice :: Float } deriving (Show, Eq) | |
data Buyable = Meat | Fruit deriving (Show, Eq) |
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
> z;; | |
val it : int [] * int = ([|1|], 1) | |
> p;; | |
val it : int [] * int = ([|1|], 1) | |
> z.Equals(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
#compdef test | |
local arguments | |
_branch(){ | |
val=() | |
git branch | grep -v "\*" | while read -r branch ; do | |
val=($val $branch) | |
done |
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
" nerdtree mapping | |
map <F3> :NERDTreeToggle<CR> | |
" enabled mouse | |
set mouse=a | |
" enable osx clipboard | |
set clipboard=unnamed |
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
#!/usr/bin/env bash | |
ENVIRONMENT=develop | |
MACHINE=$1 | |
shift | |
function print_help(){ |
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 enum Mode { | |
Gen0, | |
Gen1 | |
} | |
//============================= | |
@Data | |
@EqualsAndHashCode(of = "id") | |
public class Node { |
OlderNewer