Skip to content

Instantly share code, notes, and snippets.

View kubaPod's full-sized avatar

Kuba Podkalicki kubaPod

View GitHub Profile
@kubaPod
kubaPod / Preferences.m
Created June 21, 2022 07:09
My personal configuration for a fresh Mathematica installation. Run it step by step in case our preferences differ.
(* ::Package:: *)
(* ::Section:: *)
(*Preferences*)
CurrentValue[$FrontEnd,"NotebooksMenuHistoryLength"]=25
(* ::Subsection:: *)
@kubaPod
kubaPod / DateTimeFormFunction.md
Last active December 28, 2020 11:19
How to use native datetime (datetime-local) input as Wolfram Mathematica / Wolfram Cloud FormFunction field's control (as opposed to a smart input field).


FormFunction[{
  "date" -> <|
    "Interpreter" -> "String",
    "Control"     -> Function @ EmbeddedHTML @ StringTemplate[
        "<input type='datetime-local' id='id_`1`', name='`1`' value=`2` step='1'>"
     ]["date", DateString["ISODateTime"] ]
 |&gt;
@kubaPod
kubaPod / Vue nested v-model component snippet.md
Last active December 22, 2020 07:10
A tldr; template or VSCode template

Disclaimer: I am learning

This answers a question, how to create a component that takes v-model prop can pass that prop further down.

v-model='var' is :value='var' @input='new => {var=new}' so it needs to have value prop and emit input event. But if we want to pass it down we need a localVar which can be mutated because properties can't. (unless they are objects or arrays which are passed by reference in JS but this should not be abused to not obsucre the flow)

Based on Using v-model on Nested Vue Components you should use:

<|
"b3m2a1" -> {"mathematica-BTools"},
"CarlWoll" -> {"MatrixD", "Stack-Exchange-Stylesheet", "TensorSimplify", "DifferentialOperator"},
"cekdahl" -> {"jSoupLink", "wl-wordpress-xmlrpc-client", "OBJImporter"},
"kubapod" -> {"MPM", "M2MD", "DevTools", "WLForms", "MoreUI", "MGUI", "Meh" "MVue", "MoreCalculus", "PreciseTracking"},
"szhorvat" -> {"IGraphM", "MaTeX"},
"tpfto" -> {"Carlson", "MoleculeViewer", "Wright", "CMLConvert"},
"WolframResearch" -> {"FEMAddOns", "GitLink", "RhinoLink"}
|>
@kubaPod
kubaPod / Robust TabView.md
Last active June 8, 2018 13:11
Controlling dynamic view in TabView/PaneSelector/MenuView and similar cell expressions