User:Xenwolf/SandBox: Difference between revisions

Xenwolf (talk | contribs)
Xenwolf (talk | contribs)
 
(20 intermediate revisions by the same user not shown)
Line 46: Line 46:
* [https://www.mediawiki.org/wiki/Topic:T7po6uisor9f7nz0 {{NUMBEROFACTIVEUSERS}} remains stuck at 0 on Project:Support desk]
* [https://www.mediawiki.org/wiki/Topic:T7po6uisor9f7nz0 {{NUMBEROFACTIVEUSERS}} remains stuck at 0 on Project:Support desk]
* [https://phabricator.wikimedia.org/T140079 ⚓ T140079 {{NUMBEROFACTIVEUSERS}} doesn’t get updated when $wgMiserMode = false]
* [https://phabricator.wikimedia.org/T140079 ⚓ T140079 {{NUMBEROFACTIVEUSERS}} doesn’t get updated when $wgMiserMode = false]
== Proposal: Shorten editing titles ==
When using tabbed browsing, long identical prefixes (like ''Editing '') in titles make it hard to differentiate tabs of wiki pages currently being edited.
{| class="wikitable"
! system message
! predefined text
! suggested text
|-
| [[MediaWiki:Editingcomment]]
| Editing $1 (new section)
| ✎ $1 (new section)
|-
| [[MediaWiki:Editing]]
| Editing $1
| ✎ $1
|-
| [[MediaWiki:Editingsection]]
| Editing $1 (section)
| ✎ $1 (section)
|}


== Testing [[User:Xenwolf/Template:Primes in EDO]] ==
== Testing [[User:Xenwolf/Template:Primes in EDO]] ==
Line 76: Line 54:


This (or something similar) could be transformed into a subst template now. See [[Wikipedia: Help:Substitution]] for more on substitution.
This (or something similar) could be transformed into a subst template now. See [[Wikipedia: Help:Substitution]] for more on substitution.
== Testing [[Template:Primes in edo]] ==
{{Primes in edo|columns=9|23}}
{{Primes in edo|columns=9|26}}
{{Primes in edo|columns=9|37}}


== Testing [[Template:Signed]] ==
== Testing [[Template:Signed]] ==
Line 84: Line 68:
* {{signed|-0.5}}
* {{signed|-0.5}}
* {{signed|-5}}
* {{signed|-5}}
== Testing [[User:Xenwolf/Template:EDOs]] ==
I evaluate option(s) to only generate links to existing pages as a feature of [[Template:EDOs]]. Answer: No.
{{User:Xenwolf/Template:EDOs|101, 1001, and 123xy, even 000}}
* done: leading zeros removed
{{#ifexist: 101edo | [[101edo{{!}}101]] | 101edo}}
{{#ifexist: 1001edo | [[1001edo]] | 1001edo}}
* hard to do: existence checks
** <code>#ifexist</code> is evaluated before <code>#regex</code>
** expensive (see [[mw: Help:Extension:ParserFunctions ##ifexist]])
== Testing template arguments ==
[[User:Arseniiv/TodoTest]] ist used to generate the text (and auto-categorization) of the following sections.
The visual design is completely left out, but a variable list of (up to 7) positional arguments is supported as well as an optional named argument without auto-categorization.
=== no argument ===
{{User:Arseniiv/TodoTest}}
=== one argument ===
{{User:Arseniiv/TodoTest|expand}}
=== multiple arguments ===
{{User:Arseniiv/TodoTest|add color name|expand|unify precision}}
=== saturated argument ===
{{User:Arseniiv/TodoTest|add color name|expand|cleanup|add example|improve layout|unify precision|review|read}}
=== additional comment ===
{{User:Arseniiv/TodoTest|unify precision|comment=An occasionally appearing surplus decimal place <code>5</code> gives a deceptive impression of higher accuracy.}}
=== new category (useful byproduct?) ===
{{User:Arseniiv/TodoTest|unify precision|simplify writing style|description=This page reads like a scientific paper not like a wiki page}}


== Testing factor notation ==
== Testing factor notation ==
Line 193: Line 138:


* [https://css-tricks.com/almanac/properties/v/visibility/ visibility &#124; CSS&#45;Tricks]
* [https://css-tricks.com/almanac/properties/v/visibility/ visibility &#124; CSS&#45;Tricks]
== ImageMap ==
[[File:Jacob Collier with a Kite Guitar 6-26-19.jpg|thumb|200px|the image being used]]
This is just a short check, not an elaborated example, that's why I use only rectangles, not polygons to surround people and guitar. Also the positions are all but exact.
<imagemap>
File:Jacob Collier with a Kite Guitar 6-26-19.jpg|400x300px|thumb|center|some text as description
rect 300 50 460 500 [[Kite Giedraitis]]
rect 460 50 700 700 [[Jacob Collier]]
rect 700 100 850 700 [[Aaron Wolf]]
rect 850 100 1500 700 [[Caleb Ramsey]]
rect 200 400 400 900 [[Kite Guitar]]
default [[:File:Jacob Collier with a Kite Guitar 6-26-19.jpg|Image description page ...]]
# desc bottom-right
</imagemap>
<imagemap>
File:Jacob Collier with a Kite Guitar 6-26-19.jpg|400x300px|some text as description
rect 300 50 460 500 [[Kite Giedraitis]]
rect 460 50 700 700 [[Jacob Collier]]
rect 700 100 850 700 [[Aaron Wolf]]
rect 850 100 1500 700 [[Caleb Ramsey]]
rect 200 400 400 900 [[Kite Guitar]]
default [[:File:Jacob Collier with a Kite Guitar 6-26-19.jpg|Image description page ...]]
desc bottom-left
</imagemap>
Image maps kind of work, but the there is something wrong with the info icon. Also the appearance on [[Special:Version]] is a bit strange, there is '''no version information for ImageMap'''. I'd guess there is a bad interference with EmbedVideo. Also, when using it with thumb or frame, there is no icon in the description (as is observable with all images on this wiki).
== Color notation map ==
<imagemap>
File:Lattice32.png
# yellow
circle 185 36 33 [[10/9]]
circle 378 36 33 [[5/3]]
circle 570 36 33 [[5/4]]
circle 763 36 33 [[15/8]]
# brown
circle 281 95 33 [[40/21]]
circle 474 95 33 [[10/7]]
circle 666 95 33 [[15/14]]
# blue
circle 185 145 33 [[14/9]]
circle 378 145 33 [[7/6]]
circle 570 145 33 [[7/4]]
circle 763 145 33 [[21/16]]
# white
circle 89 205 33 [[16/9]]
circle 281 205 33 [[4/3]]
circle 474 205 33 [[1/1]]
circle 666 205 33 [[3/2]]
circle 859 205 33 [[9/8]]
# red
circle 185 263 33 [[32/21]]
circle 378 263 33 [[8/7]]
circle 570 263 33 [[12/7]]
circle 763 263 33 [[9/7]]
# cyan
circle 281 313 33 [[28/15]]
circle 474 313 33 [[7/5]]
circle 666 313 33 [[21/20]]
# green
circle 185 373 33 [[16/15]]
circle 378 373 33 [[8/5]]
circle 570 373 33 [[6/5]]
circle 763 373 33 [[9/5]]
default [[File:Lattice32.png]]
desc none
</imagemap>
== links to same page ==
[[User:Xenwolf/SandBox|(selflink)]] [[User:Xenwolf]]
== Flag Emojis ==
https://emojipedia.org/flags/
{| class="wikitable sortable"
|+ Some Example Flags
! Emoji || 1st part || 2nd part
|-
| 🇷🇺 || 🇷 U+1F1F7 || 🇺 U+1F1FA
|-
| 🇬🇧 || 🇬 U+1F1EC || 🇧 U+1F1E7
|-
| 🇻🇪  || 🇻 U+1F1FB || 🇪 U+1F1EA
|-
| 🇫🇷  || 🇫 U+1F1EB || 🇷 U+1F1F7
|-
| 🇸🇪  || 🇸 U+1F1F8 || 🇪 U+1F1EA
|-
| 🇳🇴  || 🇳 U+1F1F3 || 🇴 U+1F1F4
|-
| 🇦🇺  || 🇦 U+1F1E6 || 🇺 U+1F1FA
|-
| 🇦🇹  || 🇦 U+1F1E6 || 🇹 U+1F1F9
|-
| 🇩🇪  || 🇩 U+1F1E9 || 🇪 U+1F1EA
|-
| 🇨🇳  || 🇨 U+1F1E8 || 🇳 U+1F1F3
|-
| 🇺🇳 || 🇺 U+1F1FA || 🇳 U+1F1F3
|-
| 🇺🇸  || 🇺 U+1F1FA || 🇸 U+1F1F8
|-
| 🇮🇹  || 🇮 U+1F1EE || 🇹 U+1F1F9
|-
| 🇪🇸  || 🇪 U+1F1EA || 🇸 U+1F1F8
|-
| 🇯🇵  || 🇯 U+1F1EF || 🇵 U+1F1F5
|-
| 🇨🇱  || 🇨 U+1F1E8 || 🇱 U+1F1F1
|-
| 🇪🇺  || 🇪 U+1F1EA || 🇺 U+1F1FA
|}
In Unicode, these icons are displayed for valid combinations of [[Wikipedia: Regional indicator symbol| Regional indicator symbol]]s.
{| class="wikitable"
|+ Regional indicator symbols
|-
! Icon || Code point
|-
| 🇦 || U+1F1E6
|-
| 🇧 || U+1F1E7
|-
| 🇨 || U+1F1E8
|-
| 🇩 || U+1F1E9
|-
| 🇪 || U+1F1EA
|-
| 🇫 || U+1F1EB
|-
| 🇬 || U+1F1EC
|-
| 🇭 || U+1F1ED
|-
| 🇮 || U+1F1EE
|-
| 🇯 || U+1F1EF 
|-
| 🇰 || U+1F1F0
|-
| 🇱 || U+1F1F1
|-
| 🇲 || U+1F1F2
|-
| 🇳 || U+1F1F3
|-
| 🇴 || U+1F1F4
|-
| 🇵 || U+1F1F5
|-
| 🇶 || U+1F1F6
|-
| 🇷 || U+1F1F7
|-
| 🇸 || U+1F1F8
|-
| 🇹 || U+1F1F9
|-
| 🇺 || U+1F1FA
|-
| 🇻 || U+1F1FB
|-
| 🇼 || U+1F1FC
|-
| 🇽 || U+1F1FD
|-
| 🇾 || U+1F1FE
|-
| 🇿 || U+1F1FF
|}
== Calculate EDO props for boilerplate code ==
For boilerplates:
<code><nowiki>{{subst:#regex:{{subst:PAGENAME}}|/(\S+)\/(\S+)/|\1-\2}}</nowiki></code>
; Steps from page name:
Codes:
* <code><nowiki>{{#regex:12edo|/(\d+)-?EDO/i|\1}}</nowiki></code>
* <code><nowiki>{{#regex:13-EDO|/(\d+)-?EDO/i|\1}}</nowiki></code>
Results:
* {{#regex:12edo|/(\d+)-?EDO/i|\1}}
* {{#regex:13-EDO|/(\d+)-?EDO/i|\1}}
; Step size from page name:
Codes:
* <code><nowiki>{{#number_format:{{#expr:1200/{{#regex:12edo|/(\d+)-?EDO/i|\1}}}}|3}}</nowiki></code>
* <code><nowiki>{{#number_format:{{#expr:1200/{{#regex:13-EDO|/(\d+)-?EDO/i|\1}}}}|3}}</nowiki></code>
Results
* {{#number_format:{{#expr:1200/{{#regex:12edo|/(\d+)-?EDO/i|\1}}}}|3}}
* {{#number_format:{{#expr:1200/{{#regex:13-EDO|/(\d+)-?EDO/i|\1}}}}|3}}
Finding <code>Step size</code> parameter values with units attached
<nowiki>* 1 {{#if:{{#regex:{{{Step size|12.7¢}}}|/[\d.]+(.*)/|\1}}|YES!}}
* 2 {{#if:{{#regex:12.7|/[\d.]+(.*)/|\1}}|YES!}}
* 3 {{#if:{{#regex:|/[\d.]+(.*)/|\1}}|YES!}}</nowiki>
Output:
* 1 {{#if:{{#regex:{{{Step size|12.7¢}}}|/[\d.]+(.*)/|\1}}|YES!}}
* 2 {{#if:{{#regex:12.7|/[\d.]+(.*)/|\1}}|YES!}}
* 3 {{#if:{{#regex:|/[\d.]+(.*)/|\1}}|YES!}}
== Include [[:File:Space Tour.mp3/Description]] ==
By placing <code><nowiki>{{File:Space Tour.mp3/Description}}</nowiki></code> into a page, the content gets included:
{{File:Space Tour.mp3/Description}}
== Autofill parameters for [[template:Infobox ET ]] ==
todo.
All parameters could be omitted:
* Step count (P8) can be extracted from the page name
* Step size can be calculated := 1200/P8
* Fifth (P5) can be calculated, it's the patent fifth: P5 := round(log2(3/2) * P8)
* M2, m2, and A1 can be calculated from P8 and P5
Some EDOs may have an auxiliary Fifth!
== <abbr title="You are editing">✎</abbr> User:Xenwolf/SandBox (section) ==
<abbr title="You are editing">✎</abbr> User:Xenwolf/SandBox (section)
== Testing [[User:Xenwolf/Template:TestDefPar]] ==
{{User:Xenwolf/Template:TestDefPar|52}}
{{User:Xenwolf/Template:TestDefPar|53}}
{{User:Xenwolf/Template:TestDefPar|526}}
{{User:Xenwolf/Template:TestDefPar|527}}
{{User:Xenwolf/Template:TestDefPar|5263}}
{{User:Xenwolf/Template:TestDefPar|5264}}