From 7645dd129b0db943fcb16a8ebe5ddcb3f778769c Mon Sep 17 00:00:00 2001 From: Matt Elen Date: Thu, 11 Apr 2024 15:05:31 +1200 Subject: [PATCH 1/3] chore(3.0.0): Add copy commands, and remove unneeded files --- docs/shiki/samples/abap.sample | 21 --- docs/shiki/samples/actionscript-3.sample | 27 ---- docs/shiki/samples/ada.sample | 22 --- docs/shiki/samples/apache.sample | 39 ----- docs/shiki/samples/apex.sample | 19 --- docs/shiki/samples/apl.sample | 37 ----- docs/shiki/samples/applescript.sample | 19 --- docs/shiki/samples/ara.sample | 29 ---- docs/shiki/samples/asm.sample | 18 --- docs/shiki/samples/astro.sample | 28 ---- docs/shiki/samples/awk.sample | 25 ---- docs/shiki/samples/ballerina.sample | 32 ---- docs/shiki/samples/bash.sample | 28 ---- docs/shiki/samples/bat.sample | 21 --- docs/shiki/samples/beancount.sample | 9 -- docs/shiki/samples/berry.sample | 60 -------- docs/shiki/samples/bibtex.sample | 28 ---- docs/shiki/samples/bicep.sample | 47 ------ docs/shiki/samples/blade.sample | 47 ------ docs/shiki/samples/c.sample | 52 ------- docs/shiki/samples/cadence.sample | 19 --- docs/shiki/samples/clarity.sample | 53 ------- docs/shiki/samples/clj.sample | 14 -- docs/shiki/samples/clojure.sample | 14 -- docs/shiki/samples/cmake.sample | 36 ----- docs/shiki/samples/cobol.sample | 94 ------------ docs/shiki/samples/codeql.sample | 102 ------------- docs/shiki/samples/coffee.sample | 30 ---- docs/shiki/samples/cpp.sample | 21 --- docs/shiki/samples/crystal.sample | 43 ------ docs/shiki/samples/csharp.sample | 33 ----- docs/shiki/samples/css.sample | 46 ------ docs/shiki/samples/cue.sample | 108 -------------- docs/shiki/samples/cypher.sample | 21 --- docs/shiki/samples/d.sample | 18 --- docs/shiki/samples/dart.sample | 32 ---- docs/shiki/samples/dax.sample | 19 --- docs/shiki/samples/diff.sample | 28 ---- docs/shiki/samples/dm.sample | 77 ---------- docs/shiki/samples/docker.sample | 19 --- docs/shiki/samples/dream-maker.sample | 24 --- docs/shiki/samples/elixir.sample | 26 ---- docs/shiki/samples/elm.sample | 66 --------- docs/shiki/samples/erb.sample | 69 --------- docs/shiki/samples/erlang.sample | 50 ------- docs/shiki/samples/fish.sample | 13 -- docs/shiki/samples/fsharp.sample | 13 -- docs/shiki/samples/fsl.sample | 47 ------ docs/shiki/samples/gdresource.sample | 95 ------------ docs/shiki/samples/gdscript.sample | 57 -------- docs/shiki/samples/gdshader.sample | 97 ------------ docs/shiki/samples/gherkin.sample | 11 -- docs/shiki/samples/gjs.sample | 18 --- docs/shiki/samples/glsl.sample | 86 ----------- docs/shiki/samples/gnuplot.sample | 20 --- docs/shiki/samples/go.sample | 18 --- docs/shiki/samples/graphql.sample | 15 -- docs/shiki/samples/groovy.sample | 18 --- docs/shiki/samples/gts.sample | 7 - docs/shiki/samples/hack.sample | 23 --- docs/shiki/samples/haml.sample | 40 ----- docs/shiki/samples/handlebars.sample | 17 --- docs/shiki/samples/haskell.sample | 23 --- docs/shiki/samples/hcl.sample | 15 -- docs/shiki/samples/hjson.sample | 25 ---- docs/shiki/samples/hlsl.sample | 20 --- docs/shiki/samples/html.sample | 52 ------- docs/shiki/samples/http.sample | 18 --- docs/shiki/samples/imba.sample | 55 ------- docs/shiki/samples/ini.sample | 12 -- docs/shiki/samples/java.sample | 36 ----- docs/shiki/samples/javascript.sample | 29 ---- docs/shiki/samples/jinja-html.sample | 22 --- docs/shiki/samples/jison.sample | 61 -------- docs/shiki/samples/json.sample | 38 ----- docs/shiki/samples/json5.sample | 41 ------ docs/shiki/samples/jsonc.sample | 34 ----- docs/shiki/samples/jsonl.sample | 31 ---- docs/shiki/samples/jsonnet.sample | 33 ----- docs/shiki/samples/jssm.sample | 22 --- docs/shiki/samples/jsx.sample | 30 ---- docs/shiki/samples/julia.sample | 16 -- docs/shiki/samples/kotlin.sample | 149 ------------------- docs/shiki/samples/kusto.sample | 7 - docs/shiki/samples/latex.sample | 31 ---- docs/shiki/samples/less.sample | 31 ---- docs/shiki/samples/liquid.sample | 14 -- docs/shiki/samples/lisp.sample | 25 ---- docs/shiki/samples/logo.sample | 21 --- docs/shiki/samples/lua.sample | 18 --- docs/shiki/samples/make.sample | 26 ---- docs/shiki/samples/markdown.sample | 161 -------------------- docs/shiki/samples/marko.sample | 13 -- docs/shiki/samples/matlab.sample | 22 --- docs/shiki/samples/mdc.sample | 13 -- docs/shiki/samples/mdx.sample | 13 -- docs/shiki/samples/mermaid.sample | 23 --- docs/shiki/samples/mojo.sample | 11 -- docs/shiki/samples/narrat.sample | 92 ------------ docs/shiki/samples/nextflow.sample | 63 -------- docs/shiki/samples/nginx.sample | 72 --------- docs/shiki/samples/nim.sample | 49 ------- docs/shiki/samples/nix.sample | 44 ------ docs/shiki/samples/objective-c.sample | 13 -- docs/shiki/samples/objective-cpp.sample | 33 ----- docs/shiki/samples/ocaml.sample | 23 --- docs/shiki/samples/pascal.sample | 109 -------------- docs/shiki/samples/perl.sample | 24 --- docs/shiki/samples/php.sample | 29 ---- docs/shiki/samples/plsql.sample | 20 --- docs/shiki/samples/postcss.sample | 19 --- docs/shiki/samples/powerquery.sample | 22 --- docs/shiki/samples/powershell.sample | 22 --- docs/shiki/samples/prisma.sample | 41 ------ docs/shiki/samples/prolog.sample | 179 ----------------------- docs/shiki/samples/proto.sample | 45 ------ docs/shiki/samples/pug.sample | 18 --- docs/shiki/samples/puppet.sample | 19 --- docs/shiki/samples/purescript.sample | 81 ---------- docs/shiki/samples/python.sample | 12 -- docs/shiki/samples/r.sample | 21 --- docs/shiki/samples/raku.sample | 37 ----- docs/shiki/samples/razor.sample | 25 ---- docs/shiki/samples/reg.sample | 26 ---- docs/shiki/samples/rel.sample | 66 --------- docs/shiki/samples/riscv.sample | 30 ---- docs/shiki/samples/rst.sample | 27 ---- docs/shiki/samples/ruby.sample | 21 --- docs/shiki/samples/rust.sample | 39 ----- docs/shiki/samples/sas.sample | 17 --- docs/shiki/samples/sass.sample | 27 ---- docs/shiki/samples/scala.sample | 14 -- docs/shiki/samples/scheme.sample | 26 ---- docs/shiki/samples/scss.sample | 17 --- docs/shiki/samples/shaderlab.sample | 60 -------- docs/shiki/samples/shellscript.sample | 28 ---- docs/shiki/samples/shellsession.sample | 13 -- docs/shiki/samples/smalltalk.sample | 11 -- docs/shiki/samples/solidity.sample | 51 ------- docs/shiki/samples/sparql.sample | 8 - docs/shiki/samples/splunk.sample | 15 -- docs/shiki/samples/sql.sample | 17 --- docs/shiki/samples/ssh-config.sample | 47 ------ docs/shiki/samples/stata.sample | 30 ---- docs/shiki/samples/stylus.sample | 33 ----- docs/shiki/samples/svelte.sample | 28 ---- docs/shiki/samples/swift.sample | 20 --- docs/shiki/samples/system-verilog.sample | 30 ---- docs/shiki/samples/tasl.sample | 25 ---- docs/shiki/samples/tcl.sample | 51 ------- docs/shiki/samples/tex.sample | 29 ---- docs/shiki/samples/toml.sample | 25 ---- docs/shiki/samples/tsx.sample | 26 ---- docs/shiki/samples/turtle.sample | 16 -- docs/shiki/samples/twig.sample | 18 --- docs/shiki/samples/typescript.sample | 24 --- docs/shiki/samples/v.sample | 38 ----- docs/shiki/samples/vb.sample | 38 ----- docs/shiki/samples/verilog.sample | 30 ---- docs/shiki/samples/vhdl.sample | 43 ------ docs/shiki/samples/viml.sample | 12 -- docs/shiki/samples/vue-html.sample | 15 -- docs/shiki/samples/vue.sample | 45 ------ docs/shiki/samples/vyper.sample | 11 -- docs/shiki/samples/wasm.sample | 65 -------- docs/shiki/samples/wenyan.sample | 25 ---- docs/shiki/samples/wgsl.sample | 19 --- docs/shiki/samples/wolfram.sample | 9 -- docs/shiki/samples/xml.sample | 122 --------------- docs/shiki/samples/xsl.sample | 65 -------- docs/shiki/samples/yaml.sample | 50 ------- docs/shiki/samples/zenscript.sample | 44 ------ docs/shiki/samples/zig.sample | 26 ---- docs/shiki/samples/zsh.sample | 20 --- package-lock.json | 163 ++++++++++----------- package.json | 2 +- 176 files changed, 76 insertions(+), 6249 deletions(-) delete mode 100644 docs/shiki/samples/abap.sample delete mode 100644 docs/shiki/samples/actionscript-3.sample delete mode 100644 docs/shiki/samples/ada.sample delete mode 100644 docs/shiki/samples/apache.sample delete mode 100644 docs/shiki/samples/apex.sample delete mode 100644 docs/shiki/samples/apl.sample delete mode 100644 docs/shiki/samples/applescript.sample delete mode 100644 docs/shiki/samples/ara.sample delete mode 100644 docs/shiki/samples/asm.sample delete mode 100644 docs/shiki/samples/astro.sample delete mode 100644 docs/shiki/samples/awk.sample delete mode 100644 docs/shiki/samples/ballerina.sample delete mode 100644 docs/shiki/samples/bash.sample delete mode 100644 docs/shiki/samples/bat.sample delete mode 100644 docs/shiki/samples/beancount.sample delete mode 100644 docs/shiki/samples/berry.sample delete mode 100644 docs/shiki/samples/bibtex.sample delete mode 100644 docs/shiki/samples/bicep.sample delete mode 100644 docs/shiki/samples/blade.sample delete mode 100644 docs/shiki/samples/c.sample delete mode 100644 docs/shiki/samples/cadence.sample delete mode 100644 docs/shiki/samples/clarity.sample delete mode 100644 docs/shiki/samples/clj.sample delete mode 100644 docs/shiki/samples/clojure.sample delete mode 100644 docs/shiki/samples/cmake.sample delete mode 100644 docs/shiki/samples/cobol.sample delete mode 100644 docs/shiki/samples/codeql.sample delete mode 100644 docs/shiki/samples/coffee.sample delete mode 100644 docs/shiki/samples/cpp.sample delete mode 100644 docs/shiki/samples/crystal.sample delete mode 100644 docs/shiki/samples/csharp.sample delete mode 100644 docs/shiki/samples/css.sample delete mode 100644 docs/shiki/samples/cue.sample delete mode 100644 docs/shiki/samples/cypher.sample delete mode 100644 docs/shiki/samples/d.sample delete mode 100644 docs/shiki/samples/dart.sample delete mode 100644 docs/shiki/samples/dax.sample delete mode 100644 docs/shiki/samples/diff.sample delete mode 100644 docs/shiki/samples/dm.sample delete mode 100644 docs/shiki/samples/docker.sample delete mode 100644 docs/shiki/samples/dream-maker.sample delete mode 100644 docs/shiki/samples/elixir.sample delete mode 100644 docs/shiki/samples/elm.sample delete mode 100644 docs/shiki/samples/erb.sample delete mode 100644 docs/shiki/samples/erlang.sample delete mode 100644 docs/shiki/samples/fish.sample delete mode 100644 docs/shiki/samples/fsharp.sample delete mode 100644 docs/shiki/samples/fsl.sample delete mode 100644 docs/shiki/samples/gdresource.sample delete mode 100644 docs/shiki/samples/gdscript.sample delete mode 100644 docs/shiki/samples/gdshader.sample delete mode 100644 docs/shiki/samples/gherkin.sample delete mode 100644 docs/shiki/samples/gjs.sample delete mode 100644 docs/shiki/samples/glsl.sample delete mode 100644 docs/shiki/samples/gnuplot.sample delete mode 100644 docs/shiki/samples/go.sample delete mode 100644 docs/shiki/samples/graphql.sample delete mode 100644 docs/shiki/samples/groovy.sample delete mode 100644 docs/shiki/samples/gts.sample delete mode 100644 docs/shiki/samples/hack.sample delete mode 100644 docs/shiki/samples/haml.sample delete mode 100644 docs/shiki/samples/handlebars.sample delete mode 100644 docs/shiki/samples/haskell.sample delete mode 100644 docs/shiki/samples/hcl.sample delete mode 100644 docs/shiki/samples/hjson.sample delete mode 100644 docs/shiki/samples/hlsl.sample delete mode 100644 docs/shiki/samples/html.sample delete mode 100644 docs/shiki/samples/http.sample delete mode 100644 docs/shiki/samples/imba.sample delete mode 100644 docs/shiki/samples/ini.sample delete mode 100644 docs/shiki/samples/java.sample delete mode 100644 docs/shiki/samples/javascript.sample delete mode 100644 docs/shiki/samples/jinja-html.sample delete mode 100644 docs/shiki/samples/jison.sample delete mode 100644 docs/shiki/samples/json.sample delete mode 100644 docs/shiki/samples/json5.sample delete mode 100644 docs/shiki/samples/jsonc.sample delete mode 100644 docs/shiki/samples/jsonl.sample delete mode 100644 docs/shiki/samples/jsonnet.sample delete mode 100644 docs/shiki/samples/jssm.sample delete mode 100644 docs/shiki/samples/jsx.sample delete mode 100644 docs/shiki/samples/julia.sample delete mode 100644 docs/shiki/samples/kotlin.sample delete mode 100644 docs/shiki/samples/kusto.sample delete mode 100644 docs/shiki/samples/latex.sample delete mode 100644 docs/shiki/samples/less.sample delete mode 100644 docs/shiki/samples/liquid.sample delete mode 100644 docs/shiki/samples/lisp.sample delete mode 100644 docs/shiki/samples/logo.sample delete mode 100644 docs/shiki/samples/lua.sample delete mode 100644 docs/shiki/samples/make.sample delete mode 100644 docs/shiki/samples/markdown.sample delete mode 100644 docs/shiki/samples/marko.sample delete mode 100644 docs/shiki/samples/matlab.sample delete mode 100644 docs/shiki/samples/mdc.sample delete mode 100644 docs/shiki/samples/mdx.sample delete mode 100644 docs/shiki/samples/mermaid.sample delete mode 100644 docs/shiki/samples/mojo.sample delete mode 100644 docs/shiki/samples/narrat.sample delete mode 100644 docs/shiki/samples/nextflow.sample delete mode 100644 docs/shiki/samples/nginx.sample delete mode 100644 docs/shiki/samples/nim.sample delete mode 100644 docs/shiki/samples/nix.sample delete mode 100644 docs/shiki/samples/objective-c.sample delete mode 100644 docs/shiki/samples/objective-cpp.sample delete mode 100644 docs/shiki/samples/ocaml.sample delete mode 100644 docs/shiki/samples/pascal.sample delete mode 100644 docs/shiki/samples/perl.sample delete mode 100644 docs/shiki/samples/php.sample delete mode 100644 docs/shiki/samples/plsql.sample delete mode 100644 docs/shiki/samples/postcss.sample delete mode 100644 docs/shiki/samples/powerquery.sample delete mode 100644 docs/shiki/samples/powershell.sample delete mode 100644 docs/shiki/samples/prisma.sample delete mode 100644 docs/shiki/samples/prolog.sample delete mode 100644 docs/shiki/samples/proto.sample delete mode 100644 docs/shiki/samples/pug.sample delete mode 100644 docs/shiki/samples/puppet.sample delete mode 100644 docs/shiki/samples/purescript.sample delete mode 100644 docs/shiki/samples/python.sample delete mode 100644 docs/shiki/samples/r.sample delete mode 100644 docs/shiki/samples/raku.sample delete mode 100644 docs/shiki/samples/razor.sample delete mode 100644 docs/shiki/samples/reg.sample delete mode 100644 docs/shiki/samples/rel.sample delete mode 100644 docs/shiki/samples/riscv.sample delete mode 100644 docs/shiki/samples/rst.sample delete mode 100644 docs/shiki/samples/ruby.sample delete mode 100644 docs/shiki/samples/rust.sample delete mode 100644 docs/shiki/samples/sas.sample delete mode 100644 docs/shiki/samples/sass.sample delete mode 100644 docs/shiki/samples/scala.sample delete mode 100644 docs/shiki/samples/scheme.sample delete mode 100644 docs/shiki/samples/scss.sample delete mode 100644 docs/shiki/samples/shaderlab.sample delete mode 100644 docs/shiki/samples/shellscript.sample delete mode 100644 docs/shiki/samples/shellsession.sample delete mode 100644 docs/shiki/samples/smalltalk.sample delete mode 100644 docs/shiki/samples/solidity.sample delete mode 100644 docs/shiki/samples/sparql.sample delete mode 100644 docs/shiki/samples/splunk.sample delete mode 100644 docs/shiki/samples/sql.sample delete mode 100644 docs/shiki/samples/ssh-config.sample delete mode 100644 docs/shiki/samples/stata.sample delete mode 100644 docs/shiki/samples/stylus.sample delete mode 100644 docs/shiki/samples/svelte.sample delete mode 100644 docs/shiki/samples/swift.sample delete mode 100644 docs/shiki/samples/system-verilog.sample delete mode 100644 docs/shiki/samples/tasl.sample delete mode 100644 docs/shiki/samples/tcl.sample delete mode 100644 docs/shiki/samples/tex.sample delete mode 100644 docs/shiki/samples/toml.sample delete mode 100644 docs/shiki/samples/tsx.sample delete mode 100644 docs/shiki/samples/turtle.sample delete mode 100644 docs/shiki/samples/twig.sample delete mode 100644 docs/shiki/samples/typescript.sample delete mode 100644 docs/shiki/samples/v.sample delete mode 100644 docs/shiki/samples/vb.sample delete mode 100644 docs/shiki/samples/verilog.sample delete mode 100644 docs/shiki/samples/vhdl.sample delete mode 100644 docs/shiki/samples/viml.sample delete mode 100644 docs/shiki/samples/vue-html.sample delete mode 100644 docs/shiki/samples/vue.sample delete mode 100644 docs/shiki/samples/vyper.sample delete mode 100644 docs/shiki/samples/wasm.sample delete mode 100644 docs/shiki/samples/wenyan.sample delete mode 100644 docs/shiki/samples/wgsl.sample delete mode 100644 docs/shiki/samples/wolfram.sample delete mode 100644 docs/shiki/samples/xml.sample delete mode 100644 docs/shiki/samples/xsl.sample delete mode 100644 docs/shiki/samples/yaml.sample delete mode 100644 docs/shiki/samples/zenscript.sample delete mode 100644 docs/shiki/samples/zig.sample delete mode 100644 docs/shiki/samples/zsh.sample diff --git a/docs/shiki/samples/abap.sample b/docs/shiki/samples/abap.sample deleted file mode 100644 index 817ef85c..00000000 --- a/docs/shiki/samples/abap.sample +++ /dev/null @@ -1,21 +0,0 @@ -report zldbread no standard page heading. -tables: lfa1. -data: begin of t occurs 0, -linfr like lfa1-lifnr, -name1 like lfa1-name1, -end of t. - -start-of-selection. - -get lfa1. -clear t. -move-corresponding lfa1 to t. -append t. -end-of-selection. -sort t by name1. -loop at t. - -write: / t-name1, t-lifnr. -endloop. - -*- From https://sapbrainsonline.com/abap-tutorial/codes/reading-logical-database-using-abap-program.html -* \ No newline at end of file diff --git a/docs/shiki/samples/actionscript-3.sample b/docs/shiki/samples/actionscript-3.sample deleted file mode 100644 index e4f20d76..00000000 --- a/docs/shiki/samples/actionscript-3.sample +++ /dev/null @@ -1,27 +0,0 @@ -private function createParticles( count ):void{ - var anchorPoint = 0; - for(var i:uint = 0; i < count; i++){ - - var particle:Object; - if( inactiveFireParticles.length > 0 ){ - particle = inactiveFireParticles.shift(); - }else { - particle = new Object(); - fireParticles.push( particle ); - } - - particle.x = uint( Math.random() * frame.width * 0.1 ) + anchors[anchorPoint]; - particle.y = frame.bottom; - particle.life = 70 + uint( Math.random() * 30 ); - particle.size = 5 + uint( Math.random() * 10 ); - - if(particle.size > 12){ - particle.size = 10; - } - particle.anchor = anchors[anchorPoint] + uint( Math.random() * 5 ); - - anchorPoint = (anchorPoint == 9)? 0 : anchorPoint + 1; - } -} - -// From https://code.tutsplus.com/tutorials/actionscript-30-optimization-a-practical-example--active-11295 \ No newline at end of file diff --git a/docs/shiki/samples/ada.sample b/docs/shiki/samples/ada.sample deleted file mode 100644 index 63dbb811..00000000 --- a/docs/shiki/samples/ada.sample +++ /dev/null @@ -1,22 +0,0 @@ -with - Ada.Text_IO, - Ada.Integer_Text_IO; -use Ada; - -procedure fizz_buzz is -begin - for i in 1..100 loop - if i mod 15 = 0 then - Text_IO.Put_Line("fizz buzz"); - elsif i mod 5 = 0 then - Text_IO.Put_Line("buzz"); - elsif i mod 3 = 0 then - Text_IO.Put_Line("fizz"); - else - Integer_Text_IO.put(i, Width => 0); - Text_IO.New_Line; - end if; - end loop; -end fizz_buzz; - --- From https://github.com/kylelk/ada-examples/blob/master/fizz_buzz.adb diff --git a/docs/shiki/samples/apache.sample b/docs/shiki/samples/apache.sample deleted file mode 100644 index 7d3391b8..00000000 --- a/docs/shiki/samples/apache.sample +++ /dev/null @@ -1,39 +0,0 @@ -# Apache httpd v2.4 minimal configuration -# see https://wiki.apache.org/httpd/Minimal_Config for documentation - -ServerRoot ${GITPOD_REPO_ROOT} - -PidFile ${APACHE_PID_FILE} -User ${APACHE_RUN_USER} -Group ${APACHE_RUN_GROUP} - -# Modules as installed/activated via apt-get -IncludeOptional /etc/apache2/mods-enabled/*.load -IncludeOptional /etc/apache2/mods-enabled/*.conf - -# Configure hostname and port for server -ServerName ${APACHE_SERVER_NAME} -Listen *:8080 - -# Configure Logging -LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog ${APACHE_LOG_DIR}/access.log common -ErrorLog ${APACHE_LOG_DIR}/error.log - -# Never change this block - - AllowOverride None - Require all denied - - -# Direcrory and files to be served -DirectoryIndex index.html -DocumentRoot "${GITPOD_REPO_ROOT}/www" - - Require all granted - - -# Include conf installed via apt-get -IncludeOptional /etc/apache2/conf-enabled/*.conf - -# https://github.com/gitpod-io/apache-example/blob/master/apache/apache.conf diff --git a/docs/shiki/samples/apex.sample b/docs/shiki/samples/apex.sample deleted file mode 100644 index e3db2371..00000000 --- a/docs/shiki/samples/apex.sample +++ /dev/null @@ -1,19 +0,0 @@ -public class EmailManager { - - public static void sendMail(String address, String subject, String body) { - Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); - String[] toAddresses = new String[] {address}; - mail.setToAddresses(toAddresses); - mail.setSubject(subject); - mail.setPlainTextBody(body); - Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); - } - -} - -String address = 'YOUR_EMAIL_ADDRESS'; -String subject = 'Speaker Confirmation'; -String body = 'Thank you for speaking at the conference.'; -EmailManager.sendMail(address, subject, body); - -// From http://ccoenraets.github.io/salesforce-developer-workshop/Creating-an-Apex-Class.html diff --git a/docs/shiki/samples/apl.sample b/docs/shiki/samples/apl.sample deleted file mode 100644 index c2ccae7e..00000000 --- a/docs/shiki/samples/apl.sample +++ /dev/null @@ -1,37 +0,0 @@ -CND ← { - X ← ⍵ - a ← 0.31938153 ¯0.356563782 1.781477937 ¯1.821255978 1.330274429 - - l ← |X - k ← ÷1+0.2316419×l - w ← 1 - (÷((2×(○1))*0.5)) × (*-(l×l)÷2) × (a +.× (k*⍳5)) - - ((|0⌊×X)×(1-w))+(1-|0⌊×X)×w -} - -⍝ S - current price -⍝ X - strike price -⍝ T - expiry in years -⍝ r - riskless interest rate -⍝ v - volatility - -S ← 60 -X ← 65 -T ← 1 -r ← 0.1 -v ← 0.2 - -d1 ← { ((⍟S÷X)+(r+(v*2)÷2)×⍵)÷(v×⍵*0.5) } -d2 ← { (d1 ⍵) -v×⍵*0.5 } - -⍝ Call price -callPrice ← { (S×CND(d1 ⍵))-(X×*-r×⍵)×CND(d2 ⍵) } - -avg ← { (+/⍵) ÷ ⊃⍴ ⍵ } - -⎕←avg callPrice¨ (⍳ 100000) ÷ 10000 - -⍝ Put price (not tested) -⍝ putPrice ← { (X×*-r×⍵)×CND(-d2 ⍵)-S×CND(-d1 ⍵) } - -⍝ From https://github.com/melsman/apltail/blob/master/tests/blacksch.apl diff --git a/docs/shiki/samples/applescript.sample b/docs/shiki/samples/applescript.sample deleted file mode 100644 index feb19ff5..00000000 --- a/docs/shiki/samples/applescript.sample +++ /dev/null @@ -1,19 +0,0 @@ -tell application "Address Book" - - set bDayList to name of every person whose birth date is not missing value - - choose from list bDayList with prompt "Whose birthday would you like?" - - if the result is not false then - - set aName to item 1 of the result - - set theBirthday to birth date of person named aName - - display dialog aName & "'s birthday is " & date string of theBirthday - - end if - -end tell - --- From https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html \ No newline at end of file diff --git a/docs/shiki/samples/ara.sample b/docs/shiki/samples/ara.sample deleted file mode 100644 index 17aaade6..00000000 --- a/docs/shiki/samples/ara.sample +++ /dev/null @@ -1,29 +0,0 @@ -namespace MyNamespace; - -use MyOtherNamespace\MyOtherClass; - -use function MyOtherNamespace\my_other_function; - -use const MyOtherNamespace\MY_OTHER_CONST; - -const MY_CONST = 1; - -type MyType = int; - -interface MyInterface { - // ... -} - -class MyClass { - // ... -} - -enum MyEnum { - // ... -} - -function my_function(): void { - // ... -} - -https://ara-lang.io/fundamentals/structure.html diff --git a/docs/shiki/samples/asm.sample b/docs/shiki/samples/asm.sample deleted file mode 100644 index e75021bb..00000000 --- a/docs/shiki/samples/asm.sample +++ /dev/null @@ -1,18 +0,0 @@ -segment .text ;code segment - global_start ;must be declared for linker - -_start: ;tell linker entry point - mov edx,len ;message length - mov ecx,msg ;message to write - mov ebx,1 ;file descriptor (stdout) - mov eax,4 ;system call number (sys_write) - int 0x80 ;call kernel - - mov eax,1 ;system call number (sys_exit) - int 0x80 ;call kernel - -segment .data ;data segment -msg db 'Hello, world!',0xa ;our dear string -len equ $ - msg ;length of our dear string - -;From https://www.tutorialspoint.com/assembly_programming/assembly_memory_segments.htm \ No newline at end of file diff --git a/docs/shiki/samples/astro.sample b/docs/shiki/samples/astro.sample deleted file mode 100644 index 6d82efab..00000000 --- a/docs/shiki/samples/astro.sample +++ /dev/null @@ -1,28 +0,0 @@ ---- -// Your component script here! -import Banner from '../components/Banner.astro'; -import ReactPokemonComponent from '../components/ReactPokemonComponent.jsx'; -const myFavoritePokemon = [/* ... */]; -const { title } = Astro.props; ---- - -{/* JS comment syntax is also valid! */} - - -

Hello, world!

- - -

{title}

- - - - - -
    - {myFavoritePokemon.map((data) =>
  • {data.name}
  • )} -
- - -

- - diff --git a/docs/shiki/samples/awk.sample b/docs/shiki/samples/awk.sample deleted file mode 100644 index 1b8691b0..00000000 --- a/docs/shiki/samples/awk.sample +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/awk -f -BEGIN { -# How many lines - lines=0; - total=0; -} -{ -# this code is executed once for each line -# increase the number of files - lines++; -# increase the total size, which is field #1 - total+=$1; -} -END { -# end, now output the total - print lines " lines read"; - print "total is ", total; - if (lines > 0 ) { - print "average is ", total/lines; - } else { - print "average is 0"; - } -} - -#From https://www.grymoire.com/Unix/Awk.html \ No newline at end of file diff --git a/docs/shiki/samples/ballerina.sample b/docs/shiki/samples/ballerina.sample deleted file mode 100644 index 4d20bfc9..00000000 --- a/docs/shiki/samples/ballerina.sample +++ /dev/null @@ -1,32 +0,0 @@ -import ballerina/io; - -// This function definition has two parameters of type `int`. -// `returns` clause specifies type of return value. -function add(int x, int y) returns int { - - int sum = x + y; - // `return` statement returns a value. - return sum; - -} - -public function main() { - io:println(add(5, 11)); -} -import ballerina/io; - -// This function definition has two parameters of type `int`. -// `returns` clause specifies type of return value. -function add(int x, int y) returns int { - - int sum = x + y; - // `return` statement returns a value. - return sum; - -} - -public function main() { - io:println(add(5, 11)); -} - -// From https://ballerina.io/learn/by-example/functions \ No newline at end of file diff --git a/docs/shiki/samples/bash.sample b/docs/shiki/samples/bash.sample deleted file mode 100644 index 9f948b52..00000000 --- a/docs/shiki/samples/bash.sample +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# weather.sh -# Copyright 2018 computer-geek64. All rights reserved. - -program=Weather -version=1.1 -year=2018 -developer=computer-geek64 - -case $1 in --h | --help) - echo "$program $version" - echo "Copyright $year $developer. All rights reserved." - echo - echo "Usage: weather [options]" - echo "Option Long Option Description" - echo "-h --help Show the help screen" - echo "-l [location] --location [location] Specifies the location" - ;; --l | --location) - curl https://wttr.in/$2 - ;; -*) - curl https://wttr.in - ;; -esac - -# From https://github.com/ruanyf/simple-bash-scripts/blob/master/scripts/weather.sh diff --git a/docs/shiki/samples/bat.sample b/docs/shiki/samples/bat.sample deleted file mode 100644 index eac0fcd7..00000000 --- a/docs/shiki/samples/bat.sample +++ /dev/null @@ -1,21 +0,0 @@ -rem -rem Alternate form of if-elseif-else structure with goto for else -rem case. That way, you can group code together in a "more logical" -rem or "more natural" manner. -rem - -if .%1 == .1 goto 1 -if .%1 == .2 goto 2 -goto else -:1 -echo You selected 1 -goto endif -:2 -echo You selected 2 -goto endif -:else -echo else (neither 1 nor 2) -goto endif -:endif - -:: From https://github.com/Archive-projects/Batch-File-examples/blob/master/files/tf5.bat diff --git a/docs/shiki/samples/beancount.sample b/docs/shiki/samples/beancount.sample deleted file mode 100644 index 93127d28..00000000 --- a/docs/shiki/samples/beancount.sample +++ /dev/null @@ -1,9 +0,0 @@ -2012-11-03 * "Transfer to pay credit card" - Assets:MyBank:Checking -400.00 USD - Liabilities:CreditCard 400.00 USD - -2012-11-03 * "Transfer to account in Canada" - Assets:MyBank:Checking -400.00 USD @ 1.09 CAD - Assets:FR:SocGen:Checking 436.01 CAD - -; https://beancount.github.io/docs/beancount_language_syntax.html#costs-and-prices diff --git a/docs/shiki/samples/berry.sample b/docs/shiki/samples/berry.sample deleted file mode 100644 index 90e1f02e..00000000 --- a/docs/shiki/samples/berry.sample +++ /dev/null @@ -1,60 +0,0 @@ -class node - var v, l, r - def init(v, l, r) - self.v = v - self.l = l - self.r = r - end - def insert(v) - if v < self.v - if self.l - self.l.insert(v) - else - self.l = node(v) - end - else - if self.r - self.r.insert(v) - else - self.r = node (v) - end - end - end - def sort(l) - if (self.l) self.l.sort(l) end - l.push(self.v) - if (self.r) self.r.sort(l) end - end -end - -class btree - var root - def insert(v) - if self.root - self.root.insert(v) - else - self.root = node(v) - end - end - def sort() - var l = [] - if self.root - self.root.sort(l) - end - return l - end -end - -var tree = btree() -tree.insert(-100) -tree.insert(5); -tree.insert(3); -tree.insert(9); -tree.insert(10); -tree.insert(10000000); -tree.insert(1); -tree.insert(-1); -tree.insert(-10); -print(tree.sort()); - -# From https://github.com/berry-lang/berry/blob/master/examples/bintree.be \ No newline at end of file diff --git a/docs/shiki/samples/bibtex.sample b/docs/shiki/samples/bibtex.sample deleted file mode 100644 index 9031b0a3..00000000 --- a/docs/shiki/samples/bibtex.sample +++ /dev/null @@ -1,28 +0,0 @@ -% This file was created with JabRef 2.10. -% Encoding: UTF8 - -@Inproceedings{NN2006-Supporting, - Title = {{Supporting...}}, - Author = {N. N. and X. X.}, - Year = {2006}, - Month = {8,}, - - Owner = {xxx}, - Timestamp = {2010.01.01} -} - - -@Book{NN1997-Entwurf, - Title = {Entwurf...}, - Publisher = {Org}, - Year = {1997}, - Month = oct, - - Owner = {xx}, - Timestamp = {2006.06.12}, -} - - -@comment{jabref-meta: fileDirectory:Folder;} - -% From https://github.com/JabRef/jabref/blob/main/src/test/resources/testbib/bug1283.bib diff --git a/docs/shiki/samples/bicep.sample b/docs/shiki/samples/bicep.sample deleted file mode 100644 index a95fbed2..00000000 --- a/docs/shiki/samples/bicep.sample +++ /dev/null @@ -1,47 +0,0 @@ -@description('Name of the eventhub namespace') -param eventHubNamespaceName string - -@description('Name of the eventhub name') -param eventHubName string - -@description('The service principal') -param principalId string - -// Create an event hub namespace -resource eventHubNamespace 'Microsoft.EventHub/namespaces@2021-01-01-preview' = { - name: eventHubNamespaceName - location: resourceGroup().location - sku: { - name: 'Standard' - tier: 'Standard' - capacity: 1 - } - properties: { - zoneRedundant: true - } -} - -// Create an event hub inside the namespace -resource eventHub 'Microsoft.EventHub/namespaces/eventhubs@2021-01-01-preview' = { - parent: eventHubNamespace - name: eventHubName - properties: { - messageRetentionInDays: 7 - partitionCount: 1 - } -} - -// give Azure Pipelines Service Principal permissions against the event hub - -var roleDefinitionAzureEventHubsDataOwner = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'f526a384-b230-433a-b45c-95f59c4a2dec') - -resource integrationTestEventHubReceiverNamespaceRoleAssignment 'Microsoft.Authorization/roleAssignments@2018-01-01-preview' = { - name: guid(principalId, eventHub.id, roleDefinitionAzureEventHubsDataOwner) - scope: eventHubNamespace - properties: { - roleDefinitionId: roleDefinitionAzureEventHubsDataOwner - principalId: principalId - } -} - -// From https://dev.azure.com/johnnyreilly/blog-demos/_git/permissioning-azure-pipelines-bicep-role-assignments?path=/infra/main.bicep \ No newline at end of file diff --git a/docs/shiki/samples/blade.sample b/docs/shiki/samples/blade.sample deleted file mode 100644 index 12a4795b..00000000 --- a/docs/shiki/samples/blade.sample +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - {!! $post->html !!} - - @unless($post->isTweet()) - @if($post->external_url) -

- - Read more - [{{ $post->external_url_host }}] -

- @endif - @endunless - - - @include('front.newsletter.partials.block', [ - 'class' => 'mb-8', - ]) - -
- @include('front.posts.partials.comments') -
- - - - - - - @foreach($post->tags as $tag) - - @endforeach - - - - - - - - - - - - -#From https://freek.dev/2024-how-to-render-markdown-with-perfectly-highlighted-code-snippets \ No newline at end of file diff --git a/docs/shiki/samples/c.sample b/docs/shiki/samples/c.sample deleted file mode 100644 index ddd06256..00000000 --- a/docs/shiki/samples/c.sample +++ /dev/null @@ -1,52 +0,0 @@ -#include - -#define ARR_LEN 7 - -void qsort(int v[], int left, int right); -void printArr(int v[], int len); - -int main() -{ - int i; - int v[ARR_LEN] = { 4, 3, 1, 7, 9, 6, 2 }; - printArr(v, ARR_LEN); - qsort(v, 0, ARR_LEN-1); - printArr(v, ARR_LEN); - return 0; -} - -void qsort(int v[], int left, int right) -{ - int i, last; - void swap(int v[], int i, int j); - - if (left >= right) - return; - swap(v, left, (left + right) / 2); - last = left; - for (i = left+1; i <= right; i++) - if (v[i] < v[left]) - swap(v, ++last, i); - swap(v, left, last); - qsort(v, left, last-1); - qsort(v, last+1, right); -} - -void swap(int v[], int i, int j) -{ - int temp; - - temp = v[i]; - v[i] = v[j]; - v[j] = temp; -} - -void printArr(int v[], int len) -{ - int i; - for (i = 0; i < len; i++) - printf("%d ", v[i]); - printf("\n"); -} - -// From https://github.com/Heatwave/The-C-Programming-Language-2nd-Edition/blob/master/chapter-4-functions-and-program-structure/8.qsort.c \ No newline at end of file diff --git a/docs/shiki/samples/cadence.sample b/docs/shiki/samples/cadence.sample deleted file mode 100644 index 465191a5..00000000 --- a/docs/shiki/samples/cadence.sample +++ /dev/null @@ -1,19 +0,0 @@ -pub contract HelloWorld { - - // Declare a public field of type String. - // - // All fields must be initialized in the init() function. - pub let greeting: String - - // The init() function is required if the contract contains any fields. - init() { - self.greeting = "Hello, World!" - } - - // Public function that returns our friendly greeting! - pub fun hello(): String { - return self.greeting - } -} - -// From https://docs.onflow.org/cadence/tutorial/02-hello-world/ \ No newline at end of file diff --git a/docs/shiki/samples/clarity.sample b/docs/shiki/samples/clarity.sample deleted file mode 100644 index b73ae4d2..00000000 --- a/docs/shiki/samples/clarity.sample +++ /dev/null @@ -1,53 +0,0 @@ -(impl-trait .sip010-ft-trait.sip010-ft-trait) - -;; SIP010 trait on mainnet -;; (impl-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait) - -(define-constant contract-owner tx-sender) -(define-constant err-owner-only (err u100)) -(define-constant err-not-token-owner (err u101)) - -;; No maximum supply! -(define-fungible-token clarity-coin) - -(define-public (transfer (amount uint) (sender principal) (recipient principal) (memo (optional (buff 34)))) - (begin - (asserts! (is-eq tx-sender sender) err-owner-only) - (try! (ft-transfer? clarity-coin amount sender recipient)) - (match memo to-print (print to-print) 0x) - (ok true) - ) -) - -(define-read-only (get-name) - (ok "Clarity Coin") -) - -(define-read-only (get-symbol) - (ok "CC") -) - -(define-read-only (get-decimals) - (ok u0) -) - -(define-read-only (get-balance (who principal)) - (ok (ft-get-balance clarity-coin who)) -) - -(define-read-only (get-total-supply) - (ok (ft-get-supply clarity-coin)) -) - -(define-read-only (get-token-uri) - (ok none) -) - -(define-public (mint (amount uint) (recipient principal)) - (begin - (asserts! (is-eq tx-sender contract-owner) err-owner-only) - (ft-mint? clarity-coin amount recipient) - ) -) - -;; From https://github.com/clarity-lang/book/blob/main/projects/sip010-ft/contracts/clarity-coin.clar \ No newline at end of file diff --git a/docs/shiki/samples/clj.sample b/docs/shiki/samples/clj.sample deleted file mode 100644 index 57cbf3c0..00000000 --- a/docs/shiki/samples/clj.sample +++ /dev/null @@ -1,14 +0,0 @@ -(let [my-vector [1 2 3 4] - my-map {:fred "ethel"} - my-list (list 4 3 2 1)] - (list - (conj my-vector 5) - (assoc my-map :ricky "lucy") - (conj my-list 5) - ;the originals are intact - my-vector - my-map - my-list)) --> ([1 2 3 4 5] {:ricky "lucy", :fred "ethel"} (5 4 3 2 1) [1 2 3 4] {:fred "ethel"} (4 3 2 1)) - -;From https://clojure.org/about/functional_programming#_immutable_data_structures diff --git a/docs/shiki/samples/clojure.sample b/docs/shiki/samples/clojure.sample deleted file mode 100644 index 80994b5e..00000000 --- a/docs/shiki/samples/clojure.sample +++ /dev/null @@ -1,14 +0,0 @@ -(let [my-vector [1 2 3 4] - my-map {:fred "ethel"} - my-list (list 4 3 2 1)] - (list - (conj my-vector 5) - (assoc my-map :ricky "lucy") - (conj my-list 5) - ;the originals are intact - my-vector - my-map - my-list)) --> ([1 2 3 4 5] {:ricky "lucy", :fred "ethel"} (5 4 3 2 1) [1 2 3 4] {:fred "ethel"} (4 3 2 1)) - -;From https://clojure.org/about/functional_programming#_immutable_data_structures \ No newline at end of file diff --git a/docs/shiki/samples/cmake.sample b/docs/shiki/samples/cmake.sample deleted file mode 100644 index cf6c551c..00000000 --- a/docs/shiki/samples/cmake.sample +++ /dev/null @@ -1,36 +0,0 @@ -# Almost all CMake files should start with this -# You should always specify a range with the newest -# and oldest tested versions of CMake. This will ensure -# you pick up the best policies. -cmake_minimum_required(VERSION 3.1...3.23) - -# This is your project statement. You should always list languages; -# Listing the version is nice here since it sets lots of useful variables -project( - ModernCMakeExample - VERSION 1.0 - LANGUAGES CXX) - -# If you set any CMAKE_ variables, that can go here. -# (But usually don't do this, except maybe for C++ standard) - -# Find packages go here. - -# You should usually split this into folders, but this is a simple example - -# This is a "default" library, and will match the *** variable setting. -# Other common choices are STATIC, SHARED, and MODULE -# Including header files here helps IDEs but is not required. -# Output libname matches target name, with the usual extensions on your system -add_library(MyLibExample simple_lib.cpp simple_lib.hpp) - -# Link each target with other targets or add options, etc. - -# Adding something we can run - Output name matches target name -add_executable(MyExample simple_example.cpp) - -# Make sure you link your targets with this command. It can also link libraries and -# even flags, so linking a target that does not exist will not give a configure-time error. -target_link_libraries(MyExample PRIVATE MyLibExample) - -# From https://cliutils.gitlab.io/modern-cmake/chapters/basics/example.html \ No newline at end of file diff --git a/docs/shiki/samples/cobol.sample b/docs/shiki/samples/cobol.sample deleted file mode 100644 index 12b8f32e..00000000 --- a/docs/shiki/samples/cobol.sample +++ /dev/null @@ -1,94 +0,0 @@ - ****************************************************************** - * Author: Bryan Flood - * Date: 25/10/2018 - * Purpose: Compute Fibonacci Numbers - * Tectonics: cobc - ****************************************************************** - IDENTIFICATION DIVISION. - PROGRAM-ID. FIB. - DATA DIVISION. - FILE SECTION. - WORKING-STORAGE SECTION. - 01 N0 BINARY-C-LONG VALUE 0. - 01 N1 BINARY-C-LONG VALUE 1. - 01 SWAP BINARY-C-LONG VALUE 1. - 01 RESULT PIC Z(20)9. - 01 I BINARY-C-LONG VALUE 0. - 01 I-MAX BINARY-C-LONG VALUE 0. - 01 LARGEST-N BINARY-C-LONG VALUE 92. - - PROCEDURE DIVISION. - *> THIS IS WHERE THE LABELS GET CALLED - PERFORM MAIN - PERFORM ENDFIB - GOBACK. - - *> THIS ACCEPTS INPUT AND DETERMINES THE OUTPUT USING A EVAL STMT - MAIN. - DISPLAY "ENTER N TO GENERATE THE FIBONACCI SEQUENCE" - ACCEPT I-MAX. - - EVALUATE TRUE - WHEN I-MAX > LARGEST-N - PERFORM INVALIDN - - WHEN I-MAX > 2 - PERFORM CASEGREATERTHAN2 - - WHEN I-MAX = 2 - PERFORM CASE2 - - WHEN I-MAX = 1 - PERFORM CASE1 - - WHEN I-MAX = 0 - PERFORM CASE0 - - WHEN OTHER - PERFORM INVALIDN - - END-EVALUATE. - - STOP RUN. - - - - *> THE CASE FOR WHEN N = 0 - CASE0. - MOVE N0 TO RESULT. - DISPLAY RESULT. - - *> THE CASE FOR WHEN N = 1 - CASE1. - PERFORM CASE0 - MOVE N1 TO RESULT. - DISPLAY RESULT. - - *> THE CASE FOR WHEN N = 2 - CASE2. - PERFORM CASE1 - MOVE N1 TO RESULT. - DISPLAY RESULT. - - *> THE CASE FOR WHEN N > 2 - CASEGREATERTHAN2. - PERFORM CASE1 - PERFORM VARYING I FROM 1 BY 1 UNTIL I = I-MAX - ADD N0 TO N1 GIVING SWAP - MOVE N1 TO N0 - MOVE SWAP TO N1 - MOVE SWAP TO RESULT - DISPLAY RESULT - END-PERFORM. - - *> PROVIDE ERROR FOR INVALID INPUT - INVALIDN. - DISPLAY 'INVALID N VALUE. THE PROGRAM WILL NOW END'. - - *> END THE PROGRAM WITH A MESSAGE - ENDFIB. - DISPLAY "THE PROGRAM HAS COMPLETED AND WILL NOW END". - - END PROGRAM FIB. - -*> From https://github.com/KnowledgePending/COBOL-Fibonacci-Sequence/blob/master/fib.cbl diff --git a/docs/shiki/samples/codeql.sample b/docs/shiki/samples/codeql.sample deleted file mode 100644 index 288e3fe9..00000000 --- a/docs/shiki/samples/codeql.sample +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @name LDAP query built from user-controlled sources - * @description Building an LDAP query from user-controlled sources is vulnerable to insertion of - * malicious LDAP code by the user. - * @kind path-problem - * @problem.severity error - * @id py/ldap-injection - * @tags experimental - * security - * external/cwe/cwe-090 - */ - -import python -import experimental.semmle.python.security.injection.LDAP -import DataFlow::PathGraph - -from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink -where config.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "$@ LDAP query parameter comes from $@.", sink.getNode(), - "This", source.getNode(), "a user-provided value" - -// a concept - -module LDAPEscape { - abstract class Range extends DataFlow::Node { - abstract DataFlow::Node getAnInput(); - } -} - -class LDAPEscape extends DataFlow::Node { - LDAPEscape::Range range; - - LDAPEscape() { this = range } - - DataFlow::Node getAnInput() { result = range.getAnInput() } -} - -// a library modeling - -private module LDAP2 { - private class LDAP2QueryMethods extends string { - LDAP2QueryMethods() { - this in ["search", "search_s", "search_st", "search_ext", "search_ext_s"] - } - } - - private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { - DataFlow::Node ldapQuery; - - LDAP2Query() { - exists(DataFlow::AttrRead searchMethod | - this.getFunction() = searchMethod and - API::moduleImport("ldap").getMember("initialize").getACall() = - searchMethod.getObject().getALocalSource() and - searchMethod.getAttributeName() instanceof LDAP2QueryMethods and - ( - ldapQuery = this.getArg(0) - or - ( - ldapQuery = this.getArg(2) or - ldapQuery = this.getArgByName("filterstr") - ) - ) - ) - } - - override DataFlow::Node getQuery() { result = ldapQuery } - } - - private class LDAP2EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { - LDAP2EscapeDNCall() { - this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() - } - - override DataFlow::Node getAnInput() { result = this.getArg(0) } - } - - private class LDAP2EscapeFilterCall extends DataFlow::CallCfgNode, LDAPEscape::Range { - LDAP2EscapeFilterCall() { - this = - API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall() - } - - override DataFlow::Node getAnInput() { result = this.getArg(0) } - } -} - -// a taint flow config - -class LDAPInjectionFlowConfig extends TaintTracking::Configuration { - LDAPInjectionFlowConfig() { this = "LDAPInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink = any(LDAPQuery ldapQuery).getQuery() } - - override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer = any(LDAPEscape ldapEsc).getAnInput() - } -} - -// From https://github.com/github/codeql/pull/5443/files diff --git a/docs/shiki/samples/coffee.sample b/docs/shiki/samples/coffee.sample deleted file mode 100644 index 433d85a2..00000000 --- a/docs/shiki/samples/coffee.sample +++ /dev/null @@ -1,30 +0,0 @@ -# Assignment: -number = 42 -opposite = true - -# Conditions: -number = -42 if opposite - -# Functions: -square = (x) -> x * x - -# Arrays: -list = [1, 2, 3, 4, 5] - -# Objects: -math = - root: Math.sqrt - square: square - cube: (x) -> x * square x - -# Splats: -race = (winner, runners...) -> - print winner, runners - -# Existence: -alert "I knew it!" if elvis? - -# Array comprehensions: -cubes = (math.cube num for num in list) - -# From https://coffeescript.org/#overview \ No newline at end of file diff --git a/docs/shiki/samples/cpp.sample b/docs/shiki/samples/cpp.sample deleted file mode 100644 index 5a78d84b..00000000 --- a/docs/shiki/samples/cpp.sample +++ /dev/null @@ -1,21 +0,0 @@ -// Working of implicit type-conversion - -#include -using namespace std; - -int main() { - - int num_int; - double num_double = 9.99; - - // implicit conversion - // assigning a double value to an int variable - num_int = num_double; - - cout << "num_int = " << num_int << endl; - cout << "num_double = " << num_double << endl; - - return 0; -} - -// From https://www.programiz.com/cpp-programming/type-conversion \ No newline at end of file diff --git a/docs/shiki/samples/crystal.sample b/docs/shiki/samples/crystal.sample deleted file mode 100644 index 04aafe97..00000000 --- a/docs/shiki/samples/crystal.sample +++ /dev/null @@ -1,43 +0,0 @@ -struct Foo(T) -end - -Foo(Int32) - -# --- -struct Foo -end - -# struct Bar < Foo -# end -# Error in ./struct/struct.cr:10: can't extend non-abstract struct Foo - -abstract struct AbstractFoo -end - -struct Bar < AbstractFoo -end - -# --- -struct Test - def initialize(@test : String) - end -end - -Test.new("foo") - -# --- -struct User - property name, age - - def initialize(@name : String, @age : Int32) - end - - def print - puts "#{age} - #{name}" - end -end - -puts User.new("osman", 3).name -User.new("ali", 9).print - -# From https://github.com/askn/crystal-by-example/blob/master/struct/struct.cr \ No newline at end of file diff --git a/docs/shiki/samples/csharp.sample b/docs/shiki/samples/csharp.sample deleted file mode 100644 index 0c73c16e..00000000 --- a/docs/shiki/samples/csharp.sample +++ /dev/null @@ -1,33 +0,0 @@ -using KCTest.Infrastructure.Database; -using Microsoft.AspNetCore.Hosting; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace KCTest.API -{ - public class Program - { - public static void Main(string[] args) - { - var host = CreateHostBuilder(args).Build(); - - using (var scope = host.Services.CreateScope()) - { - var db = scope.ServiceProvider.GetRequiredService(); - db.Database.Migrate(); - } - - host.Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - } -} - -// From https://github.com/Jadhielv/KCTest/blob/master/Backend/src/KCTest.API/Program.cs \ No newline at end of file diff --git a/docs/shiki/samples/css.sample b/docs/shiki/samples/css.sample deleted file mode 100644 index a68147d5..00000000 --- a/docs/shiki/samples/css.sample +++ /dev/null @@ -1,46 +0,0 @@ -html { - margin: 0; - background: black; - height: 100%; -} - -body { - margin: 0; - width: 100%; - height: inherit; -} - -/* the three main rows going down the page */ - -body > div { - height: 25%; -} - -.thumb { - float: left; - width: 25%; - height: 100%; - object-fit: cover; -} - -.main { - display: none; -} - -.blowup { - display: block; - position: absolute; - object-fit: contain; - object-position: center; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 2000; -} - -.darken { - opacity: 0.4; -} - -/* From https://github.com/mdn/css-examples/blob/main/object-fit-gallery/style.css */ diff --git a/docs/shiki/samples/cue.sample b/docs/shiki/samples/cue.sample deleted file mode 100644 index 0ffedc78..00000000 --- a/docs/shiki/samples/cue.sample +++ /dev/null @@ -1,108 +0,0 @@ -package kube - -service: [ID=_]: { - apiVersion: "v1" - kind: "Service" - metadata: { - name: ID - labels: { - app: ID // by convention - domain: "prod" // always the same in the given files - component: #Component // varies per directory - } - } - spec: { - // Any port has the following properties. - ports: [...{ - port: int - protocol: *"TCP" | "UDP" // from the Kubernetes definition - name: string | *"client" - }] - selector: metadata.labels // we want those to be the same - } -} - -deployment: [ID=_]: { - apiVersion: "apps/v1" - kind: "Deployment" - metadata: name: ID - spec: { - // 1 is the default, but we allow any number - replicas: *1 | int - template: { - metadata: labels: { - app: ID - domain: "prod" - component: #Component - } - // we always have one namesake container - spec: containers: [{name: ID}] - } - } -} - -#Component: string - -daemonSet: [ID=_]: _spec & { - apiVersion: "apps/v1" - kind: "DaemonSet" - _name: ID -} - -statefulSet: [ID=_]: _spec & { - apiVersion: "apps/v1" - kind: "StatefulSet" - _name: ID -} - -deployment: [ID=_]: _spec & { - apiVersion: "apps/v1" - kind: "Deployment" - _name: ID - spec: replicas: *1 | int -} - -configMap: [ID=_]: { - metadata: name: ID - metadata: labels: component: #Component -} - -_spec: { - _name: string - - metadata: name: _name - metadata: labels: component: #Component - spec: selector: {} - spec: template: { - metadata: labels: { - app: _name - component: #Component - domain: "prod" - } - spec: containers: [{name: _name}] - } -} - -// Define the _export option and set the default to true -// for all ports defined in all containers. -_spec: spec: template: spec: containers: [...{ - ports: [...{ - _export: *true | false // include the port in the service - }] -}] - -for x in [deployment, daemonSet, statefulSet] for k, v in x { - service: "\(k)": { - spec: selector: v.spec.template.metadata.labels - - spec: ports: [ - for c in v.spec.template.spec.containers - for p in c.ports - if p._export { - let Port = p.containerPort // Port is an alias - port: *Port | int - targetPort: *Port | int - }, - ] - } -} diff --git a/docs/shiki/samples/cypher.sample b/docs/shiki/samples/cypher.sample deleted file mode 100644 index 8a26ed3b..00000000 --- a/docs/shiki/samples/cypher.sample +++ /dev/null @@ -1,21 +0,0 @@ -UNWIND [ - { title: "Cypher Basics I", - created: datetime("2019-06-01T18:40:32.142+0100"), - datePublished: date("2019-06-01"), - readingTime: {minutes: 2, seconds: 15} }, - { title: "Cypher Basics II", - created: datetime("2019-06-02T10:23:32.122+0100"), - datePublished: date("2019-06-02"), - readingTime: {minutes: 2, seconds: 30} }, - { title: "Dates, Datetimes, and Durations in Neo4j", - created: datetime(), - datePublished: date(), - readingTime: {minutes: 3, seconds: 30} } -] AS articleProperties - -CREATE (article:Article {title: articleProperties.title}) -SET article.created = articleProperties.created, - article.datePublished = articleProperties.datePublished, - article.readingTime = duration(articleProperties.readingTime) - -// https://neo4j.com/developer/cypher/dates-datetimes-durations/ diff --git a/docs/shiki/samples/d.sample b/docs/shiki/samples/d.sample deleted file mode 100644 index 96f91ee4..00000000 --- a/docs/shiki/samples/d.sample +++ /dev/null @@ -1,18 +0,0 @@ -void main() -{ - import std.datetime.stopwatch : benchmark; - import std.math, std.parallelism, std.stdio; - - auto logs = new double[100_000]; - auto bm = benchmark!({ - foreach (i, ref elem; logs) - elem = log(1.0 + i); - }, { - foreach (i, ref elem; logs.parallel) - elem = log(1.0 + i); - })(100); // number of executions of each tested function - writefln("Linear init: %s msecs", bm[0].total!"msecs"); - writefln("Parallel init: %s msecs", bm[1].total!"msecs"); -} - -// From https://dlang.org/ \ No newline at end of file diff --git a/docs/shiki/samples/dart.sample b/docs/shiki/samples/dart.sample deleted file mode 100644 index 4a6fbada..00000000 --- a/docs/shiki/samples/dart.sample +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_workshop/screens/about_screen.dart'; -import 'package:flutter_workshop/screens/home_demo_screen.dart'; -import 'package:flutter_workshop/screens/home_screen.dart'; -import 'package:flutter_workshop/screens/product_detail_screen.dart'; -import 'package:flutter_workshop/screens/product_screen.dart'; -import 'package:flutter_workshop/screens/random_words_screen.dart'; -import 'package:flutter_workshop/screens/unknown_screen.dart'; -import 'package:device_simulator/device_simulator.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - initialRoute: '/', - routes: { - HomeScreen.routeName: (_) => DeviceSimulator( - brightness: Brightness.dark, enable: true, child: HomeScreen()), - ProductScreen.routeName: (_) => ProductScreen(), - ProductDetailScreen.routeName: (_) => ProductDetailScreen(), - RandomWordsScreen.routeName: (_) => RandomWordsScreen(), - HomeDemoScreen.routeName: (_) => HomeDemoScreen(), - AboutScreen.routeName: (_) => AboutScreen() - }, - onUnknownRoute: (_) => - MaterialPageRoute(builder: (_) => UnknownScreen())); - } -} - -// From https://github.com/Jadhielv/flutter-workshop/blob/master/lib/main.dart \ No newline at end of file diff --git a/docs/shiki/samples/dax.sample b/docs/shiki/samples/dax.sample deleted file mode 100644 index e095c745..00000000 --- a/docs/shiki/samples/dax.sample +++ /dev/null @@ -1,19 +0,0 @@ --- COALESCE returns the first non-blank of its arguments --- It is commonly used to provide default values to expressions --- that might result in a blank -EVALUATE -SELECTCOLUMNS ( - TOPN ( 10, Store ), - "Store name", Store[Store Name], - "Manager", - COALESCE ( Store[Area Manager], "** Not Assigned **" ), - "Years open", - DATEDIFF ( - Store[Open Date], - COALESCE ( Store[Close Date], TODAY () ), - YEAR - ) -) -ORDER BY [Manager] - --- From https://dax.guide/coalesce/ diff --git a/docs/shiki/samples/diff.sample b/docs/shiki/samples/diff.sample deleted file mode 100644 index aa7f7e5a..00000000 --- a/docs/shiki/samples/diff.sample +++ /dev/null @@ -1,28 +0,0 @@ -$ cat file1.txt -cat -mv -comm -cp - -$ cat file2.txt -cat -cp -diff -comm - -$ diff -c file1.txt file2.txt -*** file1.txt Thu Jan 11 08:52:37 2018 ---- file2.txt Thu Jan 11 08:53:01 2018 -*************** -*** 1,4 **** - cat -- mv -- comm - cp ---- 1,4 ---- - cat - cp -+ diff -+ comm - -# From https://www.geeksforgeeks.org/diff-command-linux-examples/ \ No newline at end of file diff --git a/docs/shiki/samples/dm.sample b/docs/shiki/samples/dm.sample deleted file mode 100644 index e410226c..00000000 --- a/docs/shiki/samples/dm.sample +++ /dev/null @@ -1,77 +0,0 @@ -//Allows you to set a theme for a set of areas without tying them to looping sounds explicitly -/datum/component/area_sound_manager - //area -> looping sound type - var/list/area_to_looping_type = list() - //Current sound loop - var/datum/looping_sound/our_loop - //A list of "acceptable" z levels to be on. If you leave this, we're gonna delete ourselves - var/list/accepted_zs - //The timer id of our current start delay, if it exists - var/timerid - -/datum/component/area_sound_manager/Initialize(area_loop_pairs, change_on, remove_on, acceptable_zs) - if(!ismovable(parent)) - return - area_to_looping_type = area_loop_pairs - accepted_zs = acceptable_zs - change_the_track() - - RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/react_to_move) - RegisterSignal(parent, COMSIG_MOVABLE_Z_CHANGED, .proc/react_to_z_move) - RegisterSignal(parent, change_on, .proc/handle_change) - RegisterSignal(parent, remove_on, .proc/handle_removal) - -/datum/component/area_sound_manager/Destroy(force, silent) - QDEL_NULL(our_loop) - . = ..() - -/datum/component/area_sound_manager/proc/react_to_move(datum/source, atom/oldloc, dir, forced) - SIGNAL_HANDLER - var/list/loop_lookup = area_to_looping_type - if(loop_lookup[get_area(oldloc)] == loop_lookup[get_area(parent)]) - return - change_the_track(TRUE) - -/datum/component/area_sound_manager/proc/react_to_z_move(datum/source, old_z, new_z) - SIGNAL_HANDLER - if(!length(accepted_zs) || (new_z in accepted_zs)) - return - qdel(src) - -/datum/component/area_sound_manager/proc/handle_removal(datum/source) - SIGNAL_HANDLER - qdel(src) - -/datum/component/area_sound_manager/proc/handle_change(datum/source) - SIGNAL_HANDLER - change_the_track() - -/datum/component/area_sound_manager/proc/change_the_track(skip_start = FALSE) - var/time_remaining = 0 - - if(our_loop) - var/our_id = our_loop.timerid || timerid - if(our_id) - time_remaining = timeleft(our_id, SSsound_loops) || 0 - //Time left will sometimes return negative values, just ignore them and start a new sound loop now - time_remaining = max(time_remaining, 0) - QDEL_NULL(our_loop) - - var/area/our_area = get_area(parent) - var/new_loop_type = area_to_looping_type[our_area] - if(!new_loop_type) - return - - our_loop = new new_loop_type(parent, FALSE, TRUE, skip_start) - - //If we're still playing, wait a bit before changing the sound so we don't double up - if(time_remaining) - timerid = addtimer(CALLBACK(src, .proc/start_looping_sound), time_remaining, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_NO_HASH_WAIT | TIMER_DELETE_ME, SSsound_loops) - return - timerid = null - our_loop.start() - -/datum/component/area_sound_manager/proc/start_looping_sound() - timerid = null - if(our_loop) - our_loop.start() diff --git a/docs/shiki/samples/docker.sample b/docs/shiki/samples/docker.sample deleted file mode 100644 index 6e1ac767..00000000 --- a/docs/shiki/samples/docker.sample +++ /dev/null @@ -1,19 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env -WORKDIR /app - -# Copy csproj and restore as distinct layers -COPY *.csproj ./ -RUN dotnet restore - -# Copy everything else and build -COPY ../engine/examples ./ -RUN dotnet publish -c Release -o out - -# Build runtime image -FROM mcr.microsoft.com/dotnet/aspnet:3.1 -WORKDIR /app -COPY --from=build-env /app/out . -ENTRYPOINT ["dotnet", "aspnetapp.dll"] - -# From https://docs.docker.com/samples/dotnetcore/ \ No newline at end of file diff --git a/docs/shiki/samples/dream-maker.sample b/docs/shiki/samples/dream-maker.sample deleted file mode 100644 index eeff4278..00000000 --- a/docs/shiki/samples/dream-maker.sample +++ /dev/null @@ -1,24 +0,0 @@ -/mob/Login() - var/count = 0 - - world << "Let's count until infinity!" - - // Infinite loop - while (TRUE) - count += 1 - - if (count == 3) - world << "three" - - // Skip the rest of this iteration - continue - - world << "#[count]" - - if (count == 5) - world << "OK, that's enough" - - // Exit this loop - break - -// From https://spacestation13.github.io/DMByExample/flow/loops.html diff --git a/docs/shiki/samples/elixir.sample b/docs/shiki/samples/elixir.sample deleted file mode 100644 index cadcdb50..00000000 --- a/docs/shiki/samples/elixir.sample +++ /dev/null @@ -1,26 +0,0 @@ -# [] can be used, first match returned -1 = [a: 1, b: 2, a: 3][:a] - -# [] missing value is nil -nil = [a: 1, b: 2, a: 3][:c] - -# Keyword get also works -1 = Keyword.get([a: 1, b: 2, a: 3], :a) - -# missing value is nil -nil = Keyword.get([a: 1, b: 2, a: 3], :c) - -# an optional default value can be specified -# for missing keys -"missing" = Keyword.get([a: 1, b: 2, a: 3], :c, "missing") - -# Keyword.take returns a list of matching pairs -[a: 1, a: 3] = Keyword.take([a: 1, b: 2, a: 3], [:a]) - -[] = Keyword.take([a: 1, b: 2, a: 3], [:c]) - -# dot syntax does NOT work -# results in compile error -[a: 1, b: 2, a: 3].a - -# From https://elixir-examples.github.io/single-page diff --git a/docs/shiki/samples/elm.sample b/docs/shiki/samples/elm.sample deleted file mode 100644 index 8b008c81..00000000 --- a/docs/shiki/samples/elm.sample +++ /dev/null @@ -1,66 +0,0 @@ -module Main exposing (..) - --- Press buttons to increment and decrement a counter. --- --- Read how it works: --- https://guide.elm-lang.org/architecture/buttons.html --- - - -import Browser -import Html exposing (Html, button, div, text) -import Html.Events exposing (onClick) - - - --- MAIN - - -main = - Browser.sandbox { init = init, update = update, view = view } - - - --- MODEL - - -type alias Model = Int - - -init : Model -init = - 0 - - - --- UPDATE - - -type Msg - = Increment - | Decrement - - -update : Msg -> Model -> Model -update msg model = - case msg of - Increment -> - model + 1 - - Decrement -> - model - 1 - - - --- VIEW - - -view : Model -> Html Msg -view model = - div [] - [ button [ onClick Decrement ] [ text "-" ] - , div [] [ text (String.fromInt model) ] - , button [ onClick Increment ] [ text "+" ] - ] - --- From https://elm-lang.org/examples/buttons \ No newline at end of file diff --git a/docs/shiki/samples/erb.sample b/docs/shiki/samples/erb.sample deleted file mode 100644 index 36c8d182..00000000 --- a/docs/shiki/samples/erb.sample +++ /dev/null @@ -1,69 +0,0 @@ -require "erb" - -# Build template data class. -class Product - def initialize( code, name, desc, cost ) - @code = code - @name = name - @desc = desc - @cost = cost - - @features = [ ] - end - - def add_feature( feature ) - @features << feature - end - - # Support templating of member data. - def get_binding - binding - end - - # ... -end - -# Create template. -template = %{ - - Ruby Toys -- <%= @name %> - - -

<%= @name %> (<%= @code %>)

-

<%= @desc %>

- -
    - <% @features.each do |f| %> -
  • <%= f %>
  • - <% end %> -
- -

- <% if @cost < 10 %> - Only <%= @cost %>!!! - <% else %> - Call for a price, today! - <% end %> -

- - - -}.gsub(/^ /, '') - -rhtml = ERB.new(template) - -# Set up template data. -toy = Product.new( "TZ-1002", - "Rubysapien", - "Geek's Best Friend! Responds to Ruby commands...", - 999.95 ) -toy.add_feature("Listens for verbal commands in the Ruby language!") -toy.add_feature("Ignores Perl, Java, and all C variants.") -toy.add_feature("Karate-Chop Action!!!") -toy.add_feature("Matz signature on left leg.") -toy.add_feature("Gem studded eyes... Rubies, of course!") - -# Produce result. -rhtml.run(toy.get_binding) - -# From https://docs.ruby-lang.org/en/2.3.0/ERB.html#class-ERB-label-Examples \ No newline at end of file diff --git a/docs/shiki/samples/erlang.sample b/docs/shiki/samples/erlang.sample deleted file mode 100644 index 67e57b74..00000000 --- a/docs/shiki/samples/erlang.sample +++ /dev/null @@ -1,50 +0,0 @@ -%% File: person.hrl - -%%----------------------------------------------------------- -%% Data Type: person -%% where: -%% name: A string (default is undefined). -%% age: An integer (default is undefined). -%% phone: A list of integers (default is []). -%% dict: A dictionary containing various information -%% about the person. -%% A {Key, Value} list (default is the empty list). -%%------------------------------------------------------------ --record(person, {name, age, phone = [], dict = []}). - --module(person). --include("person.hrl"). --compile(export_all). % For test purposes only. - -%% This creates an instance of a person. -%% Note: The phone number is not supplied so the -%% default value [] will be used. - -make_hacker_without_phone(Name, Age) -> - #person{name = Name, age = Age, - dict = [{computer_knowledge, excellent}, - {drinks, coke}]}. - -%% This demonstrates matching in arguments - -print(#person{name = Name, age = Age, - phone = Phone, dict = Dict}) -> - io:format("Name: ~s, Age: ~w, Phone: ~w ~n" - "Dictionary: ~w.~n", [Name, Age, Phone, Dict]). - -%% Demonstrates type testing, selector, updating. - -birthday(P) when is_record(P, person) -> - P#person{age = P#person.age + 1}. - -register_two_hackers() -> - Hacker1 = make_hacker_without_phone("Joe", 29), - OldHacker = birthday(Hacker1), - % The central_register_server should have - % an interface function for this. - central_register_server ! {register_person, Hacker1}, - central_register_server ! {register_person, - OldHacker#person{name = "Robert", - phone = [0,8,3,2,4,5,3,1]}}. - -%% From https://erlang.org/doc/programming_examples/records.html#a-longer-example \ No newline at end of file diff --git a/docs/shiki/samples/fish.sample b/docs/shiki/samples/fish.sample deleted file mode 100644 index f3ec67a1..00000000 --- a/docs/shiki/samples/fish.sample +++ /dev/null @@ -1,13 +0,0 @@ -function fish_prompt - # A simple prompt. Displays the current directory - # (which fish stores in the $PWD variable) - # and then a user symbol - a '►' for a normal user and a '#' for root. - set -l user_char '►' - if fish_is_root_user - set user_char '#' - end - - echo (set_color yellow)$PWD (set_color purple)$user_char -end - -# From https://fishshell.com/docs/current/language.html#functions diff --git a/docs/shiki/samples/fsharp.sample b/docs/shiki/samples/fsharp.sample deleted file mode 100644 index 7666c305..00000000 --- a/docs/shiki/samples/fsharp.sample +++ /dev/null @@ -1,13 +0,0 @@ -type Customer(firstName, middleInitial, lastName) = - member this.FirstName = firstName - member this.MiddleInitial = middleInitial - member this.LastName = lastName - - member this.SayFullName() = - $"{this.FirstName} {this.MiddleInitial} {this.LastName}" - -let customer = Customer("Emillia", "C", "Miller") - -printfn $"Hello, I'm {customer.SayFullName()}!" - -// From https://dotnet.microsoft.com/languages/fsharp \ No newline at end of file diff --git a/docs/shiki/samples/fsl.sample b/docs/shiki/samples/fsl.sample deleted file mode 100644 index 1b021545..00000000 --- a/docs/shiki/samples/fsl.sample +++ /dev/null @@ -1,47 +0,0 @@ - -machine_name : "TCP/IP"; -machine_reference : "http://www.texample.net/tikz/examples/tcp-state-machine/"; -machine_version : 1.0.0; - -machine_author : "John Haugeland "; -machine_license : MIT; - -jssm_version : >= 5.0.0; - - - -Closed 'Passive open' -> Listen; -Closed 'Active Open / SYN' -> SynSent; - -Listen 'Close' -> Closed; -Listen 'Send / SYN' -> SynSent; -Listen 'SYN / SYN+ACK' -> SynRcvd; - -SynSent 'Close' -> Closed; -SynSent 'SYN / SYN+ACK' -> SynRcvd; -SynSent 'SYN+ACK / ACK' -> Established; - -SynRcvd 'Timeout / RST' -> Closed; -SynRcvd 'Close / FIN' -> FinWait1; -SynRcvd 'ACK' -> Established; - -Established 'Close / FIN' -> FinWait1; -Established 'FIN / ACK' -> CloseWait; - -FinWait1 'FIN / ACK' -> Closing; // the source diagram has this action wrong -FinWait1 'FIN+ACK / ACK' -> TimeWait; -FinWait1 'ACK / Nothing' -> FinWait2; // see http://www.cs.odu.edu/~cs779/spring17/lectures/architecture_files/image009.jpg - -FinWait2 'FIN / ACK' -> TimeWait; - -Closing 'ACK' -> TimeWait; - -TimeWait 'Up to 2*MSL' -> Closed; - -CloseWait 'Close / FIN' -> LastAck; - -LastAck 'ACK' -> Closed; - - - -# From https://github.com/StoneCypher/jssm/blob/main/src/machines/linguist/tcp%20ip.fsl \ No newline at end of file diff --git a/docs/shiki/samples/gdresource.sample b/docs/shiki/samples/gdresource.sample deleted file mode 100644 index 6f2acf33..00000000 --- a/docs/shiki/samples/gdresource.sample +++ /dev/null @@ -1,95 +0,0 @@ -[gd_scene load_steps=7 format=2] - -[ext_resource path="res://Example.gd" type="Script" id=1] - -[sub_resource type="Environment" id=1] -background_mode = 4 -tonemap_mode = 3 -glow_enabled = true -glow_blend_mode = 0 - -[sub_resource type="Animation" id=2] -resource_name = "RESET" -tracks/0/type = "value" -tracks/0/path = NodePath("CanvasLayer/Panel:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ Color( 0, 0, 0, 0 ) ] -} - -[sub_resource type="Animation" id=3] -resource_name = "dim" -tracks/0/type = "value" -tracks/0/path = NodePath("CanvasLayer/Panel:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 1 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 0.501961 ) ] -} - -[sub_resource type="Animation" id=4] -tracks/0/type = "value" -tracks/0/path = NodePath("CanvasLayer/Panel:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 1 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 0, 0, 0, 1 ), Color( 0, 0, 0, 0 ) ] -} - -[sub_resource type="Animation" id=5] -tracks/0/type = "value" -tracks/0/path = NodePath("CanvasLayer/Panel:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 1 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ] -} - -[node name="Main" type="Node"] -script = ExtResource( 1 ) - -[node name="World" type="Node2D" parent="."] - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource( 1 ) - -[node name="CanvasLayer" type="CanvasLayer" parent="."] -layer = 128 - -[node name="Panel" type="Panel" parent="CanvasLayer"] -modulate = Color( 0, 0, 0, 0 ) -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="FadePlayer" type="AnimationPlayer" parent="."] -anims/RESET = SubResource( 2 ) -anims/dim = SubResource( 3 ) -anims/fade_in = SubResource( 4 ) -anims/fade_out = SubResource( 5 ) - -; from https://github.com/godotengine/godot-vscode-plugin/blob/cdc550a412dfffd26dfe7351e429b73c819d68d0/syntaxes/examples/Example.tscn \ No newline at end of file diff --git a/docs/shiki/samples/gdscript.sample b/docs/shiki/samples/gdscript.sample deleted file mode 100644 index a79e433e..00000000 --- a/docs/shiki/samples/gdscript.sample +++ /dev/null @@ -1,57 +0,0 @@ -extends Node -class_name TestClass2 -@icon("res://path/to/icon.png") - -# ****************************************************************************** - -@export var x : int -@export var y : int -@export var z : String -@export_node_path(Resource) var resource_name - -var array_a: Array[int] = [1, 2, 3] -var array_b: Array[String] = ['1', '2', '3'] - -@rpc -func remote_function_a(): - pass - -@rpc(any_peer, call_local, unreliable) -func remote_function_b(): - pass - -# ------------------------------------------------------------------------------ - -func f(): - await $Button.button_up - super() - super.some_function() - - for i in range(1): # `in` is a control keyword - print(i in range(1)) # `in` is an operator keyword - -func lambda_test(): - var lambda_a = func(param1, param2, param3): - pass - var lambda_b = func(param1, param2=func_a(10, 1.0, 'test')): - pass - var lambda_c = func(param1 = false, param2: bool = false, param3 := false): - pass - - lambda_a.call() - lambda_b.call() - lambda_c.call() - -# ------------------------------------------------------------------------------ - -signal changed(new_value) -var warns_when_changed = "some value": - get: - return warns_when_changed - set(value): - changed.emit(value) - warns_when_changed = value - -# ------------------------------------------------------------------------------ - -# from https://github.com/godotengine/godot-vscode-plugin/blob/cdc550a412dfffd26dfe7351e429b73c819d68d0/syntaxes/examples/gdscript2.gd \ No newline at end of file diff --git a/docs/shiki/samples/gdshader.sample b/docs/shiki/samples/gdshader.sample deleted file mode 100644 index c209300c..00000000 --- a/docs/shiki/samples/gdshader.sample +++ /dev/null @@ -1,97 +0,0 @@ -shader_type spatial; -render_mode wireframe; - -const lowp vec3 v[1] = lowp vec3[1] ( vec3(0, 0, 1) ); - -void fn() { - // The required amount of scalars - vec4 a0 = vec4(0.0, 1.0, 2.0, 3.0); - // Complementary vectors and/or scalars - vec4 a1 = vec4(vec2(0.0, 1.0), vec2(2.0, 3.0)); - vec4 a2 = vec4(vec3(0.0, 1.0, 2.0), 3.0); - // A single scalar for the whole vector - vec4 a3 = vec4(0.0); - - mat2 m2 = mat2(vec2(1.0, 0.0), vec2(0.0, 1.0)); - mat3 m3 = mat3(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0)); - mat4 identity = mat4(1.0); - - mat3 basis = mat3(identity); - mat4 m4 = mat4(basis); - mat2 m2a = mat2(m4); - - vec4 a = vec4(0.0, 1.0, 2.0, 3.0); - vec3 b = a.rgb; // Creates a vec3 with vec4 components. - vec3 b1 = a.ggg; // Also valid; creates a vec3 and fills it with a single vec4 component. - vec3 b2 = a.bgr; // "b" will be vec3(2.0, 1.0, 0.0). - vec3 b3 = a.xyz; // Also rgba, xyzw are equivalent. - vec3 b4 = a.stp; // And stpq (for texture coordinates). - b.bgr = a.rgb; // Valid assignment. "b"'s "blue" component will be "a"'s "red" and vice versa. - - lowp vec4 v0 = vec4(0.0, 1.0, 2.0, 3.0); // low precision, usually 8 bits per component mapped to 0-1 - mediump vec4 v1 = vec4(0.0, 1.0, 2.0, 3.0); // medium precision, usually 16 bits or half float - highp vec4 v2 = vec4(0.0, 1.0, 2.0, 3.0); // high precision, uses full float or integer range (default) - - const vec2 aa = vec2(0.0, 1.0); - vec2 bb; - bb = aa; // valid - - const vec2 V1 = vec2(1, 1), V2 = vec2(2, 2); - - float fa = 1.0; - float fb = 1.0f; - float fc = 1e-1; - - uint ua = 1u; - uint ub = uint(1); - - bool cond = false; - // `if` and `else`. - if (cond) { - } else { - } - // Ternary operator. - // This is an expression that behaves like `if`/`else` and returns the value. - // If `cond` evaluates to `true`, `result` will be `9`. - // Otherwise, `result` will be `5`. - int i, result = cond ? 9 : 5; - // `switch`. - switch (i) { // `i` should be a signed integer expression. - case -1: - break; - case 0: - return; // `break` or `return` to avoid running the next `case`. - case 1: // Fallthrough (no `break` or `return`): will run the next `case`. - case 2: - break; - //... - default: // Only run if no `case` above matches. Optional. - break; - } - // `for` loop. Best used when the number of elements to iterate on - // is known in advance. - for (int i = 0; i < 10; i++) { - } - // `while` loop. Best used when the number of elements to iterate on - // is not known in advance. - while (cond) { - } - // `do while`. Like `while`, but always runs at least once even if `cond` - // never evaluates to `true`. - do { - } while (cond); -} - -const float PI_ = 3.14159265358979323846; - -struct PointLight { - vec3 position; - vec3 color; - float intensity; -}; - -struct Scene { - PointLight lights[2]; -}; - -// from https://github.com/godotengine/godot-vscode-plugin/blob/cdc550a412dfffd26dfe7351e429b73c819d68d0/syntaxes/examples/example2.gdshader \ No newline at end of file diff --git a/docs/shiki/samples/gherkin.sample b/docs/shiki/samples/gherkin.sample deleted file mode 100644 index c4488565..00000000 --- a/docs/shiki/samples/gherkin.sample +++ /dev/null @@ -1,11 +0,0 @@ -Scenario: Eat 5 out of 12 - Given there are 12 cucumbers - When I eat 5 cucumbers - Then I should have 7 cucumbers - -Scenario: Eat 5 out of 20 - Given there are 20 cucumbers - When I eat 5 cucumbers - Then I should have 15 cucumbers - -# From https://gist.github.com/dogoku/0c024c55ec124355f01472abc70550f5 diff --git a/docs/shiki/samples/gjs.sample b/docs/shiki/samples/gjs.sample deleted file mode 100644 index ec4e2c25..00000000 --- a/docs/shiki/samples/gjs.sample +++ /dev/null @@ -1,18 +0,0 @@ -import { helper } from '@ember/component/helper'; -import { modifier } from 'ember-modifier'; - -const plusOne = helper(([num]) => num + 1); - -const setScrollPosition = modifier((element, [position]) => { - element.scrollTop = position -}); - - - -# From https://github.com/ember-template-imports/ember-template-imports diff --git a/docs/shiki/samples/glsl.sample b/docs/shiki/samples/glsl.sample deleted file mode 100644 index e92828cc..00000000 --- a/docs/shiki/samples/glsl.sample +++ /dev/null @@ -1,86 +0,0 @@ -#version 330 - -const float PI = 3.1415926535897932384626433832795; - -const float waveLength = 20.0; -const float waveAmplitude = 1.0; -const float specularReflectivity = 0.4; -const float shineDamper = 20.0; - -layout(location = 0) in vec2 in_position; -layout(location = 1) in vec4 in_indicators; - -out vec4 pass_clipSpaceGrid; -out vec4 pass_clipSpaceReal; -out vec3 pass_normal; -out vec3 pass_toCameraVector; -out vec3 pass_specular; -out vec3 pass_diffuse; - -uniform float height; -uniform vec3 cameraPos; -uniform float waveTime; - -uniform vec3 lightDirection; -uniform vec3 lightColour; -uniform vec2 lightBias; - -uniform mat4 projectionViewMatrix; - -vec3 calcSpecularLighting(vec3 toCamVector, vec3 toLightVector, vec3 normal){ - vec3 reflectedLightDirection = reflect(-toLightVector, normal); - float specularFactor = dot(reflectedLightDirection , toCamVector); - specularFactor = max(specularFactor,0.0); - specularFactor = pow(specularFactor, shineDamper); - return specularFactor * specularReflectivity * lightColour; -} - -vec3 calculateDiffuseLighting(vec3 toLightVector, vec3 normal){ - float brightness = max(dot(toLightVector, normal), 0.0); - return (lightColour * lightBias.x) + (brightness * lightColour * lightBias.y); -} - -vec3 calcNormal(vec3 vertex0, vec3 vertex1, vec3 vertex2){ - vec3 tangent = vertex1 - vertex0; - vec3 bitangent = vertex2 - vertex0; - return normalize(cross(tangent, bitangent)); -} - -float generateOffset(float x, float z){ - float radiansX = (x / waveLength + waveTime) * 2.0 * PI; - float radiansZ = (z / waveLength + waveTime) * 2.0 * PI; - return waveAmplitude * 0.5 * (sin(radiansZ) + cos(radiansX)); -} - -vec3 applyDistortion(vec3 vertex){ - float xDistortion = generateOffset(vertex.x, vertex.z); - float yDistortion = generateOffset(vertex.x, vertex.z); - float zDistortion = generateOffset(vertex.x, vertex.z); - return vertex + vec3(xDistortion, yDistortion, zDistortion); -} - -void main(void){ - - vec3 currentVertex = vec3(in_position.x, height, in_position.y); - vec3 vertex1 = currentVertex + vec3(in_indicators.x, 0.0, in_indicators.y); - vec3 vertex2 = currentVertex + vec3(in_indicators.z, 0.0, in_indicators.w); - - pass_clipSpaceGrid = projectionViewMatrix * vec4(currentVertex, 1.0); - - currentVertex = applyDistortion(currentVertex); - vertex1 = applyDistortion(vertex1); - vertex2 = applyDistortion(vertex2); - - pass_normal = calcNormal(currentVertex, vertex1, vertex2); - - pass_clipSpaceReal = projectionViewMatrix * vec4(currentVertex, 1.0); - gl_Position = pass_clipSpaceReal; - - pass_toCameraVector = normalize(cameraPos - currentVertex); - - vec3 toLightVector = -normalize(lightDirection); - pass_specular = calcSpecularLighting(pass_toCameraVector, toLightVector, pass_normal); - pass_diffuse = calculateDiffuseLighting(toLightVector, pass_normal); -} - -// From https://github.com/TheThinMatrix/WaterStep10/blob/master/water/waterRendering/waterVertex.glsl \ No newline at end of file diff --git a/docs/shiki/samples/gnuplot.sample b/docs/shiki/samples/gnuplot.sample deleted file mode 100644 index 86512267..00000000 --- a/docs/shiki/samples/gnuplot.sample +++ /dev/null @@ -1,20 +0,0 @@ -set title 'Hello, world' # plot title -set xlabel 'Time' # x-axis label -set ylabel 'Distance' # y-axis label - -# labels -set label "boiling point" at 10, 212 - -# key/legend -set key top right -set key box -set key left bottom -set key bmargin -set key 0.01,100 - -set nokey # no key - -# arrow -set arrow from 1,1 to 5,10 - -# From https://alvinalexander.com/technology/gnuplot-charts-graphs-examples/ diff --git a/docs/shiki/samples/go.sample b/docs/shiki/samples/go.sample deleted file mode 100644 index 0af70057..00000000 --- a/docs/shiki/samples/go.sample +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "fmt" - "log" - "net/http" -) - -func handler(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) -} - -func main() { - http.HandleFunc("/", handler) - log.Fatal(http.ListenAndServe(":8080", nil)) -} - -// From https://golang.org/doc/articles/wiki/#tmp_3 \ No newline at end of file diff --git a/docs/shiki/samples/graphql.sample b/docs/shiki/samples/graphql.sample deleted file mode 100644 index f50dab21..00000000 --- a/docs/shiki/samples/graphql.sample +++ /dev/null @@ -1,15 +0,0 @@ -query($number_of_repos:Int!) { - viewer { - name - repositories(last: $number_of_repos) { - nodes { - name - } - } - } -} -variables { - "number_of_repos": 3 -} - -# From https://docs.github.com/en/graphql/guides/forming-calls-with-graphql diff --git a/docs/shiki/samples/groovy.sample b/docs/shiki/samples/groovy.sample deleted file mode 100644 index a4d2c0d7..00000000 --- a/docs/shiki/samples/groovy.sample +++ /dev/null @@ -1,18 +0,0 @@ -import org.mortbay.jetty.Server -import org.mortbay.jetty.servlet.* -import groovy.servlet.* - -@Grab(group='org.mortbay.jetty', module='jetty-embedded', version='6.1.14') -def startJetty() { - def jetty = new Server(9090) - def context = new Context(jetty, '/', Context.SESSIONS) - context.setWelcomeFiles(["webserverIndex.groovy"] as String[]) - context.resourceBase = '.' - context.addServlet(GroovyServlet, '*.groovy') - jetty.start() -} - -println "Starting Jetty on port 9090, press Ctrl+C to stop." -startJetty() - -// From https://gist.github.com/saltnlight5/3756240 diff --git a/docs/shiki/samples/gts.sample b/docs/shiki/samples/gts.sample deleted file mode 100644 index 286d4d45..00000000 --- a/docs/shiki/samples/gts.sample +++ /dev/null @@ -1,7 +0,0 @@ -import type { TemplateOnlyComponent } from '@glimmer/component'; - -const Greet: TemplateOnlyComponent<{ name: string }> = - -# From https://rfcs.emberjs.com/id/0779-first-class-component-templates diff --git a/docs/shiki/samples/hack.sample b/docs/shiki/samples/hack.sample deleted file mode 100644 index 83d4c55b..00000000 --- a/docs/shiki/samples/hack.sample +++ /dev/null @@ -1,23 +0,0 @@ -<<__EntryPoint>> -async function my_example(): Awaitable { - $user_ids = vec[1, 2, 3]; - - // Initiate all the database requests together, - // so we spend less time waiting. - $user_names = await Vec\map_async( - $user_ids, - async ($id) ==> await fetch_user_name($id), - ); - // Execution continues after requests complete. - - echo Str\join($user_names, ", "); -} - -async function fetch_user_name( - int $_, -): Awaitable { - // This could be a database request. - return ""; -} - -// From hacklang.org diff --git a/docs/shiki/samples/haml.sample b/docs/shiki/samples/haml.sample deleted file mode 100644 index fa868933..00000000 --- a/docs/shiki/samples/haml.sample +++ /dev/null @@ -1,40 +0,0 @@ -!!! 5 -%html - %head - %title Example HAML - /[if IE] - %link{ :rel => "stylesheet", :href => "/css/ie.css" } - %body - #container - %header - %h1 Our Awesome HTML5 Template - #main - Did we mention this was awesome? - - / Only this line will be wrapped in a comment - %blockquote - %p Roads? Where we're going we don't need roads - - / - Now the whole block will be commented out - %blockquote - %p Roads? Where we're going we don't need roads - - %p The line below won't appear in the HTML - -# The rest of this line is a comment - %p The line above won't appear in the HTML, nor will the lines underneath - -# - None of this text will appear in our - rendered output - - %p= Time.now - - %footer - %address - .hcard - .fn Ian Oxley - .adr - .locality Newcastle-upon-Tyne - .country-name England - -/ From https://gist.github.com/ianoxley/1147666 diff --git a/docs/shiki/samples/handlebars.sample b/docs/shiki/samples/handlebars.sample deleted file mode 100644 index 7a4be637..00000000 --- a/docs/shiki/samples/handlebars.sample +++ /dev/null @@ -1,17 +0,0 @@ -
-

{{title}}

- {{#with story}} -
{{{intro}}}
-
{{{body}}}
- {{/with}} -
-
- {{#each comments}} -
-

{{subject}}

- {{{body}}} -
- {{/each}} -
- -{{! From https://handlebarsjs.com/guide/block-helpers.html#the-with-helper }} diff --git a/docs/shiki/samples/haskell.sample b/docs/shiki/samples/haskell.sample deleted file mode 100644 index dd0c5690..00000000 --- a/docs/shiki/samples/haskell.sample +++ /dev/null @@ -1,23 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE QuasiQuotes #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE MultiParamTypeClasses #-} - -import Yesod - -data WebApp = WebApp - -instance Yesod WebApp - -mkYesod "WebApp" [parseRoutes| - / HomeR GET -|] - -getHomeR = defaultLayout [whamlet| -
Hello, world! -|] - -main = warpEnv WebApp - -{-# From https://www.schoolofhaskell.com/user/eriks/Simple%20examples } diff --git a/docs/shiki/samples/hcl.sample b/docs/shiki/samples/hcl.sample deleted file mode 100644 index e573b466..00000000 --- a/docs/shiki/samples/hcl.sample +++ /dev/null @@ -1,15 +0,0 @@ -io_mode = "async" - -service "http" "web_proxy" { - listen_addr = "127.0.0.1:8080" - - process "main" { - command = ["/usr/local/bin/awesome-app", "server"] - } - - process "mgmt" { - command = ["/usr/local/bin/awesome-app", "mgmt"] - } -} - -# From: https://github.com/hashicorp/hcl/blob/main/README.md \ No newline at end of file diff --git a/docs/shiki/samples/hjson.sample b/docs/shiki/samples/hjson.sample deleted file mode 100644 index d3ea3a5d..00000000 --- a/docs/shiki/samples/hjson.sample +++ /dev/null @@ -1,25 +0,0 @@ -{ - // use #, // or /**/ comments, - // omit quotes for keys - key: 1 - // omit quotes for strings - contains: everything on this line - // omit commas at the end of a line - cool: { - foo: 1 - bar: 2 - } - // allow trailing commas - list: [ - 1, - 2, - ] - // and use multiline strings - realist: - ''' - My half empty glass, - I will fill your empty half. - Now you are half full. - ''' - // From: https://hjson.github.io/ -} diff --git a/docs/shiki/samples/hlsl.sample b/docs/shiki/samples/hlsl.sample deleted file mode 100644 index 7df27992..00000000 --- a/docs/shiki/samples/hlsl.sample +++ /dev/null @@ -1,20 +0,0 @@ -struct VS_OUTPUT -{ - float4 Position : SV_POSITION; - float4 Diffuse : COLOR0; - float2 TextureUV : TEXCOORD0; -}; - -VS_OUTPUT RenderSceneVS( float4 vPos : POSITION, - float3 vNormal : NORMAL, - float2 vTexCoord0 : TEXCOORD, - uniform int nNumLights, - uniform bool bTexture, - uniform bool bAnimate ) -{ - VS_OUTPUT Output; - ... - return Output; -} - -// From https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-function-syntax diff --git a/docs/shiki/samples/html.sample b/docs/shiki/samples/html.sample deleted file mode 100644 index 1a3cf64f..00000000 --- a/docs/shiki/samples/html.sample +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - MDN Web Docs Example: Toggling full-screen mode - - - - - - - -
- -
- - - - - -
- -
- - - - - - diff --git a/docs/shiki/samples/http.sample b/docs/shiki/samples/http.sample deleted file mode 100644 index 0bada40e..00000000 --- a/docs/shiki/samples/http.sample +++ /dev/null @@ -1,18 +0,0 @@ -// Basic authentication -GET http://example.com -Authorization: Basic username password - -### - -// Digest authentication -GET http://example.com -Authorization: Digest username password - -// The request body is provided in place -POST https://example.com:8080/api/html/post HTTP/1.1 -Content-Type: application/json -Cookie: key=first-value - -{ "key" : "value", "list": [1, 2, 3] } - -// From https://www.jetbrains.com/help/idea/exploring-http-syntax.html#use-multipart-form-data diff --git a/docs/shiki/samples/imba.sample b/docs/shiki/samples/imba.sample deleted file mode 100644 index c8c5b399..00000000 --- a/docs/shiki/samples/imba.sample +++ /dev/null @@ -1,55 +0,0 @@ -global css body m:0 p:0 rd:lg bg:yellow1 of:hidden -tag value-picker - css w:100px h:40px pos:rel - d:hgrid ji:center ai:center - css .item h:100% pos:rel tween:styles 0.1s ease-out - - def update e - data = options[e.x] - - - for item in options - - -tag stroke-picker < value-picker - css .item bg:black w:calc($value*1px) h:40% rd:sm - o:0.3 @hover:0.8 .sel:1 - -tag color-picker < value-picker - css .item js:stretch rdt:lg bg:$value mx:2px scale-y.sel:1.5 - -tag app-canvas - prop dpr = window.devicePixelRatio - prop state = {} - - def draw e - let path = e.#path ||= new Path2D - let ctx = $canvas.getContext('2d') - path.lineTo(e.x * dpr,e.y * dpr) - ctx.lineWidth = state.stroke * dpr - ctx.strokeStyle = state.color - ctx.stroke(path) - - def resized e - $canvas.width = offsetWidth * dpr - $canvas.height = offsetHeight * dpr - - - - -const strokes = [1,2,3,5,8,12] -const colors = ['#F59E0B','#10B981','#3B82F6','#8B5CF6'] -const state = {stroke: 5, color: '#3B82F6'} - -tag App - - 'draw here' - - - - - -imba.mount - -# from https://imba.io -# run online at https://scrimba.com/scrim/cPPdD4Aq \ No newline at end of file diff --git a/docs/shiki/samples/ini.sample b/docs/shiki/samples/ini.sample deleted file mode 100644 index 0a3aa8db..00000000 --- a/docs/shiki/samples/ini.sample +++ /dev/null @@ -1,12 +0,0 @@ -; last modified 1 April 2001 by John Doe -[owner] -name = John Doe -organization = Acme Widgets Inc. - -[database] -; use IP address in case network name resolution is not working -server = 192.0.2.62` -port = 143 -file = "payroll.dat" - -; From https://en.wikipedia.org/wiki/INI_file diff --git a/docs/shiki/samples/java.sample b/docs/shiki/samples/java.sample deleted file mode 100644 index b249d932..00000000 --- a/docs/shiki/samples/java.sample +++ /dev/null @@ -1,36 +0,0 @@ -import java.awt.Rectangle; - -public class ObjectVarsAsParameters -{ public static void main(String[] args) - { go(); - } - - public static void go() - { Rectangle r1 = new Rectangle(0,0,5,5); - System.out.println("In method go. r1 " + r1 + "\n"); - // could have been - //System.out.prinltn("r1" + r1.toString()); - r1.setSize(10, 15); - System.out.println("In method go. r1 " + r1 + "\n"); - alterPointee(r1); - System.out.println("In method go. r1 " + r1 + "\n"); - - alterPointer(r1); - System.out.println("In method go. r1 " + r1 + "\n"); - } - - public static void alterPointee(Rectangle r) - { System.out.println("In method alterPointee. r " + r + "\n"); - r.setSize(20, 30); - System.out.println("In method alterPointee. r " + r + "\n"); - } - - public static void alterPointer(Rectangle r) - { System.out.println("In method alterPointer. r " + r + "\n"); - r = new Rectangle(5, 10, 30, 35); - System.out.println("In method alterPointer. r " + r + "\n"); - } - -} - -// From https://www.cs.utexas.edu/~scottm/cs307/javacode/codeSamples/ObjectVarsAsParameters.java diff --git a/docs/shiki/samples/javascript.sample b/docs/shiki/samples/javascript.sample deleted file mode 100644 index 3e2035b1..00000000 --- a/docs/shiki/samples/javascript.sample +++ /dev/null @@ -1,29 +0,0 @@ -function resolveAfter2Seconds(x) { - return new Promise((resolve) => { - setTimeout(() => { - resolve(x); - }, 2000); - }); -} - -// async function expression assigned to a variable -const add = async function (x) { - const a = await resolveAfter2Seconds(20); - const b = await resolveAfter2Seconds(30); - return x + a + b; -}; - -add(10).then((v) => { - console.log(v); // prints 60 after 4 seconds. -}); - -// async function expression used as an IIFE -(async function (x) { - const p1 = resolveAfter2Seconds(20); - const p2 = resolveAfter2Seconds(30); - return x + (await p1) + (await p2); -})(10).then((v) => { - console.log(v); // prints 60 after 2 seconds. -}); - -// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/async_function diff --git a/docs/shiki/samples/jinja-html.sample b/docs/shiki/samples/jinja-html.sample deleted file mode 100644 index 778eb157..00000000 --- a/docs/shiki/samples/jinja-html.sample +++ /dev/null @@ -1,22 +0,0 @@ -{# templates/results.html #} - - - - - - Results - - - -

{{ test_name }} Results

-
    - {% for student in students %} -
  • - {{ student.name }}: {{ student.score }}/{{ max_score }} -
  • - {% endfor %} -
- - - -{# From https://realpython.com/primer-on-jinja-templating/#use-if-statements #} diff --git a/docs/shiki/samples/jison.sample b/docs/shiki/samples/jison.sample deleted file mode 100644 index 5a9f1942..00000000 --- a/docs/shiki/samples/jison.sample +++ /dev/null @@ -1,61 +0,0 @@ -/* description: Parses end executes mathematical expressions. */ - -/* lexical grammar */ -%lex - -%% -\s+ /* skip whitespace */ -[0-9]+("."[0-9]+)?\b return 'NUMBER'; -"*" return '*'; -"/" return '/'; -"-" return '-'; -"+" return '+'; -"^" return '^'; -"(" return '('; -")" return ')'; -"PI" return 'PI'; -"E" return 'E'; -<> return 'EOF'; - -/lex - -/* operator associations and precedence */ - -%left '+' '-' -%left '*' '/' -%left '^' -%left UMINUS - -%start expressions - -%% /* language grammar */ - -expressions - : e EOF - {print($1); return $1;} - ; - -e - : e '+' e - {$$ = $1+$3;} - | e '-' e - {$$ = $1-$3;} - | e '*' e - {$$ = $1*$3;} - | e '/' e - {$$ = $1/$3;} - | e '^' e - {$$ = Math.pow($1, $3);} - | '-' e %prec UMINUS - {$$ = -$2;} - | '(' e ')' - {$$ = $2;} - | NUMBER - {$$ = Number(yytext);} - | E - {$$ = Math.E;} - | PI - {$$ = Math.PI;} - ; - -/* From https://gerhobbelt.github.io/jison/docs/#specifying-a-language */ \ No newline at end of file diff --git a/docs/shiki/samples/json.sample b/docs/shiki/samples/json.sample deleted file mode 100644 index 62415ef2..00000000 --- a/docs/shiki/samples/json.sample +++ /dev/null @@ -1,38 +0,0 @@ -{ - "squadName": "Super hero squad", - "homeTown": "Metro City", - "formed": 2016, - "secretBase": "Super tower", - "active": true, - "members": [ - { - "name": "Molecule Man", - "age": 29, - "secretIdentity": "Dan Jukes", - "powers": ["Radiation resistance", "Turning tiny", "Radiation blast"] - }, - { - "name": "Madame Uppercut", - "age": 39, - "secretIdentity": "Jane Wilson", - "powers": [ - "Million tonne punch", - "Damage resistance", - "Superhuman reflexes" - ] - }, - { - "name": "Eternal Flame", - "age": 1000000, - "secretIdentity": "Unknown", - "powers": [ - "Immortality", - "Heat Immunity", - "Inferno", - "Teleportation", - "Interdimensional travel" - ] - } - ], - "from": "https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON" -} diff --git a/docs/shiki/samples/json5.sample b/docs/shiki/samples/json5.sample deleted file mode 100644 index 35ccc820..00000000 --- a/docs/shiki/samples/json5.sample +++ /dev/null @@ -1,41 +0,0 @@ -// This file is written in JSON5 syntax, naturally, but npm needs a regular -// JSON file, so compile via `npm run build`. Be sure to keep both in sync! - -{ - name: 'json5', - version: '0.5.0', - description: 'JSON for the ES5 era.', - keywords: ['json', 'es5'], - author: 'Aseem Kishore ', - contributors: [ - // TODO: Should we remove this section in favor of GitHub's list? - // https://github.com/aseemk/json5/contributors - 'Max Nanasy ', - 'Andrew Eisenberg ', - 'Jordan Tucker ', - ], - main: 'lib/json5.js', - bin: 'lib/cli.js', - files: ["lib/"], - dependencies: {}, - devDependencies: { - gulp: "^3.9.1", - 'gulp-jshint': "^2.0.0", - jshint: "^2.9.1", - 'jshint-stylish': "^2.1.0", - mocha: "^2.4.5" - }, - scripts: { - build: 'node ./lib/cli.js -c package.json5', - test: 'mocha --ui exports --reporter spec', - // TODO: Would it be better to define these in a mocha.opts file? - }, - homepage: 'http://json5.org/', - license: 'MIT', - repository: { - type: 'git', - url: 'https://github.com/aseemk/json5.git', - }, -} - -// From https://github.com/mrmlnc/vscode-json5/blob/master/syntaxes/json5.json diff --git a/docs/shiki/samples/jsonc.sample b/docs/shiki/samples/jsonc.sample deleted file mode 100644 index 043f64df..00000000 --- a/docs/shiki/samples/jsonc.sample +++ /dev/null @@ -1,34 +0,0 @@ -// A jsonc example document -{ - owner:{ - name:`komkom` - dob: /* just some random dob */ `1975-01-25T12:00:00-02:00` - } - - database:{ // our live db - server:`192.168.1.1` - ports:[8001,8002,8003] - connectionMax:5000 - enabled:true - } - - servers:{ // a server - alpha:{ - ip: /* is soon invalid */ `10.0.0.1` - dc:`eqdc10` - } - - beta:{ - ip:`10.0.0.2` - dc:`eqdc10` - } - } - - clients:{ - data:[["gamma","delta"],[1,2]] - } - - hosts:[alpha,omega] -} - -// From https://github.com/komkom/jsonc diff --git a/docs/shiki/samples/jsonl.sample b/docs/shiki/samples/jsonl.sample deleted file mode 100644 index 43901f21..00000000 --- a/docs/shiki/samples/jsonl.sample +++ /dev/null @@ -1,31 +0,0 @@ -{"name": "Gilbert", "wins": [["straight", "7♣"], ["one pair", "10♥"]]} -{"name": "Alexa", "wins": [["two pair", "4♠"], ["two pair", "9♠"]]} -{"name": "May", "wins": []} -{"name": "Deloise", "wins": [["three of a kind", "5♣"]]} -{ - "name": "Gilbert", - "wins": [ - [ - "straight", - "7♣" - ], - [ - "one pair", - "10♥" - ] - ] -} -{ - "name": "Alexa", - "wins": [ - [ - "two pair", - "4♠" - ], - [ - "two pair", - "9♠" - ] - ] -} -// From https://jsonlines.org/examples/ diff --git a/docs/shiki/samples/jsonnet.sample b/docs/shiki/samples/jsonnet.sample deleted file mode 100644 index cdcdd515..00000000 --- a/docs/shiki/samples/jsonnet.sample +++ /dev/null @@ -1,33 +0,0 @@ -/* A C-style comment. */ -# A Python-style comment. -{ - cocktails: { - // Ingredient quantities are in fl oz. - 'Tom Collins': { - ingredients: [ - { kind: "Farmer's Gin", qty: 1.5 }, - { kind: 'Lemon', qty: 1 }, - { kind: 'Simple Syrup', qty: 0.5 }, - { kind: 'Soda', qty: 2 }, - { kind: 'Angostura', qty: 'dash' }, - ], - garnish: 'Maraschino Cherry', - served: 'Tall', - description: ||| - The Tom Collins is essentially gin and - lemonade. The bitters add complexity. - |||, - }, - Manhattan: { - ingredients: [ - { kind: 'Rye', qty: 2.5 }, - { kind: 'Sweet Red Vermouth', qty: 1 }, - { kind: 'Angostura', qty: 'dash' }, - ], - garnish: 'Maraschino Cherry', - served: 'Straight Up', - description: @'A clear \ red drink.', - }, - }, -} -# From https://jsonnet.org/learning/tutorial.html diff --git a/docs/shiki/samples/jssm.sample b/docs/shiki/samples/jssm.sample deleted file mode 100644 index 87e6ca08..00000000 --- a/docs/shiki/samples/jssm.sample +++ /dev/null @@ -1,22 +0,0 @@ - -machine_name : "BGP"; -machine_reference : "http://www.inetdaemon.com/tutorials/internet/ip/routing/bgp/operation/finite_state_model.shtml"; -machine_version : 1.0.0; - -machine_author : "John Haugeland "; -machine_license : MIT; - -jssm_version : >= 5.0.0; - - - - Idle -> [Idle Connect]; - Connect -> [Idle Connect OpenSent Active]; - Active -> [Idle Connect OpenSent Active]; - OpenSent -> [Idle Active OpenConfirm]; -OpenConfirm -> [Idle OpenSent OpenConfirm Established]; -Established -> [Idle Established]; - - - -# from https://github.com/StoneCypher/jssm/blob/main/src/machines/linguist/bgp.fsl \ No newline at end of file diff --git a/docs/shiki/samples/jsx.sample b/docs/shiki/samples/jsx.sample deleted file mode 100644 index 1f420e01..00000000 --- a/docs/shiki/samples/jsx.sample +++ /dev/null @@ -1,30 +0,0 @@ -function Item({ name, isPacked }) { - if (isPacked) { - return null; - } - return
  • {name}
  • ; -} - -export default function PackingList() { - return ( -
    -

    Sally Ride's Packing List

    -
      - - - -
    -
    - ); -} - -// From https://react.dev/learn/conditional-rendering diff --git a/docs/shiki/samples/julia.sample b/docs/shiki/samples/julia.sample deleted file mode 100644 index 7d009e89..00000000 --- a/docs/shiki/samples/julia.sample +++ /dev/null @@ -1,16 +0,0 @@ -function mandelbrot(a) - z = 0 - for i=1:50 - z = z^2 + a - end - return z -end - -for y=1.0:-0.05:-1.0 - for x=-2.0:0.0315:0.5 - abs(mandelbrot(complex(x, y))) < 2 ? print("*") : print(" ") - end - println() -end - -# From: https://rosettacode.org/wiki/Mandelbrot_set#Julia diff --git a/docs/shiki/samples/kotlin.sample b/docs/shiki/samples/kotlin.sample deleted file mode 100644 index 9978294c..00000000 --- a/docs/shiki/samples/kotlin.sample +++ /dev/null @@ -1,149 +0,0 @@ -package com.example.kotlin - -import java.util.Random as Rand -import android.support.v7.app.AppCompatActivity -import org.amshove.kluent.`should equal` as Type - -fun main(@NonNull args: Array) { - println("Hello Kotlin! ${/*test*/}") - - val map = mutableMapOf("A" to "B") - - thing.apply("random string here \n\t\r") - thing.let { test: -> } - - val string = "${getThing()}" -} - -val items = listOf("apple", "banana", "kiwifruit") -var x = 9 -const val CONSTANT = 99 - -@get:Rule -val activityRule = ActivityTestRule(SplashActivity::class.java) - -val oneMillion = 1_000_000 -val creditCardNumber = 1234_5678_9012_3456L -val socialSecurityNumber = 999_99_9999L -val hexBytes = 0xFF_EC_DE_5E -val float = 0.043_331F -val bytes = 0b11010010_01101001_10010100_10010010 - -if(test == "") { - 1 and 2 not 3 -} else { - -} - -fun foo() { - val x = Bar::class - val y = hello?.test -} - -suspend fun SequenceBuilder.yieldIfOdd(x: Int) { - if (x % 2 != 0) yield(x) -} - -val function = fun(@Inject x: Int, y: Int, lamda: (A, B) -> Unit): Int { - test.test() - return x + y; -} - -abstract fun onCreate(savedInstanceState: Bundle?) - -fun isOdd(x: Int) = x % 2 != 0 -fun isOdd(s: String) = s == "brillig" || s == "slithy" || s == "tove" - -val numbers = listOf(1, 2, 3) -println(numbers.filter(::isOdd)) - -fun foo(node: Node?): String? { - val parent = node.getParent() ?: return null -} - -interface Greetable { - fun greet() -} - -open class Greeter: Greetable { - companion object { - private const val GREETING = "Hello, World!" - } - - override fun greet() { - println(GREETING) - } -} - -expect class Foo(bar: String) { - fun frob() -} - -actual class Foo actual constructor(val bar: String) { - actual fun frob() { - println("Frobbing the $bar") - } -} - -expect fun formatString(source: String, vararg args: Any): String -expect annotation class Test - -actual fun formatString(source: String, vararg args: Any) = String.format(source, args) -actual typealias Test = org.junit.Test - -sealed class Expr -data class Const(val number: Double) : Expr() -data class Sum(val e1: Expr, val e2: Expr) : Expr() -object NotANumber : Expr() - -@file:JvmName("Foo") -private sealed class InjectedClass @Inject constructor( - val test: Int = 50, - var anotherVar: String = "hello world" -) : SomeSuperClass(test, anotherVar) { - - init { - // - } - - constructor(param1: String, param2: Int): this(param1, param2) { - // - } - - companion object { - // - } -} -annotation class Suspendable -val f = @Suspendable { Fiber.sleep(10) } - - -private data class Foo( - /** - * ``` - * ($) - * ``` - */ - val variables: Map -) - -data class Response(@SerializedName("param1") val param1: String, - @SerializedName("param2") val param2: String, - @SerializedName("param3") val param3: String) { -} - -object DefaultListener : MouseAdapter() { - override fun mouseClicked(e: MouseEvent) { } - - override fun mouseEntered(e: MouseEvent) { } -} - -class Feature : Node("Title", "Content", "Description") { - -} - -class Outer { - inner class Inner {} -} - -// From: https://github.com/nishtahir/language-kotlin/blob/master/snapshots/corpus.kt \ No newline at end of file diff --git a/docs/shiki/samples/kusto.sample b/docs/shiki/samples/kusto.sample deleted file mode 100644 index d2c0d41c..00000000 --- a/docs/shiki/samples/kusto.sample +++ /dev/null @@ -1,7 +0,0 @@ -let dt = datetime(2017-01-29 09:00:05); -print -v1=format_datetime(dt,'yy-MM-dd [HH:mm:ss]'), -v2=format_datetime(dt, 'yyyy-M-dd [H:mm:ss]'), -v3=format_datetime(dt, 'yy-MM-dd [hh:mm:ss tt]') - -// From https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/ diff --git a/docs/shiki/samples/latex.sample b/docs/shiki/samples/latex.sample deleted file mode 100644 index d3890d80..00000000 --- a/docs/shiki/samples/latex.sample +++ /dev/null @@ -1,31 +0,0 @@ -% This is a simple sample document. For more complicated documents take a look in the exercise tab. Note that everything that comes after a % symbol is treated as comment and ignored when the code is compiled. - -\documentclass{article} % \documentclass{} is the first command in any LaTeX code. It is used to define what kind of document you are creating such as an article or a book, and begins the document preamble - -\usepackage{amsmath} % \usepackage is a command that allows you to add functionality to your LaTeX code - -\title{Simple Sample} % Sets article title -\author{My Name} % Sets authors name -\date{\today} % Sets date for date compiled - -% The preamble ends with the command \begin{document} -\begin{document} % All begin commands must be paired with an end command somewhere - \maketitle % creates title using information in preamble (title, author, date) - - \section{Hello World!} % creates a section - - \textbf{Hello World!} Today I am learning \LaTeX. %notice how the command will end at the first non-alphabet charecter such as the . after \LaTeX - \LaTeX{} is a great program for writing math. I can write in line math such as $a^2+b^2=c^2$ %$ tells LaTexX to compile as math - . I can also give equations their own space: - \begin{equation} % Creates an equation environment and is compiled as math - \gamma^2+\theta^2=\omega^2 - \end{equation} - If I do not leave any blank lines \LaTeX{} will continue this text without making it into a new paragraph. Notice how there was no indentation in the text after equation (1). - Also notice how even though I hit enter after that sentence and here $\downarrow$ - \LaTeX{} formats the sentence without any break. Also look how it doesn't matter how many spaces I put between my words. - - For a new paragraph I can leave a blank space in my code. - -\end{document} % This is the end of the document - -% From https://guides.nyu.edu/LaTeX/sample-document diff --git a/docs/shiki/samples/less.sample b/docs/shiki/samples/less.sample deleted file mode 100644 index bb456b78..00000000 --- a/docs/shiki/samples/less.sample +++ /dev/null @@ -1,31 +0,0 @@ -.button { - &-ok { - background-image: url("ok.png"); - } - &-cancel { - background-image: url("cancel.png"); - } - - &-custom { - background-image: url("custom.png"); - } -} -.link { - & + & { - color: red; - } - - & & { - color: green; - } - - && { - color: blue; - } - - &, &ish { - color: cyan; - } -} - -// From https://lesscss.org/features/#parent-selectors-feature diff --git a/docs/shiki/samples/liquid.sample b/docs/shiki/samples/liquid.sample deleted file mode 100644 index 00d39067..00000000 --- a/docs/shiki/samples/liquid.sample +++ /dev/null @@ -1,14 +0,0 @@ -

    Recommended Products

    - - -{%- comment -%} From https://www.codeshopify.com/blog_posts/related-products-with-product_list-sections-metafields {%- endcomment -%} diff --git a/docs/shiki/samples/lisp.sample b/docs/shiki/samples/lisp.sample deleted file mode 100644 index eaa4242f..00000000 --- a/docs/shiki/samples/lisp.sample +++ /dev/null @@ -1,25 +0,0 @@ -;;; testing.lisp -;;; by Philip Fong -;;; -;;; Introductory comments are preceded by ";;;" -;;; Function headers are preceded by ";;" -;;; Inline comments are introduced by ";" -;;; - -;; -;; Triple the value of a number -;; - -(defun triple (X) - "Compute three times X." ; Inline comments can - (* 3 X)) ; be placed here. - -;; -;; Negate the sign of a number -;; - -(defun negate (X) - "Negate the value of X." ; This is a documentation string. - (- X)) - -;;; From https://www2.cs.sfu.ca/CourseCentral/310/pwfong/Lisp/1/tutorial1.html diff --git a/docs/shiki/samples/logo.sample b/docs/shiki/samples/logo.sample deleted file mode 100644 index 949e777c..00000000 --- a/docs/shiki/samples/logo.sample +++ /dev/null @@ -1,21 +0,0 @@ -print word "apple "sauce -; applesauce - -print word "3 "4 -; 34 - -print 12 + word "3 "4 -; 46 - -to factorial :number -if :number = 1 [output 1] -output :number * factorial :number - 1 -end - -print factorial 3 -; 6 - -print factorial 5 -; 120 - -; From https://el.media.mit.edu/logo-foundation/what_is_logo/logo_programming.html diff --git a/docs/shiki/samples/lua.sample b/docs/shiki/samples/lua.sample deleted file mode 100644 index 9ca8ec2c..00000000 --- a/docs/shiki/samples/lua.sample +++ /dev/null @@ -1,18 +0,0 @@ -ball = { - xpos = 60, - ypos = 60, - - -- without the colon syntax, must mention self argument explicitly - move = function(self, newx, newy) - self.xpos = newx - self.ypos = newy - end -} - --- using the colon, ball is passed as self automatically -ball:move(100, 120) - --- using the dot, must pass self explicitly -ball.move(ball, 100, 120) - --- From https://pico-8.fandom.com/wiki/Lua diff --git a/docs/shiki/samples/make.sample b/docs/shiki/samples/make.sample deleted file mode 100644 index e0893da1..00000000 --- a/docs/shiki/samples/make.sample +++ /dev/null @@ -1,26 +0,0 @@ -edit : main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - cc -o edit main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - -main.o : main.c defs.h - cc -c main.c -kbd.o : kbd.c defs.h command.h - cc -c kbd.c -command.o : command.c defs.h command.h - cc -c command.c -display.o : display.c defs.h buffer.h - cc -c display.c -insert.o : insert.c defs.h buffer.h - cc -c insert.c -search.o : search.c defs.h buffer.h - cc -c search.c -files.o : files.c defs.h buffer.h command.h - cc -c files.c -utils.o : utils.c defs.h - cc -c utils.c -clean : - rm edit main.o kbd.o command.o display.o \ - insert.o search.o files.o utils.o - -# From https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html diff --git a/docs/shiki/samples/markdown.sample b/docs/shiki/samples/markdown.sample deleted file mode 100644 index 644a2aae..00000000 --- a/docs/shiki/samples/markdown.sample +++ /dev/null @@ -1,161 +0,0 @@ -An h1 header -============ - -Paragraphs are separated by a blank line. - -2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists -look like: - - * this one - * that one - * the other one - -Note that --- not considering the asterisk --- the actual text -content starts at 4-columns in. - -> Block quotes are -> written like so. -> -> They can span multiple paragraphs, -> if you like. - -Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all -in chapters 12--14"). Three dots ... will be converted to an ellipsis. -Unicode is supported. ☺ - - - -An h2 header ------------- - -Here's a numbered list: - - 1. first item - 2. second item - 3. third item - -Note again how the actual text starts at 4 columns in (4 characters -from the left side). Here's a code sample: - - # Let me re-iterate ... - for i in 1 .. 10 { do-something(i) } - -As you probably guessed, indented 4 spaces. By the way, instead of -indenting the block, you can use delimited blocks, if you like: - -~~~ -define foobar() { - print "Welcome to flavor country!"; -} -~~~ - -(which makes copying & pasting easier). You can optionally mark the -delimited block for Pandoc to syntax highlight it: - -~~~python -import time -# Quick, count to ten! -for i in range(10): - # (but not *too* quick) - time.sleep(0.5) - print(i) -~~~ - - - -### An h3 header ### - -Now a nested list: - - 1. First, get these ingredients: - - * carrots - * celery - * lentils - - 2. Boil some water. - - 3. Dump everything in the pot and follow - this algorithm: - - find wooden spoon - uncover pot - stir - cover pot - balance wooden spoon precariously on pot handle - wait 10 minutes - goto first step (or shut off burner when done) - - Do not bump wooden spoon or it will fall. - -Notice again how text always lines up on 4-space indents (including -that last line which continues item 3 above). - -Here's a link to [a website](http://foo.bar), to a [local -doc](local-doc.html), and to a [section heading in the current -doc](#an-h2-header). Here's a footnote [^1]. - -[^1]: Some footnote text. - -Tables can look like this: - -Name Size Material Color -------------- ----- ------------ ------------ -All Business 9 leather brown -Roundabout 10 hemp canvas natural -Cinderella 11 glass transparent - -Table: Shoes sizes, materials, and colors. - -(The above is the caption for the table.) Pandoc also supports -multi-line tables: - --------- ----------------------- -Keyword Text --------- ----------------------- -red Sunsets, apples, and - other red or reddish - things. - -green Leaves, grass, frogs - and other things it's - not easy being. --------- ----------------------- - -A horizontal rule follows. - -*** - -Here's a definition list: - -apples - : Good for making applesauce. - -oranges - : Citrus! - -tomatoes - : There's no "e" in tomatoe. - -Again, text is indented 4 spaces. (Put a blank line between each -term and its definition to spread things out more.) - -Here's a "line block" (note how whitespace is honored): - -| Line one -| Line too -| Line tree - -and images can be specified like so: - -![example image](example-image.jpg "An exemplary image") - -Inline math equation: $\omega = d\phi / dt$. Display -math should get its own line like so: - -$$I = \int \rho R^{2} dV$$ - -And note that you can backslash-escape any punctuation characters -which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc. - - diff --git a/docs/shiki/samples/marko.sample b/docs/shiki/samples/marko.sample deleted file mode 100644 index e4ce98a2..00000000 --- a/docs/shiki/samples/marko.sample +++ /dev/null @@ -1,13 +0,0 @@ - - <@then>Done - <@catch|err|> - - Took too long to fetch the data! - - - Promise failed with ${err.message}. - - - - - diff --git a/docs/shiki/samples/matlab.sample b/docs/shiki/samples/matlab.sample deleted file mode 100644 index dfcb7c2a..00000000 --- a/docs/shiki/samples/matlab.sample +++ /dev/null @@ -1,22 +0,0 @@ - - -clear -number = input('Give an integer: '); -remainder2 = rem(number,2); -remainder3 = rem(number,3); - -if remainder2==0 & remainder3==0 - 'Your number is divisible by both 2 and 3' -else - if remainder2==0 - 'Your number is divisble by 2 but not by 3' - else - if remainder3==0 - 'Your number is divisible by 3 but not by 2' - else - 'Your number is not divisible by either 2 or 3' - end - end -end - -% From https://www.math.colostate.edu/~yzhou/course/matlab_doc/matlab_programming_intro.html diff --git a/docs/shiki/samples/mdc.sample b/docs/shiki/samples/mdc.sample deleted file mode 100644 index dfb01862..00000000 --- a/docs/shiki/samples/mdc.sample +++ /dev/null @@ -1,13 +0,0 @@ -::card ---- -icon: Icon -title: A complex card. ---- - -Default slot - -#description - ::alert - Description slot - :: -:: diff --git a/docs/shiki/samples/mdx.sample b/docs/shiki/samples/mdx.sample deleted file mode 100644 index 7dffc420..00000000 --- a/docs/shiki/samples/mdx.sample +++ /dev/null @@ -1,13 +0,0 @@ - - -You can also use objects with components, such as the `thisOne` component on -the `myComponents` object: - -} -/> - -{/* From https://mdxjs.com/docs/what-is-mdx/#mdx-syntax */} diff --git a/docs/shiki/samples/mermaid.sample b/docs/shiki/samples/mermaid.sample deleted file mode 100644 index f83923c9..00000000 --- a/docs/shiki/samples/mermaid.sample +++ /dev/null @@ -1,23 +0,0 @@ -graph TB - sq[Square shape] --> ci((Circle shape)) - - subgraph A - od>Odd shape]-- Two line
    edge comment --> ro - di{Diamond with
    line break} -.-> ro(Rounded
    square
    shape) - di==>ro2(Rounded square shape) - end - - %% Notice that no text in shape are added here instead that is appended further down - e --> od3>Really long text with linebreak
    in an Odd shape] - - %% Comments after double percent signs - e((Inner / circle
    and some odd
    special characters)) --> f(,.?!+-*ز) - - cyr[Cyrillic]-->cyr2((Circle shape Начало)); - - classDef green fill:#9f6,stroke:#333,stroke-width:2px; - classDef orange fill:#f96,stroke:#333,stroke-width:4px; - class sq,e green - class di orange - -%% From https://mermaid.js.org/syntax/examples.html diff --git a/docs/shiki/samples/mojo.sample b/docs/shiki/samples/mojo.sample deleted file mode 100644 index 019392e4..00000000 --- a/docs/shiki/samples/mojo.sample +++ /dev/null @@ -1,11 +0,0 @@ -def softmax(lst): - norm = np.exp(lst - np.max(lst)) - return norm / norm.sum() - -struct NDArray: - def max(self) -> NDArray: - return self.pmap(SIMD.max) - -struct SIMD[type: DType, width: Int]: - def max(self, rhs: Self) -> Self: - return (self >= rhs).select(self, rhs) \ No newline at end of file diff --git a/docs/shiki/samples/narrat.sample b/docs/shiki/samples/narrat.sample deleted file mode 100644 index 715ed9a1..00000000 --- a/docs/shiki/samples/narrat.sample +++ /dev/null @@ -1,92 +0,0 @@ -quest_demo: - set_button shopButton true - set_button parkButton greyed - jump bread_quest - -bread_quest: - choice: - talk helper idle "Can you get 2 pieces of bread for me?" - "Yes": - talk helper idle "Thanks, that's very nice!" - talk helper idle "I'll be waiting for you at the park" - jump bread_start - "No": - talk helper idle "Oh, okay" - jump quest_demo - -bread_start: - start_quest breadShopping - talk inner idle "Time to go to the shop to buy some bread then." - set_screen map - set_button shopButton true - -shopButton: - // set_screen default - "You visit the bread shop" - talk shopkeeper idle "Hello, I'm a little baker selling bread and drinks!" - set data.breadPrice 5 - jump shop_menu - -parkButton: - choice: - talk helper idle "Ah, so do you have my bread?" - "Yes!" if (>= $items.bread.amount 2): - talk helper idle "Thanks a lot!" - add_item bread -2 - complete_objective breadShopping delivery - complete_quest breadShopping - set_button parkButton false - jump demo_end - "No :(": - talk helper idle "Oh okay" - -shop_menu: - choice: - talk shopkeeper idle "So, do you want some bread?" - "Buy bread (costs %{$$data.breadPrice})" if (>= $stats.money.value $data.breadPrice): - add_item bread 1 - if (== $data.breadPrice 5): - add_stat money -5 - else: - add_stat money -4 - jump map_update - roll bread_haggle haggling 50 "Try to haggle for bread" hideAfterRoll: - success "You explain that helper cat needs bread to feed his poor family": - add_xp haggling 10 - set data.breadPrice 4 - talk shopkeeper idle "I guess I can sell you bread for 4 coins" - jump shop_menu - failure "You try to pity trip the shopkeeper but he won't bulge": - add_xp haggling 5 - talk shopkeeper idle "The price is 5 coins, nothing less, nothing more." - jump shop_menu - "Exit": - jump map_update - -show_map: - set_button parkButton false - set_button shopButton true - set_screen map - -map_update: - set_button parkButton false - set_button shopButton true - log $items.bread - if (>= $items.bread.amount 2): - complete_objective breadShopping bread - talk inner idle "I've got enough bread now, I'm going to go to the park." - start_objective breadShopping delivery - set_screen map - set_button parkButton true - set_button shopButton false - else: - talk inner idle "Hmm, I still need to buy more bread for helper cat." - set_screen map - -eat_bread: - talk player idle "hmm, bread" - -read_book: - talk inner idle "It's full of ocult rituals. I'm not sure what they are, but I'm sure they are useful." - -// From: https://github.com/liana-p/narrat-engine/blob/main/packages/narrat/examples/games/demo/data/quest.narrat \ No newline at end of file diff --git a/docs/shiki/samples/nextflow.sample b/docs/shiki/samples/nextflow.sample deleted file mode 100644 index a14adac2..00000000 --- a/docs/shiki/samples/nextflow.sample +++ /dev/null @@ -1,63 +0,0 @@ -/* - * The following pipeline parameters specify the reference genomes - * and read pairs and can be provided as command line options - */ -params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" -params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" -params.outdir = "results" - -workflow { - read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true ) - - INDEX(params.transcriptome) - FASTQC(read_pairs_ch) - QUANT(INDEX.out, read_pairs_ch) -} - -process INDEX { - tag "$transcriptome.simpleName" - - input: - path transcriptome - - output: - path 'index' - - script: - """ - salmon index --threads $task.cpus -t $transcriptome -i index - """ -} - -process FASTQC { - tag "FASTQC on $sample_id" - publishDir params.outdir - - input: - tuple val(sample_id), path(reads) - - output: - path "fastqc_${sample_id}_logs" - - script: - """ - fastqc.sh "$sample_id" "$reads" - """ -} - -process QUANT { - tag "$pair_id" - publishDir params.outdir - - input: - path index - tuple val(pair_id), path(reads) - - output: - path pair_id - - script: - """ - salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id - """ -} \ No newline at end of file diff --git a/docs/shiki/samples/nginx.sample b/docs/shiki/samples/nginx.sample deleted file mode 100644 index 49b778a8..00000000 --- a/docs/shiki/samples/nginx.sample +++ /dev/null @@ -1,72 +0,0 @@ -user www www; ## Default: nobody -worker_processes 5; ## Default: 1 -error_log logs/error.log; -pid logs/nginx.pid; -worker_rlimit_nofile 8192; - -events { - worker_connections 4096; ## Default: 1024 -} - -http { - include conf/mime.types; - include /etc/nginx/proxy.conf; - include /etc/nginx/fastcgi.conf; - index index.html index.htm index.php; - - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] $status ' - '"$request" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log logs/access.log main; - sendfile on; - tcp_nopush on; - server_names_hash_bucket_size 128; # this seems to be required for some vhosts - - server { # php/fastcgi - listen 80; - server_name domain1.com www.domain1.com; - access_log logs/domain1.access.log main; - root html; - - location ~ \.php$ { - fastcgi_pass 127.0.0.1:1025; - } - } - - server { # simple reverse-proxy - listen 80; - server_name domain2.com www.domain2.com; - access_log logs/domain2.access.log main; - - # serve static files - location ~ ^/(images|javascript|js|css|flash|media|static)/ { - root /var/www/virtual/big.server.com/htdocs; - expires 30d; - } - - # pass requests for dynamic content to rails/turbogears/zope, et al - location / { - proxy_pass http://127.0.0.1:8080; - } - } - - upstream big_server_com { - server 127.0.0.3:8000 weight=5; - server 127.0.0.3:8001 weight=5; - server 192.168.0.1:8000; - server 192.168.0.1:8001; - } - - server { # simple load balancing - listen 80; - server_name big.server.com; - access_log logs/big.server.access.log main; - - location / { - proxy_pass http://big_server_com; - } - } -} - -# From https://www.nginx.com/resources/wiki/start/topics/examples/full/ diff --git a/docs/shiki/samples/nim.sample b/docs/shiki/samples/nim.sample deleted file mode 100644 index fa1f50d8..00000000 --- a/docs/shiki/samples/nim.sample +++ /dev/null @@ -1,49 +0,0 @@ -type - Animal* = object - name*, species*: string - age: int - -proc sleep*(a: var Animal) = - a.age += 1 - -proc dead*(a: Animal): bool = - result = a.age > 20 - -var carl: Animal -carl = Animal(name : "Carl", - species : "L. glama", - age : 12) - -let joe = Animal(name : "Joe", - species : "H. sapiens", - age : 23) - -assert(not carl.dead) -for i in 0..10: - carl.sleep() -assert carl.deadtype - Animal* = object - name*, species*: string - age: int - -proc sleep*(a: var Animal) = - a.age += 1 - -proc dead*(a: Animal): bool = - result = a.age > 20 - -var carl: Animal -carl = Animal(name : "Carl", - species : "L. glama", - age : 12) - -let joe = Animal(name : "Joe", - species : "H. sapiens", - age : 23) - -assert(not carl.dead) -for i in 0..10: - carl.sleep() -assert carl.dead - -# From https://nim-by-example.github.io/types/objects/ diff --git a/docs/shiki/samples/nix.sample b/docs/shiki/samples/nix.sample deleted file mode 100644 index 1d0ebe30..00000000 --- a/docs/shiki/samples/nix.sample +++ /dev/null @@ -1,44 +0,0 @@ -{ - # dependencies - stdenv, fetchurl, nix-gitignore, buildGoModule, - - # args - localFiles ? false -}: - -buildGoModule rec { - - pname = "hello"; - version = "1.0"; - - src = ( - if localFiles then - nix-gitignore.gitignoreSource [ "result" ] ./. - else - fetchurl { - url = "https://example.com"; - sha256 = stdenv.lib.fakeSha256; - } - ); - - modSha256 = "1ggp6xhhlixihjx37v5j9gd3sa1gymqrglf9c3j1pwfnym1k99y3"; - - subPackages = [ "." ]; - - passthru = { - executable = "main"; - }; - - meta = with stdenv.lib; { - description = "Hello world example in Go"; - longDescription = '' - Long description for Hello world example in Go. - ''; - homepage = https://blog.golang.org/using-go-modules; - license = licenses.asl20; - maintainers = []; - platforms = platforms.all; - }; -} - -# From https://github.com/vlktomas/nix-examples/tree/master/desktop/Go/hello diff --git a/docs/shiki/samples/objective-c.sample b/docs/shiki/samples/objective-c.sample deleted file mode 100644 index c90e3d30..00000000 --- a/docs/shiki/samples/objective-c.sample +++ /dev/null @@ -1,13 +0,0 @@ -@interface classname : superclassname { - // instance variables -} -+ classMethod1; -+ (return_type)classMethod2; -+ (return_type)classMethod3:(param1_type)param1_varName; - -- (return_type)instanceMethod1With1Parameter:(param1_type)param1_varName; -- (return_type)instanceMethod2With2Parameters:(param1_type)param1_varName - param2_callName:(param2_type)param2_varName; -@end - -// From https://en.wikipedia.org/wiki/Objective-C diff --git a/docs/shiki/samples/objective-cpp.sample b/docs/shiki/samples/objective-cpp.sample deleted file mode 100644 index 24ef62af..00000000 --- a/docs/shiki/samples/objective-cpp.sample +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -typedef int (^IntBlock)(); - -IntBlock MakeCounter(int start, int increment) { - __block int i = start; - - return Block_copy( ^ { - int ret = i; - i += increment; - return ret; - }); - -} - -int main(void) { - IntBlock mycounter = MakeCounter(5, 2); - printf("First call: %d\n", mycounter()); - printf("Second call: %d\n", mycounter()); - printf("Third call: %d\n", mycounter()); - - /* because it was copied, it must also be released */ - Block_release(mycounter); - - return 0; -} -/* Output: - First call: 5 - Second call: 7 - Third call: 9 -*/ - -// From https://en.wikipedia.org/wiki/Objective-C diff --git a/docs/shiki/samples/ocaml.sample b/docs/shiki/samples/ocaml.sample deleted file mode 100644 index 5b624e73..00000000 --- a/docs/shiki/samples/ocaml.sample +++ /dev/null @@ -1,23 +0,0 @@ - -utop # type person = { name: string ; age: int ; human : bool };; -type person = { name : string; age : int; human : bool; } - -utop # let david = { name = "david" ; age = 32 ; human = false };; -val david : person = {name = "david"; age = 32; human = false} - -utop # let mary = { david with name = "mary" };; -val mary : person = {name = "mary"; age = 32; human = false} - -utop # let toggle_human (p : person) = { p with human = not p.human };; -val toggle_human : person -> person = - -utop # let () = - let david' = toggle_human david in - if david'.human then - print_endline "david is human" - else - print_endline "david is not human" -;; -david is human - -(** From https://o1-labs.github.io/ocamlbyexample/basics-records.html *) diff --git a/docs/shiki/samples/pascal.sample b/docs/shiki/samples/pascal.sample deleted file mode 100644 index 3d16eacc..00000000 --- a/docs/shiki/samples/pascal.sample +++ /dev/null @@ -1,109 +0,0 @@ -{***************************************************************************** - * A Pascal quicksort. - *****************************************************************************} -PROGRAM Sort(input, output); - CONST - { Max array size. } - MaxElts = 50; - TYPE - { Type of the element array. } - IntArrType = ARRAY [1..MaxElts] OF Integer; - - VAR - { Indexes, exchange temp, array size. } - i, j, tmp, size: integer; - - { Array of ints } - arr: IntArrType; - - { Read in the integers. } - PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType); - BEGIN - size := 1; - WHILE NOT eof DO BEGIN - readln(a[size]); - IF NOT eof THEN - size := size + 1 - END - END; - - { Use quicksort to sort the array of integers. } - PROCEDURE Quicksort(size: Integer; VAR arr: IntArrType); - { This does the actual work of the quicksort. It takes the - parameters which define the range of the array to work on, - and references the array as a global. } - PROCEDURE QuicksortRecur(start, stop: integer); - VAR - m: integer; - - { The location separating the high and low parts. } - splitpt: integer; - - { The quicksort split algorithm. Takes the range, and - returns the split point. } - FUNCTION Split(start, stop: integer): integer; - VAR - left, right: integer; { Scan pointers. } - pivot: integer; { Pivot value. } - - { Interchange the parameters. } - PROCEDURE swap(VAR a, b: integer); - VAR - t: integer; - BEGIN - t := a; - a := b; - b := t - END; - - BEGIN { Split } - { Set up the pointers for the hight and low sections, and - get the pivot value. } - pivot := arr[start]; - left := start + 1; - right := stop; - - { Look for pairs out of place and swap 'em. } - WHILE left <= right DO BEGIN - WHILE (left <= stop) AND (arr[left] < pivot) DO - left := left + 1; - WHILE (right > start) AND (arr[right] >= pivot) DO - right := right - 1; - IF left < right THEN - swap(arr[left], arr[right]); - END; - - { Put the pivot between the halves. } - swap(arr[start], arr[right]); - - { This is how you return function values in pascal. - Yeccch. } - Split := right - END; - - BEGIN { QuicksortRecur } - { If there's anything to do... } - IF start < stop THEN BEGIN - splitpt := Split(start, stop); - QuicksortRecur(start, splitpt-1); - QuicksortRecur(splitpt+1, stop); - END - END; - - BEGIN { Quicksort } - QuicksortRecur(1, size) - END; - - BEGIN - { Read } - ReadArr(size, arr); - - { Sort the contents. } - Quicksort(size, arr); - - { Print. } - FOR i := 1 TO size DO - writeln(arr[i]) - END. - -{ From http://sandbox.mc.edu/~bennet/cs404/doc/qsort_pas.html } diff --git a/docs/shiki/samples/perl.sample b/docs/shiki/samples/perl.sample deleted file mode 100644 index 43ab18d7..00000000 --- a/docs/shiki/samples/perl.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; - -# first, create your message -use Email::MIME; -my $message = Email::MIME->create( - header_str => [ - From => 'you@example.com', - To => 'friend@example.com', - Subject => 'Happy birthday!', - ], - attributes => { - encoding => 'quoted-printable', - charset => 'ISO-8859-1', - }, - body_str => "Happy birthday to you!\n", -); - -# send the message -use Email::Sender::Simple qw(sendmail); -sendmail($message); - -# From https://learn.perl.org/examples/email.html diff --git a/docs/shiki/samples/php.sample b/docs/shiki/samples/php.sample deleted file mode 100644 index b9af3eb9..00000000 --- a/docs/shiki/samples/php.sample +++ /dev/null @@ -1,29 +0,0 @@ -command('inspire')->hourly(); - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - - require base_path('routes/console.php'); - } -} - -// From https://github.com/laravel/laravel/blob/10.x/app/Console/Kernel.php diff --git a/docs/shiki/samples/plsql.sample b/docs/shiki/samples/plsql.sample deleted file mode 100644 index f03d7a6a..00000000 --- a/docs/shiki/samples/plsql.sample +++ /dev/null @@ -1,20 +0,0 @@ --- available online in file 'examp1' -DECLARE - qty_on_hand NUMBER(5); -BEGIN - SELECT quantity INTO qty_on_hand FROM inventory - WHERE product = 'TENNIS RACKET' - FOR UPDATE OF quantity; - IF qty_on_hand > 0 THEN -- check quantity - UPDATE inventory SET quantity = quantity - 1 - WHERE product = 'TENNIS RACKET'; - INSERT INTO purchase_record - VALUES ('Tennis racket purchased', SYSDATE); - ELSE - INSERT INTO purchase_record - VALUES ('Out of tennis rackets', SYSDATE); - END IF; - COMMIT; -END; - --- From https://docs.oracle.com/cd/B10500_01/appdev.920/a96624/01_oview.htm#7106 diff --git a/docs/shiki/samples/postcss.sample b/docs/shiki/samples/postcss.sample deleted file mode 100644 index 0a26ec9c..00000000 --- a/docs/shiki/samples/postcss.sample +++ /dev/null @@ -1,19 +0,0 @@ -{ - "plugins": [ - "postcss-flexbugs-fixes", - [ - "postcss-preset-env", - { - "autoprefixer": { - "flexbox": "no-2009" - }, - "stage": 3, - "features": { - "custom-properties": false - } - } - ] - ] -} - -// From https://nextjs.org/docs/pages/building-your-application/configuring/post-css diff --git a/docs/shiki/samples/powerquery.sample b/docs/shiki/samples/powerquery.sample deleted file mode 100644 index 27d9143f..00000000 --- a/docs/shiki/samples/powerquery.sample +++ /dev/null @@ -1,22 +0,0 @@ -// Transforms a table into markdown syntax -(Table as table) => - let - Source = Table, - TableValues = Table.AddColumn( - Source, "Custom", each Text.Combine(Record.FieldValues(_), " | ") - ), - HyphenLine = Text.Combine( - List.Transform( - Table.ColumnNames(Source), each Text.Repeat("-", Text.Length(_)) - ), - " | " - ), - CombineList = List.Combine( - {{Text.Combine(Table.ColumnNames(Source), " | ")}, - {HyphenLine}, TableValues[Custom]} - ), - TransferToMarkdown = Text.Combine(CombineList, "#(lf)") - in - TransferToMarkdown - -// From https://github.com/mogulargmbh/powerquerysnippets/blob/main/snippets/Table_ToMarkdown.pq diff --git a/docs/shiki/samples/powershell.sample b/docs/shiki/samples/powershell.sample deleted file mode 100644 index 65fe3b79..00000000 --- a/docs/shiki/samples/powershell.sample +++ /dev/null @@ -1,22 +0,0 @@ -## Define the service name in a variable -$ServiceName = 'EventLog' - -## Read the service from Windows to return a service object -$ServiceInfo = Get-Service -Name $ServiceName - -## If the server is not running (ne) -if ($ServiceInfo.Status -ne 'Running') { - ## Write to the console that the service is not running - Write-Host 'Service is not started, starting service' - ## Start the service - Start-Service -Name $ServiceName - ## Update the $ServiceInfo object to reflect the new state - $ServiceInfo.Refresh() - ## Write to the console the Status property which indicates the state of the service - Write-Host $ServiceInfo.Status -} else { ## If the Status is anything but Running - ## Write to the console the service is already running - Write-Host 'The service is already running.' -} - -## From https://adamtheautomator.com/powershell-script-examples/ diff --git a/docs/shiki/samples/prisma.sample b/docs/shiki/samples/prisma.sample deleted file mode 100644 index e5bf4ea8..00000000 --- a/docs/shiki/samples/prisma.sample +++ /dev/null @@ -1,41 +0,0 @@ -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -generator client { - provider = "prisma-client-js" -} - -/// Post including an author and content. -model Post { - id Int @default(autoincrement()) @id - content String? - published Boolean @default(false) - author User? @relation(fields: [authorId], references: [id]) - authorId Int? -} - -// Documentation for this model. -model User { - id Int @default(autoincrement()) @id - email String @unique - name String? - posts Post[] - specialName UserName - test Test -} - -/// This is an enum specifying the UserName. -enum UserName { - Fred - Eric -} - -// This is a test enum. -enum Test { - TestUno - TestDue -} - -// taken from https://github.com/prisma/language-tools/blob/master/packages/vscode/testFixture/hover.prisma diff --git a/docs/shiki/samples/prolog.sample b/docs/shiki/samples/prolog.sample deleted file mode 100644 index 2cc0bf68..00000000 --- a/docs/shiki/samples/prolog.sample +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/swipl -% vim: ft=prolog textwidth=80 tabstop=4 softtabstop=4 shiftwidth=4 expandtab - -map_size(78, 23). -map_upper_bound(XMax, YMax) :- - map_size(XSize, YSize), - XMax is XSize - 1, - YMax is YSize - 1. - -in_map(X, Y) :- - X >= 0, - Y >= 0, - map_size(XSize, YSize), - X < XSize, - Y < YSize. - -tile(wall, X, Y) :- \+ in_map(X, Y). -tile(floor, X, Y) :- in_map(X, Y). -% tile(wall, 0, _). -% tile(wall, _, 0). -% tile(wall, X, _) :- map_upper_bound(X, _). -% tile(wall, _, Y) :- map_upper_bound(_, Y). - -:- dynamic(player/2, messages/1). - -player(2,3). -messages(["", ""]). -message_lines(2). - -msg(Message) :- - messages(Tail), - retractall(messages(_)), - assertz(messages([Message|Tail])). - -%%%%%%%%%%%%%%%% -% drawing code % -%%%%%%%%%%%%%%%% - -draw_char(_X, Y) :- - tty_size(YSize, _), - % map_size(_, YSize), - Y >= YSize. -draw_char(X, Y) :- - tty_size(_, XSize), - % map_size(XSize, _), - X >= XSize, - NY is Y + 1, - %nl, - draw_char(0, NY). -draw_char(X, Y) :- - ( X = 0 - ->tty_goto(X, Y) - ; true - ), - - message_lines(YMsgs), - ( Y < YMsgs - -> write(' ') - ; display_offset(XOff, YOff), - XMap is X + XOff, - YMap is Y + YOff, - get_character(XMap, YMap, C), - format('~s', [C]) - ), - NX is X + 1, - draw_char(NX, Y). - -display_offset(X, Y) :- - player(XPos, YPos), - tty_size(YSize, XSize), - message_lines(YMsgs), - X is XPos - floor(XSize / 2), - Y is YPos - floor((YSize - YMsgs) / 2). - -display_msgs(Line) :- message_lines(Line). -display_msgs(Line) :- - message_lines(LineCount), - MsgId is LineCount - Line, - messages(Messages), - nth1(MsgId, Messages, Message), - tty_goto(0, Line), - format('~s', [Message]), - NextLine is Line + 1, - display_msgs(NextLine). - -draw :- - once(draw_char(0, 0)), - map_size(_, YSize), - display_msgs(0), - tty_goto(0, YSize). - -% character displayed for a position on map -get_character(X, Y, "@") :- player(X, Y). -get_character(X, Y, C) :- - tile(Tile, X, Y), - tile_display(Tile, C). - -tile_display(wall, "#"). -tile_display(floor, "."). - -tile_passable(floor). - -% % get line of a map to display as a string into aggregator, starting from XCur -% % as rightmost character -% get_line(Y, XCur, Trail, Agg) :- -% ( XCur < 0 -% -> Trail = Agg -% ; XPrev is XCur - 1, -% get_character(XCur, Y, C), -% get_line(Y, XPrev, [C|Trail], Agg) -% ). - -% get_screen(YCur, Trail, Agg) :- -% ( YCur < 0 -% -> Trail = Agg -% ; YPrev is YCur - 1, -% map_size(XSize, _), -% XLast is XSize - 1, -% get_line(YCur, XLast, [], Line), -% get_screen(YPrev, [Line|Trail], Agg) -% ). - -% get_screen(Lines) :- -% map_size(_, YSize), -% YLast is YSize - 1, -% get_screen(YLast, [], Lines). - -% % draw a list of lines on screen -% draw_lines([]). -% draw_lines([Line|Rest]) :- -% name(LineAtom, Line), -% write(LineAtom), -% nl, -% draw_lines(Rest). - -% % draw current map -% draw :- get_screen(Lines), draw_lines(Lines). - -%%%%%%%%%%%%%%%%%%%% -% interaction code % -%%%%%%%%%%%%%%%%%%%% - -move_player(X, Y) :- - player(XCur, YCur), - XNew is XCur + X, - YNew is YCur + Y, - ( tile(Tile, XNew, YNew), - tile_passable(Tile) - -> retractall(player(_, _)), - asserta(player(XNew, YNew)) - ; print('Bump!'), nl - ). - -act("\n"). -act("\r"). - -act("h") :- msg("left"), move_player(-1, 0). -act("j") :- msg("down"), move_player( 0, 1). -act("k") :- msg("up"), move_player( 0, -1). -act("l") :- msg("right"), move_player( 1, 0). - -act("y") :- move_player(-1, -1). -act("u") :- move_player( 1, -1). -act("b") :- move_player(-1, 1). -act("n") :- move_player( 1, 1). - -mainloop :- - draw, - get_single_char(C), - ( act([C]) - -> true - ; format(codes(Msg), 'unknown character code: ~d', [C]), - msg(Msg) - ), - mainloop. - -main :- mainloop. - -% From https://github.com/Anniepoo/prolog-examples/blob/master/roguelike.pl diff --git a/docs/shiki/samples/proto.sample b/docs/shiki/samples/proto.sample deleted file mode 100644 index f92e9e89..00000000 --- a/docs/shiki/samples/proto.sample +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package mypackage.books.v1; - -import "google/protobuf/empty.proto"; -import "google/api/field_behavior.proto"; - -import "google/api/annotations.proto"; - -option go_package = "mypackage.books.v1/books"; - -// Book service -service BooksService { - // Get a book. - rpc GetBook(GetBookRequest) returns (Book) { - option (google.api.http) = { - get: "/resources/store/v1/{name=books/*}" - }; - } -} - -// The definition of a book resource. -message Book { - // The name of the book. - // Format: books/{book}. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name of the book. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // The authors of the book. - repeated string authors = 3 [(google.api.field_behavior) = REQUIRED]; - - // The publisher of the book - string publisher = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for [play.me.resources.books.v1.BooksService.GetBook]. -message GetBookRequest { - // The book name is the unique identifier across organisations. - // Format: books/{book} - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// From https://alis.build/guides/how-to-guides/make-your-first-request.html#book-repository-example \ No newline at end of file diff --git a/docs/shiki/samples/pug.sample b/docs/shiki/samples/pug.sample deleted file mode 100644 index 6e6c6b57..00000000 --- a/docs/shiki/samples/pug.sample +++ /dev/null @@ -1,18 +0,0 @@ -doctype html -html(lang="en") - head - title= pageTitle - script(type='text/javascript'). - if (foo) bar(1 + 5); - body - h1 Pug - node template engine - #container.col - if youAreUsingPug - p You are amazing - else - p Get on it! - p. - Pug is a terse and simple templating language with a - strong focus on performance and powerful features. - -//- From https://github.com/pugjs/pug diff --git a/docs/shiki/samples/puppet.sample b/docs/shiki/samples/puppet.sample deleted file mode 100644 index 69f2e010..00000000 --- a/docs/shiki/samples/puppet.sample +++ /dev/null @@ -1,19 +0,0 @@ -class ntp::service { - - if ! ($ntp::service_ensure in [ 'running', 'stopped' ]) { - fail('service_ensure parameter must be running or stopped') - } - - if $ntp::service_manage == true { - service { 'ntp': - ensure => $ntp::service_ensure, - enable => $ntp::service_enable, - name => $ntp::service_name, - provider => $ntp::service_provider, - hasstatus => true, - hasrestart => true, - } - } -} - -# From https://www.puppet.com/docs/puppet/8/bgtm.html diff --git a/docs/shiki/samples/purescript.sample b/docs/shiki/samples/purescript.sample deleted file mode 100644 index b6a21a15..00000000 --- a/docs/shiki/samples/purescript.sample +++ /dev/null @@ -1,81 +0,0 @@ -module Main where - -import Data.Either (Either(..)) -import Data.Eq (class Eq) -import Data.Function.Uncurried (Fn2, mkFn2, runFn2) -import Data.List (List(..), filter, (:)) -import Data.Maybe (Maybe(..)) -import Data.String.Regex (Regex, parseFlags, regex, replace) -import Effect (Effect) -import Effect.Console (log, logShow) -import Partial.Unsafe (unsafePartial) -import Prelude (Unit, discard, map, mod, show, (+), (==), ($), (/=), (<>)) - -type Dict key value = key → Maybe value - -emptyDict :: ∀ k v. Dict k v -emptyDict _ = Nothing - -insertDict :: ∀ k v. (Eq k) => k → v → Dict k v → Dict k v -insertDict key value dict = - \key' → if key == key' - then (Just value) - else dict key' - - --- | Take a look at src/Main.js to see how we curry arguments --- | in Javascript -foreign import myAdd :: Int → Int → Int - --- | When performance is critical then use Data.Function.Uncurried -myAddFast :: Fn2 Int Int Int -myAddFast = mkFn2 \x y → x + y - -add10 :: Int -> Int -add10 = myAdd 10 - -modulo :: Int -> Int -> Int -modulo dvr dvd = dvd `mod` dvr - -isOdd :: Int -> Int -isOdd = modulo 2 - -getAllOdds :: List Int -> List Int -getAllOdds = filter (\x -> isOdd x /= 0) - -regexString :: Regex -regexString = - unsafePartial - case (regex "[aeiou]" (parseFlags "ig")) of - Right r -> r - -censor :: String -> String -censor = replace regexString "*" - -censorAll :: Array String -> Array String -censorAll = map censor - -main :: Effect Unit -main = do - log "Build curried functions" - log "\nAdvantage 1: Partially applying functions" - log $ "myAdd: " <> (show $ myAdd 2 2) - log "\nAdvantage 2: function types" - -- notice key' == key ('a' == 'a'), so return Just 1 - logShow $ (insertDict 'a' (1::Int) emptyDict) 'a' - -- search for 'a' in Dict and return its value - logShow $ insertDict 'b' 2 (insertDict 'a' (1::Int) emptyDict) 'a' - -- the 'x' key is not in Dict, so fall back to Nothing - logShow $ insertDict 'b' 2 (insertDict 'a' (1::Int) emptyDict) 'x' - log "\nCurrying Examples: add10, isOdd, isOdd21, getAllOdds" - logShow $ add10 2 - logShow $ isOdd 2 - logShow $ isOdd 21 - logShow $ getAllOdds (1 : 2 : 3 : 4 : Nil) - log "\nBuild up predicate functions" - log $ censor "hello world" - logShow $ censorAll ["hello", "world"] - log "\nUse Data.Function.Uncurried when performance is critical" - logShow $ runFn2 myAddFast 10 10 - --- From https://github.com/adkelley/javascript-to-purescript/blob/master/tut17/src/Main.purs diff --git a/docs/shiki/samples/python.sample b/docs/shiki/samples/python.sample deleted file mode 100644 index 4448995c..00000000 --- a/docs/shiki/samples/python.sample +++ /dev/null @@ -1,12 +0,0 @@ -def fib(n): # write Fibonacci series up to n - """Print a Fibonacci series up to n.""" - a, b = 0, 1 - while a < n: - print(a, end=' ') - a, b = b, a+b - print() - -# Now call the function we just defined: -fib(2000) - -# From https://docs.python.org/3/tutorial/controlflow.html#defining-functions \ No newline at end of file diff --git a/docs/shiki/samples/r.sample b/docs/shiki/samples/r.sample deleted file mode 100644 index e10ab6da..00000000 --- a/docs/shiki/samples/r.sample +++ /dev/null @@ -1,21 +0,0 @@ -Year.Release <- game$Year.Release -counts <- data.frame(table(Year.Release)) -p <- game %>% - select(Year.Release, Global.Sales) %>% - group_by(Year.Release) %>% - summarise(Total.Sales = sum(Global.Sales)) -q <- cbind.data.frame(p, counts[2]) # Add counts to data frame -names(q)[3] <- "count" -q$count <- as.numeric(q$count) - -ggplot(q, aes(x = Year.Release, y = Total.Sales, label = q$count)) + - geom_col(fill = "green") + - geom_point(y = q$count * 500000, size = 3, shape = 21, fill = "Yellow" ) + - geom_text(y = (q$count + 50) * 500000) + # Position of the text: count of games each year - theme(axis.text.x = element_text(angle = 90), - panel.background = element_rect(fill = "purple"), - panel.grid.major = element_blank(), - panel.grid.minor = element_blank()) + - scale_x_discrete("Year.Release", labels = as.character(Year.Release), breaks = Year.Release) - -# From https://gexijin.github.io/learnR/the-game-sales-dataset.html#analysis-of-sales diff --git a/docs/shiki/samples/raku.sample b/docs/shiki/samples/raku.sample deleted file mode 100644 index 7c915252..00000000 --- a/docs/shiki/samples/raku.sample +++ /dev/null @@ -1,37 +0,0 @@ -use v6; - -# start by printing out the header. -say "Tournament Results:\n"; - -my $file = open 'scores.txt'; # get filehandle and... -my @names = $file.get.words; # ... get players. - -my %matches; -my %sets; - -for $file.lines -> $line { - next unless $line; # ignore any empty lines - - my ($pairing, $result) = $line.split(' | '); - my ($p1, $p2) = $pairing.words; - my ($r1, $r2) = $result.split(':'); - - %sets{$p1} += $r1; - %sets{$p2} += $r2; - - if $r1 > $r2 { - %matches{$p1}++; - } else { - %matches{$p2}++; - } -} - -my @sorted = @names.sort({ %sets{$_} }).sort({ %matches{$_} }).reverse; - -for @sorted -> $n { - my $match-noun = %matches{$n} == 1 ?? 'match' !! 'matches'; - my $set-noun = %sets{$n} == 1 ?? 'set' !! 'sets'; - say "$n has won %matches{$n} $match-noun and %sets{$n} $set-noun"; -} - -# From https://docs.raku.org/language/101-basics diff --git a/docs/shiki/samples/razor.sample b/docs/shiki/samples/razor.sample deleted file mode 100644 index c5d42c72..00000000 --- a/docs/shiki/samples/razor.sample +++ /dev/null @@ -1,25 +0,0 @@ -@{ - string message = "foreignObject example with Scalable Vector Graphics (SVG)"; -} - - - - -

    @message

    -
    -
    - - - -@{ var i = 0; } -@do -{ - var person = people[i]; -

    Name: @person.Name

    -

    Age: @person.Age

    - - i++; -} while (i < people.Length); - - diff --git a/docs/shiki/samples/reg.sample b/docs/shiki/samples/reg.sample deleted file mode 100644 index 2fe60bfc..00000000 --- a/docs/shiki/samples/reg.sample +++ /dev/null @@ -1,26 +0,0 @@ -Windows Registry Editor Version 5.00 - - -; WARNING: before run replace PATH_TO_APP with correct value -; Example: C:\\Anaconda3 - -[HKEY_CLASSES_ROOT\Directory\shell\AnacondaJupyterNotebook] -; This will make it appear when you right click ON a folder -; The "Icon" line can be removed if you don't want the icon to appear -@="&Jupyter Notebook There" -"Icon"="\"PATH_TO_APP\\Menu\\jupyter.ico"" - -[HKEY_CLASSES_ROOT\Directory\shell\AnacondaJupyterNotebook\command] -@="cmd /K pushd \"%1\" && \"PATH_TO_APP\\Scripts\\activate.bat\" && jupyter-notebook" - - -[HKEY_CLASSES_ROOT\Directory\Background\shell\AnacondaJupyterNotebook] -; This will make it appear when you right click INSIDE a folder -; The "Icon" line can be removed if you don't want the icon to appear -@="&Jupyter Notebook Here" -"Icon"="\"PATH_TO_APP\\Menu\\jupyter.ico\"" - -[HKEY_CLASSES_ROOT\Directory\Background\shell\AnacondaJupyterNotebook\command] -@="cmd /K \"PATH_TO_APP\\Scripts\\activate.bat\" && jupyter-notebook" - -; From https://github.com/NickVeld/win-registry-snippets/blob/main/AnacondaJupyterNotebookHere.reg diff --git a/docs/shiki/samples/rel.sample b/docs/shiki/samples/rel.sample deleted file mode 100644 index 43c173f4..00000000 --- a/docs/shiki/samples/rel.sample +++ /dev/null @@ -1,66 +0,0 @@ -module person - def ssn = 123-45-6789 - module name - def first = "John" - def middle = "Q" - def last = "Public" - end - module birth - def city = "Pittsburg" - def state = "PA" - def country = "USA" - def date = parse_date["2000-01-01", "Y-m-d"] - end -end - -module mymodule - def R = {1; 2} - ic {count[R] = 2} -end - -@inline -module my_stats[R] - def my_minmax = (min[R], max[R]) - def my_mean = mean[R] - def my_median = median[R] -end - -@inline -module BipartiteGraph[M, N] - def node = M; N - def edge = M, N -end - -@inline -module CycleGraph[N] - def node = N - def edge(a in N, b in N) = - sort[N](x, a) - and sort[N](y, b) - and y = x%count[N] + 1 - from x, y -end - -@inline -module GraphProperties[G] - def outdegree[v in G:node] = count[v1 : G:edge(v, v1)] <++ 0 - def indegree[v in G:node] = count[v1 : G:edge(v1, v)] <++ 0 - def edge_count = count[G:edge] <++ 0 -end - -def cg = CompleteGraph[range[1 ,5, 1]] -def cg_props = GraphProperties[cg] - -def bg = BipartiteGraph[{1; 2}, {3; 4; 5}] -def bg_props = GraphProperties[bg] - -def cycleg = CycleGraph[{"a"; "b"; "c"; "d" ; "e"}] -def cycleg_props = GraphProperties[cycleg] - -module output - def complete_edge_count = cg_props:edge_count - def bipartite_edge_count = bg_props:edge_count - def cycle_edge_count = cycleg_props:edge_count -end - -# From https://docs.relational.ai/rel/concepts/modules/ \ No newline at end of file diff --git a/docs/shiki/samples/riscv.sample b/docs/shiki/samples/riscv.sample deleted file mode 100644 index 45f9741b..00000000 --- a/docs/shiki/samples/riscv.sample +++ /dev/null @@ -1,30 +0,0 @@ -# -# Risc-V Assembler program to print "Hello World!" -# to stdout. -# -# a0-a2 - parameters to linux function services -# a7 - linux function number -# - -.global _start # Provide program starting address to linker - -# Setup the parameters to print hello world -# and then call Linux to do it. - -_start: addi a0, x0, 1 # 1 = StdOut - la a1, helloworld # load address of helloworld - addi a2, x0, 13 # length of our string - addi a7, x0, 64 # linux write system call - ecall # Call linux to output the string - -# Setup the parameters to exit the program -# and then call Linux to do it. - - addi a0, x0, 0 # Use 0 return code - addi a7, x0, 93 # Service command code 93 terminates - ecall # Call linux to terminate the program - -.data -helloworld: .ascii "Hello World!\n" - -# From https://smist08.wordpress.com/2019/09/07/risc-v-assembly-language-hello-world/ diff --git a/docs/shiki/samples/rst.sample b/docs/shiki/samples/rst.sample deleted file mode 100644 index 183bdf55..00000000 --- a/docs/shiki/samples/rst.sample +++ /dev/null @@ -1,27 +0,0 @@ -* This is a bulleted list. -* It has two items, the second - item uses two lines. - -1. This is a numbered list. -2. It has two items too. - -#. This is a numbered list. -#. It has two items too. - -This is a normal text paragraph. The next paragraph is a code sample:: - - It is not processed in any way, except - that the indentation is removed. - - It can span multiple lines. - -This is a normal text paragraph again. - -Lorem ipsum [#]_ dolor sit amet ... [#]_ - -.. rubric:: Footnotes - -.. [#] Text of the first footnote. -.. [#] Text of the second footnote. - -.. From https://devguide.python.org/documentation/markup/ diff --git a/docs/shiki/samples/ruby.sample b/docs/shiki/samples/ruby.sample deleted file mode 100644 index 1571893a..00000000 --- a/docs/shiki/samples/ruby.sample +++ /dev/null @@ -1,21 +0,0 @@ -class LotteryTicket - - NUMERIC_RANGE = 1..25 - - attr_reader :picks, :purchased - - def initialize( *picks ) - if picks.length != 3 - raise ArgumentError, "three numbers must be picked" - elsif picks.uniq.length != 3 - raise ArgumentError, "the three picks must be different numbers" - elsif picks.detect { |p| not NUMERIC_RANGE === p } - raise ArgumentError, "the three picks must be numbers between 1 and 25" - end - @picks = picks - @purchased = Time.now - end - -end - -# From https://poignant.guide/book/chapter-5.html \ No newline at end of file diff --git a/docs/shiki/samples/rust.sample b/docs/shiki/samples/rust.sample deleted file mode 100644 index bbc3f4f7..00000000 --- a/docs/shiki/samples/rust.sample +++ /dev/null @@ -1,39 +0,0 @@ -// Unlike C/C++, there's no restriction on the order of function definitions -fn main() { - // We can use this function here, and define it somewhere later - fizzbuzz_to(100); -} - -// Function that returns a boolean value -fn is_divisible_by(lhs: u32, rhs: u32) -> bool { - // Corner case, early return - if rhs == 0 { - return false; - } - - // This is an expression, the `return` keyword is not necessary here - lhs % rhs == 0 -} - -// Functions that "don't" return a value, actually return the unit type `()` -fn fizzbuzz(n: u32) -> () { - if is_divisible_by(n, 15) { - println!("fizzbuzz"); - } else if is_divisible_by(n, 3) { - println!("fizz"); - } else if is_divisible_by(n, 5) { - println!("buzz"); - } else { - println!("{}", n); - } -} - -// When a function returns `()`, the return type can be omitted from the -// signature -fn fizzbuzz_to(n: u32) { - for n in 1..=n { - fizzbuzz(n); - } -} - -// From https://doc.rust-lang.org/rust-by-example/fn.html diff --git a/docs/shiki/samples/sas.sample b/docs/shiki/samples/sas.sample deleted file mode 100644 index 2a4e6341..00000000 --- a/docs/shiki/samples/sas.sample +++ /dev/null @@ -1,17 +0,0 @@ -DATA TEMP; -INPUT ID $ NAME $ SALARY DEPARTMENT $; -comm = SALARY*0.25; -LABEL ID = 'Employee ID' comm = 'COMMISION'; -DATALINES; -1 Rick 623.3 IT -2 Dan 515.2 Operations -3 Michelle 611 IT -4 Ryan 729 HR -5 Gary 843.25 Finance -6 Nina 578 IT -7 Simon 632.8 Operations -8 Guru 722.5 Finance -; -RUN; - -* From https://www.tutorialspoint.com/sas/sas_program_structure.htm diff --git a/docs/shiki/samples/sass.sample b/docs/shiki/samples/sass.sample deleted file mode 100644 index 2794b51b..00000000 --- a/docs/shiki/samples/sass.sample +++ /dev/null @@ -1,27 +0,0 @@ -/* This CSS will print because %message-shared is extended. */ -%message-shared - border: 1px solid #ccc - padding: 10px - color: #333 - -// This CSS won't print because %equal-heights is never extended. -%equal-heights - display: flex - flex-wrap: wrap - -.message - @extend %message-shared - -.success - @extend %message-shared - border-color: green - -.error - @extend %message-shared - border-color: red - -.warning - @extend %message-shared - border-color: yellow - -// From https://sass-lang.com/guide/ diff --git a/docs/shiki/samples/scala.sample b/docs/shiki/samples/scala.sample deleted file mode 100644 index 42a96196..00000000 --- a/docs/shiki/samples/scala.sample +++ /dev/null @@ -1,14 +0,0 @@ -class Date(y: Int, m: Int, d: Int) extends Ord: - // previous decls here - - def <(that: Any): Boolean = that match - case d: Date => - (year < d.year) || - (year == d.year && (month < d.month || - (month == d.month && day < d.day))) - - case _ => sys.error("cannot compare " + that + " and a Date") - end < -end Date - -// From https://docs.scala-lang.org/tutorials/scala-for-java-programmers.html diff --git a/docs/shiki/samples/scheme.sample b/docs/shiki/samples/scheme.sample deleted file mode 100644 index 33a65447..00000000 --- a/docs/shiki/samples/scheme.sample +++ /dev/null @@ -1,26 +0,0 @@ -(define WINDOW-WIDTH 150) -(define WINDOW-HEIGHT 180) - -; A world is a number. -; Its display is a blue disk of that size. -; show-world : world -> image -(define (show-world diameter) - (circle diameter "solid" "blue")) -"Examples of show-world:" -(show-world 1) "should be a blue dot" -(show-world 20) "should be" (circle 20 "solid" "blue") - -; The next world is one larger. -; next-world : world -> world -(define (next-world diameter) - (+ 1 diameter)) -"Examples of next-world:" -(next-world 7) "should be" 8 - -"Now let's start the animation!" - -(big-bang WINDOW-WIDTH WINDOW-HEIGHT 1 1) -(on-update-event show-world) -(on-tick-event next-world) - -; From https://home.adelphi.edu/sbloch/class/archive/160/spring2005/examples/ diff --git a/docs/shiki/samples/scss.sample b/docs/shiki/samples/scss.sample deleted file mode 100644 index 4c17f36a..00000000 --- a/docs/shiki/samples/scss.sample +++ /dev/null @@ -1,17 +0,0 @@ -nav { - ul { - margin: 0; - padding: 0; - list-style: none; - } - - li { display: inline-block; } - - a { - display: block; - padding: 6px 12px; - text-decoration: none; - } -} - -// From https://sass-lang.com/guide/ diff --git a/docs/shiki/samples/shaderlab.sample b/docs/shiki/samples/shaderlab.sample deleted file mode 100644 index 19691b1a..00000000 --- a/docs/shiki/samples/shaderlab.sample +++ /dev/null @@ -1,60 +0,0 @@ -Shader "Unlit/NewUnlitShader" -{ - Properties - { - _MainTex ("Texture", 2D) = "white" {} - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 100 - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - // make fog work - #pragma multi_compile_fog - - #include "UnityCG.cginc" - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - UNITY_FOG_COORDS(1) - float4 vertex : SV_POSITION; - }; - - sampler2D _MainTex; - float4 _MainTex_ST; - - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = TRANSFORM_TEX(v.uv, _MainTex); - UNITY_TRANSFER_FOG(o,o.vertex); - return o; - } - - fixed4 frag (v2f i) : SV_Target - { - // sample the texture - fixed4 col = tex2D(_MainTex, i.uv); - // apply fog - UNITY_APPLY_FOG(i.fogCoord, col); - return col; - } - ENDCG - } - } -} - -// From https://docs.unity3d.com/Manual/SL-VertexFragmentShaderExamples.html diff --git a/docs/shiki/samples/shellscript.sample b/docs/shiki/samples/shellscript.sample deleted file mode 100644 index 9f948b52..00000000 --- a/docs/shiki/samples/shellscript.sample +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# weather.sh -# Copyright 2018 computer-geek64. All rights reserved. - -program=Weather -version=1.1 -year=2018 -developer=computer-geek64 - -case $1 in --h | --help) - echo "$program $version" - echo "Copyright $year $developer. All rights reserved." - echo - echo "Usage: weather [options]" - echo "Option Long Option Description" - echo "-h --help Show the help screen" - echo "-l [location] --location [location] Specifies the location" - ;; --l | --location) - curl https://wttr.in/$2 - ;; -*) - curl https://wttr.in - ;; -esac - -# From https://github.com/ruanyf/simple-bash-scripts/blob/master/scripts/weather.sh diff --git a/docs/shiki/samples/shellsession.sample b/docs/shiki/samples/shellsession.sample deleted file mode 100644 index 58da7b62..00000000 --- a/docs/shiki/samples/shellsession.sample +++ /dev/null @@ -1,13 +0,0 @@ -$ echo $EDITOR -vim -$ git checkout main -Switched to branch 'main' -Your branch is up-to-date with 'origin/main'. -$ git push -Everything up-to-date -$ echo 'All -> done!' -All -done! - -# From https://github.com/highlightjs/highlight.js/blob/fcefad4a6bf99b88c54b2b724ca77466e94c374d/test/detect/shell/default.txt#L4 diff --git a/docs/shiki/samples/smalltalk.sample b/docs/shiki/samples/smalltalk.sample deleted file mode 100644 index 72d5dbd8..00000000 --- a/docs/shiki/samples/smalltalk.sample +++ /dev/null @@ -1,11 +0,0 @@ -exampleWithNumber: x - | y | - true & false not & (nil isNil) ifFalse: [self halt]. - y := self size + super size. - #($a #a 'a' 1 1.0) - do: [ :each | - Transcript show: (each class name); - show: ' ']. - ^x < y - -"From https://en.wikipedia.org/wiki/Smalltalk" diff --git a/docs/shiki/samples/solidity.sample b/docs/shiki/samples/solidity.sample deleted file mode 100644 index dd9e058d..00000000 --- a/docs/shiki/samples/solidity.sample +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; - -contract Array { - // Several ways to initialize an array - uint[] public arr; - uint[] public arr2 = [1, 2, 3]; - // Fixed sized array, all elements initialize to 0 - uint[10] public myFixedSizeArr; - - function get(uint i) public view returns (uint) { - return arr[i]; - } - - // Solidity can return the entire array. - // But this function should be avoided for - // arrays that can grow indefinitely in length. - function getArr() public view returns (uint[] memory) { - return arr; - } - - function push(uint i) public { - // Append to array - // This will increase the array length by 1. - arr.push(i); - } - - function pop() public { - // Remove last element from array - // This will decrease the array length by 1 - arr.pop(); - } - - function getLength() public view returns (uint) { - return arr.length; - } - - function remove(uint index) public { - // Delete does not change the array length. - // It resets the value at index to it's default value, - // in this case 0 - delete arr[index]; - } - - function examples() external { - // create array in memory, only fixed size can be created - uint[] memory a = new uint[](5); - } -} - -// From https://solidity-by-example.org/array/ diff --git a/docs/shiki/samples/sparql.sample b/docs/shiki/samples/sparql.sample deleted file mode 100644 index 07b0925a..00000000 --- a/docs/shiki/samples/sparql.sample +++ /dev/null @@ -1,8 +0,0 @@ -PREFIX foaf: -SELECT ?name (COUNT(?friend) AS ?count) -WHERE { - ?person foaf:name ?name . - ?person foaf:knows ?friend . -} GROUP BY ?person ?name - -# From https://www.w3.org/TR/sparql11-overview/#sparql11-query \ No newline at end of file diff --git a/docs/shiki/samples/splunk.sample b/docs/shiki/samples/splunk.sample deleted file mode 100644 index 71a1fafa..00000000 --- a/docs/shiki/samples/splunk.sample +++ /dev/null @@ -1,15 +0,0 @@ -# CPU/Memory usage -`dmc_set_index_introspection` sourcetype=splunk_resource_usage component=Hostwide host=* | eval CPU_Usage=('data.cpu_system_pct' + 'data.cpu_user_pct') | timechart avg(CPU_Usage) by host - - -index=_introspection host=* sourcetype=splunk_resource_usage component=Hostwide -| `drop_dm_object_name("data")` -| timechart limit=0 useother=f span=30s avg(cpu_user_pct) AS avg,max(cpu_user_pct) AS max by host - -index=_introspection host=* sourcetype=splunk_resource_usage component=Hostwide -| `drop_dm_object_name("data")` -| eval used_pct=round((mem_used/mem)*100,2) -| eval swap_used_pct=round((swap_used/swap)*100,2) -| timechart limit=0 useother=f span=1m max(used_pct) AS max_used,max(swap_used_pct) AS max_swap_used by host - -# https://github.com/getkub/SplunkScriplets/blob/master/docs/splunk_tips/searches/cpu_memory.txt diff --git a/docs/shiki/samples/sql.sample b/docs/shiki/samples/sql.sample deleted file mode 100644 index c4c6bd14..00000000 --- a/docs/shiki/samples/sql.sample +++ /dev/null @@ -1,17 +0,0 @@ -USE AdventureWorks2022; -GO -IF OBJECT_ID('dbo.NewProducts', 'U') IS NOT NULL - DROP TABLE dbo.NewProducts; -GO -ALTER DATABASE AdventureWorks2022 SET RECOVERY BULK_LOGGED; -GO - -SELECT * INTO dbo.NewProducts -FROM Production.Product -WHERE ListPrice > $25 -AND ListPrice < $100; -GO -ALTER DATABASE AdventureWorks2022 SET RECOVERY FULL; -GO - --- From https://learn.microsoft.com/en-us/sql/t-sql/queries/select-examples-transact-sql diff --git a/docs/shiki/samples/ssh-config.sample b/docs/shiki/samples/ssh-config.sample deleted file mode 100644 index b84867f0..00000000 --- a/docs/shiki/samples/ssh-config.sample +++ /dev/null @@ -1,47 +0,0 @@ -### default for all ## -Host * - ForwardAgent no - ForwardX11 no - ForwardX11Trusted yes - User nixcraft - Port 22 - Protocol 2 - ServerAliveInterval 60 - ServerAliveCountMax 30 - -## override as per host ## -Host server1 - HostName server1.cyberciti.biz - User nixcraft - Port 4242 - IdentityFile /nfs/shared/users/nixcraft/keys/server1/id_rsa - -## Home nas server ## -Host nas01 - HostName 192.168.1.100 - User root - IdentityFile ~/.ssh/nas01.key - -## Login AWS Cloud ## -Host aws.apache - HostName 1.2.3.4 - User wwwdata - IdentityFile ~/.ssh/aws.apache.key - -## Login to internal lan server at 192.168.0.251 via our public uk office ssh based gateway using ## -## $ ssh uk.gw.lan ## -Host uk.gw.lan uk.lan - HostName 192.168.0.251 - User nixcraft - ProxyCommand ssh nixcraft@gateway.uk.cyberciti.biz nc %h %p 2> /dev/null - -## Our Us Proxy Server ## -## Forward all local port 3128 traffic to port 3128 on the remote vps1.cyberciti.biz server ## -## $ ssh -f -N proxyus ## -Host proxyus - HostName vps1.cyberciti.biz - User breakfree - IdentityFile ~/.ssh/vps1.cyberciti.biz.key - LocalForward 3128 127.0.0.1:3128 - -## From https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/ diff --git a/docs/shiki/samples/stata.sample b/docs/shiki/samples/stata.sample deleted file mode 100644 index b6376c45..00000000 --- a/docs/shiki/samples/stata.sample +++ /dev/null @@ -1,30 +0,0 @@ -capture program drop exit_message -program exit_message - syntax, rc(int) progname(str) start_time(str) [CAPture] - local end_time "$S_TIME $S_DATE" - local time "Start: `start_time'" _n(1) "End: `end_time'" - di "" - if (`rc' == 0) { - di "End: $S_TIME $S_DATE" - local paux ran - local message "`progname' finished running" _n(2) "`time'" - local subject "`progname' `paux'" - } - else if ("`capture'" == "") { - di "WARNING: $S_TIME $S_DATE" - local paux ran with non-0 exit status - local message "`progname' ran but Stata gave error code r(`rc')" _n(2) "`time'" - local subject "`progname' `paux'" - } - else { - di "ERROR: $S_TIME $S_DATE" - local paux ran with errors - local message "`progname' stopped with error code r(`rc')" _n(2) "`time'" - local subject "`progname' `paux'" - } - di "`subject'" - di "" - di "`message'" -end - -* From https://github.com/mcaceresb/stata-gtools/blob/fad519ef0454936d450802ac732728ba953957ac/src/test/gtools_tests.do diff --git a/docs/shiki/samples/stylus.sample b/docs/shiki/samples/stylus.sample deleted file mode 100644 index 675a5a71..00000000 --- a/docs/shiki/samples/stylus.sample +++ /dev/null @@ -1,33 +0,0 @@ -vendor(prop, args) - -webkit-{prop} args - -moz-{prop} args - {prop} args - -border-radius() - vendor('border-radius', arguments) - -box-shadow() - vendor('box-shadow', arguments) - -button - border-radius 1px 2px / 3px 4px - -border-radius() { - -webkit-border-radius: arguments; - -moz-border-radius: arguments; - border-radius: arguments; -} - -body a { - font: 12px/1.4 "Lucida Grande", Arial, sans-serif; - background: black; - color: #ccc; -} - -form input { - padding: 5px; - border: 1px solid; - border-radius: 5px; -} - -// From https://stylus-lang.com/docs/css-style.html#example diff --git a/docs/shiki/samples/svelte.sample b/docs/shiki/samples/svelte.sample deleted file mode 100644 index 59ce14c0..00000000 --- a/docs/shiki/samples/svelte.sample +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - -{#if files} -

    Selected files:

    - {#each Array.from(files) as file} -

    {file.name} ({file.size} bytes)

    - {/each} -{/if} - -// From https://svelte.dev/examples/file-inputs diff --git a/docs/shiki/samples/swift.sample b/docs/shiki/samples/swift.sample deleted file mode 100644 index 754acb24..00000000 --- a/docs/shiki/samples/swift.sample +++ /dev/null @@ -1,20 +0,0 @@ -class Residence { - var rooms: [Room] = [] - var numberOfRooms: Int { - return rooms.count - } - subscript(i: Int) -> Room { - get { - return rooms[i] - } - set { - rooms[i] = newValue - } - } - func printNumberOfRooms() { - print("The number of rooms is \(numberOfRooms)") - } - var address: Address? -} - -// From https://docs.swift.org/swift-book/documentation/the-swift-programming-language/optionalchaining#Defining-Model-Classes-for-Optional-Chaining diff --git a/docs/shiki/samples/system-verilog.sample b/docs/shiki/samples/system-verilog.sample deleted file mode 100644 index d0c069d5..00000000 --- a/docs/shiki/samples/system-verilog.sample +++ /dev/null @@ -1,30 +0,0 @@ -// File : tb_top.sv -module tb_top (); - - reg clk; - reg resetn; - reg d; - wire q; - - // Instantiate the design - d_ff d_ff0 ( .clk (clk), - .resetn (resetn), - .d (d), - .q (q)); - - // Create a clock - always #10 clk <= ~clk; - - initial begin - resetn <= 0; - d <= 0; - - #10 resetn <= 1; - #5 d <= 1; - #8 d <= 0; - #2 d <= 1; - #10 d <= 0; - end -endmodule - -// From https://www.chipverify.com/tutorials/systemverilog diff --git a/docs/shiki/samples/tasl.sample b/docs/shiki/samples/tasl.sample deleted file mode 100644 index 932ed5b4..00000000 --- a/docs/shiki/samples/tasl.sample +++ /dev/null @@ -1,25 +0,0 @@ -# This is a tasl schema! -namespace s http://schema.org/ - -# classes are like tables, except they -# can be arbitrary algebraic data types, -# not just columns of primitives. -class s:Person :: { - s:name -> string - s:email -> ? uri - s:spouse -> ? * s:Person - s:gender -> [ - s:Male - s:Female - s:value <- string - ] -} - -# references are a primitive type that -# point to other classes in the schema, -# just like foreign keys. -class s:Book :: { - s:name -> string - s:isbn -> uri - s:author -> * s:Person -} diff --git a/docs/shiki/samples/tcl.sample b/docs/shiki/samples/tcl.sample deleted file mode 100644 index 03574068..00000000 --- a/docs/shiki/samples/tcl.sample +++ /dev/null @@ -1,51 +0,0 @@ -proc set'contains {set el} {expr {[lsearch -exact $set $el]>=0}} - -e.g. {set'contains {A B C} A} -> 1 -e.g. {set'contains {A B C} D} -> 0 - -proc set'add {_set args} { - upvar 1 $_set set - foreach el $args { - if {![set'contains $set $el]} {lappend set $el} - } - set set -} - -set example {1 2 3} -e.g. {set'add example 4} -> {1 2 3 4} -e.g. {set'add example 4} -> {1 2 3 4} - -proc set'remove {_set args} { - upvar 1 $_set set - foreach el $args { - set pos [lsearch -exact $set $el] - set set [lreplace $set $pos $pos] - } - set set -} - -e.g. {set'remove example 3} -> {1 2 4} - -proc set'intersection {a b} { - foreach el $a {set arr($el) ""} - set res {} - foreach el $b {if {[info exists arr($el)]} {lappend res $el}} - set res - -e.g. {set'intersection {1 2 3 4} {2 4 6 8}} -> {2 4} - -proc set'union {a b} { - foreach el $a {set arr($el) ""} - foreach el $b {set arr($el) ""} - lsort [array names arr] -} - -e.g. {set'union {1 3 5 7} {2 4 6 8}} -> {1 2 3 4 5 6 7 8} - -proc set'difference {a b} { - eval set'remove a $b -} - -e.g. {set'difference {1 2 3 4 5} {2 4 6}} -> {1 3 5} - -# https://en.wikibooks.org/wiki/Tcl_Programming/Examples diff --git a/docs/shiki/samples/tex.sample b/docs/shiki/samples/tex.sample deleted file mode 100644 index 8cab4895..00000000 --- a/docs/shiki/samples/tex.sample +++ /dev/null @@ -1,29 +0,0 @@ -\documentclass{article} - -\usepackage{expl3} - -\ExplSyntaxOn - \cs_new_eq:NN \calc \fp_eval:n -\ExplSyntaxOff - -\def\valueA{7} -\def\valueB{19} -\def\valueC{41} -\def\valueD{31} -\def\valueE{25} -\def\valueF{17} -\def\valueG{7} -\def\valueH{3} - -\begin{document} - -\noindent I have the list -\[ -\valueA,\valueB,\valueC,\valueD,\valueE,\valueF,\valueG,\valueH -\] -in which the largest element is $\calc{max(\valueA,\valueB,\valueC,\valueD,\valueE,\valueF,\valueG,\valueH)}$ (but that is of no importance to me).\\[\baselineskip] -How can I get \LaTeX{} to extract the position number of the largest element in a list? (In the example above, the answer is of course `$3$'.) - -\end{document} - -% From https://tex.stackexchange.com/questions/231558/position-of-largest-element-in-a-list diff --git a/docs/shiki/samples/toml.sample b/docs/shiki/samples/toml.sample deleted file mode 100644 index ca64f190..00000000 --- a/docs/shiki/samples/toml.sample +++ /dev/null @@ -1,25 +0,0 @@ -# This is a TOML document - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -dob = 1979-05-27T07:32:00-08:00 - -[database] -enabled = true -ports = [ 8000, 8001, 8002 ] -data = [ ["delta", "phi"], [3.14] ] -temp_targets = { cpu = 79.5, case = 72.0 } - -[servers] - -[servers.alpha] -ip = "10.0.0.1" -role = "frontend" - -[servers.beta] -ip = "10.0.0.2" -role = "backend" - -# From https://toml.io/en/ diff --git a/docs/shiki/samples/tsx.sample b/docs/shiki/samples/tsx.sample deleted file mode 100644 index 1e0434d3..00000000 --- a/docs/shiki/samples/tsx.sample +++ /dev/null @@ -1,26 +0,0 @@ -// posts will be populated at build time by getStaticProps() -function Blog({ posts }) { - return ( -
      - {posts.map((post) => ( -
    • {post.title}
    • - ))} -
    - ) -} - -// This function gets called at build time on server-side. -export async function getStaticProps() { - const res = await fetch('https://.../posts') - const posts = await res.json() - - return { - props: { - posts - } - } -} - -export default Blog - -// From https://nextjs.org/docs/basic-features/data-fetching diff --git a/docs/shiki/samples/turtle.sample b/docs/shiki/samples/turtle.sample deleted file mode 100644 index 9f61f5e0..00000000 --- a/docs/shiki/samples/turtle.sample +++ /dev/null @@ -1,16 +0,0 @@ - @prefix foaf: . - @prefix rdfs: . - - a foaf:Person . - foaf:name "Alice" . - foaf:mbox . - foaf:knows . - foaf:knows . - foaf:name "Bob" . - foaf:knows . - foaf:knows . - foaf:name "Charlie" . - foaf:knows . - foaf:name "Snoopy"@en . - -# From https://www.w3.org/TR/sparql11-overview/#Example \ No newline at end of file diff --git a/docs/shiki/samples/twig.sample b/docs/shiki/samples/twig.sample deleted file mode 100644 index fbde3c65..00000000 --- a/docs/shiki/samples/twig.sample +++ /dev/null @@ -1,18 +0,0 @@ - - - - My Webpage - - - - -

    My Webpage

    - {{ a_variable }} - - - -{# From https://twig.symfony.com/doc/3.x/templates.html #} diff --git a/docs/shiki/samples/typescript.sample b/docs/shiki/samples/typescript.sample deleted file mode 100644 index 0376eccc..00000000 --- a/docs/shiki/samples/typescript.sample +++ /dev/null @@ -1,24 +0,0 @@ -enum LogLevel { - ERROR, - WARN, - INFO, - DEBUG, -} - -/** - * This is equivalent to: - * type LogLevelStrings = 'ERROR' | 'WARN' | 'INFO' | 'DEBUG'; - */ -type LogLevelStrings = keyof typeof LogLevel; - -function printImportant(key: LogLevelStrings, message: string) { - const num = LogLevel[key]; - if (num <= LogLevel.WARN) { - console.log("Log level key is:", key); - console.log("Log level value is:", num); - console.log("Log level message is:", message); - } -} -printImportant("ERROR", "This is a message"); - -// From https://www.typescriptlang.org/docs/handbook/enums.html diff --git a/docs/shiki/samples/v.sample b/docs/shiki/samples/v.sample deleted file mode 100644 index 4df10979..00000000 --- a/docs/shiki/samples/v.sample +++ /dev/null @@ -1,38 +0,0 @@ -// This program displays the fibonacci sequence -import os - -fn main() { - // Check for user input - if os.args.len != 2 { - println('usage: fibonacci [rank]') - - return - } - - // Parse first argument and cast it to int - - stop := os.args[1].int() - // Can only calculate correctly until rank 92 - if stop > 92 { - println('rank must be 92 or less') - return - } - - // Three consecutive terms of the sequence - mut a := i64(0) - mut b := i64(0) - mut c := i64(1) - println(a + b + c) - for _ in 0 .. stop { - // Set a and b to the next term - a = b - b = c - // Compute the new term - c = a + b - - // Print the new term - println(c) - } -} - -// From https://github.com/vlang/v/blob/master/examples/fibonacci.v \ No newline at end of file diff --git a/docs/shiki/samples/vb.sample b/docs/shiki/samples/vb.sample deleted file mode 100644 index bd6c4e43..00000000 --- a/docs/shiki/samples/vb.sample +++ /dev/null @@ -1,38 +0,0 @@ -Imports System -Imports System.Drawing -Imports System.Windows.Forms - -Public Class HelloWindows - - Inherits Form - - Private lblHelloWindows As Label - - Public Shared Sub Main( ) - Application.Run(New HelloWindows( )) - End Sub - - Public Sub New( ) - - lblHelloWindows = New Label( ) - With lblHelloWindows - .Location = New Point(37, 31) - .Size = New Size(392, 64) - .Font = New Font("Arial", 36) - .Text = "Hello, Windows!" - .TabIndex = 0 - .TextAlign = ContentAlignment.TopCenter - End With - - Me.Text = "Programming Visual Basic .NET" - AutoScaleBaseSize = New Size(5, 13) - FormBorderStyle = FormBorderStyle.FixedSingle - ClientSize = New Size(466, 127) - - Controls.Add(lblHelloWindows) - - End Sub - -End Class - -' From https://www.oreilly.com/library/view/programming-visual-basic/0596000936/ch01s03.html diff --git a/docs/shiki/samples/verilog.sample b/docs/shiki/samples/verilog.sample deleted file mode 100644 index d0c069d5..00000000 --- a/docs/shiki/samples/verilog.sample +++ /dev/null @@ -1,30 +0,0 @@ -// File : tb_top.sv -module tb_top (); - - reg clk; - reg resetn; - reg d; - wire q; - - // Instantiate the design - d_ff d_ff0 ( .clk (clk), - .resetn (resetn), - .d (d), - .q (q)); - - // Create a clock - always #10 clk <= ~clk; - - initial begin - resetn <= 0; - d <= 0; - - #10 resetn <= 1; - #5 d <= 1; - #8 d <= 0; - #2 d <= 1; - #10 d <= 0; - end -endmodule - -// From https://www.chipverify.com/tutorials/systemverilog diff --git a/docs/shiki/samples/vhdl.sample b/docs/shiki/samples/vhdl.sample deleted file mode 100644 index 56f3ce0f..00000000 --- a/docs/shiki/samples/vhdl.sample +++ /dev/null @@ -1,43 +0,0 @@ --- dual_port_RAM_visualTest.vhd - --- created by : Meher Krishna Patel --- date : 26-Dec-16 - --- Functionality: - -- store and retrieve data from dual port RAM - --- ports: - -- Write Enable (we) : SW[16] - -- Address (addr_wr) : SW[15-14] - -- Address (addr_rd) : SW[13-12] - -- din : SW[2:0] - -- dout : LEDR - -use ieee.numeric_std.all;library ieee; -use ieee.std_logic_1164.all; -use ieee.numeric_std.all; - -entity dual_port_RAM_visualTest is - generic ( - ADDR_WIDTH : integer := 2; - DATA_WIDTH : integer := 3 - ); - - port( - CLOCK_50: in std_logic; - SW : in std_logic_vector(16 downto 0); - LEDR : out std_logic_vector(DATA_WIDTH-1 downto 0) - ); -end dual_port_RAM_visualTest; - -architecture arch of dual_port_RAM_visualTest is -begin - dual_port_RAM_test: entity work.dual_port_RAM - port map (clk=>CLOCK_50, we=>SW(16), - addr_wr => SW(15 downto 14), - addr_rd => SW(13 downto 12), - din => SW(2 downto 0), - dout =>LEDR); -end arch; - --- From https://vhdlguide.readthedocs.io/en/latest/vhdl/dex.html diff --git a/docs/shiki/samples/viml.sample b/docs/shiki/samples/viml.sample deleted file mode 100644 index b036c288..00000000 --- a/docs/shiki/samples/viml.sample +++ /dev/null @@ -1,12 +0,0 @@ -" This is the Hello World program in Vim script. -echo "Hello, world!" - -" This is a simple while loop in Vim script. -let i = 1 -while i < 5 - echo "count is" i - let i += 1 -endwhile -unlet i - -" From https://en.wikipedia.org/wiki/Vim_%28text_editor%29#Vim_script diff --git a/docs/shiki/samples/vue-html.sample b/docs/shiki/samples/vue-html.sample deleted file mode 100644 index c1b43e42..00000000 --- a/docs/shiki/samples/vue-html.sample +++ /dev/null @@ -1,15 +0,0 @@ - -
    - - - - - -
    - {{ item }} - -
    -
    -
    - -// From https://vuejs.org/examples/#list-transition diff --git a/docs/shiki/samples/vue.sample b/docs/shiki/samples/vue.sample deleted file mode 100644 index 5515f80c..00000000 --- a/docs/shiki/samples/vue.sample +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - -// From https://vuejs.org/examples/#tree diff --git a/docs/shiki/samples/vyper.sample b/docs/shiki/samples/vyper.sample deleted file mode 100644 index 839f9fcc..00000000 --- a/docs/shiki/samples/vyper.sample +++ /dev/null @@ -1,11 +0,0 @@ -storedData: public(int128) - -@external -def __init__(_x: int128): - self.storedData = _x - -@external -def set(_x: int128): - self.storedData = _x - -# https://github.com/vyperlang/vyper/blob/master/examples/storage/storage.vy diff --git a/docs/shiki/samples/wasm.sample b/docs/shiki/samples/wasm.sample deleted file mode 100644 index 3009d4f8..00000000 --- a/docs/shiki/samples/wasm.sample +++ /dev/null @@ -1,65 +0,0 @@ -(module - ;; add the $even_check function to the top of the module - (func $even_check (param $n i32) (result i32) - local.get $n - i32.const 2 - i32.rem_u ;; if you take the remainder of a division by 2 - i32.const 0 ;; even numbers will have a remainder 0 - i32.eq ;; $n % 2 == 0 - ) - ;; add the $eq_2 function after $even_check - (func $eq_2 (param $n i32) (result i32) - local.get $n - i32.const 2 - i32.eq ;; returns 1 if $n == 2 - ) - - ;; add $multiple_check after $eq_2 - (func $multiple_check (param $n i32) (param $m i32) (result i32) - local.get $n - local.get $m - i32.rem_u ;; get the remainder of $n / $m - i32.const 0 ;; I want to know if the remainder is 0 - i32.eq ;; that will tell us if $n is a multiple of $m - ) - - ;; add the is_prime exported function after $multiple_check - (func (export "is_prime") (param $n i32) (result i32) - (local $i i32) - (if (i32.eq (local.get $n) (i32.const 1)) ;; 1 is not prime - (then - i32.const 0 - return - )) - (if (call $eq_2 (local.get $n)) ;; check to see if $n is 2 - (then - i32.const 1 ;; 2 is prime - return - ) - ) - (block $not_prime - (call $even_check (local.get $n)) - br_if $not_prime ;; even numbers are not prime (except 2) - - (local.set $i (i32.const 1)) - (loop $prime_test_loop - - (local.tee $i (i32.add (local.get $i) (i32.const 2) ) ) ;; $i += 2 - local.get $n ;; stack = [$n, $i] - - i32.ge_u ;; $i >= $n - if ;; if $i >= $n, $n is prime - i32.const 1 - return - end - (call $multiple_check (local.get $n) (local.get $i)) - br_if $not_prime ;; if $n is a multiple of $i this is not prime - br $prime_test_loop ;; branch back to top of loop - ) ;; end of $prime_test_loop loop - ) ;; end of $not_prime block - -i32.const 0 ;; return false - ) -) ;; end of module - -;; From https://github.com/battlelinegames/ArtOfWasm/blob/main/Chapter3/is_prime.wat diff --git a/docs/shiki/samples/wenyan.sample b/docs/shiki/samples/wenyan.sample deleted file mode 100644 index 7eae3bcf..00000000 --- a/docs/shiki/samples/wenyan.sample +++ /dev/null @@ -1,25 +0,0 @@ -吾有一術。名之曰「埃氏篩」。欲行是術。必先得一數。曰「甲」。乃行是術曰。 - 吾有一列。名之曰「掩」。為是「甲」遍。充「掩」以陽也。 - 除「甲」以二。名之曰「甲半」。 - - 有數二。名之曰「戊」。恆為是。若「戊」不小於「甲半」者乃止也。 - 有數二。名之曰「戌」。恆為是。若「戌」不小於「甲半」者乃止也。 - - 乘「戊」以「戌」。名之曰「合」 - 若「合」不大於「甲」者。 - 昔之「掩」之「合」者。今陰是矣。 - 若非乃止也。 - 加一以「戌」。昔之「戌」者。今其是矣云云。 - 加一以「戊」。昔之「戊」者。今其是矣云云。 - - 吾有一列。名之曰「諸素」。 - 昔之「戊」者。今二是矣。恆為是。若「戊」等於「掩」之長者乃止也。 - 夫「掩」之「戊」。名之曰「素耶」。 - 若「素耶」者充「諸素」以「戊」也。 - 加一以「戊」。昔之「戊」者。今其是矣云云。 - 乃得「諸素」。 -是謂「埃氏篩」之術也。 - -施「埃氏篩」於一百。書之。 - -// From https://wy-lang.org/ diff --git a/docs/shiki/samples/wgsl.sample b/docs/shiki/samples/wgsl.sample deleted file mode 100644 index 74f113ae..00000000 --- a/docs/shiki/samples/wgsl.sample +++ /dev/null @@ -1,19 +0,0 @@ -struct CoolMaterial { - color: vec4, -}; - -@group(1) @binding(0) -var material: CoolMaterial; -@group(1) @binding(1) -var color_texture: texture_2d; -@group(1) @binding(2) -var color_sampler: sampler; - -@fragment -fn fragment( - #import bevy_pbr::mesh_vertex_output -) -> @location(0) vec4 { - return material.color * textureSample(color_texture, color_sampler, uv); -} - -// From https://bevyengine.org/news/bevy-0-8/ \ No newline at end of file diff --git a/docs/shiki/samples/wolfram.sample b/docs/shiki/samples/wolfram.sample deleted file mode 100644 index bca1dd8e..00000000 --- a/docs/shiki/samples/wolfram.sample +++ /dev/null @@ -1,9 +0,0 @@ -iStochasticityAssumptions [sm_List] := - SquareMatrixQ[sm] && Element[DeleteDuplicates[Flatten[sm]], Reals] && - Apply [And, Map[#>=0&, sm, {2}], {0, 1}] && Apply [And, Thread[Total[sm, {2}] == 1]] - -iStochasticityAssumptions[sm_SparseArray] := SquareMatrixQ[sm] && - Apply[And, Thread[ DeleteDuplicates [ sm["NonzeroValues"] ~Join~ {sm["Background"]} ] >= 0 ] ] && - Apply[And, Thread [Total [sm, {2}] = 1]] - -(* https://github.com/WolframResearch/vscode-wolfram/blob/master/docs/highlighting.png *) diff --git a/docs/shiki/samples/xml.sample b/docs/shiki/samples/xml.sample deleted file mode 100644 index 14b68b15..00000000 --- a/docs/shiki/samples/xml.sample +++ /dev/null @@ -1,122 +0,0 @@ - - - - Gambardella, Matthew - XML Developer's Guide - Computer - 44.95 - 2000-10-01 - An in-depth look at creating applications - with XML. - - - Ralls, Kim - Midnight Rain - Fantasy - 5.95 - 2000-12-16 - A former architect battles corporate zombies, - an evil sorceress, and her own childhood to become queen - of the world. - - - Corets, Eva - Maeve Ascendant - Fantasy - 5.95 - 2000-11-17 - After the collapse of a nanotechnology - society in England, the young survivors lay the - foundation for a new society. - - - Corets, Eva - Oberon's Legacy - Fantasy - 5.95 - 2001-03-10 - In post-apocalypse England, the mysterious - agent known only as Oberon helps to create a new life - for the inhabitants of London. Sequel to Maeve - Ascendant. - - - Corets, Eva - The Sundered Grail - Fantasy - 5.95 - 2001-09-10 - The two daughters of Maeve, half-sisters, - battle one another for control of England. Sequel to - Oberon's Legacy. - - - Randall, Cynthia - Lover Birds - Romance - 4.95 - 2000-09-02 - When Carla meets Paul at an ornithology - conference, tempers fly as feathers get ruffled. - - - Thurman, Paula - Splish Splash - Romance - 4.95 - 2000-11-02 - A deep sea diver finds true love twenty - thousand leagues beneath the sea. - - - Knorr, Stefan - Creepy Crawlies - Horror - 4.95 - 2000-12-06 - An anthology of horror stories about roaches, - centipedes, scorpions and other insects. - - - Kress, Peter - Paradox Lost - Science Fiction - 6.95 - 2000-11-02 - After an inadvertant trip through a Heisenberg - Uncertainty Device, James Salway discovers the problems - of being quantum. - - - O'Brien, Tim - Microsoft .NET: The Programming Bible - Computer - 36.95 - 2000-12-09 - Microsoft's .NET initiative is explored in - detail in this deep programmer's reference. - - - O'Brien, Tim - MSXML3: A Comprehensive Guide - Computer - 36.95 - 2000-12-01 - The Microsoft MSXML3 parser is covered in - detail, with attention to XML DOM interfaces, XSLT processing, - SAX and more. - - - Galos, Mike - Visual Studio 7: A Comprehensive Guide - Computer - 49.95 - 2001-04-16 - Microsoft Visual Studio 7 is explored in depth, - looking at how Visual Basic, Visual C++, C#, and ASP+ are - integrated into a comprehensive development - environment. - - - - diff --git a/docs/shiki/samples/xsl.sample b/docs/shiki/samples/xsl.sample deleted file mode 100644 index ec36743a..00000000 --- a/docs/shiki/samples/xsl.sample +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - <xsl:value-of select="/myNS:Article/myNS:Title"/> - - - - - - - -

    - - -
    - - Authors:
    - -

    - -

    - -

    - - - - -
    - - - -- - - - :: - - -
    -
    - - - - - - - - - - - - -
    - - diff --git a/docs/shiki/samples/yaml.sample b/docs/shiki/samples/yaml.sample deleted file mode 100644 index 7e1709ee..00000000 --- a/docs/shiki/samples/yaml.sample +++ /dev/null @@ -1,50 +0,0 @@ -name: Check dist/ - -on: - push: - branches: - - main - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - -jobs: - check-dist: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Rebuild the dist/ directory - run: | - npm run build:compile - npm run build:package - - - name: Compare the expected and actual dist/ directories - run: | - if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then - echo "Detected uncommitted changes after build. See status below:" - git diff - exit 1 - fi - id: diff - - # If index.js was different than expected, upload the expected version as an artifact - - uses: actions/upload-artifact@v3 - if: ${{ failure() && steps.diff.conclusion == 'failure' }} - with: - name: dist - path: dist/ - -# From https://github.com/actions/add-to-project/blob/main/.github/workflows/check-dist.yml diff --git a/docs/shiki/samples/zenscript.sample b/docs/shiki/samples/zenscript.sample deleted file mode 100644 index 9f28b9bb..00000000 --- a/docs/shiki/samples/zenscript.sample +++ /dev/null @@ -1,44 +0,0 @@ -import crafttweaker.api.BracketHandlers; - -val air = ; -val diamond = ; -var woodTypes = ["oak","spruce","birch","jungle","acacia","dark_oak"]; - -for name in woodTypes { - val thing = BracketHandlers.getItem("minecraft:" + name + "_planks"); - craftingTable.addShaped(name + "_diamond", diamond, [[air, thing], [thing, air]]); -} - -function checkLeapYear(year as int) as bool { - if(year % 4 == 0) { - if(year % 100 == 0) { - if(year % 400 == 0) { - return true; - } else { - return false; - } - } else { - return true; - } - } else { - return false; - } -} - -print("Is 2000 a leap year: " ~ checkLeapYear(2000)); -print("Is 2004 a leap year: " ~ checkLeapYear(2004)); -print("Is 2100 a leap year: " ~ checkLeapYear(2100)); -print("Is 2012 a leap year: " ~ checkLeapYear(2012)); - - -//Note: this is a cleaner way -function checkLeapYear2(year as int) as bool { - return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); -} - -print("Is 2000 a leap year (2nd function): " ~ checkLeapYear2(2000)); -print("Is 2004 a leap year (2nd function): " ~ checkLeapYear2(2004)); -print("Is 2100 a leap year (2nd function): " ~ checkLeapYear2(2100)); -print("Is 2012 a leap year (2nd function): " ~ checkLeapYear2(2012)); - -# From https://github.com/CraftTweaker/CraftTweaker-Examples \ No newline at end of file diff --git a/docs/shiki/samples/zig.sample b/docs/shiki/samples/zig.sample deleted file mode 100644 index 6bb25143..00000000 --- a/docs/shiki/samples/zig.sample +++ /dev/null @@ -1,26 +0,0 @@ -const std = @import("std"); -const parseInt = std.fmt.parseInt; - -test "parse integers" { - const input = "123 67 89,99"; - const ally = std.testing.allocator; - - var list = std.ArrayList(u32).init(ally); - // Ensure the list is freed at scope exit. - // Try commenting out this line! - defer list.deinit(); - - var it = std.mem.tokenize(u8, input, " ,"); - while (it.next()) |num| { - const n = try parseInt(u32, num, 10); - try list.append(n); - } - - const expected = [_]u32{ 123, 67, 89, 99 }; - - for (expected, list.items) |exp, actual| { - try std.testing.expectEqual(exp, actual); - } -} - -// from https://ziglang.org \ No newline at end of file diff --git a/docs/shiki/samples/zsh.sample b/docs/shiki/samples/zsh.sample deleted file mode 100644 index a82e1a6c..00000000 --- a/docs/shiki/samples/zsh.sample +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/zsh - -# Add commonly used folders to $PATH -export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - -# Specify default editor. Possible values: vim, nano, ed etc. -export EDITOR=vim - -# File search functions -function f() { find . -iname "*$1*" ${@:2} } -function r() { grep "$1" ${@:2} -R . } - -# Create a folder and move into it in one command -function mkcd() { mkdir -p "$@" && cd "$_"; } - -# Example aliases -alias cppcompile='c++ -std=c++11 -stdlib=libc++' -alias g='git' - -# From https://sourabhbajaj.com/mac-setup/iTerm/zsh.html diff --git a/package-lock.json b/package-lock.json index 1802ed70..167f04e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3301,6 +3301,81 @@ } } }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "optional": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://npm.suade.io/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -17666,94 +17741,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.3", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", - "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://npm.suade.io/vue-style-loader/-/vue-style-loader-4.1.3.tgz", diff --git a/package.json b/package.json index b253ecaf..a899b0fe 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "Matt Elen " ], "scripts": { - "copy": "shx mkdir -p documentation/shiki && shx cp -r node_modules/shiki/{dist,languages,samples,themes} documentation/shiki/", + "copy": "shx mkdir -p docs/shiki && shx mkdir -p documentation/shiki && shx cp -r node_modules/shiki/{dist,languages,samples,themes} documentation/shiki/ && shx cp -r node_modules/shiki/{dist,languages,samples,themes} docs/shiki/", "lint": "vue-cli-service lint", "bundle": "vue-cli-service build --target lib ./src/index.js && rm -rf ./dist/demo.html && rollup -c --environment BUILD:production", "finish": "npm run lint && npm test && npm run bundle", From cc5632d98ebae4db8ece91cb7eab05bde2e2be43 Mon Sep 17 00:00:00 2001 From: Matt Elen Date: Wed, 24 Apr 2024 04:18:51 +1200 Subject: [PATCH 2/3] chore(3.0.0): Re-add CNAME --- docs/CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/CNAME diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..8f5b7e4a --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +vue-multiselect.js.org \ No newline at end of file From 5ec5ad6076488b5a7c213ace66802739b1e634c6 Mon Sep 17 00:00:00 2001 From: Matt Elen Date: Wed, 24 Apr 2024 04:22:13 +1200 Subject: [PATCH 3/3] chore(3.0.0): Update Package.json to force build docs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 42f14d03..6fa5c822 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": false, "types": "index.d.ts", "homepage": "vue-multiselect.js.org", - "description": "Multiselect component for Vue 3", + "description": "Multiselect component for Vue", "author": { "name": "Damian Dulisz", "email": "damian@dulisz.com"