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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/themes/smoothness/jquery-ui.css" /> | |
| <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.0/jquery-ui.min.js"></script> | |
| <script> | |
| $(document).ready(function() | |
| { | |
| var root_pieces = 2; |
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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <body> | |
| <style> | |
| .link { | |
| stroke: #666; | |
| opacity: 0.6; | |
| stroke-width: 1.5px; | |
| } | |
| .node circle { |
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
| ```{r} | |
| # group source lines into complete expressions (using a brutal-force method) | |
| group_src_V8 = function(code, context) { | |
| if ((n <- length(code)) < 1) return(list(code)) | |
| i = i1 = i2 = 1 | |
| x = list() | |
| while (i2 <= n) { | |
| piece = code[i1:i2] | |
| if (eval(parse(text=sprintf("%s$validate(piece)", context))) && eval(parse(text=sprintf('%s$eval(piece)!="undefined"', context)))) { | |
| x[[i]] = piece; i = i + 1 |
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
| ```{r} | |
| # group source lines into complete expressions (using a brutal-force method) | |
| group_src_V8 = function(code, context) { | |
| if ((n <- length(code)) < 1) return(list(code)) | |
| i = i1 = i2 = 1 | |
| x = list() | |
| while (i2 <= n) { | |
| piece = code[i1:i2] | |
| if (eval(parse(text=sprintf("%s$validate(piece)", context))) && eval(parse(text=sprintf('%s$eval(piece)!="undefined"', context)))) { | |
| x[[i]] = piece; i = i + 1 |
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
| ```{r} | |
| library(knitr) | |
| knit_engines$set(V8 = runr:::V8engine) | |
| ``` | |
| By default the Javascript context is a R variable named `.context`. You can set another name by doing `opts_chunk$set(V8.context=mycontext)`. For instance: | |
| ```{r} | |
| library(V8) | |
| ct <- new_context() |
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
| {-# LANGUAGE OverloadedStrings #-} | |
| import Data.Text.ICU.Replace | |
| import qualified Data.Text.IO as T | |
| import qualified Data.Text as T | |
| import Options.Applicative | |
| import Data.Monoid ((<>)) | |
| bracketify :: FilePath -> IO() | |
| bracketify file = do | |
| string <- readFile 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
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
| <script src="libraries/PapaParse-4.1.2/papaparse.min.js"></script> | |
| <script src="libraries/xlsx/xlsx-0.8.0.core.min.js"></script> | |
| <script src="libraries/bootstrap/js/bootstrap-4.0.0.min.js"></script> | |
| <link rel="stylesheet" href="libraries/bootstrap/css/bootstrap-4.0.0.min.css"> | |
| <script src="libraries/bootstrap.file-input.js"></script> |
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
| !!! | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1"> | |
| <title>Regression | |
| <body> | |
| <div #wrapper> | |
| $# Sidebar | |
| <div #sidebar-wrapper> | |
| <div .container> |
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
| <!DOCTYPE html> | |
| <html> | |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
| <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> | |
| <script src="modules/ng-flow-standalone.min.js"></script> | |
| <script src="libraries/PapaParse-4.1.2/papaparse.min.js"></script> | |
| <style> | |
| select option:empty {display:none} |
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
| {-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell, OverloadedStrings #-} | |
| {-# LANGUAGE GADTs, MultiParamTypeClasses, TypeSynonymInstances #-} | |
| import Data.Text (Text) | |
| import Data.ByteString (ByteString) | |
| import Database.Persist.Sqlite | |
| import Control.Monad.Logger (runStderrLoggingT) | |
| import Yesod | |
| import Yesod.Auth |