diff --git a/articles/demo.md b/articles/demo.md new file mode 100644 index 0000000..381dea3 --- /dev/null +++ b/articles/demo.md @@ -0,0 +1,110 @@ +# markdown demo +> markdown渲染成HTML的插件 + + +```js +function func(a, b) { + return a + b +} +``` + +## [katex](https://katex.org/) + +- [js katex api ](https://katex.org/docs/api) +- [支持格式](https://katex.org/docs/support_table) + +$$ +a^2=b^2+c^2 +$$ + +This is inline katex: + +$ c = \\pm\\sqrt{ a^2 + b^2 } $ + +This is block level katex: + +$$ +c = \\pm\\sqrt{a^2 + b^2} +$$ + +$$ +\\begin{array}{cc} + a & b \\\\ + c & d +\\end{array} +$$ + +$$ +\\begin{array}{cc} +1 & 2 & 3 \\\\ +4 & 5 & 6 \\\\ +7 & 8 & 9 +\\end{array} +$$ + +[maths symbols for latex](https://mirrors.jlu.edu.cn/CTAN/info/symbols/math/maths-symbols.pdf) + +## [alert](https://github.com/bent10/marked-extensions/tree/main/packages/alert) +- [Enables GFM alerts](https://github.com/orgs/community/discussions/16925) + +> [!NOTE] +> Highlights information that users should take into account, even when skimming. + +> [!TIP] +> Optional information to help a user be more successful. + +> [!IMPORTANT] +> Crucial information necessary for users to succeed. + +> [!WARNING] +> Critical content demanding immediate user attention due to potential risks. + +> [!CAUTION] +> Negative potential consequences of an action. + +> **Note** +> This is a note + +> **Warning** +> This is a warning + +## table + +- **table one** + +| This header spans two || Header A | +| columns *and* two rows ^|| Header B | +|-------------|------------|----------| +| Cell A | Cell B | Cell C | + +- **table two** + +| H1 | H2 | +|--------------|---------| +| This cell | Cell A | +| spans three ^| Cell B | +| rows ^| Cell C | + +- table three + +| H1 | H2 | H3 | +|---------|---------|---------| +| This cell spans 3 columns ||| + +- table four + +| Syntax | Description | Test Text | +| :--- | :----: | ---: | +| Header | Title | Here's this | +| Paragraph | Text | And more | + + +## 其他 + +- [A WYSIWYG Markdown editor, improve reading and editing experience. and generate your Markdown files into online documents in the easiest and fastest way一个所见即所得的 Markdown 桌面编辑器,集成了 Mermaid 图形与 Katex 公式,支持明亮和暗黑风格。](https://github.com/1943time/bluestone) + +[Marked Documentation](https://marked.js.org/) + +- [marked github](https://github.com/markedjs/marked) +- [demo可下载发布后的文件](https://marked.js.org/demo/) +- [marked插件 github](https://github.com/bent10/marked-extensions) \ No newline at end of file diff --git a/articles/others/markdown.md b/articles/others/markdown.md deleted file mode 100644 index 7091a0b..0000000 --- a/articles/others/markdown.md +++ /dev/null @@ -1,37 +0,0 @@ -# Markdown -## 矩阵 - -$$ -\begin{martix} -1 & 2 & 3 \\ -4 & 5 & 6 \\ -7 & 8 & 9 -\end{matrix} \tag{1} -$$ - -$$\left\{ -\begin{martix} -1 & 2 & 3 \\ -4 & 5 & 6 \\ -7 & 8 & 9 -\end{matrix} -\right\} \tag{2}$$ - -$\left 1 2 3 4 5 6 7 8 9 \right$ - -[maths symbols for latex](https://mirrors.jlu.edu.cn/CTAN/info/symbols/math/maths-symbols.pdf) - -[markdown library document](https://marked.js.org/) - -## table - -| Syntax | Description | Test Text | -| :--- | :----: | ---: | -| Header | Title | Here's this | -| Paragraph | Text | And more | - -## 其他 - -- [A WYSIWYG Markdown editor, improve reading and editing experience. and generate your Markdown files into online documents in the easiest and fastest way一个所见即所得的 Markdown 桌面编辑器,集成了 Mermaid 图形与 Katex 公式,支持明亮和暗黑风格。](https://github.com/1943time/bluestone) - -# [Marked Documentation](https://marked.js.org/) \ No newline at end of file diff --git a/cpl/cplusplus.md b/cpl/cplusplus.md index a1e3227..b72324f 100644 --- a/cpl/cplusplus.md +++ b/cpl/cplusplus.md @@ -283,6 +283,7 @@ base + sizeof * 偏移量,数组指针好像就是这样的,用*(a+b)访 - [Software optimization resources,涉及很多底层的技术和文档,值得去看看](https://www.agner.org/optimize/#manuals) - [Calling conventions for different C++ compilers and operating systems](https://www.agner.org/optimize/calling_conventions.pdf),更新到2023年的技术 - [微软出品C++下一代的多态Proxy: Next Generation Polymorphism in C++](https://github.com/microsoft/proxy) +- [反射库refl-cpp is a header-only library which provides compile-time reflection and introspection capabilities to C++](https://github.com/veselink1/refl-cpp) ### 工具 diff --git a/cpl/js/regularExpressions.js b/cpl/js/regularExpressions.js index 5c91705..5505746 100644 --- a/cpl/js/regularExpressions.js +++ b/cpl/js/regularExpressions.js @@ -13,22 +13,26 @@ const re4 = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i; * @deprecated RegExp.$1这种方式已经废弃了 */ const re4a = /(\w+)@(\w+)\.(\w+)(\.\w+)?/i; +// 匹配特殊字符 +const re5 = /[$]+/g; // 匹配一次 +const re5a = /[$]{2,4}/g; // 匹配一次 +const re5b = /\$\${2,}/g; // 匹配一次 // let str1 = 'abc123'; // console.log(1, 'match', '1', str1.match(re1), '2', str1.match(re2)); // console.log(2, 'replace', '1', str1.replace(re1,''), '2', str1.replace(re2, '')); -let str3 = '我得数字1', str3a = '11汉字', str3b = '11汉字aa', str3c = 'bb11汉字aa'; -console.log(3, re3.test(str3), str3.match(re3), re3.test(str3a), str3a.match(re3)) -if (re3a.test(str3)) { - console.log(3, RegExp.$1, RegExp.$2); -} -if (re3a.test(str3a)) { - console.log('3a',RegExp.$1, RegExp.$2); -} -console.log('3b', str3.replace(re3b, ''), str3a.replace(re3b,'')); -console.log('3b', str3b.replace(re3c, ''), str3b.replace(re3c,'')); -console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); +// let str3 = '我得数字1', str3a = '11汉字', str3b = '11汉字aa', str3c = 'bb11汉字aa'; +// console.log(3, re3.test(str3), str3.match(re3), re3.test(str3a), str3a.match(re3)) +// if (re3a.test(str3)) { +// console.log(3, RegExp.$1, RegExp.$2); +// } +// if (re3a.test(str3a)) { +// console.log('3a',RegExp.$1, RegExp.$2); +// } +// console.log('3b', str3.replace(re3b, ''), str3a.replace(re3b,'')); +// console.log('3b', str3b.replace(re3c, ''), str3b.replace(re3c,'')); +// console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); // let str4 = 'a@b.com', str4a = 'a.b.com'; // console.log(4, str4.match(re4), str4a.match(re4)); @@ -37,4 +41,12 @@ console.log('3b', str3c.replace(re3c, ''), str3c.replace(re3c,'')); // } // if (re4a.test(str4a)) { // console.log('4a2', RegExp.$1, RegExp.$2, RegExp.$3); -// } \ No newline at end of file +// } + +let str5 = '$a=b+c$', str5a = `$$ +a = b + c; +$$`; +console.log(5, re5.test(str5), re5a.test(str5), re5b.test(str5)); +console.log('5a', re5.test(str5a), re5a.test(str5a), re5b.test(str5a)); +console.log('5b', str5.match(re5), str5.match(re5a), str5.match(re5b)); +console.log('5b1', str5a.match(re5), str5a.match(re5a), str5a.match(re5b)); \ No newline at end of file diff --git a/dev-note/index.md b/dev-note/index.md index 083d866..091db1b 100644 --- a/dev-note/index.md +++ b/dev-note/index.md @@ -1,5 +1,6 @@ # dev-note +- [nodejs包管理](/web/pkg.md) - [git](/dev-note/git.md) - [cmake](/dev-note/cmake.md) - [linux](/dev-note/linux.md) @@ -11,7 +12,6 @@ - [build System](/dev-note/buildSystem.md) - [debug](/dev-note/debug.md) - [powershell](/dev-note/powershell.md) -- [nodejs包管理](/web/pkg.md) - [包管理C++](/dev-note/pkg.md) - [maven](/dev-note/maven.md) diff --git a/html/mathjax.config.js b/html/mathjax.config.js index 6e98efc..61cd6bd 100644 --- a/html/mathjax.config.js +++ b/html/mathjax.config.js @@ -21,7 +21,7 @@ window.MathJax = { (function () { var script = document.createElement('script'); script.id = 'MathJax-script'; - script.src = './es5/tex-chtml-full.js'; + script.src = '../libs/mathjax.es5/tex-chtml-full.js'; script.async = true; document.head.appendChild(script); })(); \ No newline at end of file diff --git a/html/pinyin.html b/html/pinyin.html index 41e6997..60323a1 100644 --- a/html/pinyin.html +++ b/html/pinyin.html @@ -3,7 +3,7 @@ Depth to View - +