├── dbi ├── dbi.pdf ├── allnsf.dbi └── dbi_describe.md ├── latex ├── APL386.ttf ├── Apl385.ttf ├── allchars.txt ├── aplbadboys.png ├── cvh2010pub.pdf ├── cvh2010pub.zip ├── apl-lstlisting.pdf ├── typesettingutfaplcod1837.pdf └── kindlesize.tex ├── swag ├── swag.xlsx ├── actuals.xlsx ├── tests │ ├── tp.xlsx │ ├── tr0.xlsm │ └── CrossReference.txt ├── rawact │ ├── RawIncome.txt │ ├── RawExpenses.txt │ ├── RawLastReserves.txt │ └── RawReserves.txt ├── tabsheets │ ├── s_77Actuals.txt │ └── s_78Actuals.txt └── scenarios │ ├── s_78scenario.txt │ └── s_77scenario.txt ├── brandxmp ├── brandxmp.pdf └── jupyter │ └── brandxmp.ijs.pdf ├── dogpony ├── WhatIsJOD.pdf └── WritingPortableJaddons.pdf ├── eucgvuts ├── eucgvuts.pdf ├── eucgvuts_notebook.pdf ├── euclid_digraph_books_1_6.pdf ├── euclid_i_47_dependencies.pdf └── euclid_i_47_dependencies.gv ├── griddemo ├── favicon.ico ├── jodoval.png └── savedhtlxgrid.js ├── ipynbfrjod ├── ipynb.pdf ├── ipynb_onself.pdf └── ipynb.ijs ├── jacksjodlogotiny.png ├── mirrorxref ├── mirror.png ├── MirrorXref.pdf ├── mirrorstats.pdf ├── Mirror SmugMug Statistics.pdf ├── TODO_MirrorXref.md ├── buildmirror.bat └── HISTORY_MirrorXref.md ├── geotagged ├── geotagged.kmz └── gpxutils.pdf ├── jodliterate ├── sunmoon.pdf ├── PJHighlight.pdf ├── jodliterate.pdf ├── UsingJodliterate.pdf ├── inclusions │ ├── bonebridge2.jpg │ ├── jqt_pacman.png │ ├── jqt_pacman_menu.png │ ├── jodliteratelionlittle.png │ └── literate_programming_book_cover_smaller.png ├── tango.css ├── bonebridge.ijs ├── TODO_jodliterate.md ├── j.xml └── J.hs ├── slipslide ├── slipslide.pdf ├── slipslide_test.zig ├── slipslide0.zig ├── slipslide.ijs └── slipslide.ipynb ├── texfrwpxml ├── wp2latex.zip ├── TeXfrWpxml.pdf ├── wp2latexlogo.png ├── turnyourblogintoaneb2587.pdf ├── wordpresstolatexwith2374.pdf ├── wordpresstolatexwith2456.pdf ├── wordpresstolatexwith2518.pdf ├── TODO_TeXfrWpxml.md └── cdata.html ├── ResizeKeys └── ResizeKeys.pdf ├── hilbert ├── hilbert_kindle.pdf ├── hilbert_foundations_of_geometry_source.zip └── RescaleHilbertGraphics.ijs ├── numpyjlove └── numpy-j-logo.png ├── jserver ├── bin │ └── Release │ │ ├── JServer.dll │ │ ├── JServer.pdb │ │ └── Interop.JEXEServerLib.dll ├── obj │ └── Release │ │ ├── JServer.dll │ │ ├── JServer.pdb │ │ ├── Interop.JEXEServerLib.dll │ │ ├── JServer.csproj.GenerateResource.Cache │ │ ├── JServer.csproj.ResolveComReference.cache │ │ ├── JServerClass.JserverResources.resources │ │ ├── TempPE │ │ ├── JServerResources.Designer.cs.dll │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── JServerClass.Properties.Resources.resources │ │ └── JServer.csproj.FileListAbsolute.txt ├── Resources │ ├── jodgooggle.txt │ └── CSsrv.ijs ├── JSession.cs ├── Properties │ ├── AssemblyInfo.cs │ └── Resources.resx ├── JServer.csproj └── JserverResources.resx ├── bitcoin ├── JD-Bitcoin-Blockchain-Spelunking.pdf └── sslhash.ijs ├── .gitignore ├── sqlstuff ├── Histograms.ijs ├── OdbcExample.ijs └── HistoryAge.sql ├── configs ├── jqtcfg │ ├── about.md │ ├── launch.cfg │ ├── dirmatch.cfg │ ├── folders.cfg │ ├── style.cfg │ ├── userkeys.cfg │ ├── qtide.cfg │ └── base.cfg ├── md-notepad.xml ├── j._udl.xml └── j._udl_DM.xml ├── mathjaxdemo ├── startup_mathjaxdemo_jhs.ijs ├── htmthorn.ijs └── MathJaxDemo.ijs ├── .gitattributes ├── phones └── jPhoneBlogExamples.ijs ├── LICENSE ├── notebooks ├── NationalFireData.txt ├── wildfire plot.ipynb └── Extracting SQL code from SSIS dtsx packages with Python lxml.ipynb ├── smugmug ├── SmugDupsFrMD5.ijs └── SmugPrintSizes.ijs ├── pandocexamples └── jpdh.md └── README.md /dbi/dbi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/dbi/dbi.pdf -------------------------------------------------------------------------------- /dbi/allnsf.dbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/dbi/allnsf.dbi -------------------------------------------------------------------------------- /latex/APL386.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/APL386.ttf -------------------------------------------------------------------------------- /latex/Apl385.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/Apl385.ttf -------------------------------------------------------------------------------- /swag/swag.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/swag/swag.xlsx -------------------------------------------------------------------------------- /latex/allchars.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/allchars.txt -------------------------------------------------------------------------------- /swag/actuals.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/swag/actuals.xlsx -------------------------------------------------------------------------------- /swag/tests/tp.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/swag/tests/tp.xlsx -------------------------------------------------------------------------------- /brandxmp/brandxmp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/brandxmp/brandxmp.pdf -------------------------------------------------------------------------------- /dogpony/WhatIsJOD.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/dogpony/WhatIsJOD.pdf -------------------------------------------------------------------------------- /eucgvuts/eucgvuts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/eucgvuts/eucgvuts.pdf -------------------------------------------------------------------------------- /griddemo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/griddemo/favicon.ico -------------------------------------------------------------------------------- /griddemo/jodoval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/griddemo/jodoval.png -------------------------------------------------------------------------------- /ipynbfrjod/ipynb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/ipynbfrjod/ipynb.pdf -------------------------------------------------------------------------------- /jacksjodlogotiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jacksjodlogotiny.png -------------------------------------------------------------------------------- /latex/aplbadboys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/aplbadboys.png -------------------------------------------------------------------------------- /latex/cvh2010pub.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/cvh2010pub.pdf -------------------------------------------------------------------------------- /latex/cvh2010pub.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/cvh2010pub.zip -------------------------------------------------------------------------------- /mirrorxref/mirror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/mirrorxref/mirror.png -------------------------------------------------------------------------------- /swag/tests/tr0.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/swag/tests/tr0.xlsm -------------------------------------------------------------------------------- /geotagged/geotagged.kmz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/geotagged/geotagged.kmz -------------------------------------------------------------------------------- /geotagged/gpxutils.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/geotagged/gpxutils.pdf -------------------------------------------------------------------------------- /jodliterate/sunmoon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/sunmoon.pdf -------------------------------------------------------------------------------- /slipslide/slipslide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/slipslide/slipslide.pdf -------------------------------------------------------------------------------- /texfrwpxml/wp2latex.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/wp2latex.zip -------------------------------------------------------------------------------- /ResizeKeys/ResizeKeys.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/ResizeKeys/ResizeKeys.pdf -------------------------------------------------------------------------------- /hilbert/hilbert_kindle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/hilbert/hilbert_kindle.pdf -------------------------------------------------------------------------------- /latex/apl-lstlisting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/apl-lstlisting.pdf -------------------------------------------------------------------------------- /mirrorxref/MirrorXref.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/mirrorxref/MirrorXref.pdf -------------------------------------------------------------------------------- /mirrorxref/mirrorstats.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/mirrorxref/mirrorstats.pdf -------------------------------------------------------------------------------- /texfrwpxml/TeXfrWpxml.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/TeXfrWpxml.pdf -------------------------------------------------------------------------------- /ipynbfrjod/ipynb_onself.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/ipynbfrjod/ipynb_onself.pdf -------------------------------------------------------------------------------- /jodliterate/PJHighlight.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/PJHighlight.pdf -------------------------------------------------------------------------------- /jodliterate/jodliterate.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/jodliterate.pdf -------------------------------------------------------------------------------- /numpyjlove/numpy-j-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/numpyjlove/numpy-j-logo.png -------------------------------------------------------------------------------- /texfrwpxml/wp2latexlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/wp2latexlogo.png -------------------------------------------------------------------------------- /eucgvuts/eucgvuts_notebook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/eucgvuts/eucgvuts_notebook.pdf -------------------------------------------------------------------------------- /jserver/bin/Release/JServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/bin/Release/JServer.dll -------------------------------------------------------------------------------- /jserver/bin/Release/JServer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/bin/Release/JServer.pdb -------------------------------------------------------------------------------- /jserver/obj/Release/JServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServer.dll -------------------------------------------------------------------------------- /jserver/obj/Release/JServer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServer.pdb -------------------------------------------------------------------------------- /brandxmp/jupyter/brandxmp.ijs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/brandxmp/jupyter/brandxmp.ijs.pdf -------------------------------------------------------------------------------- /jodliterate/UsingJodliterate.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/UsingJodliterate.pdf -------------------------------------------------------------------------------- /dogpony/WritingPortableJaddons.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/dogpony/WritingPortableJaddons.pdf -------------------------------------------------------------------------------- /latex/typesettingutfaplcod1837.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/latex/typesettingutfaplcod1837.pdf -------------------------------------------------------------------------------- /eucgvuts/euclid_digraph_books_1_6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/eucgvuts/euclid_digraph_books_1_6.pdf -------------------------------------------------------------------------------- /eucgvuts/euclid_i_47_dependencies.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/eucgvuts/euclid_i_47_dependencies.pdf -------------------------------------------------------------------------------- /jodliterate/inclusions/bonebridge2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/inclusions/bonebridge2.jpg -------------------------------------------------------------------------------- /jodliterate/inclusions/jqt_pacman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/inclusions/jqt_pacman.png -------------------------------------------------------------------------------- /jserver/Resources/jodgooggle.txt: -------------------------------------------------------------------------------- 1 | Credentials for Google Code Project; joddictionary 2 | 3 | user: bakerjd99 4 | pwd: qQ3QY9De6jd7 -------------------------------------------------------------------------------- /mirrorxref/Mirror SmugMug Statistics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/mirrorxref/Mirror SmugMug Statistics.pdf -------------------------------------------------------------------------------- /texfrwpxml/turnyourblogintoaneb2587.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/turnyourblogintoaneb2587.pdf -------------------------------------------------------------------------------- /texfrwpxml/wordpresstolatexwith2374.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/wordpresstolatexwith2374.pdf -------------------------------------------------------------------------------- /texfrwpxml/wordpresstolatexwith2456.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/wordpresstolatexwith2456.pdf -------------------------------------------------------------------------------- /texfrwpxml/wordpresstolatexwith2518.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/texfrwpxml/wordpresstolatexwith2518.pdf -------------------------------------------------------------------------------- /jodliterate/inclusions/jqt_pacman_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/inclusions/jqt_pacman_menu.png -------------------------------------------------------------------------------- /bitcoin/JD-Bitcoin-Blockchain-Spelunking.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/bitcoin/JD-Bitcoin-Blockchain-Spelunking.pdf -------------------------------------------------------------------------------- /jserver/bin/Release/Interop.JEXEServerLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/bin/Release/Interop.JEXEServerLib.dll -------------------------------------------------------------------------------- /jserver/obj/Release/Interop.JEXEServerLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/Interop.JEXEServerLib.dll -------------------------------------------------------------------------------- /jodliterate/inclusions/jodliteratelionlittle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/inclusions/jodliteratelionlittle.png -------------------------------------------------------------------------------- /hilbert/hilbert_foundations_of_geometry_source.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/hilbert/hilbert_foundations_of_geometry_source.zip -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | 3 | ## jacks files to ignore 4 | desktop.ini 5 | jserver/Backup/ 6 | jserver/obj/Debug/ 7 | .DS_Store 8 | configs/.DS_Store 9 | *.suo -------------------------------------------------------------------------------- /jserver/obj/Release/JServer.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServer.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /jserver/obj/Release/JServer.csproj.ResolveComReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServer.csproj.ResolveComReference.cache -------------------------------------------------------------------------------- /jserver/obj/Release/JServerClass.JserverResources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServerClass.JserverResources.resources -------------------------------------------------------------------------------- /jserver/obj/Release/TempPE/JServerResources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/TempPE/JServerResources.Designer.cs.dll -------------------------------------------------------------------------------- /jserver/obj/Release/JServerClass.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/JServerClass.Properties.Resources.resources -------------------------------------------------------------------------------- /jserver/obj/Release/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jserver/obj/Release/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /jodliterate/inclusions/literate_programming_book_cover_smaller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bakerjd99/jacks/HEAD/jodliterate/inclusions/literate_programming_book_cover_smaller.png -------------------------------------------------------------------------------- /jserver/JSession.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.ComponentModel; 5 | 6 | namespace JServer 7 | { 8 | public class JServer 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sqlstuff/Histograms.ijs: -------------------------------------------------------------------------------- 1 | NB. computes histograms uses right open intervals 2 | histogram=:<:@(#/.~)@(i.@#@[ , I.) 3 | 4 | NB. variation on (histogram) uses left open intervals 5 | histogram2=:<:@(#/.~)@(i.@>:@#@[ , |.@[ (#@[ - I.) ]) -------------------------------------------------------------------------------- /sqlstuff/OdbcExample.ijs: -------------------------------------------------------------------------------- 1 | NB. odbc interface 2 | require 'dd' 3 | 4 | NB. read CTE query 5 | HistoryAgeSQL=. read 'c:/temp/HistoryAge.sql' 6 | 7 | NB. connect sqlserver database 8 | ch =. ddcon 'dsn=history' 9 | 10 | NB. select with CTE query 11 | sh =. HistoryAgeSQL ddsel ch 12 | 13 | NB. fetch results 14 | data=. ddfet sh,_1 -------------------------------------------------------------------------------- /swag/rawact/RawIncome.txt: -------------------------------------------------------------------------------- 1 | Date Name Amount Category Description 2 | 2015-09-15 salary 2200.42 genericemployer after tax bimontly salary 3 | 2015-09-30 salary 2200.42 genericemployer 4 | 2015-10-15 salary 2200.42 genericemployer 5 | 2015-10-30 salary 2200.42 genericemployer 6 | 2015-11-13 salary 2200.42 genericemployer 7 | 2015-11-30 salary 2200.42 genericemployer 8 | -------------------------------------------------------------------------------- /configs/jqtcfg/about.md: -------------------------------------------------------------------------------- 1 | J QT IDE Configuration Files 2 | ============================= 3 | 4 | The files in this directory are a snapshot of my working 5 | J QT IDE configuration files. Tracking the picayune 6 | settings in these files across numerous machines is exactly 7 | the annoying problem version control was invented to solve. 8 | 9 | John Baker 10 | Meridian ID 11 | February 25, 2017 12 | 13 | 14 | -------------------------------------------------------------------------------- /configs/jqtcfg/launch.cfg: -------------------------------------------------------------------------------- 1 | NB. launch.cfg 2 | NB. 3 | NB. each definition is a pair: name;script as in: 4 | NB. Life;~addons/demos/wd/life.ijs 5 | NB. 6 | NB. = for a menu separator line 7 | NB. 8 | NB. if script exists, name is added to the Tools|Launch menu 9 | NB. 10 | NB. if there are no valid scripts, the Launch Pad menu is not shown 11 | 12 | Life;~addons/demos/wd/life.ijs 13 | = 14 | Minesweeper;~addons/games/minesweeper/uiwd.ijs 15 | -------------------------------------------------------------------------------- /swag/rawact/RawExpenses.txt: -------------------------------------------------------------------------------- 1 | Date Name Amount Category Description 2 | 2015-09-01 house 825.00 rent apartment 3 | 2015-09-01 living 925.00 4 | 2015-09-15 living 1000.00 5 | 2015-10-01 house 825.00 rent 6 | 2015-10-01 living 1000.00 7 | 2015-10-15 living 1400.00 8 | 2015-10-15 optional 1000.00 travel modest weekend 9 | 2015-11-01 house 825.00 rent 10 | 2015-11-01 living 500.00 11 | 2015-11-04 other 2500.00 buycamera buy camera 12 | 2015-11-15 living 1200.00 13 | 2015-12-01 house 825.00 rent 14 | 2015-12-08 car 343.22 car fix muffler 15 | 2016-01-02 house 850.00 rent 16 | -------------------------------------------------------------------------------- /mathjaxdemo/startup_mathjaxdemo_jhs.ijs: -------------------------------------------------------------------------------- 1 | NB.*startup_mathjaxdemo_jhs s-- start MathJaxDemo when JHS loads. 2 | NB. 3 | NB. Copy this file to J's installed config directory 4 | NB. (jpath '~config') and rename it (startup_jhs.ijs). 5 | NB. 6 | NB. JHS runs this script when it starts. After 7 | NB. running browse to url: 8 | NB. 9 | NB. http://127.0.0.1:65001/MathJaxDemo 10 | 11 | smoutput 0 : 0 12 | This is a JHS MathJax demo - ehh! 13 | ) 14 | 15 | NB. hide console window (windows only) 16 | NB. jshowconsole_j_ 0 17 | 18 | NB. load demo script 19 | load '~MathJaxDemo/MathJaxDemo.ijs' 20 | -------------------------------------------------------------------------------- /configs/jqtcfg/dirmatch.cfg: -------------------------------------------------------------------------------- 1 | NB. Directory Match configuration 2 | NB. 3 | NB. DMType/DMTypes - defines file extensions 4 | NB. DMFavorites - pre-selected source/target directories 5 | NB. 6 | NB. DMFavorites is a list of files, taken in pairs, e.g. 7 | NB. /home/guest/mywork/dev 8 | NB. /home/guest/mywork/prod 9 | NB. ~Addons/data/dbman 10 | NB. ~Projects/dev/dbman 11 | NB. 12 | NB. DMTypes and DMFavorites lines must begin with a blank 13 | 14 | DMType=All 15 | 16 | DMTypes= 17 | Scripts ijs 18 | SourceText c cfg cpp h ijs ijt jproj js sh txt tex md rs bat cs 19 | All 20 | 21 | DMFavorites= 22 | -------------------------------------------------------------------------------- /swag/rawact/RawLastReserves.txt: -------------------------------------------------------------------------------- 1 | Date Name Category Amount Conversion Foreign LastActive Description 2 | 2015-09-01 n/a n/a n/a n/a n/a n/a Many reserve items are not reported monthly. This sheet maintains last known reports. Missing months will be filled based on last values 3 | 2014-06-30 rsinvest usret 12004.3 boo retire 4 | 2014-12-31 rsinvest usret 7233.28 hoo retire 5 | 2015-09-30 rsinvest stock 19777.64 hoo 6 | 2015-10-01 rssavings cash 22440.43108 0.7478 30008.6 2015-11-07 zoo ca ;; account converted to us dollar 7 | 2015-10-31 rsinvest rrsp 8974.153372 0.7478 12000.74 foo retire 8 | 2015-11-15 rssavings cash 40143.63 foo joint 9 | 2015-11-30 rssavings cash 57003.83 zoo joint 10 | 2015-11-30 rssavings cash 18246.97 foo me 11 | 2016-01-08 rsinvest rrsp 8504.63208 0.7056 12053.05 yada retire 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.tex text 7 | *.markdown text 8 | *.md text 9 | *.txt text 10 | *.ijs text 11 | *.ijt text 12 | *.bat text 13 | *.sh text 14 | 15 | # Denote all files that are truly binary and should not be modified. 16 | *.png binary 17 | *.jpg binary 18 | *.tif binary 19 | *.mobi binary 20 | *.epub binary 21 | *.xml binary 22 | *.ijn binary 23 | *.ijf binary 24 | *.xlsx binary 25 | *.xlsm binary 26 | *.docx binary 27 | *.kmz binary 28 | *.ttf binary 29 | *.ico binary 30 | *.dbi binary 31 | *.pdf binary 32 | 33 | # Custom for Visual Studio 34 | *.cs diff=csharp 35 | *.sln merge=union 36 | *.csproj merge=union 37 | *.vbproj merge=union 38 | *.fsproj merge=union 39 | *.dbproj merge=union 40 | 41 | 42 | -------------------------------------------------------------------------------- /jodliterate/tango.css: -------------------------------------------------------------------------------- 1 | table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { 2 | margin: 0; padding: 0; vertical-align: baseline; border: none; } 3 | table.sourceCode { width: 100%; background-color: #f8f8f8; } 4 | td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } 5 | td.sourceCode { padding-left: 5px; } 6 | pre, code { background-color: #f8f8f8; } 7 | code > span.kw { color: #204a87; font-weight: bold; } 8 | code > span.dt { color: #204a87; } 9 | code > span.dv { color: #0000cf; } 10 | code > span.bn { color: #0000cf; } 11 | code > span.fl { color: #0000cf; } 12 | code > span.ch { color: #4e9a06; } 13 | code > span.st { color: #4e9a06; } 14 | code > span.co { color: #8f5902; font-style: italic; } 15 | code > span.ot { color: #8f5902; } 16 | code > span.al { color: #ef2929; } 17 | code > span.fu { color: #000000; } 18 | code > span.er { font-weight: bold; } -------------------------------------------------------------------------------- /mirrorxref/TODO_MirrorXref.md: -------------------------------------------------------------------------------- 1 | [`MirrorXref`](https://github.com/bakerjd99/jacks/blob/master/mirrorxref/MirrorXref.ijs) TODO 2 | ====================================================== 3 | 4 | Pending and considered changes for `MirrorXref`. 5 | 6 | `MirrorXref` is a [J/JOD](https://analyzethedatanotthedrivel.org/the-jod-page/) class group that 7 | converts a directory of metadata text and image thumbnail files to a single consolidated 8 | SQLite `mirror.db` database file, see: 9 | 10 | * https://github.com/bakerjd99/jacks/blob/master/mirrorxref/MirrorXref.pdf 11 | 12 | The base 36 case insensitive GUID key is stable over the lifetime of a task. It uniquely 13 | labels each task and makes it possible compile detailed change histories 14 | by trolling over the version history of this file. 15 | 16 | `[begin-todo]` 17 | 18 | 1. `<_bbi74vorh3swa5369bpqrwjhk_>` Add two new tables to `mirror.db` to support non SmugMug image groups. 19 | 20 | `[end-todo]` -------------------------------------------------------------------------------- /configs/jqtcfg/folders.cfg: -------------------------------------------------------------------------------- 1 | NB. folders.cfg 2 | NB. 3 | NB. each non-empty line is a pair: name path, e.g. 4 | NB. Van /home/guest/van/source 5 | NB. 6 | NB. name begins with lowercase - added to SystemFolders_j_ 7 | NB. name begins with uppercase - defines UserFolders_j_ 8 | 9 | Demos ~addons/demos 10 | Projects ~user/projects 11 | User ~user 12 | 13 | NB. JOD directories 14 | JOD c:/Users/John.Baker/OneDrive - Jackson Companies/jod 15 | JODDUMPS c:/Users/John.Baker/OneDrive - Jackson Companies/jod/joddumps 16 | JODPRVDUMPS c:/Users/John.Baker/OneDrive - Jackson Companies/jod/jodprvdumps 17 | JODSOURCE c:/jodtest/labtesting 18 | JODTEST c:/jodtest/test 19 | 20 | NB. jacksons git versioned directory 21 | JACK c:/Users/John.Baker/OneDrive - Jackson Companies/wd/jacksons/git/daily_xml_preprocess/ijs 22 | DUMPPUTSECONDARY c:/Users/John.Baker/OneDrive - Jackson Companies/wd/jacksons/git/daily_xml_preprocess/ijs 23 | 24 | NB. shared temp 25 | STEMP c:/Users/John.Baker/OneDrive - Jackson Companies/temp 26 | 27 | NB. jupyter notebook root 28 | BIDATA c:/bidata 29 | -------------------------------------------------------------------------------- /phones/jPhoneBlogExamples.ijs: -------------------------------------------------------------------------------- 1 | NB. J examples for the blog post: 2 | NB. Turn your iPhone into a jPhone 3 | NB. http://bakerjd99.wordpress.com/2012/06/23/turn-your-iphone-into-a-jphone-2/ 4 | 5 | NB. generate one million random numbers and average them 6 | (+/ % #) ? 1000000#10000 7 | 8 | NB. generate a 50 50 random matrix, invert it and multiply with the 9 | NB. original - rounding to the nearest 0.0001 to form an identity matrix 10 | round=: [ * [: <. 0.5 + %~ 11 | matrix=: ? 50 50 $ 10000 12 | invmat=: %. matrix 13 | identity=: 0.0001 round matrix +/ . * invmat 14 | 15 | NB. sum of the diagonal elements of matrix (identity) is 50 16 | 50 = +/ (<0 1) |: identity 17 | 18 | NB. multiply two polynomials with complex number coefficients 19 | polyprod=: +//.@(*/) 20 | 21 | NB. complex number coefficients - AjB is J's notation for A + Bi 22 | poly0=: 2j5 3j7 0 1 23 | poly1=: 1j2 0 3j7 0 0 2 24 | poly0 polyprod poly1 25 | 26 | NB. prime factorization table of 50 random integers less than one billion 27 | (<"0 nums) ,: -.&0 &.> <"1 q: nums=.50?1e9 -------------------------------------------------------------------------------- /configs/jqtcfg/style.cfg: -------------------------------------------------------------------------------- 1 | # Qt Styles config 2 | # This file is read and written by the Qt IDE. 3 | # Make changes in the same format as the original. 4 | # 5 | # Each style has rgb color values (0-255), optionally 6 | # followed by bold or italic, e.g. 7 | # verb=0 128 128 bold 8 | # 9 | # Edit/Term/View definitions are: 10 | # fore = text color 11 | # back = default background color 12 | # high = edit-line background color 13 | # selb = selection background color 14 | # selt = selection text color 15 | 16 | [Edit] 17 | fore=0 0 0 18 | back=221 252 222 19 | high=240 240 232 20 | selt=255 255 255 21 | selb=0 162 232 22 | 23 | [Term] 24 | fore=0 0 0 25 | back=180 180 180 26 | high=240 240 232 27 | selt=255 255 255 28 | selb=0 162 232 29 | 30 | [View] 31 | fore=0 0 0 32 | back=221 252 222 33 | high=240 240 232 34 | selt=255 255 255 35 | selb=0 162 232 36 | 37 | [Class] 38 | adverb=221 68 68 39 | comment=136 136 136 italic 40 | conjunction=221 153 153 41 | control=255 0 0 42 | function=0 0 255 43 | noun=0 0 255 bold 44 | noundef=0 0 255 45 | number=160 32 240 46 | string=0 0 255 47 | verb=0 153 102 48 | -------------------------------------------------------------------------------- /configs/jqtcfg/userkeys.cfg: -------------------------------------------------------------------------------- 1 | NB. userkeys.cfg 2 | NB. 3 | NB. See wiki page www.jsoftware.com/jwiki/Guides/Config/JQt/UserKeys 4 | NB. also: http://jsoftware.com/gitlist/qtide.git/blob/master/lib/base/userkeys.cpp 5 | NB. 6 | NB. Examples: 7 | NB. F3;1;Minesweeper;load '~addons/games/minesweeper/uiwd.ijs' 8 | NB. Ctrl+H;0;Glossary;browse_j_'http://www.jsoftware.com/jwiki/Vocabulary/Glossary' 9 | NB. 10 | NB. "Ctrl+F6" 11 | NB. "Ctrl+Shift+F6" 12 | NB. "Shift+F6" 13 | NB. "F7" 14 | NB. "Ctrl+F7" 15 | NB. "Ctrl+Shift+F7" 16 | NB. "Shift+F7" 17 | 18 | NB. Henry's "butt-ugly" 9.02 workarounds 19 | NB. 9!:29 (1) [ 9!:27 'dbrun $0 [ 9!:29 (' , (": 9!:28'') , ') [ 9!:27 ''' , ((#~ [: >: ''''&=) 9!:26'') , '''' 20 | NB. 9!:29]1[9!:27'dbrun$0[9!:29]',(":9!:28$0),'[9!:27',quote 9!:26$0 21 | 22 | F2;1;Remake Current;'NIMP remake current' 23 | Ctrl+F2;1;Set Current;'NIMP set current' 24 | Ctrl+Shift+F2;1;Dump Put;rs 'dumpput' 25 | F3;1;Require JOD;require 'general/jod' 26 | Ctrl+F3;1;Recycle JOD;(jodon , jodoff) 1 27 | Shift+F3;1;JOD Help;jodhelp 0 28 | F4;0;Debug Run;9!:29]1[9!:27'dbrun$0[9!:29]',(":9!:28$0),'[9!:27',quote 9!:26$0 29 | F6;1;Test Smoke;'NIMP smoke test' 30 | Shift+F6;1;Test Basic;'NIMP basic test' -------------------------------------------------------------------------------- /swag/tabsheets/s_77Actuals.txt: -------------------------------------------------------------------------------- 1 | Date E0 E1 E2 E3 E4 E5 E6 E7 E8 EC EF Etotal I0 I1 I2 I3 I4 I5 IC Itotal R0 R1 R2 R3 Rtotal D0 D1 D2 D3 D4 Dtotal BB NW U0 U1 U2 U3 2 | 2015-09-01 912 1650.000000000 100 0 50 0.000000000 0 0 0 0 0 2712.000000000 4800.000000000 0 0 0 0 0 0 4800.000000000 130000.000000000 25000.000000000 0.000000000 0 155000.000000000 0.00000000 0.000000000 0 0 0 0.000000000 2088.000000000 157088.000000000 155000 0 0.0000000 0.000000000 3 | 2015-10-01 912 1656.875000000 100 0 50 0.000000000 0 0 0 0 0 2718.875000000 4806.000000000 0 0 0 0 0 0 4806.000000000 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2087.125000000 159291.791666667 0 0 0.0000000 0.000000000 4 | 2015-11-01 912 1663.778645833 100 0 50 0.000000000 0 0 0 0 0 2725.778645833 4812.007500000 0 0 0 0 0 0 4812.007500000 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2086.228854167 161378.020520833 0 0 0.0000000 0.000000000 5 | 2015-12-01 912 1670.711056858 100 0 50 0.000000000 0 0 0 0 0 2732.711056858 4818.022509375 0 0 0 0 0 0 4818.022509375 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2085.311452517 163463.331973351 0 0 0.0000000 0.000000000 6 | -------------------------------------------------------------------------------- /swag/tabsheets/s_78Actuals.txt: -------------------------------------------------------------------------------- 1 | Date E0 E1 E2 E3 E4 E5 E6 E7 E8 EC EF Etotal I0 I1 I2 I3 I4 I5 IC Itotal R0 R1 R2 R3 Rtotal D0 D1 D2 D3 D4 Dtotal BB NW U0 U1 U2 U3 2 | 2015-09-01 912 1650.000000000 100 0 50 0.000000000 0 0 0 0 0 2712.000000000 4800.000000000 0 0 0 0 0 0 4800.000000000 130000.000000000 25000.000000000 0.000000000 0 155000.000000000 0.00000000 0.000000000 0 0 0 0.000000000 2088.000000000 157088.000000000 155000 0 0.0000000 0.000000000 3 | 2015-10-01 912 1656.875000000 100 0 50 0.000000000 0 0 0 0 0 2718.875000000 4806.000000000 0 0 0 0 0 0 4806.000000000 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2087.125000000 159291.791666667 0 0 0.0000000 0.000000000 4 | 2015-11-01 912 1663.778645833 100 0 50 0.000000000 0 0 0 0 0 2725.778645833 4812.007500000 0 0 0 0 0 0 4812.007500000 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2086.228854167 161378.020520833 0 0 0.0000000 0.000000000 5 | 2015-12-01 912 1670.711056858 100 0 50 0.000000000 0 0 0 0 0 2732.711056858 4818.022509375 0 0 0 0 0 0 4818.022509375 130054.166666667 25062.500000000 0.000000000 0 155116.666666667 0.00000000 0.000000000 0 0 0 0.000000000 2085.311452517 163463.331973351 0 0 0.0000000 0.000000000 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /sqlstuff/HistoryAge.sql: -------------------------------------------------------------------------------- 1 | WITH cte1 2 | AS (SELECT c.obj_id AS obj_id, 3 | a.created AS creation_date, 4 | Datediff(DAY, a.created, Getdate()) AS day_cnt 5 | FROM [HIST].[dbo].[History] a 6 | JOIN [HIST].[dbo].[HistorySummary] b 7 | ON a.rowid = b.rowid 8 | JOIN [HIST].[dbo].[ObjectNames] c 9 | ON c.obj_name = b.obj_name), 10 | cte2 11 | AS (SELECT cte1.obj_id AS obj_id, 12 | CASE 13 | WHEN cte1.day_cnt <= 30 THEN 1 14 | ELSE 0 15 | END AS d0, 16 | CASE 17 | WHEN ( cte1.day_cnt > 30 ) 18 | AND ( cte1.day_cnt <= 60 ) THEN 1 19 | ELSE 0 20 | END AS d1, 21 | CASE 22 | WHEN ( cte1.day_cnt > 60 ) 23 | AND ( cte1.day_cnt <= 90 ) THEN 1 24 | ELSE 0 25 | END AS d2, 26 | CASE 27 | WHEN ( cte1.day_cnt > 90 ) THEN 1 28 | ELSE 0 29 | END AS d3 30 | FROM cte1) 31 | SELECT obj_id, 32 | SUM(d0) AS OneMonth, 33 | SUM(d1) AS TwoMonths, 34 | SUM(d2) AS ThreeMonths, 35 | SUM(d3) AS Overdue 36 | FROM cte2 37 | GROUP BY obj_id -------------------------------------------------------------------------------- /texfrwpxml/TODO_TeXfrWpxml.md: -------------------------------------------------------------------------------- 1 | ![WP to latex logo](wp2latexlogo.png)`TeXfrWpxml` TODO 2 | ====================================================== 3 | 4 | Pending and considered changes for `TeXfrWpxml`. 5 | 6 | `TeXfrWpxml` is a [J/JOD](https://analyzethedatanotthedrivel.org/the-jod-page/) class group that 7 | converts WordPress.com export XML to LaTeX and Markdown. See the following for more information: 8 | 9 | * https://analyzethedatanotthedrivel.org/2012/02/11/wordpress-to-latex-with-pandoc-and-j-prerequisites-part-1/ 10 | * https://github.com/bakerjd99/jacks/tree/master/texfrwpxml 11 | * https://github.com/bakerjd99/jacks/blob/master/texfrwpxml/wordpresstolatexwith2374.pdf 12 | 13 | This document tracks pending and considered changes for `TeXfrWpxml`. 14 | The base 36 case insensitive GUID key is stable over the lifetime of a task. It uniquely 15 | labels each task and makes it possible compile detailed change histories 16 | by trolling over the version history of this file. 17 | 18 | `[begin-todo]` 19 | 20 | 1. `<_1d2ynsw2ozr7a2llcbs824opu_>` Changes to WordPress's *block editor* have invalidated some of 21 | the assumptions in the code of `TeXfrWpxml`. In particular it no longer 22 | extracts source code blocks reliably. Update for the block editor. 23 | 24 | 2. `<_33xb34nbtb2xqf46lit3e6oaq_>` Test graphics downloading. Graphics 25 | downloading fails to fetch WordPress.com images see `WGETCMD`. 26 | 27 | 3. `<_e5puo4u676b0tn461z945jm7o_>` Consider swapping `curl` for `wget`. 28 | 29 | `[end-todo]` -------------------------------------------------------------------------------- /mirrorxref/buildmirror.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | title Running mirror.db build ... 3 | pushd 4 | setlocal 5 | 6 | if exist c:\SmugMirror\Documents\XrefDb\use-j-beta.txt goto UseBeta00 7 | 8 | if not exist C:\j64\j903\addons\data\sqlite\lib\libjsqlite3.dll goto Exception00 9 | if exist c:\j64\j903\bin\jconsole.exe set jexe=c:\j64\j903\bin\jconsole -js 10 | goto RunScript00 11 | 12 | :UseBeta00 13 | echo using current Beta J 9.04 14 | if not exist C:\j64\j904\addons\data\sqlite\lib\libjsqlite3.dll goto Exception00 15 | if exist c:\j64\j904\bin\jconsole.exe set jexe=c:\j64\j904\bin\jconsole -js 16 | goto RunScript00 17 | 18 | :RunScript00 19 | if "%jexe%" == "" goto Exception01 20 | 21 | rem set MirrorXref J script 22 | set jscr="0!:0<'c:/SmugMirror/Documents/XrefDb/MirrorXref.ijs'" 23 | 24 | rem backup and build mirror.db 25 | %jexe% %jscr% "BuildMirror 1" "exit 0" 26 | 27 | rem copy mirror.db to distribution directory 28 | if not exist C:\SmugMirror\Documents\XrefDb\mirror.db goto Exception05 29 | echo distributing mirror.db 30 | copy /Y mirror.db c:\Users\baker\jupyter_notebooks\dbs 31 | 32 | title mirror.db build complete! 33 | goto TheEnd 34 | 35 | :Exception00 36 | echo ERROR: SQLite J addon binary not found 37 | title mirror.db build abended! 38 | goto TheEnd 39 | 40 | :Exception01 41 | echo ERROR: jconsole.exe not found 42 | title mirror.db build abended! 43 | goto TheEnd 44 | 45 | :Exception05 46 | echo ERROR: mirror.db not found 47 | title mirror.db build abended! 48 | goto TheEnd 49 | 50 | :TheEnd 51 | endlocal 52 | popd 53 | pause -------------------------------------------------------------------------------- /jserver/obj/Release/JServer.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\mp\cs\demos\JServer\JServer\obj\Release\ResolveAssemblyReference.cache 2 | C:\mp\cs\demos\JServer\JServer\obj\Release\Interop.JEXEServerLib.dll 3 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServer.csproj.ResolveComReference.cache 4 | C:\mp\cs\demos\JServer\JServer\bin\Release\JServer.dll 5 | C:\mp\cs\demos\JServer\JServer\bin\Release\JServer.pdb 6 | C:\mp\cs\demos\JServer\JServer\bin\Release\Interop.JEXEServerLib.dll 7 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServer.dll 8 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServer.pdb 9 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServerClass.Properties.Resources.resources 10 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServer.csproj.GenerateResource.Cache 11 | C:\mp\cs\demos\JServer\JServer\obj\Release\JServerClass.JserverResources.resources 12 | C:\mp\cs\JServer\JServer\bin\Release\JServer.dll 13 | C:\mp\cs\JServer\JServer\bin\Release\JServer.pdb 14 | C:\mp\cs\JServer\JServer\bin\Release\Interop.JEXEServerLib.dll 15 | C:\mp\cs\JServer\JServer\obj\Release\ResolveAssemblyReference.cache 16 | C:\mp\cs\JServer\JServer\obj\Release\Interop.JEXEServerLib.dll 17 | C:\mp\cs\JServer\JServer\obj\Release\JServer.csproj.ResolveComReference.cache 18 | C:\mp\cs\JServer\JServer\obj\Release\JServerClass.JserverResources.resources 19 | C:\mp\cs\JServer\JServer\obj\Release\JServerClass.Properties.Resources.resources 20 | C:\mp\cs\JServer\JServer\obj\Release\JServer.csproj.GenerateResource.Cache 21 | C:\mp\cs\JServer\JServer\obj\Release\JServer.dll 22 | C:\mp\cs\JServer\JServer\obj\Release\JServer.pdb 23 | -------------------------------------------------------------------------------- /jserver/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JServer")] 9 | [assembly: AssemblyDescription("Type safe interface to JEXEServer")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("JServer")] 13 | [assembly: AssemblyCopyright("Copyright © John D. Baker 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4a612f7a-5cd5-4c4d-abb7-fa57e3380e87")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("0.9.*")] 36 | [assembly: AssemblyFileVersion("0.9.0.0")] 37 | -------------------------------------------------------------------------------- /griddemo/savedhtlxgrid.js: -------------------------------------------------------------------------------- 1 | // Example function that extracts data from the free DHTMLX grid see: 2 | // 3 | // http://bakerjd99.wordpress.com/2012/12/04/more-about-jhs-with-dhtmlx-the-grid/ 4 | 5 | function ev_saveme_click(){ 6 | 7 | if ('undefined' != typeof grid0){ 8 | 9 | if (0 == grid0.getRowsNum()){ 10 | jbyid("rerowcnt").innerHTML = "No rows to save"; 11 | return; 12 | } 13 | 14 | var st = new Date().getTime(), // start time 15 | ids = grid0.getAllRowIds(","), 16 | ccnt = 1 + grid0.getColumnsNum(); // includes id 17 | 18 | ids = ids.split(","); 19 | var rcnt = ids.length, 20 | tab = new Array(rcnt); 21 | 22 | // header row - tab[0][0] cell ignored 23 | tab[0] = new Array(ccnt); 24 | for (var i = 1; i < ccnt; i++) { 25 | tab[0][i] = grid0.getColumnLabel(i-1,0); 26 | } 27 | 28 | // cells with leading row id 29 | for (var i = 0 , si = 1 ; i < rcnt; i++ , si++) { 30 | tab[si] = new Array(ccnt); 31 | for (var j = 1; j < ccnt; j++) { 32 | tab[si][j] = grid0.cells((+ids[i]),j-1).getValue(); 33 | } 34 | tab[si][0] = ids[i]; 35 | } 36 | 37 | // prefix row column counts 38 | var pfx = (rcnt+1) + " " + ccnt + "*"; 39 | jbyid("gridchgs").innerHTML = pfx + JSON.stringify(tab); 40 | jdoajax(["gridchgs","tout"],""); 41 | 42 | var et = new Date().getTime() - st; // end time 43 | jbyid("rerowcnt").innerHTML= " row count= " + grid0.getRowsNum() + 44 | ", JavaScript ms= " + et; 45 | 46 | } else { 47 | 48 | jbyid("rerowcnt").innerHTML= "Nothing to save"; 49 | } 50 | } -------------------------------------------------------------------------------- /swag/rawact/RawReserves.txt: -------------------------------------------------------------------------------- 1 | Date Name Amount Key 2 | 2015-09-01 rsinvest 8974.153372 rsinvest-rrsp-foo-retire 3 | 2015-09-01 rsinvest 19777.64 rsinvest-stock-hoo 4 | 2015-09-01 rsinvest 12004.3 rsinvest-usret-boo-retire 5 | 2015-09-01 rsinvest 7233.28 rsinvest-usret-hoo-retire 6 | 2015-09-01 rssavings 40143.63 rssavings-cash-foo-joint 7 | 2015-09-01 rssavings 18246.97 rssavings-cash-foo-me 8 | 2015-09-01 rssavings 22440.43108 rssavings-cash-zoo-ca 9 | 2015-09-01 rssavings 57003.83 rssavings-cash-zoo-joint 10 | 2015-10-01 rsinvest 8974.153372 rsinvest-rrsp-foo-retire 11 | 2015-10-01 rsinvest 19777.64 rsinvest-stock-hoo 12 | 2015-10-01 rsinvest 12004.3 rsinvest-usret-boo-retire 13 | 2015-10-01 rsinvest 7233.28 rsinvest-usret-hoo-retire 14 | 2015-10-01 rssavings 40143.63 rssavings-cash-foo-joint 15 | 2015-10-01 rssavings 18246.97 rssavings-cash-foo-me 16 | 2015-10-01 rssavings 22440.43108 rssavings-cash-zoo-ca 17 | 2015-10-01 rssavings 57003.83 rssavings-cash-zoo-joint 18 | 2015-11-01 rsinvest 8974.153372 rsinvest-rrsp-foo-retire 19 | 2015-11-01 rsinvest 19777.64 rsinvest-stock-hoo 20 | 2015-11-01 rsinvest 12004.3 rsinvest-usret-boo-retire 21 | 2015-11-01 rsinvest 7233.28 rsinvest-usret-hoo-retire 22 | 2015-11-01 rssavings 40143.63 rssavings-cash-foo-joint 23 | 2015-11-01 rssavings 18246.97 rssavings-cash-foo-me 24 | 2015-11-01 rssavings 22440.43108 rssavings-cash-zoo-ca 25 | 2015-11-01 rssavings 57003.83 rssavings-cash-zoo-joint 26 | 2015-12-01 rsinvest 8974.153372 rsinvest-rrsp-foo-retire 27 | 2015-12-01 rsinvest 19777.64 rsinvest-stock-hoo 28 | 2015-12-01 rsinvest 12004.3 rsinvest-usret-boo-retire 29 | 2015-12-01 rsinvest 7233.28 rsinvest-usret-hoo-retire 30 | 2015-12-01 rssavings 40143.63 rssavings-cash-foo-joint 31 | 2015-12-01 rssavings 18246.97 rssavings-cash-foo-me 32 | 2015-12-01 rssavings 22440.43108 rssavings-cash-zoo-ca 33 | 2015-12-01 rssavings 57003.83 rssavings-cash-zoo-joint 34 | -------------------------------------------------------------------------------- /configs/jqtcfg/qtide.cfg: -------------------------------------------------------------------------------- 1 | # Qt IDE config 2 | # This file is read and written by the Qt IDE. 3 | # Make changes in the same format as the original. 4 | # 5 | # BoxForm=0 0=linedraw 1=ascii (overrides base cfg) 6 | # ConfirmClose=false confirm session close 7 | # ConfirmSave=false confirm script save 8 | # EscClose=false if Esc will close a window 9 | # Extensions=ijs, c cfg... FIF file extension lists 10 | # FontFamily=Menlo term/edit font family 11 | # FontSize=10 font size 12 | # FontWeight=normal font weight: normal or bold 13 | # KeepCursorPosOnRecall=false if keep cursor position on line recall 14 | # LineNumbers=false if show line numbers 15 | # MaxInputLog=100 max number in input log, 0 for none 16 | # MaxRecent=15 max number in recent files 17 | # OpenTabAt=0 open tab 0=left,1=insert,2=right 18 | # Snapshots=5 number of project snapshots kept 19 | # Snapshotx= snapshots exclusion list 20 | # Terminal=gnome-terminal show in terminal command 21 | # TermSyntaxHighlight=false if term has syntax highlighting 22 | # TrimTrailingWS=false if remove trailing whitespace on save 23 | # 24 | # Initial xywh positions, with negative xy from opposite edge: 25 | # Debug=-590 50 540 500 debug position 26 | # Edit=600 100 750 750 edit position 27 | # Term=0 0 500 600 term position 28 | 29 | [Session] 30 | BoxForm=0 31 | ConfirmClose=false 32 | ConfirmSave=false 33 | EscClose=false 34 | FontFamily=Lucida Console 35 | FontSize=10 36 | FontWeight=normal 37 | KeepCursorPosOnRecall=false 38 | LineNumbers=false 39 | MaxInputLog=500 40 | MaxRecent=15 41 | OpenTabAt=0 42 | Snapshots=1 43 | Snapshotx= 44 | TermSyntaxHighlight=false 45 | TrimTrailingWS=false 46 | 47 | [FindinFiles] 48 | Extensions=ijs ijt, c cs cfg cpp h ijs ijt jproj js markdown md sh txt tex, htm html, * 49 | 50 | [Position] 51 | Debug=-590 50 540 500 52 | Edit=600 100 750 750 53 | Term=0 0 500 600 54 | 55 | [Run] 56 | Terminal=cmd.exe 57 | -------------------------------------------------------------------------------- /texfrwpxml/cdata.html: -------------------------------------------------------------------------------- 1 | I am learning C#. 2 | 3 | Two years ago I swore a blood oath not to learn anymore programming languages.   It’s been obvious for decades that you seldom find any new and important ideas in programming languages.  What you typically find are old ideas renamed and wrapped in a new syntax.  Virtually all key concepts in programming are over twenty years old and many are far older.  My disgust with new languages started with a single word:  refactoring!  4 | 5 | When I met refactoring it seduced me with its sleek geeky’ness.  What could this wonderful word mean and what thrilling concept did it clothe? Well it basically means cleaning up your abhorrent code so that you can make some freaking sense of it!  All competent programmers, dating back to Ada Lovelace (1815-1852),  have been refactoring all their goddamn coding lives.  Refactoring is geek marketing: the same old shit in a glistening new package. 6 | 7 | C# is as free of new concepts as I expected but the language has its strengths.  C# has managed to inherit most of its predecessors gifts without introducing untested features.  C#’s designers restrained themselves and it shows.  The language is clean, easy to learn, and integrates elegantly with  .Net libraries.  8 | 9 | This is all good but what makes it better is that you can steal tons of C# code.  Google and Bing are my accomplices.  When I want to find out what a DataSet does I just pop a query and dredge up nuggets like:  Creating A Data Set From Scratch in C#.   In the old days you had to read  dense language documents like the J Dictionary and think for yourself. 10 | 11 | Thinking for yourself is so 20th century;  why code when you can steal! -------------------------------------------------------------------------------- /slipslide/slipslide_test.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | const expect = @import("std").testing.expect; 3 | const print = std.debug.print; 4 | 5 | // slideslide0 for shooter marble as a zig test 6 | 7 | test "shooter marble slip slide" { 8 | 9 | // Archimedes' constant (π) 10 | const pi = 3.14159265358979323846264338327950288419716939937510; 11 | 12 | // ρ air density (kg/m^3) 13 | // https://www.wolframalpha.com/input?i=air+density+at+sea+level+in+kilograms+per+cubic+meter 14 | const rho: f64 = 1.226; 15 | 16 | // glass density (kg/m^3) 17 | // https://www.wolframalpha.com/input?i=2520+kilograms+per+cubic+meter&assumption=%22ClashPrefs%22+-%3E+%22%22 18 | const gd: f64 = 2520.0; 19 | 20 | // radius shooter marble (m) 21 | // https://www.moonmarble.com/t2-marbleinfo.aspx 22 | const rm: f64 = 0.0095; 23 | 24 | // mass of shooter marble (kg) 25 | const mm: f64 = gd * (4.0/3.0) * pi * (rm * rm * rm); 26 | 27 | // area shooter marble (m^2) 28 | const ma: f64 = pi * (rm * rm); 29 | 30 | // drag coefficient ideal sphere 31 | // https://physics.info/drag/ 32 | const C: f64 = 0.5; 33 | 34 | // drag constant 35 | const drgc: f64 = 0.5 * rho * C * ma; 36 | 37 | // delta t (sec) 38 | const dT: f64 = 0.001; 39 | 40 | // iteration count - two hours at dT 41 | const cnt: i64 = 1000 * 3600 * 2; 42 | 43 | // initial velocity (m/sec) 44 | var vn: f64 = 1.0; 45 | 46 | // initial drag force (kg*m/sec^2) 47 | var rn: f64 = drgc * (vn * vn); 48 | 49 | // initial acceleration (m/sec^2) 50 | var an: f64 = rn/mm; 51 | 52 | // total distance (m) 53 | var S: f64 = 0.0; 54 | 55 | var i: i64 = 0; 56 | var dS: f64 = 0; 57 | while (i < cnt) : (i += 1) { 58 | dS = vn * dT; // step distance 59 | vn = vn - (an * dT); // new velocity (decreasing) 60 | rn = drgc * (vn * vn); // new drag force 61 | an = rn/mm; // new acceleration 62 | S += dS; // total distance 63 | } 64 | try expect(i == 7200000); 65 | 66 | print("\nfinal count: {d}", .{i}); 67 | print("\nmarble mass: {d}", .{mm}); 68 | print("\nmarble area: {d}", .{ma}); 69 | print("\nfinal velocity: {d}", .{vn}); 70 | print("\nfinal acceleration: {d}", .{an}); 71 | print("\ntotal distance: {d}", .{S}); 72 | } 73 | -------------------------------------------------------------------------------- /swag/tests/CrossReference.txt: -------------------------------------------------------------------------------- 1 | SeriesName SeriesType Name LongName LongDescription 2 | D0 dbt dbhouse debt series 0 balance remaining on mortgage loans 3 | D1 dbt dbcar debt series 1 balance remaining on car loans 4 | D2 dbt dbmedical debt series 2 balance remaining on major medical loans 5 | D3 dbt dbother debt series 3 balance remaining on major other loans 6 | D4 dbt dboptional debt series 4 balance remaining on major optional loans 7 | Dtotal dbt debttotal total debt series total debt for month 8 | E0 exp house expense series 0 rent, mortgage 9 | E1 exp living expense series 1 normal monthly living expenses 10 | E2 exp insurance expense series 2 medical, car other insurance 11 | E3 exp taxes expense series 3 state, federal 12 | E4 exp car expense series 4 car maintenance and other payments 13 | E5 exp loan expense series 5 loan payments 14 | E6 exp optional expense series 6 expensive discretionary spending trips, telescopes et cetera 15 | E7 exp other expense series 7 other noncategorized expenses 16 | E8 exp medical expense series 8 medical dental expenses not regular insurance payments 17 | EF utl fee transaction fee series period transaction fees 18 | EC utl expcredit expense calculation credits calculated expense period credits 19 | Etotal exp expensetotal total expense series total expenses for month 20 | I0 inc salary income series 0 main income source 21 | I1 inc salarysup income series 1 supplementary salary 22 | I2 inc annuities income series 2 any regular monthly payment 23 | I3 inc dividends income series 3 interest, dividends, stock sales et cetera 24 | I4 inc annuitysup income series 4 additional regular monthly payments 25 | I5 inc windfall income series 5 unexpected income 26 | IC utl inccharge income calculation charges calculated income charges 27 | Itotal inc incometotal total income series total income for month 28 | BB utl balance balance income expenses primary period balance income minus expenses 29 | NW utl networth net worth basic period net worth 30 | R0 res rssavings reserve savings total savings and inheritance available in current period 31 | R1 res rsinvest reserve investments total investments available in current period 32 | R2 res rsequity reserve equity total house, land and other equity available in current period 33 | R3 res rsother reserve other total other cash like reserves like health spending accounts 34 | Rtotal res reservetotal total reserve series total reserves for period 35 | Date yyyymm01 date month date series model time span contiguous months 36 | U0 utl u0 utility series 0 utility series 0 37 | U1 utl u1 utility series 1 utility series 1 38 | U2 utl u2 utility series 2 utility series 2 39 | U3 utl u3 utility series 3 utility series 3 40 | -------------------------------------------------------------------------------- /jodliterate/bonebridge.ijs: -------------------------------------------------------------------------------- 1 | bonebridge=:3 : 0 2 | 3 | NB.*bonebridge v-- lists totem symbol permutations for bone 4 | NB. bridge. 5 | NB. 6 | NB. The solution to this MYST IV puzzle is similiar to the book 7 | NB. shelf puzzle in Tomanha but requires far more exploration of 8 | NB. the age. 9 | NB. 10 | NB. You are confronted with 5 bones on the lock. All the bones 11 | NB. move independently. You can see the settings for 4 bones. One 12 | NB. bone has a broken display. The four visible bones have 8 13 | NB. symbols on them in the same order. The 5th bone also has 8 14 | NB. symbols and you can "safely" infer they are in the same order 15 | NB. as the visible bones. 16 | NB. 17 | NB. Four bone symbols match symbols found on totem poles 18 | NB. distributed around the age. There is a 5th totem pole but 19 | NB. fruit eating mangrees obscure the totem symbol and I have 20 | NB. never seen it. The totem poles are associated with age 21 | NB. animals. In addition to the totem poles there is a chart in 22 | NB. the mangree observation hut that displays a triangular 23 | NB. pattern of paw prints. The paw prints define an animal 24 | NB. ordering. The order seems to be how dangerous a particular 25 | NB. animal is; big scary animals are at the top and vegetarians 26 | NB. are at the bottom. 27 | NB. 28 | NB. Putting the clues together you infer: 29 | NB. 30 | NB. a) the bridge combination is some permutation of five 31 | NB. different symbols 32 | NB. 33 | NB. b) two possible symbol orders are given by the paw chart 34 | NB. 35 | NB. c) you know 5 symbols and the 4th is one of the remaining 4 36 | NB. 37 | NB. If this is the case the number of possible lock settings 38 | NB. shrinks from 32768 to the ones listed by this verb. 39 | NB. 40 | NB. monad: bonebridge uuIgnore 41 | NB. 42 | NB. bonebridge 0 43 | 44 | NB. known in paw order 45 | known=. s: ' square triangle hourglass yingyang' 46 | unknown=. s: ' clover cross xx yy' 47 | 48 | NB. all possible lock permutations 49 | settings=. ~. 5 {."1 tapl known,unknown 50 | assert. ((!8)%!8-5) = #settings 51 | 52 | NB. possible ordering - we don't know 53 | NB. what the fifth symbol is but it 54 | NB. occurs in the 3rd slot 55 | order=. 8#s:<'' 56 | order=. known (0 1 6 7)} order 57 | order=. unknown (2 3 4 5)} order 58 | 59 | NB. keep unknown only in 3rd slot 60 | settings=. settings #~ -. +./"1 (0 1 3 4{"1 settings) e. unknown 61 | settings=. settings #~ (2 {"1 settings) e. unknown 62 | 63 | NB. strict row sequence adverb 64 | srsm=. {{ *./"1 u/&> 2 <\"1 y }} 65 | 66 | NB. retain strictly increasing and strictly decreasing rows 67 | grade=. order i. settings 68 | settings #~ ((< srsm)"1 grade) +. (> srsm)"1 grade 69 | ) 70 | -------------------------------------------------------------------------------- /jodliterate/TODO_jodliterate.md: -------------------------------------------------------------------------------- 1 | 2 | ![jod literate lion](inclusions/jodliteratelionlittle.png)`jodliterate` TODO 3 | ============================================================================ 4 | 5 | Pending and considered changes for `jodliterate`. 6 | 7 | `jodliterate` is a [J/JOD](https://analyzethedatanotthedrivel.org/the-jod-page/) class group that provides 8 | [literate programming](http://literateprogramming.com/index.html) support 9 | for J code stored in JOD dictionaries. 10 | 11 | This document tracks pending and considered changes for `jodliterate`. 12 | The base 36 case insensitive GUID key is stable over the lifetime of a task. It uniquely 13 | labels each task and makes it possible compile detailed change histories 14 | by trolling over the version history of this file. 15 | 16 | `[begin-todo]` 17 | 18 | 1. `<_b9g7eajovtfz49saualwur8ym_>` Generalize `setifacetargs` to set hyperlink targets for lists of hint words. Hint words will 19 | come from JOD group associated lists like `IFACEWORDS*` and `ROOTWORDS*`. The idea is to point 20 | out words in long source code listings that require special attention. Such hinted words will 21 | appear in blocks like: 22 | ~~~~ 23 | AlbumImageCount_sql CreateMirror_sql LocalFile_sql 24 | UnClickHereImages_sql UpdateLocalPresent_sql UploadRateCount_sql 25 | ~~~~ 26 | 27 | 2. `<_2r3hv91c891s7n1qqjajqdqak_>` Consider allowing original word order for `wordlit`. Currently the words 28 | are sorted by JODs `wttext` conventions. 29 | 30 | 3. `<_73vgsq4u4yw3ammui15cdeazt_>` Investigate why underbar characters `_` in JOD group names break LaTeX processing. For now just 31 | don't use underbar characters in group names. 32 | 33 | 4. `<_6tjcxi308slh372manqve7a8a_>` Comments without whitespace, e.g. `NB.no space ehh` may not color properly. User `NB. space please`. 34 | 35 | 5. `<_b5swcujvdy4wuyvthwk543fcl_>` Syntax coloring of wrapped boxed heterogenous arrays may not be correct. 36 | ~~~ 37 | 'quoted string' ; (? 20 20$100) ; ;:'quoted strings with numerics' 38 | ~~~ 39 | 40 | 6. `<_lh1mo16u2ru3im4mv71jowbv_>` Similarly, wrapping nonnouns with long embedded quoted strings may not color properly: 41 | ~~~ 42 | NB. ISBN-13 checksum 43 | _80 ]\ disp 'i13cd' 44 | i13cd=:'098765432109876543210987654321098765432109876543210 45 | 98765432109876543210987654321098765432109876543210987654321098765432109876543210 46 | 98765432109876543210987654321098765432109876543210987654321098765432109876543210 47 | 987654' { ~ 1 3 1 3 1 3 1 3 1 3 1 3 +/ .* '0123456789' i. ] 48 | ~~~ 49 | NOTE: Long lines are wrapped before going to pandoc. This can lead to pandoc 50 | assigning inaccurate tokens that cannot be *easily* patched afterwards. Fix 51 | these infrequent objects with manual LaTeX edits: see `uwlatexfrwords`. 52 | 53 | `[end-todo]` 54 | -------------------------------------------------------------------------------- /notebooks/NationalFireData.txt: -------------------------------------------------------------------------------- 1 | https://www.nifc.gov/fireInfo/fireInfo_stats_totalFires.html 2 | 3 | Total Wildland Fires and Acres (1926-2019) 4 | The National Interagency Coordination Center at NIFC compiles annual wildland fire statistics 5 | for federal and state agencies.This information is provided through Situation Reports, which have 6 | been in use for several decades. Prior to 1983, sources of these figures are not known, or cannot be 7 | confirmed, and were not derived from the current situation reporting process. As a result the 8 | figures prior to 1983 should not be compared to later data. 9 | 10 | Source: National Interagency Coordination Center 11 | US fires 12 | 13 | ===[DATA=AFTER]=== 14 | Year Fires Acres 15 | 1926 91793 24316000 16 | 1927 158438 38531000 17 | 1928 175934 43542000 18 | 1929 134895 46230000 19 | 1930 190980 52266000 20 | 1931 187214 51607000 21 | 1932 166399 42063000 22 | 1933 140722 43890000 23 | 1934 162663 41821000 24 | 1935 140297 30335000 25 | 1936 226285 43207000 26 | 1937 185209 21981000 27 | 1938 232229 33815000 28 | 1939 212671 30449000 29 | 1940 195427 25848000 30 | 1941 199702 26405000 31 | 1942 208218 31854000 32 | 1943 210326 32333000 33 | 1944 131229 16549000 34 | 1945 124728 17681000 35 | 1946 172278 20691000 36 | 1947 200799 23226000 37 | 1948 174189 16557000 38 | 1949 193774 15397000 39 | 1950 208402 15519000 40 | 1951 164090 10781000 41 | 1952 188277 14187000 42 | 1953 154160 9976000 43 | 1954 176891 8833000 44 | 1955 145180 8069000 45 | 1956 143485 6606000 46 | 1957 83392 3410000 47 | 1958 97910 3280000 48 | 1959 104662 4156000 49 | 1960 103387 4478188 50 | 1961 98517 3036219 51 | 1962 115345 4078894 52 | 1963 164183 7120768 53 | 1964 116358 4197309 54 | 1965 113684 2652112 55 | 1966 122500 4574389 56 | 1967 125025 4658586 57 | 1968 125371 4231996 58 | 1969 113351 6689081 59 | 1970 121736 3278565 60 | 1971 108398 4278472 61 | 1972 124554 2641166 62 | 1973 117957 1915273 63 | 1974 145868 2879095 64 | 1975 134872 1791327 65 | 1976 241699 5109926 66 | 1977 173998 3152644 67 | 1978 218842 3910913 68 | 1979 163196 2986826 69 | 1980 234892 5260825 70 | 1981 249370 4814206 71 | 1982 174755 2382036 72 | 1983 18229 1323666 73 | 1984 20493 1148409 74 | 1985 82591 2896147 75 | 1986 85907 2719162 76 | 1987 71300 2447296 77 | 1988 72750 5009290 78 | 1989 48949 1827310 79 | 1990 66481 4621621 80 | 1991 75754 2953578 81 | 1992 87394 2069929 82 | 1993 58810 1797574 83 | 1994 79107 4073579 84 | 1995 82234 1840546 85 | 1996 96363 6065998 86 | 1997 66196 2856959 87 | 1998 81043 1329704 88 | 1999 92487 5626093 89 | 2000 92250 7393493 90 | 2001 84079 3570911 91 | 2002 73457 7184712 92 | 2003 63629 3960842 93 | 2004 65461 8097880 94 | 2005 66753 8689389 95 | 2006 96385 9873745 96 | 2007 85705 9328045 97 | 2008 78979 5292468 98 | 2009 78792 5921786 99 | 2010 71971 3422724 100 | 2011 74126 8711367 101 | 2012 67774 9326238 102 | 2013 47579 4319546 103 | 2014 63312 3595613 104 | 2015 68151 10125149 105 | 2016 67743 5509995 106 | 2017 71499 10026086 107 | 2018 58083 8767492 108 | 2019 50477 4664364 109 | -------------------------------------------------------------------------------- /swag/scenarios/s_78scenario.txt: -------------------------------------------------------------------------------- 1 | Name Scenario On Group Value OnDate OffDate Method MethodArguments Description 2 | reservetotal s_78 assumptions 0 2015-09-01 2015-10-01 assume RSavings=. 0.5 [ RInvest=. 3 [ REquity=. 3 [ ROther=. 1 annual nominal percent reserve growth or decline during period 3 | car s_78 50 2015-09-01 2035-08-01 history annualized car maintenance until first death 4 | house s_78 912 2015-09-01 2016-08-01 history BackPeriods=.1 current rent until move 5 | insurance s_78 100 2015-09-01 2035-08-01 history car insurance 6 | living s_78 1650 2015-09-01 2044-01-01 history YearInflate=.5 normal monthly living expenses 7 | salary s_78 4800 2015-09-01 2016-08-01 history BackPeriods=.4 [ YearInflate=.1.5 maintain net monthly income until move 8 | reservetotal s_78 25000 2015-09-01 2015-10-01 reserve Initial=.1 [ RInvest=. 1 stock value at model start 9 | reservetotal s_78 130000 2015-09-01 2015-10-01 reserve Initial=.1 savings at model start 10 | salary s_78 4200 2016-08-01 2018-07-01 history BackPeriods=.4 [ YearInflate=.1.5 reduced net income after move until retirement 11 | house s_78 move 2000 2016-08-01 2016-09-01 history moving expenses 12 | house s_78 100 2016-08-01 2044-01-01 history incidental housing expenses after move 13 | house s_78 100 2016-08-01 2044-01-01 history home owners association payments 14 | house s_78 150 2016-08-01 2044-01-01 history property taxes 15 | reservetotal s_78 buy house 110000 2016-08-01 2016-09-01 reserve Initial=.1 [ REquity=. 1 down payment added to house equity initial setting prevents double spend 16 | loan s_78 buy house 150000 2016-08-01 2023-02-01 borrow Interest=. 4.5 [ YearTerm=. 30 [ DHouse=.1 30 year mortgage rate on house until inheritance 17 | reservetotal s_78 buy house 110000 2016-08-01 2016-09-01 spend down payment on house from savings 18 | annuities s_78 250 2018-07-01 2035-08-01 history monthly retirement and other annuity payments end date is unknown 19 | annuities s_78 50 2018-07-01 2035-08-01 history any government pension payments 20 | reservetotal s_78 assumptions 0 2020-01-01 2044-01-01 assume RSavings=. -2.5 [ RInvest=. -5.0 [ REquity=. -5.0 [ ROther=. 2 market tanks government introduces negative interest 21 | loan s_78 buy car 10000 2020-07-01 2025-07-01 borrow Interest=. 5 [ YearTerm=. 5 [ DCar=.1 pay balance of car at 5% for 5 years 22 | reservetotal s_78 buy car 7000 2020-07-01 2020-08-01 spend car down payment from savings 23 | reservetotal s_78 inherit 180000 2023-01-01 2023-02-01 reserve Initial=.1 inheritance to savings 24 | reservetotal s_78 buy house 150000 2023-03-01 2023-04-01 transfer Fee=. 1500 [ DHouse=.1 pay off remaining mortgage balance after inheritance fee is closing cost 25 | salary s_78 1400 2023-07-01 2035-08-01 history estimated social security payments spread over expected life 26 | insurance s_78 700 2023-07-01 2024-12-01 history medical insurance in the gap between retirement and spouse medicare eligibility 27 | annuities s_78 100 2024-12-01 2044-01-01 history any retirement pension payments to spouse 28 | annuities s_78 100 2035-08-01 2044-01-01 history any us social security survivor benefit after first death 29 | -------------------------------------------------------------------------------- /swag/scenarios/s_77scenario.txt: -------------------------------------------------------------------------------- 1 | Name Scenario On Group Value OnDate OffDate Method MethodArguments Description 2 | reservetotal s_77 assumptions 0 2015-09-01 2015-10-01 assume RSavings=. 0.5 [ RInvest=. 3 [ REquity=. 3 [ ROther=. 1 annual nominal percent reserve growth or decline during period 3 | car s_77 50 2015-09-01 2035-08-01 history annualized car maintenance until first death 4 | house s_77 912 2015-09-01 2016-08-01 history BackPeriods=.1 current rent until move 5 | insurance s_77 100 2015-09-01 2035-08-01 history car insurance 6 | living s_77 1650 2015-09-01 2044-01-01 history YearInflate=.5 normal monthly living expenses 7 | salary s_77 4800 2015-09-01 2016-08-01 history BackPeriods=.4 [ YearInflate=.1.5 maintain net monthly income until move 8 | reservetotal s_77 25000 2015-09-01 2015-10-01 reserve Initial=.1 [ RInvest=. 1 stock value at model start 9 | reservetotal s_77 130000 2015-09-01 2015-10-01 reserve Initial=.1 savings at model start 10 | salary s_77 4200 2016-08-01 2023-07-01 history BackPeriods=.4 [ YearInflate=.1.5 reduced net income after move until retirement 11 | house s_77 move 2000 2016-08-01 2016-09-01 history moving expenses 12 | house s_77 100 2016-08-01 2044-01-01 history incidental housing expenses after move 13 | house s_77 100 2016-08-01 2044-01-01 history home owners association payments 14 | house s_77 150 2016-08-01 2044-01-01 history property taxes 15 | reservetotal s_77 buy house 110000 2016-08-01 2016-09-01 reserve Initial=.1 [ REquity=. 1 down payment added to house equity initial setting prevents double spend 16 | loan s_77 buy house 150000 2016-08-01 2023-02-01 borrow Interest=. 4.5 [ YearTerm=. 30 [ DHouse=.1 [ LoanEquity=.1 30 year mortgage rate on house until inheritance 17 | reservetotal s_77 buy house 110000 2016-08-01 2016-09-01 spend down payment on house from savings 18 | annuities s_77 250 2018-07-01 2035-08-01 history monthly retirement and other annuity payments end date is unknown 19 | annuities s_77 50 2018-07-01 2035-08-01 history any government pension payments 20 | reservetotal s_77 assumptions 0 2020-01-01 2044-01-01 assume RSavings=. -2.5 [ RInvest=. -5.0 [ REquity=. -5.0 [ ROther=. 2 market tanks government introduces negative interest 21 | loan s_77 buy car 10000 2020-07-01 2025-07-01 borrow Interest=. 5 [ YearTerm=. 5 [ DCar=.1 pay balance of car at 5% for 5 years 22 | reservetotal s_77 buy car 7000 2020-07-01 2020-08-01 spend car down payment from savings 23 | reservetotal s_77 inherit 180000 2023-01-01 2023-02-01 reserve Initial=.1 inheritance to savings 24 | reservetotal s_77 buy house 150000 2023-03-01 2023-04-01 transfer Fee=. 1500 [ DHouse=.1 pay off remaining mortgage balance after inheritance fee is closing cost 25 | salary s_77 1400 2023-07-01 2035-08-01 history estimated social security payments spread over expected life 26 | insurance s_77 700 2023-07-01 2024-12-01 history medical insurance in the gap between retirement and spouse medicare eligibility 27 | annuities s_77 100 2024-12-01 2044-01-01 history any retirement pension payments to spouse 28 | annuities s_77 100 2035-08-01 2044-01-01 history any us social security survivor benefit after first death 29 | -------------------------------------------------------------------------------- /configs/jqtcfg/base.cfg: -------------------------------------------------------------------------------- 1 | NB. base config 2 | NB. 3 | NB. interpreter config: 4 | NB. BoxForm 0=linedraw 1=ascii (9!:7) 5 | NB. BoxPos boxed output positioning (9!:17) 6 | NB. 7 | NB. DisplayForm output display form (9!:3) 8 | NB. The representation(s) to used for default displays of non-nouns. 9 | NB. 1 atomic, 2 boxed, 4 tree, 5 linear, 6 paren. 10 | NB. 11 | NB. MemoryLimit memory limit, size or power-of-2 (9!:21) 12 | NB. Output output definition (9!:37) 13 | NB. 14 | NB. ReadCatalog: pacman: 0=local,1=server,2=prompt at startup 15 | NB. 16 | NB. recent lists: 17 | NB. RecentMax max entries in lists 18 | NB. 19 | NB. script formatting: 20 | NB. Format is a numeric list: 21 | NB. 0 0=no format, 1=do format 22 | NB. 1 soft tab width (0=hard tab) 23 | NB. 2 if remove multiple spaces in code 24 | NB. 3 if indent explicit definition 25 | NB. 4 if indent select 26 | NB. 27 | NB. RGBSEQ: color byte order with A always at the upper byte 28 | NB. 0 ABGR (red is 255) 29 | NB. 1 ARGB (blue is 255) 30 | NB. 31 | NB. external programs: 32 | NB. Browser web browser, used in Help 33 | NB. Browser_nox browser (without X), used in Help 34 | NB. EPSReader read encapsulated postscript files 35 | NB. ImageViewer view image files 36 | NB. ImageViewer_nox view image files (without X) 37 | NB. PDFReader read Adobe pdf files 38 | NB. PDFReader_nox read Adobe pdf files (without X) 39 | NB. XDiff external differencing program 40 | NB. Editor external editor program, %f=file name %l=line number 41 | NB. Editor_nox external editor program (without X), used in Linux only 42 | 43 | BoxPos=: 0 0 44 | DirTreeX=: 'release' 45 | DisplayForm=: 5 46 | Format=: 1 2 1 0 0 47 | MemoryLimit=: _ 48 | Output=: 0 256 0 222 49 | ReadCatalog=: 1 50 | RecentMax=: 15 51 | RGBSEQ=: 1 52 | 53 | NB. ========================================================= 54 | NB. host dependent configs: 55 | 3 : 0'' 56 | select. UNAME 57 | case. 'Android' do. 58 | BoxForm=: 0 59 | Browser=: '' 60 | Browser_nox=: '' 61 | EPSReader=: '' 62 | ImageViewer=: '' 63 | ImageViewer_nox=: '' 64 | PDFReader=: '' 65 | PDFReader_nox=: '' 66 | XDiff=: '' 67 | Editor=: '' 68 | Editor_nox=: '' 69 | case. 'Darwin' do. 70 | BoxForm=: 0 71 | Browser=: '' 72 | Browser_nox=: '' 73 | EPSReader=: '' 74 | ImageViewer=: '' 75 | ImageViewer_nox=: '' 76 | PDFReader=: '' 77 | PDFReader_nox=: '' 78 | XDiff=: '' 79 | Editor=: '' 80 | Editor_nox=: '' 81 | case. 'Linux' do. 82 | BoxForm=: 0 83 | Browser=: '' 84 | Browser_nox=: '' 85 | EPSReader=: '' 86 | ImageViewer=: '' 87 | ImageViewer_nox=: '' 88 | PDFReader=: '' 89 | PDFReader_nox=: '' 90 | XDiff=: '' 91 | Editor=: '' 92 | Editor_nox=: '' 93 | case. 'Win' do. 94 | BoxForm=: 1 95 | Browser=: '' 96 | Browser_nox=: '' 97 | EPSReader=: 'c:/program files/ghostgum/gsview/gsview64.exe' 98 | ImageViewer=: '' 99 | ImageViewer_nox=: '' 100 | PDFReader=: 'c:/program files (x86)/sumatraPDF/sumatraPDF.exe' 101 | XDiff=: 'c:/program files (x86)/WinMerge/WinMergeU.exe' 102 | Editor=: 'c:/Program Files (x86)/Notepad++/notepad++.exe %f' 103 | PDFReader_nox=: '' 104 | Editor_nox=: '' 105 | PDFReader_nox=: '' 106 | Editor_nox=: '' 107 | end. 108 | ) 109 | -------------------------------------------------------------------------------- /bitcoin/sslhash.ijs: -------------------------------------------------------------------------------- 1 | NB.*sslhash s-- hash algorithms from OpenSSL. 2 | NB. 3 | NB. Makes various hash algorithms available in the OpenSSL 4 | NB. binaries installed with jqt 8.0x available. From an original 5 | NB. demo script by Pascal Jasmin with adjustments by Bill Lam. 6 | NB. 7 | NB. verbatim: see http://www.openssl.org/ 8 | NB. 9 | NB. http://www.jsoftware.com/jwiki/PascalJasmin/SHA%201%2C%202%20and%20MD5%20for%20windows 10 | NB. 11 | NB. interface word(s): 12 | NB. 13 | NB. s256 - SHA256 hash from OpenSSL 14 | NB. s512 - SHA512 hash from OpenSSL 15 | NB. sha1 - SHA1 hash from OpenSSL 16 | NB. sr160 - RIPEMD-160 hash from OpenSSL 17 | NB. 18 | NB. created: 2014Jun28 19 | NB. changes: ----------------------------------------------------- 20 | NB. 14jun30 changed to run on 32 bit systems 21 | NB. 14jul03 added to jacks repository 22 | NB. 14jul07 dll prototypes adjusted for portability 23 | 24 | coclass 'sslhash' 25 | 26 | NB.*dependents 27 | 28 | NB. profile & require words !(*)=. IFIOS UNAME 29 | 30 | NB. dll/so is machine/os specific - assumes jqt 8.02 is installed 31 | OPENSSL=: ;(IFIOS + (;:'Win Linux Android Darwin') i. + x *c x *c')&cd 37 | sslsha512=: (OPENSSL , ' SHA512 > + x *c x *c')&cd 38 | sslsha1=: (OPENSSL , ' SHA1 > + x *c x *c')&cd 39 | sslRIPEMD160=: (OPENSSL , ' RIPEMD160 > + x *c x *c')&cd 40 | 41 | NB.*enddependents 42 | NB.*end-header 43 | 44 | NB. interface words (IFACEWORDSsslhash) group 45 | IFACEWORDSsslhash=:<;._1 ' sr160 sha1 s256 s512' 46 | 47 | NB. root words (ROOTWORDSsslhash) group 48 | ROOTWORDSsslhash=:<;._1 ' IFACEWORDSsslhash OPENSSL ROOTWORDSsslhash s256 s512 sha1 sr160' 49 | 50 | 51 | s256=:3 : 0 52 | 53 | NB.*s256 v-- SHA256 hash from OpenSSL. 54 | NB. 55 | NB. monad: clHash =. s256 cl 56 | NB. 57 | NB. s256 'dont hash with me' 58 | NB. 59 | NB. s256 10000 $ 'hash it up cowboy' 60 | 61 | sslsha256 (y);(# y);hash=. 32#' ' 62 | hash 63 | ) 64 | 65 | 66 | s512=:3 : 0 67 | 68 | NB.*s512 v-- SHA512 hash from OpenSSL. 69 | NB. 70 | NB. monad: clHash =. s512 cl 71 | NB. 72 | NB. s512 'my what big hashes you have' 73 | NB. 74 | NB. s512 10000 $ 'collisions are rare' 75 | 76 | sslsha512 (y);(# y);hash=. 64#' ' 77 | hash 78 | ) 79 | 80 | 81 | sha1=:3 : 0 82 | 83 | NB.*sha1 v-- SHA1 hash from OpenSSL. 84 | NB. 85 | NB. monad: clHash =. sha1 cl 86 | NB. 87 | NB. sha1 'this is a fine mess' 88 | NB. 89 | NB. sha1 10000 $ 'a bigger mess ' 90 | 91 | sslsha1 (y);(# y);hash=. 20#' ' 92 | hash 93 | ) 94 | 95 | 96 | sr160=:3 : 0 97 | 98 | NB.*sr160 v-- RIPEMD-160 hash from OpenSSL. 99 | NB. 100 | NB. monad: clHash =. sr160 cl 101 | NB. 102 | NB. sr160 'go ahead hash my day - result is 20 byte hash' 103 | NB. 104 | NB. sr160 30000 $ 'yada yada yada et cetera byte me ' 105 | 106 | sslRIPEMD160 (y);(# y);hash=. 20#' ' 107 | hash 108 | ) 109 | 110 | NB.POST_sslhash post processor 111 | 112 | smoutput 0 : 0 113 | NB. interface word(s): 114 | NB. s256 NB. SHA256 hash from OpenSSL 115 | NB. s512 NB. SHA512 hash from OpenSSL 116 | NB. sha1 NB. SHA1 hash from OpenSSL 117 | NB. sr160 NB. RIPEMD-160 hash from OpenSSL 118 | ) 119 | 120 | cocurrent 'base' 121 | coinsert 'sslhash' -------------------------------------------------------------------------------- /jserver/Resources/CSsrv.ijs: -------------------------------------------------------------------------------- 1 | (9!:41) 0 2 | coclass'CSsrv' 3 | Afmt=:": 4 | Aex=:". 5 | CSBOOLS=:<;._1 ' False True' 6 | CSTYPES=:2 5$<;._1 ' string int double bool datetime System.String System.Int32 System.Double System.Boolean System.DateTime' 7 | CSsrvBADRC=:_777 8 | IFACEWORDSCSsrv=:<;._1 ' dtColumnInfo dtTableData isDataTable testDataTable dtDataTableFrTrdata' 9 | ISDATATABLECODE=:31 10 | ROOTWORDSCSsrv=:<;._1 ' IFACEWORDSCSsrv ROOTWORDSCSsrv box0 dtColumnInfo dtDataTableFrTrdata dtTableData isDataTable scatter testDataTable' 11 | TESTWORDS=:<;._1 ' these are the words that we test by they are pure and good and devoid of the badness that is wrong' 12 | assert=:0 0"_$13!:8^:((0:e.])`(12"_)) 13 | box0=:[:":&.><"0 14 | dtColumnInfo=:>@:(0&{) 15 | dtDataTableFrTrdata=:4 :0 16 | 'j f'=.x 17 | if.(j=0 )*.0 =#f do.ISDATATABLECODE;'r<0>4.0'(8!:0)i.h 23 | g=.h$<'literal' 24 | c=.1{b 25 | i=.(1{CSTYPES)i.c 26 | if.({:$CSTYPES)>>./i do. 27 | c=.i{0{CSTYPES 28 | e=.a,(0{b),g,:c 29 | ISDATATABLECODE;<(@:(1&{) 38 | dtTableDataFrStr=:<;._1&>@:(<;._1) 39 | isDataTable=:3 :0 40 | '_base_'isDataTable y 41 | : 42 | c=.CSsrvBADRC 43 | b=.y,x 44 | if.0~:nc1{a do. 48 | if.~:/{:@:$&.>a do.c return.end. 49 | ISDATATABLECODE return. 50 | elseif.-.1 1-:L.&>a do.c 51 | elseif.d=.$&.>a 52 | -.2 2-:#&>d do.c 53 | elseif.4~:{.;0{d do.c 54 | elseif.~:/{:&>d do.c 55 | elseif.do. 56 | ISDATATABLECODE 57 | end. 58 | ) 59 | nc=:4!:0 60 | rndcoords=:]$([:?~*/){[:,[:{[:i.&.><"0 61 | scatter=:]{~[:rndcoords$ 62 | testDataTable=:3 :0 63 | 'i h'=.y 64 | g=.h$<'literal' 65 | b=.0{CSTYPES 66 | c=.b{~?h##b 67 | a=.(<'Column'),&.>'r<0>4.0'(8!:0)i.h 68 | d=.c,&.>' ',&.>'r<0>4.0'(8!:0)i.h 69 | f=.a,d,g,:c 70 | if.0 <"0?x#10000 77 | case.'double'do.'0.2'(8!:0)239%~?x#613 78 | case.'bool'do.(?x#2){CSBOOLS 79 | case.'datetime'do. 80 | a=.1 tsrep(1e9*?x#200)+tsrep(6!:0)'' 81 | c=.(<"1 ('q,q,q<>'(8!:2)3{."1 a))-.&.>' ' 82 | b=.(<"1 'q<:>,q<:>,q<>'(8!:2)<.3}."1 a)-.&.>' ' 83 | c,&.>' ',&.>b 84 | case.do. 85 | 'invalid j DataTable column type'assert 0 86 | end. 87 | ) 88 | testDataTableMatch=:4 :0 89 | if.x-:y do.1 90 | else. 91 | 'b d'=.x 92 | 'c e'=.y 93 | if.b-:c do. 94 | if.*./0<(#d),#e do. 95 | f=.(I.(<'double')=3{b){"1 d 96 | a=.10j10 97 | d=.a&".&>d 98 | e=.a&".&>e 99 | if.(a e.d)+.a e.e do.0 else.d-:e end. 100 | else. 101 | 0 102 | end. 103 | else. 104 | 0 105 | end. 106 | end. 107 | ) 108 | tsrep=:3 :0 109 | 0 tsrep y 110 | : 111 | if.x do. 112 | r=.$y 113 | 'w n t'=.|:0 86400 1000#:,y 114 | w=.w+657377.75 115 | d=.<.w-36524.25*c=.<.w%36524.25 116 | d=.<.1.75+d-365.25*w=.<.(d+0.75)%365.25 117 | s=.(1+12|m+2),:<.0.41+d-30.6*m=.<.(d-0.59)%30.6 118 | s=.|:((c*100)+w+m>:10),s 119 | r$s,.(_3{.&>t%1000)+"1[0 60 60#:n 120 | else. 121 | a=.((*/r=.}:$y),{:$y)$,y 122 | 'w m d'=.<"_1|:3{."1 a 123 | w=.0 100#:w-m<:2 124 | n=.+/|:<.36524.25 365.25*"1 w 125 | n=.n+<.0.41+0 30.6#.(12|m-3),"0 d 126 | s=.3600000 60000 1000+/ .*"1 [3}."1 a 127 | r$s+86400000*n-657378 128 | end. 129 | ) 130 | 18!:4 <'base' 131 | (9!:41) 1 -------------------------------------------------------------------------------- /dbi/dbi_describe.md: -------------------------------------------------------------------------------- 1 | 2 | Using `dbi.ijs` 3 | =============== 4 | 5 | See [APL Software Archaeology `.dbi` Edition](https://analyzethedatanotthedrivel.org/2013/12/26/apl-software-archaeology-dbi-edition/) 6 | for more information. 7 | 8 | Using the J `dbi.ijs` script is simple. The included file 9 | [`allnsf.dbi`](https://github.com/bakerjd99/jacks/blob/master/dbi/allnsf.dbi) is 10 | an example `.dbi` file that holds all the *field types* supported by 11 | `dbi.ijs`. Simple fields are similar to SQL database columns and result 12 | in single column tables when fetched. Repeated fields are actually tables 13 | and result in tables when fetched. All fields are stored as contiguous byte 14 | runs in the `.dbi` file making access as fast as it's ever going to get. 15 | 16 | The `.dbi` format works very well for numeric (integer and floating point) 17 | vectors and tables. The byte representation of `.dbi` matches 18 | the native format of the host and can be easily read and written 19 | by other programs. Simple ASCII character data is supported but 20 | the `.dbi` format is not text oriented. 21 | 22 | To run download the [GitHub `dbi` directory](https://github.com/bakerjd99/jacks/tree/master/dbi) 23 | to a local directory. I placed the files in `c:/temp`. 24 | 25 | Load `dbi.ijs`: 26 | 27 | load 'c:/temp/dbi.ijs' 28 | 29 | View the file template: 30 | 31 | dbitemplate 'c:/temp/allnsf.dbi' 32 | ┌──────┬───┬─────┬───┬─────┬───┬─────┬────┬──────┬────┬──────┬────┬──────┬───┬──┬───┐ 33 | │ALLNSF│u1f│u21u1│u4f│u17u4│u8f│u37u8│i16f│i16i16│i32f│i20i32│f64f│f97f64│d6f│c0│c15│ 34 | ├──────┼───┼─────┼───┼─────┼───┼─────┼────┼──────┼────┼──────┼────┼──────┼───┼──┼───┤ 35 | │1713 │U1 │21U1 │U4 │17U4 │U8 │37U8 │I16 │16I16 │I32 │20I32 │F64 │97F64 │D6 │C0│C15│ 36 | └──────┴───┴─────┴───┴─────┴───┴─────┴────┴──────┴────┴──────┴────┴──────┴───┴──┴───┘ 37 | 38 | This file has 1713 *records.* Read all the fields: 39 | 40 | d=. dbiread 'c:/temp/allnsf.dbi' 41 | 42 | The result is a two row boxed table. The first row contains field names and 43 | the second row holds the field data. 44 | 45 | list 0 { d 46 | ALLNSF_u1f ALLNSF_u21u1 ALLNSF_u4f ALLNSF_u17u4 ALLNSF_u8f 47 | ALLNSF_u37u8 ALLNSF_i16f ALLNSF_i16i16 ALLNSF_i32f ALLNSF_i20i32 48 | ALLNSF_f64f ALLNSF_f97f64 ALLNSF_d6f ALLNSF_c0 ALLNSF_c15 49 | 50 | list datatype&.> 1 { d NB. fields have various J datatypes 51 | boolean boolean integer integer integer integer integer integer 52 | integer integer floating floating integer literal literal 53 | 54 | Indirect assignment is a handy way to extract all the fields as nouns: 55 | 56 | (0{d)=: 1{d 57 | 58 | names'' 59 | ALLNSF_c0 ALLNSF_c15 ALLNSF_d6f ALLNSF_f64f ALLNSF_f97f64 60 | ALLNSF_i16f ALLNSF_i16i16 ALLNSF_i20i32 ALLNSF_i32f ALLNSF_u17u4 61 | ALLNSF_u1f ALLNSF_u21u1 ALLNSF_u37u8 ALLNSF_u4f ALLNSF_u8f 62 | d 63 | 64 | Creating and writing a new `.dbi` is straight forward. 65 | 66 | t=. dbitemplate 'c:/temp/allnsf.dbi' 67 | 68 | Start the new file with 0 records. The system preallocates file space 69 | if the record count is not zero. 70 | 71 | tc =. (<":0) (<1;0)} t 72 | 73 | NB. nonzero result indicates success 74 | tc dbicreate 'c:/temp/allcopy.dbi' 75 | 2048 76 | 77 | NB. write all fields - result is byte count 78 | d dbiwrite 'c:/temp/allcopy.dbi' 79 | 1782243 80 | 81 | Read the copy back and compare data: 82 | 83 | dc =.dbiread 'c:/temp/allcopy.dbi' 84 | (1{d) -: 1{dc 85 | 1 86 | 87 | The `.dbi` system can read and write single fields and supports datetime data. 88 | See code comments for more details. 89 | 90 | John Baker 91 | original: December 26, 2013 92 | revised: October 8, 2020 93 | -------------------------------------------------------------------------------- /smugmug/SmugDupsFrMD5.ijs: -------------------------------------------------------------------------------- 1 | NB.*SmugDupsFrMD5 s-- find duplicate SmugMug images using MD5. 2 | NB. 3 | NB. verbatim: 4 | NB. 5 | NB. http://bakerjd99.wordpress.com/2010/02/05/smugmug-duplicate-image-hunting/ 6 | NB. http://bakerjd99.wordpress.com/2010/02/11/more-on-smugmug-duplicates/ 7 | NB. 8 | NB. author: John Baker 9 | NB. created: 2013dec20 10 | NB. ------------------------------------------------------------------------------ 11 | NB. 2013dec20 saved in (jacks) GitHub repo 12 | NB.*end-header 13 | 14 | NB. name of TAB delimited SmugMug album table file 15 | SMUGALBUMTABLE=:'smugalbumtable.txt' 16 | 17 | NB. name of TAB delimited SmugMug image table file 18 | SMUGIMAGETABLE=:'smugimagetable.txt' 19 | 20 | NB. directory containing SmugMug data files 21 | SMUGTABLEDIR=:'c:\pd\docs\smugmug\data\' 22 | 23 | 24 | CheckSmugDups=:3 : 0 25 | 26 | NB.*CheckSmugDups v-- checks duplicate SmugMug images. 27 | NB. 28 | NB. monad: CheckSmugDups uuIgnore 29 | 30 | 'albums images'=. readsmugtables 0 31 | images=. }. images [ imhead=. 0 { images 32 | 33 | NB. images should be unique in three ways: 34 | r=. ,: 'PID unique: '; # ~.(imhead i. <'PID') {"1 images 35 | r=. r, 'MD5 unique: '; # ~.(imhead i. <'MD5') {"1 images 36 | r=. r, 'FILENAME unique: '; # ~.(imhead i. <'FILENAME') {"1 images 37 | 38 | dups=. 1 <# ~. ;{:"1 r 39 | dups;(ctl ;"1 ":&.> r);dups{'No duplicates';'Duplicates present' 40 | ) 41 | 42 | 43 | SmugDupsFrMD5=:3 : 0 44 | 45 | NB.*SmugDupsFrMD5 v-- duplicate SmugMug images from MD5. 46 | NB. 47 | NB. verbatim: 48 | NB. 49 | NB. http://bakerjd99.wordpress.com/2010/02/05/smugmug-duplicate-image-hunting/ 50 | NB. 51 | NB. monad: btct =. SmugDupsFrMD5 uuIgnore 52 | NB. 53 | NB. SmugDupsFrMD5 0 54 | 55 | NB. read table files 56 | 'albums images'=. readsmugtables 0 57 | images=. }. images [ imhead=. 0 { images 58 | 59 | NB. all duplicate MD5's 60 | pos=. imhead i. <'MD5' 61 | md5=. pos {"1 images 62 | dup=. md5 #~ -. ~:md5 63 | images=. (md5 e. dup)#images 64 | images=. (/: pos {"1 images) { images 65 | 66 | NB. remove images with matching smugmug pids 67 | NB. these are proper virtual images and not copies 68 | pos=. imhead i. <'PID' 69 | pid=. pos {"1 images 70 | mask=. -. ~: pid 71 | smoutput (":+/mask),' virtual/collected images' 72 | dup=. mask#pid 73 | if. #images=. (-.pid e. dup)#images do. 74 | 75 | NB. retain selected columns and insert album names 76 | images=. (imhead i. ;:'FILENAME GID PID MD5 ALBUMURL') {"1 images 77 | albums=. ((0 {"1 albums) i. 1 {"1 images){ 1 {"1 albums 78 | images=. albums (&.>@:(<"1@|:) &> images 83 | 84 | NB. order MD5 groups by galleries in groups 85 | NB. this results in a good order for editing 86 | NB. out the duplicates on SmugMug 87 | images=. (\:&.> 1 {"1 images) {&.> images 88 | (\: 0 {&> 1 {"1 images){images 89 | else. 90 | smoutput'no MD5 duplicates' 91 | 0 5$'' 92 | end. 93 | ) 94 | 95 | NB. character table to newline delimited list 96 | ctl=:}.@(,@(1&(,"1)@(-.@(*./\."1@(=&' '@])))) # ,@((10{a.)&(,"1)@])) 97 | 98 | 99 | readsmugtables=:3 : 0 100 | 101 | NB.*readsmugtables v-- reads SmugMug tables. 102 | NB. 103 | NB. monad: readsmugtables uuIgnore 104 | NB. 105 | NB. 'albums images'=. readsmugtables 0 106 | 107 | path=. tslash SMUGTABLEDIR 108 | albums=. readtd2 path,SMUGALBUMTABLE 109 | images=. readtd2 path,SMUGIMAGETABLE 110 | ( (9{a.) ,&.>~ [: <;._2 [: (] , ((10{a.)"_ = {:) }. (10{a.)"_) (13{a.) -.~ 1!:1&(]`<@.(32&>@(3!:0))) 115 | 116 | NB. session manager output 117 | smoutput=:0 0 $ 1!:2&2 118 | 119 | NB. appends trailing \ character if necessary 120 | tslash=:] , ('\'"_ = {:) }. '\'"_ -------------------------------------------------------------------------------- /smugmug/SmugPrintSizes.ijs: -------------------------------------------------------------------------------- 1 | NB.*SmugPrintSizes s-- compute largest print size for given dpi. 2 | NB. 3 | NB. verbatim: 4 | NB. 5 | NB. http://bakerjd99.wordpress.com/2010/02/21/assigning-smugmug-print-size-keys/ 6 | NB. 7 | NB. author: John Baker 8 | NB. created: 2013dec20 9 | NB. ------------------------------------------------------------------------------ 10 | NB. 2013dec20 saved in (jacks) GitHub repo 11 | NB.*end-header 12 | 13 | NB. round off for print surface area (square inches) 14 | SMUGAREAROUND=:0.5 15 | 16 | NB. round off for SmugMug aspect ratios - precision must distinguish all ratios 17 | SMUGASPECTROUND=:0.0050000000000000001 18 | 19 | NB. default print DPI (typically 300) 20 | SMUGPRINTDPI=:300 21 | 22 | NB. list of available SmugMug print sizes - larger sizes not listed 23 | SMUGPRINTSIZES=:<;._1 ' 3.5x5 4x5 4x5.3 4x6 4x8 5x5 5x6.7 5x7 5x10 5x30 7x10 8x8 8x10 8x10.6 8x12 8x16 8x20 8.5x11 9x12 10x10 10x13 10x15 10x16 10x20 10x30 11x14 11x16 11x28 12x12 12x18 12x20 12x24 12x30' 24 | 25 | NB. signal with optional message 26 | assert=:0 0"_ $ 13!:8^:((0: e. ])`(12"_)) 27 | 28 | 29 | charsub=:4 : 0 30 | 31 | NB.*charsub v-- single character pair replacements. 32 | NB. 33 | NB. dyad: clPairs charsub cu 34 | NB. 35 | NB. '-_$ ' charsub '$123 -456 -789' 36 | 37 | 'f t'=. ((#x)$0 1)<@,&a./.x 38 | t {~ f i. y 39 | ) 40 | 41 | 42 | printsizestable=:3 : 0 43 | 44 | NB.*printsizestable v-- computes print sizes table. 45 | NB. 46 | NB. WARNING: THIS: assumes the sizes listed in (SMUGPRINTSIZES) 47 | NB. have dimensions listed in Short x Long order. 48 | NB. 49 | NB. monad: bt=. printsizestable blclPrintSizes 50 | NB. 51 | NB. printsizestable SMUGPRINTSIZES 52 | 53 | NB. assume (y) is short x long 54 | ratios=. ".&> 'x%'&charsub&.> y 55 | areas=. ".&> 'x*'&charsub&.> y 56 | 57 | NB. sizes with same ratio, eg: 4x5, 8x10, 4x6, 8x12 58 | aspect=. ((~.ratios) i. ratios) aspect {&.> (imhead i. ;:'WIDTH HEIGHT') {"1 images 100 | 'invalid image dimensions' assert -. _1 e. idims 101 | idims=. (/:"1 idims) {"1 idims 102 | 103 | NB. aspect ratio and print area (square inches) 104 | ratios=. SMUGASPECTROUND round %/"1 idims 105 | areas=. SMUGAREAROUND round (*/"1 idims) % *: x 106 | 107 | NB. mask table selecting images with ratio 108 | masks=. (SMUGASPECTROUND round ;0 {"1 pst) =/ ratios 109 | if. -.1 e. ,masks do. 0 2$nsym return.end. 110 | 111 | masks=. <"1 masks 112 | pids=. s:&.> masks #&.> masks #&.> masks #"1 &.> pids) -. L: 0 nsym 117 | sizes=. <"0&.> 2 {"1 pst 118 | ; |:&.> ; pids ,: L: 0 (# L: 0 pids) # L: 0 sizes 119 | ) -------------------------------------------------------------------------------- /latex/kindlesize.tex: -------------------------------------------------------------------------------- 1 | % A simple test document that displays some packages and settings 2 | % that are useful when compiling LaTeXe documents for the Kindle. 3 | % Compile with pdflatex or xelatex. 4 | % 5 | % Tested on MikTeX 2.9 6 | % July 22, 2011 7 | 8 | \documentclass[12pt]{article} 9 | 10 | % included graphics in immediate subdirectory 11 | \usepackage{graphicx} 12 | \graphicspath{{./image/}} 13 | 14 | % extended coloring 15 | \usepackage[usenames,dvipsnames]{color} 16 | 17 | % can be useful for tables that 18 | % overflow the limited Kindle display 19 | %\usepackage{longtable} 20 | 21 | % hyperref link colors are chosen to display 22 | % well on Kindle monochrome devices turn on 23 | % dvips for dvi -> ps -> pdf workflows 24 | \usepackage[ 25 | %dvips, 26 | colorlinks, 27 | linkcolor=OliveGreen, 28 | urlcolor=blue, 29 | pdfauthor={your name}, 30 | pdftitle={your title}, 31 | pdfsubject={your subject}, 32 | pdfcreator={MikTeX+LaTeXe with hyperref package}, 33 | pdfkeywords={your,key,words}, 34 | ]{hyperref} 35 | 36 | % KINDLE SIZING 37 | %\usepackage{fontspec} % fontspec use XeLaTeX 38 | %\setmainfont{Cambria} 39 | %\usepackage{breqn} % automatic equation breaking 40 | \usepackage{microtype} % microtypography, reduces hyphenation 41 | %\usepackage{polyglossia} % language selection 42 | %\setmainlanguage{english} 43 | 44 | % customize captions 45 | % \usepackage[font=small,labelformat=simple,]{caption} 46 | 47 | % customizing section titles 48 | % \usepackage{titlesec} 49 | % \titleformat{\section}{\itshape\large}{}{0em}{} 50 | % \titlespacing{\section}{0pt}{8pt}{4pt} 51 | % \titleformat{\subsection}{\itshape}{}{0em}{} 52 | % \titlespacing{\subsection}{0pt}{4pt}{2pt} 53 | % \titleformat{\subsubsection}[runin]{\bf\scshape}{}{0em}{} 54 | % \titlespacing{\subsubsection}{0pt}{5pt}{5pt} 55 | 56 | % kindle page geometry (no page numbers) 57 | %\usepackage[papersize={3.6in,4.8in},hmargin=0.1in,vmargin={0.1in,0.1in}]{geometry} 58 | 59 | % portrait kindle page geometry space reserved for page numbers 60 | \usepackage[papersize={3.6in,4.8in},hmargin=0.1in,vmargin={0.1in,0.255in}]{geometry} 61 | 62 | % landscape geometry 63 | %\usepackage[papersize={4.8in,3.6in},hmargin={0.1in,0.18},vmargin={0.1in,0.255in}]{geometry} 64 | 65 | % headers and footers 66 | \usepackage{fancyhdr} 67 | \pagestyle{fancy} 68 | \fancyhead{} % clear page header 69 | \fancyfoot{} % clear page footer 70 | 71 | %\fancyhf{} 72 | %\rfoot{\thepage} 73 | 74 | \setlength{\abovecaptionskip}{2pt} % space above captions 75 | \setlength{\belowcaptionskip}{0pt} % space below captions 76 | \setlength{\textfloatsep}{2pt} % space between last top float or first bottom float and the text 77 | \setlength{\floatsep}{2pt} % space left between floats 78 | \setlength{\intextsep}{2pt} % space left on top and bottom of an in-text float 79 | % END KINDLE SIZING 80 | 81 | % print LaTeX dimensions 82 | \usepackage{printlen} 83 | 84 | % reduces footer text separation adjusted for page numbers 85 | \setlength{\footskip}{14pt} 86 | 87 | % scales down page number font size if document is at 12pt -> page numbers 10 pt 88 | \renewcommand*{\thepage}{\footnotesize\arabic{page}} 89 | 90 | \begin{document} 91 | 92 | The \verb|\textwidth| is \printlength{\textwidth} which is also 93 | \uselengthunit{in}\printlength{\textwidth} and 94 | \uselengthunit{mm}\printlength{\textwidth}. 95 | 96 | \uselengthunit{pt} 97 | The \verb|\textheight| is \printlength{\textheight} which is also 98 | \uselengthunit{in}\printlength{\textheight} and 99 | \uselengthunit{mm}\printlength{\textheight}. 100 | 101 | \uselengthunit{pt} 102 | The \verb|\linewidth| is \printlength{\linewidth} which is also 103 | \uselengthunit{in}\printlength{\linewidth} and 104 | \uselengthunit{mm}\printlength{\linewidth}. 105 | 106 | \end{document} -------------------------------------------------------------------------------- /mathjaxdemo/htmthorn.ijs: -------------------------------------------------------------------------------- 1 | NB.*htmthorn s-- j array formatting (thorn) that generates 2 | NB. HTML. 3 | NB. 4 | NB. This elegant script by Roger Hui implements a model of the j 5 | NB. array formatting primitive thorn (":) that generates HTML 6 | NB. output. See the J wiki: 7 | NB. 8 | NB. verbatim: 9 | NB. 10 | NB. http://www.jsoftware.com/jwiki/Essays/Boxed%20Array%20Display 11 | NB. 12 | NB. examples: 13 | NB. 14 | NB. thh i.2 2 3 4 15 | NB. thh <"0 i.2 2 3 4 16 | NB. thh 5!:2 <'assert' 17 | NB. thh 2 3 4 $ i.&.> i.7 18 | NB. thh 2 2 3 $ (i.&.>i.6),<<2 5$'a efghij' 19 | NB. 20 | NB. interface word(s): 21 | NB. ------------------------------------------------------------------------------ 22 | NB. thh - j array format in HTML 23 | NB. 24 | NB. author: Roger Hui 25 | NB. created: 2010Mar31 26 | NB. ------------------------------------------------------------------------------ 27 | 28 | coclass 'htmthorn' 29 | 30 | boxed =: 32 = 3!:0 31 | mt =: 0 e. $ 32 | boxc =: 9!:6 '' 33 | tcorn =: 2 0{boxc 34 | tint =: 1 10{boxc 35 | bcorn =: 8 6{boxc 36 | bint =: 7 10{boxc 37 | 38 | sh =: (*/@}: , {:)@(1&,)@$ ($,) ] 39 | rows =: */\.@}:@$ 40 | bl =: }.@(,&0)@(+/)@(0&=)@(|/ i.@{.@(,&1)) 41 | mask =: 1&,. #&, ,.&0@>:@i.@# 42 | mat =: mask@bl@rows { ' ' , sh 43 | 44 | edge =: ,@(1&,.)@[ }.@# +:@#@[ $ ] 45 | left =: edge&(3 9{boxc)@>@(0&{)@[ , "0 1"2 ] 46 | right =: edge&(5 9{boxc)@>@(0&{)@[ ,~"0 1"2 ] 47 | top =: 1&|.@(tcorn&,)@(edge&tint)@>@(1&{)@[ ,"2 ] 48 | bot =: 1&|.@(bcorn&,)@(edge&bint)@>@(1&{)@[ ,"2~ ] 49 | perim =: [ top [ bot [ left right 50 | 51 | topleft=: (4{boxc)&((<0 0)}) @ ((_2{boxc)&,.) @ ((_1{boxc)&,) 52 | inside =: 1 1&}. @: ; @: (,.&.>/"1) @: (topleft&.>) 53 | take =: {. ' '"_^:mt 54 | frame =: [ perim {@[ inside@:(take&.>)"2 ,:^:(1=#@$)@] 55 | rc =: (>./@sh&.>) @: (,.@|:"2@:(0&{"1);1&{"1) @: ($&>) 56 | 57 | thorn1 =: ":`thbox @. boxed 58 | thbox =: (rc frame ]) @: (mat@thorn1&.>) 59 | 60 | thboxcheck=: 3 : 0 61 | z=. thbox y 62 | assert. (#$z) = 2 >. #$y 63 | assert. z -:&(_2&}.)&$ y 64 | t=. (<0$~_2+#$z){z 65 | p=. ({."1 t) e. 0 3 6{boxc 66 | q=. ({. t) e. 0 1 2{boxc 67 | assert. z -:&((,p+./q)#,)"2 t 68 | z 69 | ) 70 | 71 | nbsp =: [: ; ((<' ') 32}<"0 a.) {~ a. i. ] NB. replace space by   72 | pad =: '
' $~ 4 * *@[ * - 73 | 74 | BOXCHARS=: 9!:6 '' NB. box drawing characters 75 | SPACER =: ' ',CRLF 76 | 77 | JARRAYSTYLE=: 0 : 0 78 | 84 | ) 85 | 86 | thh=: 3 : 0 NB. "thorn" (array formatting) producing HTML output 87 | JARRAYSTYLE,'
',(0 thh y),'
' 88 | : 89 | if. (0 e. $y) >: 32=3!:0 y do. NB. y is empty or not boxed 90 | nbsp _4}.(,z),x pad #z=. (mat ":y),"1 '
' 91 | else. NB. y is boxed 92 | s=. {."1 (_2{.$t) ($,) t=. ":y NB. s is 1st column in 1st plane in ":y 93 | h=. <: 2 -~/\ I. s e. 0 3 6{BOXCHARS NB. height (# lines) in each row 94 | z=. h thh&.>"2 ,:^:(0>.2-#$y) y NB. format each atom 95 | z=. ('','',~])&.> z NB. bracket each atom 96 | z=. <@('','',~;)"1 z NB. bracket each row 97 | '',(;(mask bl rows y){SPACER;,z),'
',(_4}.x pad #mat t),CRLF 98 | end. 99 | ) 100 | NB.*end-header 101 | 102 | NB. interface words (IFACEWORDShtmthorn) group 103 | IFACEWORDShtmthorn=:,<'thh' 104 | 105 | NB. root words (ROOTWORDShtmthorn) group 106 | ROOTWORDShtmthorn=:<;._1 ' ROOTWORDShtmthorn IFACEWORDShtmthorn' 107 | 108 | NB.POST_htmthorn post processor. 109 | 110 | smoutput 0 : 0 111 | NB. interface word(s): 112 | NB. thh NB. j array format in HTML 113 | ) 114 | 115 | cocurrent 'base' 116 | coinsert 'htmthorn' -------------------------------------------------------------------------------- /hilbert/RescaleHilbertGraphics.ijs: -------------------------------------------------------------------------------- 1 | NB.*RescaleHilbertGraphics s-- replaces fixed width \includegraphics with relative widths. 2 | NB. 3 | NB. verbatim: 4 | NB. 5 | NB. http://bakerjd99.wordpress.com/2011/07/12/open-source-hilbert-for-the-kindle/ 6 | NB. http://www.gutenberg.org/ebooks/17384 7 | NB. 8 | NB. author: John Baker 9 | NB. created: 2013dec20 10 | NB. ------------------------------------------------------------------------------ 11 | NB. 13dec20 saved in (jacks) GitHub repo 12 | NB.*end-header 13 | 14 | NB. dimensions of letter paper page in TeX points 15 | SourcePageTeXPts=:426.39256 607.06754999999998 16 | 17 | NB. TeX points per inch 18 | TeXPtIn=:72.269999999999996 19 | 20 | 21 | RescaleHilbertGraphics=:3 : 0 22 | 23 | NB.*RescaleHilbertGraphics v-- replaces all fixed width 24 | NB. \includegraphics dimensions with relative widths. 25 | NB. 26 | NB. This verb replaces all the fixed width \includegraphics 27 | NB. commands in the LaTeX source of David Hilbert's Foundations 28 | NB. of Geometry with relative \textwidth based commands. This 29 | NB. transformation makes it possible to generate a Kindle 30 | NB. oriented PDF of this famous little book. 31 | NB. 32 | NB. The LaTeX source of an English translation of Hilbert's book 33 | NB. is available at the Project Gutenberg web site at: 34 | NB. http://www.gutenberg.org/ebooks/17384 35 | NB. 36 | NB. monad: cl =. RescaleHilbertGraphics clTex 37 | 38 | NB. extract unique list of graphics dimensions 39 | uw=. graphdims y 40 | 41 | NB. insure all dimensions are width=W.Din units 42 | wid=. 'width=' [ msg =. 'graphics dimensions invalid' 43 | msg assert wid -:"1 (#wid)&{. &> uw 44 | msg assert 'in' -:"1 (-#'in')&{. &> uw 45 | 46 | NB. inch character units to numeric 47 | msg assert 0 < udin =. _1&".&> uw #&.>~ uw e.&.> <'.0123456789' 48 | 49 | NB. rounded page fractions assuming standard letterpaper page 50 | NB. the actual text area will vary depending depending 51 | NB. on a host of style and over page settings. 52 | pgfr=. 0.0001 round udin % (0{SourcePageTeXPts) % TeXPtIn 53 | 54 | NB. make width= replacements 55 | nwid=. uw ,. ( (":&.> <"0 pgfr) ,&.> <'\textwidth' 56 | msg assert -.'#' e. ; ,nwid 57 | (;,'#',&.>nwid) changestr y 58 | ) 59 | 60 | NB. retains string after first occurrence of (x) 61 | afterstr=:] }.~ #@[ + 1&(i.~)@([ E. ]) 62 | 63 | NB. signal with optional message 64 | assert=:0 0"_ $ 13!:8^:((0: e. ])`(12"_)) 65 | 66 | NB. retains string before first occurrence of (x) 67 | beforestr=:] {.~ 1&(i.~)@([ E. ]) 68 | 69 | 70 | changestr=:4 : 0 71 | 72 | NB.*changestr v-- replaces substrings - see long documentation. 73 | NB. 74 | NB. dyad: clReps changestr cl 75 | NB. 76 | NB. NB. first character delimits replacements 77 | NB. '/change/becomes/me/ehh' changestr 'blah blah ...' 78 | 79 | pairs=. 2 {."(1) _2 [\ <;._1 x NB. change table 80 | cnt=._1 [ lim=. # pairs 81 | while. lim > cnt=.>:cnt do. NB. process each change pair 82 | 't c'=. cnt { pairs NB. /target/change 83 | if. +./b=. t E. y do. NB. next if no target 84 | r=. I. b NB. target starts 85 | 'l q'=. #&> cnt { pairs NB. lengths 86 | p=. r + 0,+/\(<:# r)$ d=. q - l NB. change starts 87 | s=. * d NB. reduce < and > to = 88 | if. s = _1 do. 89 | b=. 1 #~ # b 90 | b=. ((l * # r)$ 1 0 #~ q,l-q) (,r +/ i. l)} b 91 | y=. b # y 92 | if. q = 0 do. continue. end. NB. next for deletions 93 | elseif. s = 1 do. 94 | y=. y #~ >: d r} b NB. first target char replicated 95 | end. 96 | y=.(c $~ q *# r) (,p +/i. q)} y NB. insert replacements 97 | end. 98 | end. y NB. altered string 99 | ) 100 | 101 | NB. extract unique list of graphics dimensions from latex 102 | graphdims=:[: ~. [: '['&afterstr@:(']'&beforestr)&.> ] <;.1~ '\includegraphics' E. ] 103 | 104 | NB. round y to nearest x (e.g. 1000 round 12345) 105 | round=:[ * [: <. 0.5 + %~ -------------------------------------------------------------------------------- /notebooks/wildfire plot.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Wildfire Plot\n", 8 | "\n", 9 | "* Code for the blog post [Woke Wildfires](https://analyzethedatanotthedrivel.org/2020/09/19/woke-wildfires/)\n", 10 | "\n", 11 | "* From [Analyze the Data not the Drivel](https://analyzethedatanotthedrivel.org/)" 12 | ] 13 | }, 14 | { 15 | "cell_type": "markdown", 16 | "metadata": {}, 17 | "source": [ 18 | "The code in this notebook was adapted from:\n", 19 | "\n", 20 | "[https://www.machinelearningplus.com/plots/top-50-matplotlib-visualizations-the-master-plots-python/#41.-Plotting-with-different-scales-using-secondary-Y-axis](https://www.machinelearningplus.com/plots/top-50-matplotlib-visualizations-the-master-plots-python/#41.-Plotting-with-different-scales-using-secondary-Y-axis)" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "metadata": {}, 27 | "outputs": [], 28 | "source": [ 29 | "import pandas as pd\n", 30 | "import numpy as np\n", 31 | "import csv\n", 32 | "import matplotlib.pyplot as plt" 33 | ] 34 | }, 35 | { 36 | "cell_type": "markdown", 37 | "metadata": {}, 38 | "source": [ 39 | "Download https://github.com/bakerjd99/jacks/blob/master/notebooks/NationalFireData.txt \n", 40 | "\n", 41 | "It seems `read_csv` does not skip leading rows when pulling directly from an URL." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": null, 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "# import data - skipping header preamble\n", 51 | "df = pd.read_csv(\"c:/temp/NationalFireData.txt\", delimiter=\"\\t\", skiprows=13)" 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": null, 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "x = df['Year']\n", 61 | "y1 = df['Acres'] / 1000 # 1000's of acres\n", 62 | "y2 = df['Fires'] " 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "metadata": {}, 69 | "outputs": [], 70 | "source": [ 71 | "# Plot Line1 (Left Y Axis)\n", 72 | "fig, ax1 = plt.subplots(1,1,figsize=(16,9), dpi= 80)\n", 73 | "ax1.plot(x, y1, color='tab:red')\n", 74 | "\n", 75 | "# Plot Line2 (Right Y Axis)\n", 76 | "ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis\n", 77 | "ax2.plot(x, y2, color='tab:blue')\n", 78 | "\n", 79 | "# Decorations\n", 80 | "# ax1_2 (left Y axis)\n", 81 | "ax1.set_xlabel('Year', fontsize=20)\n", 82 | "ax1.tick_params(axis='x', rotation=0, labelsize=12)\n", 83 | "ax1.set_ylabel('Acres Burned', color='tab:red', fontsize=20)\n", 84 | "ax1.tick_params(axis='y', rotation=0, labelcolor='tab:red' )\n", 85 | "ax1.grid(alpha=.4)\n", 86 | "\n", 87 | "# ax2 (right Y axis)\n", 88 | "ax2.set_ylabel(\"Number of Fires\", color='tab:blue', fontsize=20)\n", 89 | "ax2.tick_params(axis='y', labelcolor='tab:blue')\n", 90 | "#ax2.set_xticks(np.arange(0, len(x), 60))\n", 91 | "#ax2.set_xticklabels(x[::60], rotation=90, fontdict={'fontsize':10})\n", 92 | "ax2.set_title(\"Wildfire Acres Burned (1000's), Number of Files (1926-2019)\", fontsize=22)\n", 93 | "fig.tight_layout()\n", 94 | "plt.show()" 95 | ] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": null, 100 | "metadata": {}, 101 | "outputs": [], 102 | "source": [] 103 | } 104 | ], 105 | "metadata": { 106 | "kernelspec": { 107 | "display_name": "Python 3", 108 | "language": "python", 109 | "name": "python3" 110 | }, 111 | "language_info": { 112 | "codemirror_mode": { 113 | "name": "ipython", 114 | "version": 3 115 | }, 116 | "file_extension": ".py", 117 | "mimetype": "text/x-python", 118 | "name": "python", 119 | "nbconvert_exporter": "python", 120 | "pygments_lexer": "ipython3", 121 | "version": "3.7.4" 122 | } 123 | }, 124 | "nbformat": 4, 125 | "nbformat_minor": 2 126 | } 127 | -------------------------------------------------------------------------------- /jserver/JServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {70FFE2AC-8F2F-4D72-8FE3-6408BD8AD384} 9 | Library 10 | Properties 11 | JServerClass 12 | JServer 13 | v4.0 14 | 512 15 | 16 | 17 | 18 | 19 | 3.5 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | 40 | 41 | 3.5 42 | 43 | 44 | 3.5 45 | 46 | 47 | 3.5 48 | 49 | 50 | 51 | 52 | 53 | 54 | Code 55 | 56 | 57 | True 58 | True 59 | JserverResources.resx 60 | 61 | 62 | 63 | True 64 | True 65 | Resources.resx 66 | 67 | 68 | 69 | 70 | {21EB05E1-1AB3-11CF-A2AC-8FF70874C460} 71 | 3 72 | 0 73 | 0 74 | tlbimp 75 | False 76 | 77 | 78 | 79 | 80 | ResXFileCodeGenerator 81 | JserverResources.Designer.cs 82 | 83 | 84 | PublicResXFileCodeGenerator 85 | Resources.Designer.cs 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | -------------------------------------------------------------------------------- /jodliterate/j.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ]> 18 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /slipslide/slipslide0.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | 3 | pub fn main() !void { 4 | 5 | // There are seven numeric arguments to slipslide0 - example calls: 6 | // 7 | // command line: 8 | // slipslide0 25 0.001 1.226 0.5 0.0002835287369864788 0.0090502372846084037 1.0 9 | // 10 | // compile and run: 11 | // zig run slipslide0.zig -- 100 0.001 1.226 0.5 0.00028352874 0.0090502373 1.0 12 | 13 | // Get allocator 14 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; 15 | const allocator = gpa.allocator(); 16 | defer _ = gpa.deinit(); 17 | 18 | // Parse args into string array (error union needs 'try') 19 | const args = try std.process.argsAlloc(allocator); 20 | defer std.process.argsFree(allocator, args); 21 | 22 | const stdout = std.io.getStdOut().writer(); 23 | 24 | if (8 != args.len) { 25 | try stdout.print("ERROR - invalid argument count - needs 7 - see example:\n", .{}); 26 | try stdout.print("slipslide0 7200000 0.001 1.226 0.5 0.00028352874 0.0090502373 1.0\n", .{}); 27 | return; 28 | } 29 | 30 | // iteration count - greater than zero 31 | const dcnt: f64 = std.fmt.parseFloat(f64, args[1]) catch 0.0; 32 | const cnt: i64 = @intFromFloat(dcnt); 33 | if (0 < dcnt) { 34 | try stdout.print("iteration count: {d}\n", .{cnt}); 35 | } else { 36 | try stdout.print("ERROR - iteration count: {s}\n", .{args[1]}); 37 | return; 38 | } 39 | 40 | // Δt (sec) - greater than zero 41 | const d_t: f64 = std.fmt.parseFloat(f64, args[2]) catch 0.0; 42 | if (0.0 < d_t) { 43 | try stdout.print("delta T (sec): {d}\n", .{d_t}); 44 | } else { 45 | try stdout.print("ERROR - delta T: {s}\n", .{args[2]}); 46 | return; 47 | } 48 | 49 | // ρ air density (kg/m^3) - greater than zero 50 | // https://www.wolframalpha.com/input?i=air+density+at+sea+level+in+kilograms+per+cubic+meter 51 | const rho: f64 = std.fmt.parseFloat(f64, args[3]) catch 0.0; 52 | if (0.0 < rho) { 53 | try stdout.print("\nair density (kg/m^3): {d}\n", .{rho}); 54 | } else { 55 | try stdout.print("ERROR - air density: {s}\n", .{args[3]}); 56 | return; 57 | } 58 | 59 | // drag constant - greater than zero 60 | // basic drag formula is: R = ½ρCAv^2 https://physics.info/drag/ 61 | const c_d: f64 = std.fmt.parseFloat(f64, args[4]) catch 0.0; 62 | if (0.0 < c_d) { 63 | try stdout.print("drag constant: {d}\n", .{c_d}); 64 | } else { 65 | try stdout.print("ERROR - drag constant: {s}\n", .{args[4]}); 66 | return; 67 | } 68 | 69 | // area cross section (m^2) - greater than zero 70 | const ac: f64 = std.fmt.parseFloat(f64, args[5]) catch 0.0; 71 | if (0.0 < ac) { 72 | try stdout.print("area (m^2): {d}\n", .{ac}); 73 | } else { 74 | try stdout.print("ERROR - area: {s}\n", .{args[5]}); 75 | return; 76 | } 77 | 78 | // mass (kg) - greater than zero 79 | const mo: f64 = std.fmt.parseFloat(f64, args[6]) catch 0.0; 80 | if (0.0 < mo) { 81 | try stdout.print("mass (kg): {d}\n", .{mo}); 82 | } else { 83 | try stdout.print("ERROR - mass: {s}\n", .{args[6]}); 84 | return; 85 | } 86 | 87 | // initial velocity (m/sec) - greater than zero 88 | var vn: f64 = std.fmt.parseFloat(f64, args[7]) catch 0.0; 89 | if (0.0 < vn) { 90 | try stdout.print("initial velocity (m/sec): {d}\n", .{vn}); 91 | } else { 92 | try stdout.print("ERROR - initial velocity: {s}\n", .{args[7]}); 93 | return; 94 | } 95 | 96 | // drag constant 97 | const drgc: f64 = 0.5 * rho * c_d * ac; 98 | 99 | // initial drag force (kg*m/sec^2) 100 | var rn: f64 = drgc * (vn * vn); 101 | 102 | // initial acceleration (m/sec^2) 103 | var an: f64 = rn / mo; 104 | 105 | // total distance (m) 106 | var s_t: f64 = 0.0; 107 | 108 | var i: i64 = 0; 109 | var d_s: f64 = 0; 110 | while (i < cnt) { 111 | d_s = vn * d_t; // step distance 112 | vn = vn - (an * d_t); // new velocity (decreasing) 113 | rn = drgc * (vn * vn); // new drag force 114 | an = rn / mo; // new acceleration 115 | s_t += d_s; // total distance 116 | //std.debug.print("\n-- {d} {d} {d} {d}", .{ i, d_s, vn, s_t }); 117 | i += 1; 118 | } 119 | 120 | try stdout.print("\ntotal distance (m): {d}\n", .{s_t}); 121 | try stdout.print("final velocity (m/sec): {d}\n", .{vn}); 122 | try stdout.print("final acceleration (m/sec^2): {d}\n", .{an}); 123 | try stdout.print("final count: {d}\n", .{i}); 124 | } 125 | -------------------------------------------------------------------------------- /mirrorxref/HISTORY_MirrorXref.md: -------------------------------------------------------------------------------- 1 | 2 | [`MirrorXref`](https://github.com/bakerjd99/jacks/blob/master/mirrorxref/MirrorXref.ijs) - change history 3 | ========================================================================================================= 4 | 5 | ### December 24, 2022 6 | 7 | * Added `FixBogusDates` to streamline bogus date patching. 8 | 9 | ### June 5, 2022 10 | 11 | * Added `TODO_MirrorXref.md` to distribution and renamed `mirror_history.md` to 12 | `HISTORY_MirrorXref.md`. It's about time I standardized my 13 | haphazard notes and plans for frequently used complex scripts. 14 | 15 | ### June 4, 2022 16 | 17 | * `BuildMirror` modified to generate a `mirror_temp.db` to resolve 18 | forward references when fixing bogus real dates. 19 | 20 | ### June 2, 2022 21 | 22 | * Added `SetBogusRealDates` to group. This verb fetches 23 | real dates from the local primary thumbsplus database 24 | and inserts them in `.fix` real date files. I will still 25 | need to handle dates that are not in the local database 26 | and inspect the `.fix` files before mirror building 27 | but this verb will greatly ease the burden of patching 28 | these dates. 29 | 30 | ### May 27, 2022 31 | 32 | * Added `CheckRealDates` to group. The python function that 33 | fetches real dates from SmugMug stopped working. For now 34 | I am returning a bogus real date that I fix manually. `CheckRealDates` 35 | makes sure these bogus dates not do get stored in `mirror.db`. 36 | 37 | ### November 3, 2020 38 | 39 | * Fix typos in `CreateMirror_sql` foreign key definitions. I've been running 40 | `MirrorXref` for the last year without two foreign keys. I didn't notice the 41 | omission until I generated an ERD (Entity Relationship Diagram) for `mirror.db` 42 | while refining `jodliterate` documentation for this system. **See, literate 43 | programming helps you spot *problemos!*** 44 | 45 | ### November 28, 2019 46 | 47 | * Modified `Divisible` and `NotDivisble` to handle gallery 48 | counts that are divisible by 3 and 5. The iPhone SmugMug 49 | app display images in rows of 3 and also 5 when rotated. 50 | 51 | ### October 3, 2019 52 | 53 | * Added `Divisible` to `MirrorXref.ijs` - this verb lists 54 | galleries that have image counts divisible by three. 55 | 56 | ### August 16, 2019 57 | 58 | * I have added code to `MirrorXref.ijs` to calculate various handy 59 | `mirror.db` summary statistics like: 60 | 61 | 1. Estimates of how many images I will upload in the current year. 62 | 63 | 2. Gallery size statistics. 64 | 65 | 3. A list of galleries that have sizes that are not divisible by three. 66 | 67 | The summaries are written to a text file that is version controlled. 68 | 69 | ### March 5, 2019 70 | 71 | * `mirror.db` related programs are now complex enough 72 | and important enough to merit better history tracking. 73 | 74 | The following changes have been been made. 75 | 76 | 1. An online upload check for duplicate file names has been added. 77 | *The file name is a natural key for SmugMug accounts.* The upload 78 | utility skips duplicates when loading into a given gallery but 79 | I have seen duplicates when scanning files across all galleries. 80 | It simplifies `mirror.db` processing if online file names are unique. 81 | `uploadcheck.bat` checks uploads for duplicates. 82 | 83 | 2. I have modified `ThumbsMirror.ijs` to check for the presence of 84 | a test version of the SQLite Thumbsplus primary database and use it 85 | if present. `ThumbsMirror.ijs` is the only script that modifies 86 | a Thumbs database. The primary database is one of my most treasured 87 | files. Let's not screw it up! 88 | 89 | 3. I have added a simple means to comment out lines in `manlocoxref.txt` 90 | The other night some manual corrections I entered into this file 91 | broke one of my galleries. One or more of the corrections are wrong. 92 | Now that I can easily switch to a primary test database and 93 | comment out data lines it should be easy to find the offending records. 94 | 95 | 4. I am going to start making sure original files have different names 96 | than "developed files." `mirror.db` code paired some original 97 | `jp2` and other files with online names. These pairs are wrong 98 | and result from the original and developed files having the 99 | same name but different extensions. In the future I will 100 | append the following suffixes to all scan files. 101 | 102 | 1. `scb` flatbed scans `my flat bed scan name scb.jp2` 103 | 2. `scf` film scans `my film scan name scf.jp2` 104 | 3. `scc` camera scans `my camera scan name scc.tif` 105 | 106 | Digital image files are generally not a problem as the 107 | names cameras assign to images are so hideous that I 108 | am forced to change their names. 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /pandocexamples/jpdh.md: -------------------------------------------------------------------------------- 1 | More J Pandoc Syntax HighLighting 2 | ================================= 3 | 4 | Syntax highlighting is essential for blogging program code. Many 5 | blog hosts recognize this and provide tools for highlighting 6 | programming languages. [WordPress.com](https://wordpress.com/) (this host) has 7 | a [nifty highlighting tool](https://en.support.wordpress.com/wordpress-editor/blocks/syntax-highlighter-code-block/) that 8 | handles dozens of mainstream programming languages. 9 | Unfortunately, one of my favorite programming languages, [J](www.jsoftware.com), (yes it's a single letter name), 10 | is way out of the mainstream and is not supported. 11 | 12 | There are a few ways to deal with this *problem.* 13 | 14 | 1. Eschew J highlighting. 15 | 16 | 2. Upgrade[^paymore] your *WordPress.com* subscription and 17 | install custom syntax highlighters that can handle arbitrary language definitions. 18 | 19 | 3. Find another blog host that freely supports custom highlighters. 20 | 21 | 4. Roll your own or customize an existing highlighter. 22 | 23 | A few years ago I went with the fourth option and hacked the superb open-source tool [pandoc](https://pandoc.org/). 24 | The grim details are described in [this blog post](https://analyzethedatanotthedrivel.org/2012/09/20/pandoc-based-j-syntax-highlighting/). 25 | My hack produced a customized version of pandoc with J highlighting. I still use my 26 | hacked version and I'd probably stick with it if current pandoc versions had not 27 | introduced *must-have features like converting [Jupyter](https://jupyter.org/) notebooks to Markdown, PDF, LaTeX and HTML.* 28 | Jupyter is my default *thinking-things-through* programming environment. I've even taken to 29 | [blogging with Jupyter notebooks](https://github.com/bakerjd99/smugpyter/blob/master/notebooks/Unified%20XKCD%20Colors.ipynb). If 30 | you write and explain code you owe it to yourself to give Jupyter a try. 31 | 32 | Unwilling to eschew J highlighting or forgo Jupyter I was on the verge of re-hacking 33 | pandoc when I read the current pandoc (version 2.9.1.1) documentation and saw that ***J is now 34 | officially supported by pandoc.*** You can verify this with the shell commands. 35 | 36 | ~~~~ {.bash} 37 | pandoc --version 38 | pandoc --list-highlight-languages 39 | ~~~~ 40 | 41 | The pandoc developers made my day! I felt like [Wayne meeting a rock star](https://www.youtube.com/watch?v=lBEn3a4TIUw). 42 | 43 | Highlighting J is now a simple matter of placing J code in markdown blocks like: 44 | 45 | ~~~~ { .j } 46 | ... code code code ... 47 | ~~~~ 48 | 49 | and issuing shell commands like: 50 | 51 | ~~~~ {.bash} 52 | pandoc --highlight-style tango --metadata title="J test" -s jpdh.md -o jpdh.html 53 | ~~~~ 54 | 55 | The previous command generated the HTML of this post which I then pasted into the WordPress.com *Classic Editor.* 56 | Not only do I get J code highlighting on the cheap I also get footnotes which, *for god freaking sakes*,[^footno] 57 | are not supported by the new block editor for low budget blogs. 58 | 59 | ***The source markdown used for this post is available here - enjoy!*** 60 | 61 | ~~~~ {.j} 62 | 63 | NB. Some J code I am currently using to test TAB 64 | NB. delimited text files before loading them with SSIS. 65 | 66 | NB. read TAB delimited table files as symbols - see long document 67 | readtd2s=:[: s:@<;._2&> (9{a.) ,&.>~ [: <;._2 [: (] , ((10{a.)"_ = {:) }. (10{a.)"_) (13{a.) -.~ 1!:1&(]`<@.(32&>@(3!:0))) 68 | 69 | tdkeytest=:4 : 0 70 | 71 | NB.*tdkeytest v-- test natural key columns of TAB delimited text 72 | NB. files. 73 | NB. 74 | NB. Many of the raw tables of the ETL process depend on compound 75 | NB. primary keys. This verb applies a basic test of primary key 76 | NB. columns. Passing this test makes it very likely the table 77 | NB. will load without key constraint violations. Failures are 78 | NB. still possible depending on how text data is converted to 79 | NB. other datatypes. Failure of this test indicates a very high 80 | NB. chance of key constraint violations. 81 | NB. 82 | NB. dyad: il =. blclColnames tdkeytest clFile 83 | NB. 84 | NB. f0=. 'C:\temp\dailytsv\raw_ST_BU.txt' 85 | NB. k0=. ;:'BuId XMLFileDate' 86 | NB. k0 tdkeytest f0 87 | NB. 88 | NB. f1=. 'C:\temp\dailytsv\raw_ST_Item.txt' 89 | NB. k1=. ;:'BuId ItemId XMLFileDate' 90 | NB. k1 tdkeytest f1 91 | 92 | NB. first row is header 93 | h=. 0{d=. readtd2s y 94 | 95 | NB. key column positions 96 | 'header key column(s) missing' assert -.(#h) e. p=. h i. s: x 97 | 98 | c=. #d=. }. d 99 | b=. ~:p {"1 d 100 | 101 | NB. columns unique, rowcnt, nonunique rowcnt 102 | if. r=. c = +/b do. 103 | r , c , 0 104 | else. 105 | NB. there are duplicates show some sorted duplicate keys 106 | k=. p {"1 d 107 | d=. d {~ I. k e. k #~ -.b 108 | d=. (/: p {"1 d) { d 109 | b=. ~:p {"1 d 110 | m=. +/b 111 | smoutput (":m),' duplicate key blocks' 112 | n=. DUPSHOW <. m 113 | smoutput 'first ',(":n),' duplicate row key blocks' 114 | smoutput (

n {. ,. b <;.1 p {"1 d 115 | r , c , #d 116 | end. 117 | ) 118 | ~~~~ 119 | 120 | 121 | [^paymore]: The pay more option is always available. 122 | 123 | [^footno]: WordPress.com is beginning to remind me of Adobe. Stop taking 124 | away longstanding features when upgrading! -------------------------------------------------------------------------------- /configs/md-notepad.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 00# 01 02((EOL)) 03<!-- 04--> 9 | 10 | 11 | 12 | 13 | . 14 | 15 | 16 | @ < > \\ \` \* \_ \{ \} \[ \] \( \) \# \+ \- \. \! 17 | * - + 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | http:// (http:// https:// (https:// mailto: (mailto: ftp:// (ftp:// ftps:// (ftps:// (/ / 28 | ==== ---- 29 | *** ___ 30 | ** __ 31 | * _ 32 | 33 | 34 | 35 | 00![ 00[ 01\ 02] 02] 03` 04\ 05` 06*** 07\ 08*** 09** 10\ 11** 12 13 14 15 16 17 18 19 20 21 22 23 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /configs/j._udl.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 00NB. 00NB.* 01 02 03' 04' 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | : 21 | 22 | NB.*dependents 23 | 24 | NB.*enddependents 25 | 26 | 27 | 28 | 29 | 30 | 31 | assert. if. else. elseif. end. return. do. for. break. continue. elseif.do. while. whilst. while.do. select. case. fcase. case.do. try. catchd. catch. catcht. for_ label_ goto_ 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /ipynbfrjod/ipynb.ijs: -------------------------------------------------------------------------------- 1 | NB.*ipynb s-- insert j code in jupyter notebooks. 2 | NB. 3 | NB. verbatim: interface word(s): 4 | NB. ------------------------------------------------------------------------------ 5 | NB. ipynbfrjod - extract J words from JOD and insert in blank jupyter notebook 6 | NB. 7 | NB. created: 2022jul23 8 | NB. ------------------------------------------------------------------------------ 9 | 10 | coclass 'ipynb' 11 | 12 | NB.*dependents 13 | NB. (*)=: PYESCAPECHRS REVPYESCAPECHRS NBHEADER NBTRAILER NBJCELLBEGst NBJCELLBEGen NBJCELLEND 14 | NB.*enddependents 15 | 16 | NB. common python string escape characters - order matters 17 | PYESCAPECHRS=: ;(254{a.) ,&.> <;._1 ' \'' '' \\ \ \" "' 18 | 19 | NB. reverse python escapes - excluding single quote - order matters 20 | REVPYESCAPECHRS=: ;(254{a.) ,&.> }. |."1 ] _2 ]\ <;._1 PYESCAPECHRS 21 | 22 | NB. blank notebook json cell templates 23 | NBHEADER=: (0 : 0) 24 | { 25 | "cells": [ 26 | ) 27 | 28 | NBTRAILER=: (0 : 0) 29 | ], 30 | "metadata": { 31 | "kernelspec": { 32 | "display_name": "J", 33 | "language": "J", 34 | "name": "jkernel" 35 | }, 36 | "language_info": { 37 | "file_extension": ".ijs", 38 | "mimetype": "text/J", 39 | "name": "J" 40 | } 41 | }, 42 | "nbformat": 4, 43 | "nbformat_minor": 5 44 | } 45 | ) 46 | 47 | NBJCELLBEGst=: (0 : 0) 48 | { 49 | "cell_type": "markdown", 50 | "metadata": {}, 51 | "source": [ 52 | ) 53 | 54 | NBJCELLBEGen=: (0 : 0) 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [ 63 | ) 64 | 65 | NBJCELLEND=: (0 : 0) 66 | ] 67 | }, 68 | ) 69 | NB.*end-header 70 | 71 | NB. interface words (IFACEWORDSipynb) group 72 | IFACEWORDSipynb=:,<'ipynbfrjod' 73 | 74 | NB. prefix for markdown sections - converts to easily found strings in notebooks 75 | JWORDMARK=:' :::jword::: ' 76 | 77 | NB. line feed character 78 | LF=:10{a. 79 | 80 | NB. markdown cell section marker 81 | MDSECTION=:'###' 82 | 83 | NB. root words (ROOTWORDSipynb) group 84 | ROOTWORDSipynb=:<;._1 ' IFACEWORDSipynb PYESCAPECHRS ROOTWORDSipynb VMDipynb ipynbfrjod' 85 | 86 | NB. version, make count and date 87 | VMDipynb=:'0.8.0';17;'12 Aug 2024 13:08:51' 88 | 89 | NB. retains string (y) before last occurrence of (x) 90 | beforelaststr=:] {.~ 1&(i:~)@([ E. ]) 91 | 92 | 93 | changestr=:4 : 0 94 | 95 | NB.*changestr v-- replaces substrings - see long documentation. 96 | NB. 97 | NB. dyad: clReps changestr cl 98 | NB. 99 | NB. NB. first character delimits replacements 100 | NB. '/change/becomes/me/ehh' changestr 'blah blah ...' 101 | 102 | pairs=. 2 {."(1) _2 [\ <;._1 x NB. change table 103 | cnt=._1 [ lim=. # pairs 104 | while. lim > cnt=.>:cnt do. NB. process each change pair 105 | 't c'=. cnt { pairs NB. /target/change 106 | if. +./b=. t E. y do. NB. next if no target 107 | r=. I. b NB. target starts 108 | 'l q'=. #&> cnt { pairs NB. lengths 109 | p=. r + 0,+/\(<:# r)$ d=. q - l NB. change starts 110 | s=. * d NB. reduce < and > to = 111 | if. s = _1 do. 112 | b=. 1 #~ # b 113 | b=. ((l * # r)$ 1 0 #~ q,l-q) (,r +/ i. l)} b 114 | y=. b # y 115 | if. q = 0 do. continue. end. NB. next for deletions 116 | elseif. s = 1 do. 117 | y=. y #~ >: d r} b NB. first target char replicated 118 | end. 119 | y=.(c $~ q *# r) (,p +/i. q)} y NB. insert replacements 120 | end. 121 | end. y NB. altered string 122 | ) 123 | 124 | NB. enclose all character lists in blcl in " quotes 125 | dblquote=:'"'&,@:(,&'"')&.> 126 | 127 | 128 | ipynbfrjod=:3 : 0 129 | 130 | NB.*ipynbfrjod v-- extract J words from JOD and insert in blank 131 | NB. jupyter notebook. 132 | NB. 133 | NB. monad: clIpynb =. ipynbfrjod blclNames 134 | NB. 135 | NB. NB. examples use docs and utils 136 | NB. require 'general/jod' 137 | NB. od ;:'docs utils' 138 | NB. 139 | NB. nbj=: ipynbfrjod ;:'sha1 sha1dir' 140 | NB. nbj write 'C:\Users\baker\jupyter_notebooks\test0.ipynb' 141 | NB. 142 | NB. nbj=: ipynbfrjod }. grp 'ipynb' 143 | NB. nbj write 'C:\Users\baker\jupyter_notebooks\ipynb_onself.ipynb' 144 | NB. 145 | NB. NB. macOS/linux 146 | NB. nbj write jpath '~/jupyter_notebooks/test0.ipynb' 147 | 148 | NB. require 'general/jod' !(*)=. disp 149 | jc=. disp&.> y 150 | 151 | NB. markdown sections with word name 152 | sec=. dblquote ( y 153 | sec=. ( sec ,&.> jc 157 | nbj=. ;&.> '"' , L: 0 (<'\n",',LF) ,~ L: 0 nbj 158 | nbj=. ,&'"'&.> '\n",'&beforelaststr&.> nbj 159 | nbj=. sec ,&.> nbj ,&.> @(3!:0)) 171 | 172 | NB.POST_ipynb ipynb post processor. 173 | 174 | smoutput IFACE=: (0 : 0) 175 | NB. (ipynb) interface word(s): 20240812j130851 176 | NB. -------------------------- 177 | NB. ipynbfrjod NB. extract J words from JOD and insert in blank jupyter notebook 178 | ) 179 | 180 | cocurrent 'base' 181 | coinsert 'ipynb' -------------------------------------------------------------------------------- /configs/j._udl_DM.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 00NB. 00NB.* 01 02 03' 04' 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | : 21 | 22 | NB.*dependents 23 | 24 | NB.*enddependents 25 | 26 | 27 | 28 | 29 | 30 | 31 | assert. if. else. elseif. end. return. do. for. break. continue. elseif.do. while. whilst. while.do. select. case. fcase. case.do. try. catchd. catch. catcht. for_ label_ goto_ 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /slipslide/slipslide.ijs: -------------------------------------------------------------------------------- 1 | NB.*slipslide s-- estimate slide distance of objects on 2 | NB. frictionless plane. 3 | NB. 4 | NB. Estimate how far objects will slide on a perfectly flat 5 | NB. frictionless plane when acted upon only by stationary air 6 | NB. resistance. 7 | NB. 8 | NB. verbatim: interface word(s): 9 | NB. ----------------------------------------------------------------------- 10 | NB. lyinghuman - slide parameters for a human lying down facing wind 11 | NB. shootermarble - slide parameters for 19mm glass shooter marble 12 | NB. slipslide0 - estimate slide of object on frictionless plane 13 | NB. 14 | NB. created: 2023Dec21 15 | NB. ----------------------------------------------------------------------- 16 | NB. 23dec26 slight refactor - correct final count 17 | NB. 23dec27 compare with zig version 18 | NB. 23dec69 adjusted (shootermarble, lyinghuman) added jupyter notebook 19 | 20 | coclass 'slipslide' 21 | NB.*end-header 22 | 23 | NB. interface words (IFACEWORDSslipslide) group 24 | IFACEWORDSslipslide=:<;._1 ' lyinghuman shootermarble slipslide0' 25 | 26 | NB. root words (ROOTWORDSslipslide) group 27 | ROOTWORDSslipslide=:<;._1 ' IFACEWORDSslipslide ROOTWORDSslipslide VMDslipslide linpathsep lyinghuman portchars shootermarble slipslide0 winpathsep' 28 | 29 | NB. slipslide0 numeric parameter titles/units 30 | SlideParms=:<;._1 '|air density (kg/m^3)|drag constant|cross area (m^2)|object mass (kg)|initial velocity (m/sec)' 31 | 32 | NB. version, make count and date 33 | VMDslipslide=:'0.5.2';16;'12 Aug 2024 13:27:44' 34 | 35 | NB. standardizes path delimiter to linux forward / slash 36 | linpathsep=:'/'&(('\' I.@:= ])} ) 37 | 38 | 39 | lyinghuman=:3 : 0 40 | 41 | NB.*lyinghuman v-- slide parameters for a human lying down facing wind. 42 | NB. 43 | NB. monad: bt =. lyinghuman faV 44 | NB. 45 | NB. lyinghuman 8.8 NB. roll down frictionless 4m 46 | 47 | NB. ρ air density (kg/m^3) 48 | NB. https://www.wolframalpha.com/input?i=air+density+at+sea+level+in+kilograms+per+cubic+meter 49 | rho=. 1.226 50 | 51 | NB. human mass (kg) 52 | hm=. 75 53 | 54 | NB. drag coefficient around same as car 55 | NB. https://physics.info/drag/ 56 | c=. 0.35 57 | 58 | NB. head forward cross section area (m^2) 59 | ha=. 0.2 60 | 61 | NB. air, drag, area, mass, velocity 62 | SlideParms ,. <"0 rho,c,ha,hm,y 63 | ) 64 | 65 | NB. portable box drawing characters 66 | portchars=:[: 9!:7 '+++++++++|-'"_ [ ] 67 | 68 | 69 | shootermarble=:3 : 0 70 | 71 | NB.*shootermarble v-- slide parameters for 19mm glass shooter marble. 72 | NB. 73 | NB. monad: bt =. shootermarble faV 74 | NB. 75 | NB. shootermarble 1 NB. 1 m/sec 76 | NB. shootermarble 8.8 NB. roll down frictionless 4m 77 | 78 | NB. ρ air density (kg/m^3) 79 | NB. https://www.wolframalpha.com/input?i=air+density+at+sea+level+in+kilograms+per+cubic+meter 80 | rho=. 1.226 81 | 82 | NB. glass density (kg/m^3) 83 | NB. https://www.wolframalpha.com/input?i=2520+kilograms+per+cubic+meter&assumption=%22ClashPrefs%22+-%3E+%22%22 84 | gd=. 2520 85 | 86 | NB. radius shooter marble (m) 87 | NB. https://www.moonmarble.com/t2-marbleinfo.aspx 88 | rm=. 0.0095 89 | 90 | NB. mass of shooter marble (kg) 91 | mm=. gd * (4%3) * 1p1 * rm^3 92 | 93 | NB. drag coefficient ideal sphere 94 | NB. https://physics.info/drag/ 95 | c=. 0.5 96 | 97 | NB. area shooter marble (m^2) 98 | ma=. 1p1 * rm^2 99 | 100 | NB. air, sphere drag, area marble, mass marble, velocity 101 | SlideParms ,. <"0 rho,c,ma,mm,y 102 | ) 103 | 104 | 105 | slipslide0=:3 : 0 106 | 107 | NB.*slipslide0 v-- estimate slide of object on frictionless 108 | NB. plane. 109 | NB. 110 | NB. This verb estimates how far a slowly moving <20 m/sec object 111 | NB. will slide on a perfectly flat frictionless plane when only 112 | NB. acted upon by air resistance. 113 | NB. 114 | NB. verbatim: 115 | NB. 116 | NB. The basic formula is: R = ½ρCAv^2 https://physics.info/drag/ 117 | NB. 118 | NB. R drag force (Newtons) (kg*m/sec^2) 119 | NB. ρ air density (kg/m^3) 120 | NB. C coefficient of drag 121 | NB. constant determined by experiment 122 | NB. A projected area (m^2) 123 | NB. v velocity (m/sec) 124 | NB. 125 | NB. monad: flSva =. slipslide fl 126 | NB. 127 | NB. NB. air, sphere drag, area marble, mass marble, velocity 128 | NB. slip=. ; {:"1 shootermarble 1 129 | NB. slipslide0 slip 130 | NB. 131 | NB. dyad: flSva =. fldTCnt slipslide fl 132 | NB. 133 | NB. NB. zig test case - show many digits 134 | NB. 9!:11 [ 17 135 | NB. 0.001 25 slipslide0 slip 136 | NB. 137 | NB. NB. a 1 m/sec marble is still slowly moving 138 | NB. NB. after 2 hours and has rolled around 1/2 km 139 | NB. (0.001,1000 * 3600 * 2) slipslide0 slip 140 | NB. 141 | NB. NB. spreadsheet cross check 142 | NB. 0.001 19970 slipslide0 slip 143 | NB. 144 | NB. NB. a human is still sliding after two hours 145 | NB. (0.001,1000 * 3600 * 2) slipslide0 ; {:"1 lyinghuman 8.8 146 | 147 | 0.001 1000 slipslide0 y 148 | : 149 | 150 | 'rho C A M vn'=. y [ 'dT cnt'=. x 151 | 152 | NB. drag constant 153 | drgc=. 0.5 * rho * C * A 154 | 155 | NB. initial acceleration and drag 156 | an=. rn % M [ rn=. drgc * vn^2 157 | 158 | S=. 0 NB. total distance 159 | 160 | for_step. i. cnt do. 161 | dS=. dT * vn NB. step distance 162 | vn=. vn - an * dT NB. new velocity (decreasing) 163 | 164 | NB. new acceleration and drag 165 | an=. rn % M [ rn=. drgc * vn^2 166 | 167 | S=. S + dS 168 | NB. smoutput step, dS, vn, S 169 | end. 170 | 171 | NB. distance, end velocity, acceleration, step count 172 | S,vn,an,cnt 173 | ) 174 | 175 | NB. standardizes path delimiter to windows back \ slash 176 | winpathsep=:'\'&(('/' I.@:= ])} ) 177 | 178 | NB.POST_slipslide post processor. 179 | 180 | smoutput IFACE_slipslide=: (0 : 0) 181 | NB. (slipslide) interface word(s): 20240812j132744 182 | NB. -------------------------- 183 | NB. lyinghuman NB. slide parameters for a human lying down facing wind 184 | NB. shootermarble NB. slide parameters for 19mm glass shooter marble 185 | NB. slipslide0 NB. estimate slide of object on frictionless plane 186 | ) 187 | 188 | cocurrent 'base' 189 | coinsert 'slipslide' 190 | 191 | -------------------------------------------------------------------------------- /jserver/JserverResources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | Resources\CSsrv.ijs;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | -------------------------------------------------------------------------------- /slipslide/slipslide.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Slip Slide Tests\n", 8 | "\n", 9 | "This notebook runs various J scripts that estimate how far objects will slide on a flat frictionless plane when acted upon only by air resistance and wind. \n", 10 | "\n", 11 | "See: [https://github.com/bakerjd99/jacks/tree/master/slipslide](https://github.com/bakerjd99/jacks/tree/master/slipslide)." 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": 1, 17 | "metadata": { 18 | "scrolled": true 19 | }, 20 | "outputs": [ 21 | { 22 | "name": "stdout", 23 | "output_type": "stream", 24 | "text": [ 25 | "\n", 26 | "j9.5.0-beta9/j64avx2/windows/commercial/www.jsoftware.com/2023-12-06T14:18:10/clang-16-0-6/SLEEF=1\n", 27 | "29 Dec 2023 16:31:10\n" 28 | ] 29 | } 30 | ], 31 | "source": [ 32 | "NB. J version - notebook runtime\n", 33 | "smoutput 9!:14''\n", 34 | "smoutput timestamp 6!:0 ''" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 2, 40 | "metadata": {}, 41 | "outputs": [ 42 | { 43 | "name": "stdout", 44 | "output_type": "stream", 45 | "text": [ 46 | "NB. (slipslide) interface word(s): 20231229j162307\n", 47 | "NB. --------------------------\n", 48 | "NB. lyinghuman NB. slide parameters for a human lying down facing wind\n", 49 | "NB. shootermarble NB. slide parameters for 19mm glass shooter marble\n", 50 | "NB. slipslide0 NB. estimate slide of object on frictionless plane\n", 51 | "\n" 52 | ] 53 | } 54 | ], 55 | "source": [ 56 | "load 'slipslide'" 57 | ] 58 | }, 59 | { 60 | "cell_type": "markdown", 61 | "metadata": {}, 62 | "source": [ 63 | "### Set various utils" 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": 3, 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "NB. set portable box characters for LaTeX\n", 73 | "0 0$portchars ''\n", 74 | "\n", 75 | "NB. cell clip format\n", 76 | "ccf=: [ {.\"1 [: \": ]" 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 4, 82 | "metadata": {}, 83 | "outputs": [ 84 | { 85 | "name": "stdout", 86 | "output_type": "stream", 87 | "text": [ 88 | "+-----+-+--------------------+\n", 89 | "|0.5.2|3|29 Dec 2023 16:23:07|\n", 90 | "+-----+-+--------------------+\n" 91 | ] 92 | } 93 | ], 94 | "source": [ 95 | "NB. script version\n", 96 | "VMDslipslide" 97 | ] 98 | }, 99 | { 100 | "cell_type": "markdown", 101 | "metadata": {}, 102 | "source": [ 103 | "### Estimate how far a 19mm shooter marble will roll\n", 104 | "\n", 105 | "The calculation assumes no wind and sea level air resistance." 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 5, 111 | "metadata": {}, 112 | "outputs": [ 113 | { 114 | "name": "stdout", 115 | "output_type": "stream", 116 | "text": [ 117 | "+------------------------+-----------+\n", 118 | "|air density (kg/m^3) |1.226 |\n", 119 | "+------------------------+-----------+\n", 120 | "|drag constant |0.5 |\n", 121 | "+------------------------+-----------+\n", 122 | "|cross area (m^2) |0.000283529|\n", 123 | "+------------------------+-----------+\n", 124 | "|object mass (kg) |0.00905024 |\n", 125 | "+------------------------+-----------+\n", 126 | "|initial velocity (m/sec)|1 |\n", 127 | "+------------------------+-----------+\n" 128 | ] 129 | } 130 | ], 131 | "source": [ 132 | "NB. show slide paramters\n", 133 | "smoutput slip=: shootermarble 1" 134 | ] 135 | }, 136 | { 137 | "cell_type": "code", 138 | "execution_count": 6, 139 | "metadata": {}, 140 | "outputs": [ 141 | { 142 | "name": "stdout", 143 | "output_type": "stream", 144 | "text": [ 145 | "442.654 0.0142581 1.95206e_6 7.2e6\n" 146 | ] 147 | } 148 | ], 149 | "source": [ 150 | "NB. a 1 m/sec marble is still slowly moving\n", 151 | "NB. after 2 hours and has rolled around 1/2 km\n", 152 | "(0.001,1000 * 3600 * 2) slipslide0 ; {:\"1 slip" 153 | ] 154 | }, 155 | { 156 | "cell_type": "markdown", 157 | "metadata": {}, 158 | "source": [ 159 | "### Estimate how far a human will slide\n", 160 | "\n", 161 | "The calculation assumes the person is lying prone with cross section" 162 | ] 163 | }, 164 | { 165 | "cell_type": "code", 166 | "execution_count": 7, 167 | "metadata": {}, 168 | "outputs": [ 169 | { 170 | "name": "stdout", 171 | "output_type": "stream", 172 | "text": [ 173 | "+------------------------+-----+\n", 174 | "|air density (kg/m^3) |1.226|\n", 175 | "+------------------------+-----+\n", 176 | "|drag constant |0.35 |\n", 177 | "+------------------------+-----+\n", 178 | "|cross area (m^2) |0.2 |\n", 179 | "+------------------------+-----+\n", 180 | "|object mass (kg) |75 |\n", 181 | "+------------------------+-----+\n", 182 | "|initial velocity (m/sec)|8.8 |\n", 183 | "+------------------------+-----+\n" 184 | ] 185 | } 186 | ], 187 | "source": [ 188 | "NB. show slide parameters\n", 189 | "smoutput human=: lyinghuman 8.8" 190 | ] 191 | }, 192 | { 193 | "cell_type": "code", 194 | "execution_count": 8, 195 | "metadata": {}, 196 | "outputs": [ 197 | { 198 | "name": "stdout", 199 | "output_type": "stream", 200 | "text": [ 201 | "7016.08 0.158915 1.44486e_5 1.08e7\n" 202 | ] 203 | } 204 | ], 205 | "source": [ 206 | "NB. after three hours a person slides over 7km\n", 207 | "(0.001,1000 * 3600 * 3) slipslide0 ; {:\"1 human" 208 | ] 209 | }, 210 | { 211 | "cell_type": "markdown", 212 | "metadata": {}, 213 | "source": [ 214 | "### All done - thanks for playing!" 215 | ] 216 | } 217 | ], 218 | "metadata": { 219 | "kernelspec": { 220 | "display_name": "J", 221 | "language": "J", 222 | "name": "jkernel" 223 | }, 224 | "language_info": { 225 | "file_extension": ".ijs", 226 | "mimetype": "text/J", 227 | "name": "J" 228 | } 229 | }, 230 | "nbformat": 4, 231 | "nbformat_minor": 2 232 | } 233 | -------------------------------------------------------------------------------- /jserver/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\CSsrv.ijs;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | -------------------------------------------------------------------------------- /notebooks/Extracting SQL code from SSIS dtsx packages with Python lxml.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Extracting SQL code from SSIS dtsx packages with Python lxml\n", 8 | "\n", 9 | "* Code for the blog post [Extracting SQL code from SSIS dtsx packages with Python lxml](https://analyzethedatanotthedrivel.org/2020/01/20/extracting-sql-code-from-ssis-dtsx-packages-with-python-lxml/)\n", 10 | "\n", 11 | "* From [Analyze the Data not the Drivel](https://analyzethedatanotthedrivel.org/)" 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": null, 17 | "metadata": {}, 18 | "outputs": [], 19 | "source": [ 20 | "# imports\n", 21 | "import os\n", 22 | "from lxml import etree" 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "execution_count": null, 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [ 31 | "# set sql output directory\n", 32 | "sql_out = r\"C:\\temp\\dtsxsql\"\n", 33 | "if not os.path.isdir(sql_out):\n", 34 | " os.makedirs(sql_out)" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": null, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "# set dtsx package file\n", 44 | "ssis_dtsx = r'C:\\temp\\dtsx\\ParseXML.dtsx'\n", 45 | "if not os.path.isfile(ssis_dtsx):\n", 46 | " print(\"no package file\")" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [ 55 | "# read and parse ssis package\n", 56 | "tree = etree.parse(ssis_dtsx)\n", 57 | "root = tree.getroot()\n", 58 | "root.tag " 59 | ] 60 | }, 61 | { 62 | "cell_type": "code", 63 | "execution_count": null, 64 | "metadata": {}, 65 | "outputs": [], 66 | "source": [ 67 | "# collect unique lxml transformed element tags\n", 68 | "ele_tags = set()\n", 69 | "for ele in root.xpath(\".//*\"):\n", 70 | " ele_tags.add(ele.tag)\n", 71 | "print(ele_tags)\n", 72 | "print(len(ele_tags))" 73 | ] 74 | }, 75 | { 76 | "cell_type": "markdown", 77 | "metadata": {}, 78 | "source": [ 79 | "### Code reformatted to better display on blog" 80 | ] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": null, 85 | "metadata": {}, 86 | "outputs": [], 87 | "source": [ 88 | "pfx = '{www.microsoft.com/'\n", 89 | "exe_tag = pfx + 'SqlServer/Dts}Executable'\n", 90 | "obj_tag = pfx + 'SqlServer/Dts}ObjectName'\n", 91 | "dat_tag = pfx + 'SqlServer/Dts}ObjectData'\n", 92 | "tsk_tag = pfx + 'sqlserver/dts/tasks/sqltask}SqlTaskData'\n", 93 | "src_tag = pfx + \\\n", 94 | " 'sqlserver/dts/tasks/sqltask}SqlStatementSource'\n", 95 | "print(exe_tag)\n", 96 | "print(obj_tag)\n", 97 | "print(tsk_tag)\n", 98 | "print(src_tag)" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": null, 104 | "metadata": {}, 105 | "outputs": [], 106 | "source": [ 107 | "# extract sql source statements and write to *.sql files \n", 108 | "total_bytes = 0\n", 109 | "package_name = root.attrib[obj_tag].replace(\" \",\"\")\n", 110 | "for cnt, ele in enumerate(root.xpath(\".//*\")):\n", 111 | " if ele.tag == exe_tag:\n", 112 | " attr = ele.attrib\n", 113 | " for child0 in ele:\n", 114 | " if child0.tag == dat_tag:\n", 115 | " for child1 in child0:\n", 116 | " sql_comment = attr[obj_tag].strip()\n", 117 | " if child1.tag == tsk_tag:\n", 118 | " dtsx_sql = child1.attrib[src_tag]\n", 119 | " dtsx_sql = \"-- \" + \\\n", 120 | " sql_comment + \"\\n\" + dtsx_sql\n", 121 | " sql_file = sql_out + \"\\\\\" \\\n", 122 | " + package_name + str(cnt) + \".sql\"\n", 123 | " total_bytes += len(dtsx_sql)\n", 124 | " print((len(dtsx_sql), \n", 125 | " sql_comment, sql_file))\n", 126 | " with open(sql_file, \"w\") as file:\n", 127 | " file.write(dtsx_sql)\n", 128 | "print(('total bytes',total_bytes))" 129 | ] 130 | }, 131 | { 132 | "cell_type": "markdown", 133 | "metadata": {}, 134 | "source": [ 135 | "### Original unformatted code" 136 | ] 137 | }, 138 | { 139 | "cell_type": "code", 140 | "execution_count": null, 141 | "metadata": {}, 142 | "outputs": [], 143 | "source": [ 144 | "# scan package tree and extract sql source code\n", 145 | "total_bytes = 0\n", 146 | "package_name = root.attrib['{www.microsoft.com/SqlServer/Dts}ObjectName'].replace(\" \",\"\")\n", 147 | "for cnt, ele in enumerate(root.xpath(\".//*\")):\n", 148 | " if ele.tag == \"{www.microsoft.com/SqlServer/Dts}Executable\":\n", 149 | " attr = ele.attrib\n", 150 | " for child0 in ele:\n", 151 | " if child0.tag == \"{www.microsoft.com/SqlServer/Dts}ObjectData\":\n", 152 | " for child1 in child0:\n", 153 | " sql_comment = attr[\"{www.microsoft.com/SqlServer/Dts}ObjectName\"].strip()\n", 154 | " if child1.tag == \"{www.microsoft.com/sqlserver/dts/tasks/sqltask}SqlTaskData\":\n", 155 | " dtsx_sql = child1.attrib[\"{www.microsoft.com/sqlserver/dts/tasks/sqltask}SqlStatementSource\"]\n", 156 | " dtsx_sql = \"-- \" + sql_comment + \"\\n\" + dtsx_sql\n", 157 | " sql_file = sql_out + \"\\\\\" + package_name + str(cnt) + \".sql\"\n", 158 | " total_bytes += len(dtsx_sql)\n", 159 | " print((len(dtsx_sql), sql_comment, sql_file))\n", 160 | " with open(sql_file, \"w\") as file:\n", 161 | " file.write(dtsx_sql)\n", 162 | "print(('total sql bytes',total_bytes))" 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": null, 168 | "metadata": {}, 169 | "outputs": [], 170 | "source": [] 171 | } 172 | ], 173 | "metadata": { 174 | "kernelspec": { 175 | "display_name": "Python 3", 176 | "language": "python", 177 | "name": "python3" 178 | }, 179 | "language_info": { 180 | "codemirror_mode": { 181 | "name": "ipython", 182 | "version": 3 183 | }, 184 | "file_extension": ".py", 185 | "mimetype": "text/x-python", 186 | "name": "python", 187 | "nbconvert_exporter": "python", 188 | "pygments_lexer": "ipython3", 189 | "version": "3.7.4" 190 | } 191 | }, 192 | "nbformat": 4, 193 | "nbformat_minor": 2 194 | } 195 | -------------------------------------------------------------------------------- /jodliterate/J.hs: -------------------------------------------------------------------------------- 1 | {- This module was generated from data in the Kate syntax 2 | highlighting file j.xml, version 1.0, by Igor Zhuravlov (zhuravlov.ip@it.dvfu.ru) -} 3 | 4 | module Text.Highlighting.Kate.Syntax.J 5 | (highlight, parseExpression, syntaxName, syntaxExtensions) 6 | where 7 | import Text.Highlighting.Kate.Types 8 | import Text.Highlighting.Kate.Common 9 | import Text.ParserCombinators.Parsec hiding (State) 10 | import Control.Monad.State 11 | import Data.Char (isSpace) 12 | import Data.Maybe (fromMaybe) 13 | 14 | -- | Full name of language. 15 | syntaxName :: String 16 | syntaxName = "J" 17 | 18 | -- | Filename extensions for this language. 19 | syntaxExtensions :: String 20 | syntaxExtensions = "*.ijs;*.IJS" 21 | 22 | -- | Highlight source code using this syntax definition. 23 | highlight :: String -> [SourceLine] 24 | highlight input = evalState (mapM parseSourceLine $ lines input) startingState 25 | 26 | parseSourceLine :: String -> State SyntaxState SourceLine 27 | parseSourceLine = mkParseSourceLine parseExpression 28 | 29 | -- | Parse an expression using appropriate local context. 30 | parseExpression :: KateParser Token 31 | parseExpression = do 32 | (lang,cont) <- currentContext 33 | result <- parseRules (lang,cont) 34 | optional $ do eof 35 | updateState $ \st -> st{ synStPrevChar = '\n' } 36 | pEndLine 37 | return result 38 | 39 | startingState = SyntaxState {synStContexts = [("J","sentence")], synStLineNumber = 0, synStPrevChar = '\n', synStPrevNonspace = False, synStCaseSensitive = True, synStKeywordCaseSensitive = True, synStCaptures = []} 40 | 41 | pEndLine = do 42 | updateState $ \st -> st{ synStPrevNonspace = False } 43 | context <- currentContext 44 | case context of 45 | ("J","sentence") -> return () 46 | ("J","comment") -> (popContext) >> pEndLine 47 | _ -> return () 48 | 49 | withAttribute attr txt = do 50 | when (null txt) $ fail "Parser matched no text" 51 | updateState $ \st -> st { synStPrevChar = last txt 52 | , synStPrevNonspace = synStPrevNonspace st || not (all isSpace txt) } 53 | return (attr, txt) 54 | 55 | 56 | regex_'27'28'5b'5e'27'5d'7c'27'27'29'2a'27 = compileRegex "'([^']|'')*'" 57 | regex_'28'5b'2f'5c'5cbfMt'5d'5c'2e'7ct'3a'7c'5b'7e'2f'5c'5c'7d'5d'29'28'3f'21'5b'2e'3a'5d'29 = compileRegex "([/\\\\bfMt]\\.|t:|[~/\\\\}])(?![.:])" 58 | regex_'28'5f'3f'5cd'3a'7cp'5c'2e'5c'2e'7c'5bACeEIjLor'5d'5c'2e'7c'5b'5f'2f'5c'5ciqsux'5d'3a'7c'5c'7b'3a'3a'7c'5b'3d'21'5c'5d'5d'7c'5b'2d'3c'3e'2b'2a'25'24'7c'2c'23'7b'5d'5b'2e'3a'5d'3f'7c'5b'3b'5b'5d'3a'3f'7c'5b'7e'7d'22ip'5d'5b'2e'3a'5d'7c'5b'3f'5e'5d'5c'2e'3f'29'28'3f'21'5b'2e'3a'5d'29 = compileRegex "(_?\\d:|p\\.\\.|[ACeEIjLor]\\.|[_/\\\\iqsux]:|\\{::|[=!\\]]|[-<>+*%$|,#{][.:]?|[;[]:?|[~}\"ip][.:]|[?^]\\.?)(?![.:])" 59 | regex_'5cb'5cd'2bb'5f'3f'5ba'2dz'5cd'5d'2b'28'5c'2e'5ba'2dz'5cd'5d'2b'29'5cb'7c'5cb'5f'3f'5cd'2bx'5cb'7c'5cb'5f'3f'5cd'2br'5f'3f'5cd'2b'5cb'7c'5cb'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'28'28j'7ca'5bdr'5d'29'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'29'3f'28'5bpx'5d'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'28'28j'7ca'5bdr'5d'29'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'29'3f'29'3f'28'3f'21'5ba'2dz'5cd'5f'2e'5d'29 = compileRegex "\\b\\d+b_?[a-z\\d]+(\\.[a-z\\d]+)\\b|\\b_?\\d+x\\b|\\b_?\\d+r_?\\d+\\b|\\b(_?\\d+(\\.\\d+)?(e\\d+)?|_?_|_\\.)((j|a[dr])(_?\\d+(\\.\\d+)?(e\\d+)?|_?_|_\\.))?([px](_?\\d+(\\.\\d+)?(e\\d+)?|_?_|_\\.)((j|a[dr])(_?\\d+(\\.\\d+)?(e\\d+)?|_?_|_\\.))?)?(?![a-z\\d_.])" 60 | regex_'28'22'7c'5b'40'26'5d'5b'2e'3a'5d'3f'7c'5b'2e'3a'5d'5b'2e'3a'5d'3f'7c'5b'21D'5d'5b'2e'3a'5d'7c'26'5c'2e'3a'7c'5b'3bdHT'5d'5c'2e'7c'60'3a'3f'7c'5bLS'5e'5d'3a'29'28'3f'21'5b'2e'3a'5d'29 = compileRegex "(\"|[@&][.:]?|[.:][.:]?|[!D][.:]|&\\.:|[;dHT]\\.|`:?|[LS^]:)(?![.:])" 61 | regex_'5cb'28assert'7cbreak'7cf'3fcase'7ccatch'5bdt'5d'3f'7ccontinue'7cdo'7celse'28if'29'3f'7cend'7cfor'28'5f'5ba'2dzA'2dZ'5d'5ba'2dzA'2dZ'5cd'5f'5d'2a'29'3f'7c'28goto'7clabel'29'5f'5ba'2dzA'2dZ'5d'5ba'2dzA'2dZ'5cd'5f'5d'2a'7cif'7creturn'7cselect'7cthrow'7ctry'7cwhil'28e'7cst'29'29'5c'2e'28'3f'21'5b'2e'3a'5d'29 = compileRegex "\\b(assert|break|f?case|catch[dt]?|continue|do|else(if)?|end|for(_[a-zA-Z][a-zA-Z\\d_]*)?|(goto|label)_[a-zA-Z][a-zA-Z\\d_]*|if|return|select|throw|try|whil(e|st))\\.(?![.:])" 62 | regex_'5cb'5bnmuvxy'5d'5c'2e'3f'28'3f'21'5b'5cw'3a'5d'29 = compileRegex "\\b[nmuvxy]\\.?(?![\\w:])" 63 | regex_'5cba'5b'2e'3a'5d'28'3f'21'5b'2e'3a'5d'29 = compileRegex "\\ba[.:](?![.:])" 64 | 65 | defaultAttributes = [(("J","sentence"),NormalTok),(("J","comment"),CommentTok)] 66 | 67 | parseRules ("J","sentence") = 68 | (((pDetectSpaces >>= withAttribute NormalTok)) 69 | <|> 70 | ((pString False "NB." >>= withAttribute CommentTok) >>~ pushContext ("J","comment")) 71 | <|> 72 | ((pRegExpr regex_'27'28'5b'5e'27'5d'7c'27'27'29'2a'27 >>= withAttribute StringTok)) 73 | <|> 74 | ((pRegExpr regex_'28'5b'2f'5c'5cbfMt'5d'5c'2e'7ct'3a'7c'5b'7e'2f'5c'5c'7d'5d'29'28'3f'21'5b'2e'3a'5d'29 >>= withAttribute KeywordTok)) 75 | <|> 76 | ((pRegExpr regex_'28'5f'3f'5cd'3a'7cp'5c'2e'5c'2e'7c'5bACeEIjLor'5d'5c'2e'7c'5b'5f'2f'5c'5ciqsux'5d'3a'7c'5c'7b'3a'3a'7c'5b'3d'21'5c'5d'5d'7c'5b'2d'3c'3e'2b'2a'25'24'7c'2c'23'7b'5d'5b'2e'3a'5d'3f'7c'5b'3b'5b'5d'3a'3f'7c'5b'7e'7d'22ip'5d'5b'2e'3a'5d'7c'5b'3f'5e'5d'5c'2e'3f'29'28'3f'21'5b'2e'3a'5d'29 >>= withAttribute KeywordTok)) 77 | <|> 78 | ((pRegExpr regex_'5cb'5cd'2bb'5f'3f'5ba'2dz'5cd'5d'2b'28'5c'2e'5ba'2dz'5cd'5d'2b'29'5cb'7c'5cb'5f'3f'5cd'2bx'5cb'7c'5cb'5f'3f'5cd'2br'5f'3f'5cd'2b'5cb'7c'5cb'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'28'28j'7ca'5bdr'5d'29'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'29'3f'28'5bpx'5d'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'28'28j'7ca'5bdr'5d'29'28'5f'3f'5cd'2b'28'5c'2e'5cd'2b'29'3f'28e'5cd'2b'29'3f'7c'5f'3f'5f'7c'5f'5c'2e'29'29'3f'29'3f'28'3f'21'5ba'2dz'5cd'5f'2e'5d'29 >>= withAttribute DecValTok)) 79 | <|> 80 | ((pAnyChar "()" >>= withAttribute RegionMarkerTok)) 81 | <|> 82 | ((pRegExpr regex_'28'22'7c'5b'40'26'5d'5b'2e'3a'5d'3f'7c'5b'2e'3a'5d'5b'2e'3a'5d'3f'7c'5b'21D'5d'5b'2e'3a'5d'7c'26'5c'2e'3a'7c'5b'3bdHT'5d'5c'2e'7c'60'3a'3f'7c'5bLS'5e'5d'3a'29'28'3f'21'5b'2e'3a'5d'29 >>= withAttribute KeywordTok)) 83 | <|> 84 | ((pRegExpr regex_'5cb'28assert'7cbreak'7cf'3fcase'7ccatch'5bdt'5d'3f'7ccontinue'7cdo'7celse'28if'29'3f'7cend'7cfor'28'5f'5ba'2dzA'2dZ'5d'5ba'2dzA'2dZ'5cd'5f'5d'2a'29'3f'7c'28goto'7clabel'29'5f'5ba'2dzA'2dZ'5d'5ba'2dzA'2dZ'5cd'5f'5d'2a'7cif'7creturn'7cselect'7cthrow'7ctry'7cwhil'28e'7cst'29'29'5c'2e'28'3f'21'5b'2e'3a'5d'29 >>= withAttribute KeywordTok)) 85 | <|> 86 | ((pDetect2Chars False '=' ':' >>= withAttribute KeywordTok)) 87 | <|> 88 | ((pDetect2Chars False '=' '.' >>= withAttribute KeywordTok)) 89 | <|> 90 | ((pRegExpr regex_'5cb'5bnmuvxy'5d'5c'2e'3f'28'3f'21'5b'5cw'3a'5d'29 >>= withAttribute KeywordTok)) 91 | <|> 92 | ((pRegExpr regex_'5cba'5b'2e'3a'5d'28'3f'21'5b'2e'3a'5d'29 >>= withAttribute KeywordTok)) 93 | <|> 94 | (currentContext >>= \x -> guard (x == ("J","sentence")) >> pDefault >>= withAttribute (fromMaybe NormalTok $ lookup ("J","sentence") defaultAttributes))) 95 | 96 | parseRules ("J","comment") = 97 | (currentContext >>= \x -> guard (x == ("J","comment")) >> pDefault >>= withAttribute (fromMaybe NormalTok $ lookup ("J","comment") defaultAttributes)) 98 | 99 | 100 | parseRules x = parseRules ("J","sentence") <|> fail ("Unknown context" ++ show x) 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](jacksjodlogotiny.png) [`jacks` (J-Hacks) README](https://analyzethedatanotthedrivel.org/) 2 | ================================================================================================== 3 | 4 | This repository consolidates all [J language code](http://www.jsoftware.com/) and related files referenced by 5 | [Analyze the Data not the Drivel](https://analyzethedatanotthedrivel.org/). Most of the J[^1] 6 | scripts in this repository were generated from [JOD](https://analyzethedatanotthedrivel.org/the-jod-page/) dictionaries. 7 | 8 | `jacks` has a companion repository `jackshacks` 9 | [https://github.com/bakerjd99/jackshacks](https://github.com/bakerjd99/jackshacks) 10 | that distributes selected J scripts in immediately downloadable [J addon form](https://code.jsoftware.com/wiki/Vocabulary/Libraries). 11 | 12 | For details see blog posts - listed from newest to oldest: 13 | 14 | `[begin-list]` 15 | 16 | 1. [Decoding and Encoding RSV Files with J](https://analyzethedatanotthedrivel.org/2024/01/12/decoding-and-encoding-rsv-files-with-j/) 17 | * [`rsv.ijs`](https://github.com/bakerjd99/jackshacks/blob/main/riseset.ijs) 18 | 19 | 2. [J graphviz’s Euclid’s Elements](https://analyzethedatanotthedrivel.org/2023/06/28/j-graphvizs-euclids-elements/) 20 | * [`eucgvuts.ijs`](https://github.com/bakerjd99/jacks/blob/master/eucgvuts/eucgvuts.ijs) 21 | 22 | 3. [Sympathy for Ptolemaic Epicyclers](https://analyzethedatanotthedrivel.org/2023/04/07/sympathy-for-ptolemaic-epicyclers/) 23 | * [`riseset.ijs`](https://github.com/bakerjd99/jackshacks/blob/main/riseset.ijs) 24 | 25 | 4. Two posts about using SQLite with J see: [`mirrorxref`](https://github.com/bakerjd99/jacks/tree/master/mirrorxref) 26 | * [“Managing” a SQLite Database with J (Part 1)](https://analyzethedatanotthedrivel.org/2022/08/03/managing-a-sqlite-database-with-j-part-1/) 27 | * [“Managing” a SQLite Database with J (Part 2)](https://analyzethedatanotthedrivel.org/2022/08/08/managing-a-sqlite-database-with-j-part-2/) 28 | 29 | 5. [Stupid J Jupyter Tricks](https://analyzethedatanotthedrivel.org/2022/07/24/stupid-j-jupyter-tricks/) 30 | * [`ipynb`](https://github.com/bakerjd99/jacks/tree/master/ipynbfrjod) 31 | 32 | 6. [Branding XMP Sidecar Files with J](https://analyzethedatanotthedrivel.org/2022/07/17/branding-xmp-sidecar-files-with-j/) 33 | * [`brandxmp.ijs`](https://github.com/bakerjd99/jacks/blob/master/brandxmp/brandxmp.ijs) 34 | 35 | 7. [JOD goes into the Arctic Code Vault](https://analyzethedatanotthedrivel.org/2020/08/17/jod-goes-into-the-arctic-code-vault/) 36 | 37 | 8. [Using jodliterate](https://analyzethedatanotthedrivel.org/2020/05/25/using-jodliterate/) 38 | * [`jodliterate`](https://github.com/bakerjd99/jacks/tree/master/jodliterate) 39 | 40 | 9. [More J Pandoc Syntax HighLighting](https://analyzethedatanotthedrivel.org/2020/02/19/more-j-pandoc-syntax-highlighting/) 41 | * [`jpdh.md`](https://github.com/bakerjd99/jacks/tree/master/pandocexamples) 42 | 43 | 10. [NumPy another Iverson Ghost](https://analyzethedatanotthedrivel.org/2018/03/31/numpy-another-iverson-ghost/) 44 | * [`numpyjlove`](https://github.com/bakerjd99/jacks/tree/master/numpyjlove) 45 | 46 | 11. [SWAG a J/EXCEL/GIT Personal Cash Flow Forecasting Mob](https://bakerjd99.wordpress.com/2016/01/10/swag-a-jexcelgit-personal-cash-flow-forecasting-mob/) 47 | * [`swag`](https://github.com/bakerjd99/jacks/tree/master/swag) 48 | 49 | 12. [Parsing the Bitcoin Genesis Block with J](http://bakerjd99.wordpress.com/2014/07/03/parsing-the-bitcoin-genesis-block-with-j/) 50 | * [`bitcoin`](https://github.com/bakerjd99/jacks/tree/master/bitcoin) 51 | 52 | 13. [APL Software Archaeology `.dbi` Edition](http://bakerjd99.wordpress.com/2013/12/26/apl-software-archaeology-dbi-edition/) 53 | * [`dbi`](https://github.com/bakerjd99/jacks/tree/master/dbi) 54 | 55 | 14. [JHS with the DHTMLX Grid](http://bakerjd99.wordpress.com/2012/12/03/jhs-with-the-dhtmlx-grid/) 56 | * [`griddemo`](https://github.com/bakerjd99/jacks/tree/master/griddemo) 57 | 58 | 15. [JHS meets MathJax](http://bakerjd99.wordpress.com/2012/11/25/jhs-meets-mathjax/) 59 | * [`mathjaxdemo`](https://github.com/bakerjd99/jacks/tree/master/mathjaxdemo) 60 | 61 | 16. [Semi-Literate JOD](http://bakerjd99.wordpress.com/2012/10/01/semi-literate-jod/) 62 | * [`jodliterate`](https://github.com/bakerjd99/jacks/tree/master/jodliterate) 63 | 64 | 17. [Pandoc based J Syntax Highlighting](http://bakerjd99.wordpress.com/2012/09/20/pandoc-based-j-syntax-highlighting/) 65 | * [`jodliterate`](https://github.com/bakerjd99/jacks/tree/master/jodliterate) 66 | 67 | 18. [Writing Portable J addons](http://bakerjd99.wordpress.com/2012/07/23/writing-portable-j-addons/) 68 | * [`WritingPortableJaddons.pdf`](https://github.com/bakerjd99/jacks/blob/master/dogpony) 69 | 70 | 19. [Turn your iPhone into a jPhone](http://bakerjd99.wordpress.com/2012/06/23/turn-your-iphone-into-a-jphone-2/) 71 | * [`jPhoneBlogExamples.ijs`](https://github.com/bakerjd99/jacks/blob/master/phones/jPhoneBlogExamples.ijs) 72 | 73 | 20. [GPX from Google Maps KML J Script](http://bakerjd99.wordpress.com/2012/05/16/gpx-from-google-maps-kml-j-script/) 74 | * [`gpxfrmapkml.ijs`](https://github.com/bakerjd99/jacks/blob/master/geotagged/gpxfrmapkml.ijs) 75 | 76 | 21. The next four posts use code from the directory [`texfrwpxml`](https://github.com/bakerjd99/jacks/tree/master/texfrwpxml) 77 | * [WordPress to LaTeX with Pandoc and J: Prerequisites (Part 1)](http://bakerjd99.wordpress.com/2012/02/11/wordpress-to-latex-with-pandoc-and-j-prerequisites-part-1/) 78 | * [WordPress to LaTeX with Pandoc and J: LaTeX Directories (Part 2)](http://bakerjd99.wordpress.com/2012/02/18/wordpress-to-latex-with-pandoc-and-j-latex-directories-part-2-2/) 79 | * [WordPress to LaTeX with Pandoc and J: Using TeXfrWpxml.ijs (Part 3)](http://bakerjd99.wordpress.com/2012/02/25/wordpress-to-latex-with-pandoc-and-j-using-texfrwpxml-ijs-part-3/) 80 | * [Turn your Blog into an eBook](http://bakerjd99.wordpress.com/2012/03/04/turn-your-blog-into-an-ebook/) 81 | 82 | 22. [Typesetting UTF8 APL code with the LaTeX lstlisting package](http://bakerjd99.wordpress.com/2011/08/15/typesetting-utf8-apl-code-with-the-latex-lstlisting-package/) 83 | * [`latex`](https://github.com/bakerjd99/jacks/tree/master/latex) 84 | 85 | 23. [Common Table Expression (CTE) SQLServer Queries with J](http://bakerjd99.wordpress.com/2011/08/13/common-table-expression-cte-sqlserver-queries-with-j/) 86 | * [`sqlstuff`](https://github.com/bakerjd99/jacks/tree/master/sqlstuff) 87 | 88 | 24. [Open Source Hilbert for the Kindle](http://bakerjd99.wordpress.com/2011/07/12/open-source-hilbert-for-the-kindle/) 89 | * [`hilbert`](https://github.com/bakerjd99/jacks/blob/master/hilbert) 90 | 91 | 25. [SmugShot Metadata Mess](http://bakerjd99.wordpress.com/2011/04/03/smugshot-metadata-mess/) 92 | * [`SmugShotFix.ijs`](https://github.com/bakerjd99/jacks/blob/master/smugmug/SmugShotFix.ijs) 93 | 94 | 26. [A C# .Net class for calling J](http://bakerjd99.wordpress.com/2010/05/28/a-c-net-class-for-calling-j/) 95 | * [`jserver`](https://github.com/bakerjd99/jacks/tree/master/jserver) 96 | 97 | 27. [Assigning SmugMug Print Size Keys](http://bakerjd99.wordpress.com/2010/02/21/assigning-smugmug-print-size-keys/) 98 | * [`SmugPrintSizes.ijs`](https://github.com/bakerjd99/jacks/blob/master/smugmug/SmugPrintSizes.ijs) 99 | 100 | 28. [More on SmugMug Duplicates](http://bakerjd99.wordpress.com/2010/02/11/more-on-smugmug-duplicates/) 101 | * [`SmugDupsFrMD5.ijs`](https://github.com/bakerjd99/jacks/blob/master/smugmug/SmugDupsFrMD5.ijs) 102 | 103 | 29. [SmugMug Duplicate Image Hunting](http://bakerjd99.wordpress.com/2010/02/05/smugmug-duplicate-image-hunting/) 104 | * [`SmugDupsFrMD5.ijs`](https://github.com/bakerjd99/jacks/blob/master/smugmug/SmugDupsFrMD5.ijs) 105 | 106 | 30. [Google Earth Image Touring](http://bakerjd99.wordpress.com/2009/10/04/google-earth-image-touring/) 107 | * [`kml.ijs`](https://github.com/bakerjd99/jacks/blob/master/geotagged/kml.ijs) 108 | 109 | 31. [Fake Programming](http://bakerjd99.wordpress.com/2009/09/09/fake-progamming/) 110 | * [`analystgraphs.ijs`](https://github.com/bakerjd99/jacks/blob/master/graphviz/analystgraphs.ijs) 111 | 112 | `[end-list]` 113 | 114 | John Baker 115 | September 6, 2024 116 | 117 | [^1]: Code from other programming languages will appear in `Jacks`. Usually with some relation to J but I am not making 118 | any promises. ["A foolish consistency is the hobgoblin of little minds."](http://dictionary.reference.com/browse/a-foolish-consistency-is-the-hobgoblin-of-little-minds) 119 | -------------------------------------------------------------------------------- /mathjaxdemo/MathJaxDemo.ijs: -------------------------------------------------------------------------------- 1 | NB.*MathJaxDemo s-- use MathJax with JHS. 2 | NB. 3 | NB. This script shows how to use [MathJax](http://www.mathjax.org/) with 4 | NB. JHS. To run this demo do: 5 | NB. 6 | NB. verbatim: 7 | NB. 8 | NB. 1. Place all the demo files in a directory then edit J's (~config/folders.cfg) 9 | NB. and point to this directory. (jpath '~MathJaxDemo') must return the directory. 10 | NB. 11 | NB. 2. Copy (startup_mathjaxdemo_jhs.ijs) to (~config) and rename it to (startup_jhs.ijs) 12 | NB. 13 | NB. 3. Restart JHS and browse to: http://127.0.0.1:65001/MathJaxDemo 14 | NB. 15 | NB. for more details see: 16 | NB. 17 | NB. http://bakerjd99.wordpress.com/2012/11/25/jhs-meets-mathjax/ 18 | NB. 19 | NB. author: John Baker (bakerjd99@gmail.com) 20 | NB. created: 2012nov24 21 | NB. ------------------------------------------------------------------------------ 22 | NB. 13dec20 added to (jacks) GitHub repository 23 | 24 | 25 | NB. format J arrays as HTML tables 26 | require '~MathJaxDemo/htmthorn.ijs' 27 | 28 | coclass 'MathJaxDemo' 29 | coinsert 'jhs' 30 | 31 | 32 | NB.*dependents 33 | 34 | NB. distinguish scopes of MathJaxDemo & JHS words 35 | NB. override (*)=: HBS CSSCORE CSS JS hrtemplate configjax tabledesc 36 | NB. (*)=: MAXWELLEQTEX QUADRATICSOLTEX RAMANUJANTEX CROSSPRODUCTTEX 37 | 38 | NB. context (*)=. jpath jhrajax jhr djaxmath tmjx 39 | 40 | NB. location of MathJaxDemo files 41 | PATHPREFIX=: jpath '~MathJaxDemo/' 42 | 43 | NB. browser get request 44 | jev_get=: create 45 | 46 | NB. create page and send to browser 47 | create=: 3 : 0 48 | 'MathJaxDemo'jhr'' 49 | ) 50 | 51 | 52 | NB. J event handlers 53 | ev_ttable_click=: 3 : 0 54 | tex=.QUADRATICSOLTEX;MAXWELLEQTEX;RAMANUJANTEX;CROSSPRODUCTTEX 55 | jhrajax tmjx (1 1 >. ?5 5)$djaxmath&.> tex 56 | ) 57 | 58 | ev_tquad_click=: 3 : 0 59 | jhrajax tmjx ,. ','treset' jhb 'Reset' 86 | 87 | '


',jhh1 'Typeset with MathJax and J' 88 | configjax 89 | oltypeset'' 90 | 91 | '
',jhh1 'Typeset Random Expression Tables' 92 | tabledesc 93 | '
','ttable' jhb'Typeset Random Expression Array' 94 | '
','restable' jhspan'' 95 | ) 96 | 97 | 98 | NB. redefine template for HTML5 - use MathJax favicon 99 | hrtemplate=: 0 : 0 100 | HTTP/1.1 200 OK 101 | Content-Type: text/html; charset=utf-8 102 | Connection: close 103 | 104 | 105 | 106 | 107 | 108 | <TITLE> 109 | 110 | 113 | 114 | 115 | 116 | 117 | 118 | ) 119 | 120 | 121 | configjax=: 0 : 0 122 | 125 | ) 126 | 127 | 128 | tabledesc=: 0 : 0 129 | Generate random arrays of mathematical expressions and typeset them. This is an extreme use of 130 | MathJax and is intended to guage the system's performance. 131 | ) 132 | 133 | 134 | NB. MathJax LaTex examples 135 | MAXWELLEQTEX=: 0 : 0 136 | \begin{aligned} 137 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 138 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 139 | \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} 140 | ) 141 | 142 | QUADRATICSOLTEX=: 'x = {-b \pm \sqrt{b^2-4ac} \over 2a}' 143 | 144 | RAMANUJANTEX=: 0 : 0 145 | \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 146 | 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} 147 | {1+\frac{e^{-8\pi}} {1+\ldots} } } } 148 | ) 149 | 150 | CROSSPRODUCTTEX=: 0 : 0 151 | \mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} 152 | \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 153 | \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ 154 | \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 155 | \end{vmatrix} 156 | ) 157 | 158 | 159 | NB. override jhs styles 160 | CSSCORE=: '' 161 | 162 | CSS=: 0 : 0 163 | 164 | header{ 165 | background-color: DarkKhaki; 166 | width: 300px; 167 | padding: 5px; 168 | border: 5px solid; 169 | border-radius: 10px; /* round corners */ 170 | margin: left; 171 | font-family: "Helvetica Neue", helvetica, arial, sans-serif; 172 | font-size: 15px; 173 | line-height: 10px; 174 | color: DarkGreen; 175 | overflow: hidden; /* prepare for float clearing */ 176 | } 177 | 178 | nav ul{ 179 | overflow: hidden; 180 | padding: 0; 181 | float: left; 182 | } 183 | 184 | nav ul li:before { 185 | content: '\2022 '; /* Unicode bullet symbol */ 186 | color: DarkKhaki; /* bullet color */ 187 | padding-right: 0em; 188 | } 189 | 190 | nav li{ 191 | float: left; 192 | list style: none; 193 | color: black; 194 | list-style-type: none; 195 | background-color: DarkKhaki ; 196 | } 197 | 198 | nav a{ 199 | display: block; /* required for paddding */ 200 | padding: 8px; 201 | margin-right: 5px; 202 | border-radius: 10px; /* round corners */ 203 | background-color: Beige; 204 | color: DarkGreen; 205 | text-decoration: none; /* no underline on links */ 206 | } 207 | 208 | nav a:hover{ 209 | background-color: Gold; 210 | color: Indigo; 211 | } 212 | 213 | nav a:active{margin-top; 1px;} /* nudge down when pressed */ 214 | 215 | 216 | /* default (thh) style - used by (thh) monad */ 217 | .jarray {font-family:monospace; color: blue} 218 | 219 | table.jarray {border-collapse:collapse;} 220 | table.jarray td {border:solid black thin; vertical-align:top; padding:0.4em;} 221 | table.jarray tr.spacer td {border:none;} 222 | 223 | ) 224 | 225 | 226 | NB. javascript event handlers 227 | JS=: 0 : 0 228 | 229 | function ev_ttable_click(){jdoajax([],"");} 230 | function ev_tquad_click(){jdoajax([],"");} 231 | function ev_tmaxwell_click(){jdoajax([],"");} 232 | function ev_tramaujan_click(){jdoajax([],"");} 233 | function ev_tcrossprod_click(){jdoajax([],"");} 234 | function ev_treset_click(){jdoajax([],"");} 235 | 236 | function ev_ttable_click_ajax(ts){jbyid("restable").innerHTML=ts[0]; MathJax.Hub.Typeset();} 237 | function ev_tquad_click_ajax(ts){jbyid("resquad").innerHTML=ts[0]; MathJax.Hub.Typeset();} 238 | function ev_tmaxwell_click_ajax(ts){jbyid("resmaxwell").innerHTML=ts[0]; MathJax.Hub.Typeset();} 239 | function ev_tramaujan_click_ajax(ts){jbyid("resramaujan").innerHTML=ts[0]; MathJax.Hub.Typeset();} 240 | function ev_tcrossprod_click_ajax(ts){jbyid("rescrossprod").innerHTML=ts[0]; MathJax.Hub.Typeset();} 241 | 242 | function ev_treset_click_ajax(ts){ 243 | jbyid("restable").innerHTML=ts[0]; 244 | jbyid("resquad").innerHTML=ts[0]; 245 | jbyid("resmaxwell").innerHTML=ts[0]; 246 | jbyid("resramaujan").innerHTML=ts[0]; 247 | jbyid("rescrossprod").innerHTML=ts[0]; 248 | } 249 | 250 | ) 251 | NB.*end-header 252 | 253 | NB. MathJax LaTeX display math 254 | djaxmath=:'$$' , '$$' ,~ ] 255 | 256 | NB. generate MathJaxDemo header navigation links 257 | navul=:3 : '''page navigation links - override in header''' 258 | 259 | 260 | oltypeset=:3 : 0 261 | 262 | NB.*oltypeset v-- generate ordered list of typeset buttons. 263 | NB. 264 | NB. monad: clHTML5 =. oltypeset uuIgnore 265 | 266 | NB. jhs !(*)=. jhb 267 | 268 | t=. '
  1. ',('tquad' jhb 'Quadratic Solution'),'
  2. ' 269 | t=. t,'
  3. ',('tmaxwell' jhb 'Maxwell''s Equations'),'
  4. ' 270 | t=. t,'
  5. ',('tramaujan' jhb 'Ramaujan Identity'),'
  6. ' 271 | t,'
  7. ',('tcrossprod' jhb 'Cross Product'),'
' 272 | ) 273 | 274 | NB. suppress default (thh) style 275 | tmjx=:0&thh_htmthorn_ -------------------------------------------------------------------------------- /eucgvuts/euclid_i_47_dependencies.gv: -------------------------------------------------------------------------------- 1 | // Elements Books I-VI proposition dependencies 2 | // 3 | // Graph connections generated from extracting 4 | // justifications from David Joyce's online elements. 5 | // https://mathcs.clarku.edu/~djoyce/elements/elements.html 6 | // 7 | // First six books selected because they are the only 8 | // books found in Oliver Byrne’s 1847 illustrated Elements 9 | // https://www.c82.net/euclid/ 10 | // 11 | // 2023jun21 created 12 | // changed -------------------------------------- 13 | // 23jun23 terminal nodes colored, definitions linked 14 | // 23jun28 simplified for (fmteucgv) 15 | 16 | digraph G { 17 | 18 | rankdir=TB; //top to bottom 19 | //B bottom T top L left R right 20 | 21 | labelloc="t" 22 | 23 | label=<Proposition I.47 Dependencies>; 24 | 25 | ordering=out; 26 | fontsize="16"; 27 | 28 | node [shape=oval]; 29 | node [style=filled, fillcolor=lightyellow]; 30 | edge [color=green]; 31 | 32 | //===start-node-attributes 33 | 34 | // postulates 35 | "Post.1" [fillcolor=lightblue, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/post1.html"]; 36 | "Post.2" [fillcolor=lightblue, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/post2.html"]; 37 | "Post.3" [fillcolor=lightblue, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/post3.html"]; 38 | "Post.4" [fillcolor=lightblue, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/post4.html"]; 39 | "Post.5" [fillcolor=lightblue, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/post5.html"]; 40 | 41 | // common notions 42 | "C.N" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 43 | "C.N.1" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 44 | "C.N.2" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 45 | "C.N.3" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 46 | "C.N.4" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 47 | "C.N.5" [fillcolor=darksalmon, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/cn.html"]; 48 | 49 | // definitions 50 | "I.Def.22" [fillcolor=greenyellow URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI22.html"]; 51 | "I.Def.15" [fillcolor=greenyellow, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI15.html"]; 52 | "I.Def.20" [fillcolor=greenyellow URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI20.html"]; 53 | "I.Def.10" [fillcolor=greenyellow, URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI10.html"]; 54 | "I.Def.23" [fillcolor=greenyellow URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI23.html"]; 55 | "I.Def.16" [fillcolor=greenyellow URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/defI15.html"]; 56 | 57 | // corollaries 58 | 59 | // propositions 60 | "I.47" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI47.html"]; 61 | "I.4" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI4.html"]; 62 | "I.14" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI14.html"]; 63 | "I.31" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI31.html"]; 64 | "I.41" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI41.html"]; 65 | "I.46" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI46.html"]; 66 | "I.3" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI3.html"]; 67 | "I.11" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI11.html"]; 68 | "I.13" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI13.html"]; 69 | "I.23" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI23.html"]; 70 | "I.27" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI27.html"]; 71 | "I.29" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI29.html"]; 72 | "I.34" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI34.html"]; 73 | "I.37" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI37.html"]; 74 | "I.1" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI1.html"]; 75 | "I.2" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI2.html"]; 76 | "I.8" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI8.html"]; 77 | "I.15" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI15.html"]; 78 | "I.16" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI16.html"]; 79 | "I.22" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI22.html"]; 80 | "I.26" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI26.html"]; 81 | "I.35" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI35.html"]; 82 | "I.7" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI7.html"]; 83 | "I.10" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI10.html"]; 84 | "I.20" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI20.html"]; 85 | "I.5" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI5.html"]; 86 | "I.9" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI9.html"]; 87 | "I.19" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI19.html"]; 88 | "I.18" [URL="https://mathcs.clarku.edu/~djoyce/elements/bookI/propI18.html"]; 89 | 90 | // terminal nodes 91 | "I.47" [fillcolor=gold]; 92 | 93 | //===end=node-attributes 94 | 95 | //===start-book-deps 96 | "I.46" -> "I.47"; 97 | "I.31" -> "I.47"; 98 | "Post.1" -> "I.47"; 99 | "I.Def.22" -> "I.47"; 100 | "I.14" -> "I.47"; 101 | "Post.4" -> "I.47"; 102 | "C.N.2" -> "I.47"; 103 | "I.4" -> "I.47"; 104 | "I.41" -> "I.47"; 105 | "C.N.4" -> "I.4"; 106 | "Post.2" -> "I.14"; 107 | "I.13" -> "I.14"; 108 | "Post.4" -> "I.14"; 109 | "C.N.1" -> "I.14"; 110 | "C.N.3" -> "I.14"; 111 | "Post.1" -> "I.31"; 112 | "I.23" -> "I.31"; 113 | "Post.2" -> "I.31"; 114 | "I.27" -> "I.31"; 115 | "Post.1" -> "I.41"; 116 | "I.37" -> "I.41"; 117 | "I.34" -> "I.41"; 118 | "I.11" -> "I.46"; 119 | "I.3" -> "I.46"; 120 | "I.31" -> "I.46"; 121 | "I.34" -> "I.46"; 122 | "I.29" -> "I.46"; 123 | "Post.4" -> "I.46"; 124 | "I.Def.22" -> "I.46"; 125 | "I.2" -> "I.3"; 126 | "Post.3" -> "I.3"; 127 | "I.Def.15" -> "I.3"; 128 | "C.N.1" -> "I.3"; 129 | "I.3" -> "I.11"; 130 | "I.1" -> "I.11"; 131 | "Post.1" -> "I.11"; 132 | "I.Def.20" -> "I.11"; 133 | "I.8" -> "I.11"; 134 | "I.Def.10" -> "I.11"; 135 | "I.Def.10" -> "I.13"; 136 | "I.11" -> "I.13"; 137 | "C.N.2" -> "I.13"; 138 | "C.N.1" -> "I.13"; 139 | "Post.1" -> "I.23"; 140 | "I.22" -> "I.23"; 141 | "I.8" -> "I.23"; 142 | "I.16" -> "I.27"; 143 | "I.Def.23" -> "I.27"; 144 | "I.13" -> "I.29"; 145 | "Post.5" -> "I.29"; 146 | "I.15" -> "I.29"; 147 | "C.N.1" -> "I.29"; 148 | "C.N.2" -> "I.29"; 149 | "I.29" -> "I.34"; 150 | "I.26" -> "I.34"; 151 | "C.N.2" -> "I.34"; 152 | "I.4" -> "I.34"; 153 | "Post.2" -> "I.37"; 154 | "I.31" -> "I.37"; 155 | "I.35" -> "I.37"; 156 | "I.34" -> "I.37"; 157 | "C.N" -> "I.37"; 158 | "Post.3" -> "I.1"; 159 | "Post.1" -> "I.1"; 160 | "I.Def.15" -> "I.1"; 161 | "C.N.1" -> "I.1"; 162 | "I.Def.20" -> "I.1"; 163 | "Post.1" -> "I.2"; 164 | "I.1" -> "I.2"; 165 | "Post.2" -> "I.2"; 166 | "Post.3" -> "I.2"; 167 | "I.Def.15" -> "I.2"; 168 | "C.N.3" -> "I.2"; 169 | "C.N.1" -> "I.2"; 170 | "I.7" -> "I.8"; 171 | "C.N.4" -> "I.8"; 172 | "I.13" -> "I.15"; 173 | "Post.4" -> "I.15"; 174 | "C.N.1" -> "I.15"; 175 | "C.N.3" -> "I.15"; 176 | "I.10" -> "I.16"; 177 | "Post.1" -> "I.16"; 178 | "Post.2" -> "I.16"; 179 | "I.3" -> "I.16"; 180 | "I.15" -> "I.16"; 181 | "I.4" -> "I.16"; 182 | "C.N.5" -> "I.16"; 183 | "I.20" -> "I.22"; 184 | "Post.2" -> "I.22"; 185 | "I.3" -> "I.22"; 186 | "Post.3" -> "I.22"; 187 | "Post.1" -> "I.22"; 188 | "I.Def.16" -> "I.22"; 189 | "C.N.1" -> "I.22"; 190 | "I.3" -> "I.26"; 191 | "Post.1" -> "I.26"; 192 | "I.4" -> "I.26"; 193 | "C.N.1" -> "I.26"; 194 | "I.16" -> "I.26"; 195 | "I.34" -> "I.35"; 196 | "C.N.1" -> "I.35"; 197 | "C.N.2" -> "I.35"; 198 | "I.29" -> "I.35"; 199 | "I.4" -> "I.35"; 200 | "C.N.3" -> "I.35"; 201 | "Post.1" -> "I.7"; 202 | "I.5" -> "I.7"; 203 | "C.N.5" -> "I.7"; 204 | "C.N" -> "I.7"; 205 | "I.1" -> "I.10"; 206 | "I.9" -> "I.10"; 207 | "I.Def.20" -> "I.10"; 208 | "I.4" -> "I.10"; 209 | "Post.2" -> "I.20"; 210 | "I.3" -> "I.20"; 211 | "Post.1" -> "I.20"; 212 | "I.5" -> "I.20"; 213 | "C.N.5" -> "I.20"; 214 | "I.19" -> "I.20"; 215 | "I.Def.20" -> "I.5"; 216 | "Post.2" -> "I.5"; 217 | "I.3" -> "I.5"; 218 | "Post.1" -> "I.5"; 219 | "I.4" -> "I.5"; 220 | "C.N.3" -> "I.5"; 221 | "I.3" -> "I.9"; 222 | "Post.1" -> "I.9"; 223 | "I.1" -> "I.9"; 224 | "I.Def.20" -> "I.9"; 225 | "I.8" -> "I.9"; 226 | "I.5" -> "I.19"; 227 | "I.18" -> "I.19"; 228 | "I.3" -> "I.18"; 229 | "Post.1" -> "I.18"; 230 | "I.16" -> "I.18"; 231 | "I.5" -> "I.18"; 232 | //===end-book-deps 233 | 234 | } --------------------------------------------------------------------------------