Jump to content

User:Lent/sandbox

From Wikipedia, the free encyclopedia

Max Annenberg

[edit]

Max Annenberg, son of Moses Annenberg, brother of Walter Anneberg

Biographic sketch:[1]

1925 Relocation to New York. [2]

On December 7, 1941, before the news of the bombing of Pearl Harbor was made public, a public address message for Max Annenberg's chauffeur to report, has followed the message for Col. William J. Donovan to call his office immediately, with the third and final message being for military personnel to report to their bases.[3][4]

Introduction to interactive example

[edit]

Only some of the many sorting algorithms currently developed are known as stable. The quality that makes these algorithms stable is that when sorting on a row in a table, if the value in the column chosen to be the sort "key" is identical to another row's value in that same "key" column, the algorithm will leave the relative order of those rows unchanged. The notable sorting algorithm, Quicksort, is usually implemented lacking stability.

Mobile Browsers vs. Sortable tables

[edit]

Wikipedia supports sortable tables in desktop browsers, including stable sorting by using the Shift key while clicking on the second column to be sorted. Sadly, as of February 2020, sortable Wikipedia tables only work with desktop browsers. Even mobile browsers set to "View Desktop Site/Desktop Page" mode fail to work with Javascript code which provides Wikipedia's sortable columns. Originally, mobile browsers had extremely limited hardware resources, making a full-feature browser impossible.[5] While innovative solutions such as the Wireless Application Protocol allowed more of the web to be browsed, the results were extremely varied. As mobile devices grew in power, and browser capabilities continued to grow, Wikipedia's developers and users returned to the problem, keeping in consideration extremely limited mobile devices still in widespread use around the world.[6]


Icons buttons found on Column Headers

[edit]
Icons for sorting columns
Icon Icon Name
sort_both
sort_both
sort_down
sort_down
sort_up
sort_up

The browser currently displaying this page is capable of sorting tables, the preceding icon buttons should be on each column header. If not, interactive sorting for will not work, so "No soup for you!". If the following tables show no icons in the column headers, your browser is cannot performing sorting at this time.

Stable sort by State then City

[edit]

The following example has fifteen cities in seven different states.

Each state is abbreviated using the 2-letter codes used by the United States Postal Service.

Rationale for Postal Codes

[edit]

After suffering from duplicate city names within the U.S., the Post Office made an effort to keep new duplicate names from occurring:

To help address this problem, in the 1880s the instructions on selecting new Post Office names went [...]:
Select a short name for the proposed office, which, when written, will not resemble the name of any other post office in the United States.

— What's in a (Post Office) Name? : From Aaronsburg, Pennsylvania, to Zwolle, Louisiana, [7]

This was found to be too restrictive, and the Post Office removed the word United.:

In the 1890s this was relaxed:
Select a short name for the proposed office, which, when written, will not resemble the name of any other post office in the State.

— What's in a (Post Office) Name? : From Aaronsburg, Pennsylvania, to Zwolle, Louisiana, [7]

The Postal zone introduced in 1943 helped route mail within large U.S. cities, and 1963's introduction of the ZIP Code helped improved delivery of mail to cities with the same name by first directing the mail to the correct region of the country. Standardization of the two—letter code for each state, territory and the capital district also made mail sorting easier.[8]


Example

[edit]

Two stable sorts are performed on the randomly ordered, original table.

Note that only the second sort is required to be stable to get our desired result of a list which is alphabetical first by two—letter State code, then for each City within the alphabetically ordered State.

Mobile sorting workarounds
[edit]

While not possible on most mobile browsers, sorting can be achieve through these workarounds:

  1. Obtain a browser which wil support a Desktop site and the Javascript needed:
  2. Use a keyboard which supports a TAB key:
    • Bluetooth keyboard
    • USB keyboard via a USB On-The-Go cable
    • Virtual board which supports the TAB key , setting the keyboard visible, even when not on an input field
  3. Load the sortable page and verify that the column's sorting triangles are on the column titles
  4. Sort the selected primary column via:
    • Clicking on the column header to toggle trough ascending or descending sorting
    • Pressing TAB key on the keyboard, to move to the column, then pressing the Enter key.
  5. Press the TAB key or Shift and TAB key to position at the second sorting column and press Shift and Enter together.
  6. Now go and Square the Circle.



Table
[edit]
Unsorted table
Row City
State
1 Chicago IL
2 Rockford IL
3 Evanston IL
4 Champaign IL
5 Detroit MI
6 New York NY
7 Buffalo NY
8 Milwaukee WI
9 Albany NY
10 Green Bay WI
11 Syracuse NY
12 Rockford MI
13 Rockford IA
14 Rockford TN
15 Rockford MN
Sorted Alphabetically by only State
Old
vs.
New
Row
City
State
13 → 1 Rockford IA
2 → 2 Rockford IL
3 → 3 Evanston IL
1 → 4 Chicago IL
4 → 5 Champaign IL
12 → 6 Rockford MI
5 → 7 Detroit MI
15 → 8 Rockford MN
11 → 9 Syracuse NY
6 → 10 New York NY
7 → 11 Buffalo NY
9 → 12 Albany NY
14 → 13 Rockford TN
8 → 14 Milwaukee WI
10 → 15 Green Bay WI
Sorted Alphabetically by State, then City
Original
vs.
Sort
then
Another
stable sort
City
State
13 → 1 → 1 Rockford IA
4 → 5 → 2 Champaign IL
1 → 4 → 3 Chicago IL
3 → 3 → 4 Evanston IL
2 → 2 → 5 Rockford IL
5 → 7 → 6 Detroit MI
12 → 6 → 7 Rockford MI
15 → 8 → 8 Rockford MN
9 → 12 → 9 Albany NY
7 → 11 → 10 Buffalo NY
6 → 10 → 11 New York NY
11 → 9 → 12 Syracuse NY
14 → 13 → 13 Rockford TN
10 → 15 → 14 Green Bay WI
8 → 14 → 15 Milwaukee WI


Note that only the second sort is required to be stable to get our desired result, as once the rows are ordered by State, the cities can be in any order for the current State'. The second sort is required to be stable to keep the states in order, while alphabetizing the cities within the state.

Stable sort by City then State

[edit]

In this case, when we sort by alphabetically by City, we almost have the list we want. The problem is that there are many rows with the city of Rockford. These cities are properly between New York, NY and Syracuse, NY, but the States for the cities of Rockford remain in their original, non-alphabetic order. With a second stable sort, we can sort our file, leaving all the unique cities in their place and taking the cities with equal names, that is the cities of Rockford, and putting them in alphabetic order by the codes of each one's two—letter State code.

Unsorted table
Row City
State
1 Chicago IL
2 Rockford IL
3 Evanston IL
4 Champaign IL
5 Detroit MI
6 New York NY
7 Buffalo NY
8 Milwaukee WI
9 Albany NY
10 Green Bay WI
11 Syracuse NY
12 Rockford MI
13 Rockford IA
14 Rockford TN
15 Rockford MN
Sorted Alphabetically by only City
Row↘↓→
  Source
   Current
City
State
9 → 1 Albany NY
7 → 2 Buffalo NY
4 → 3 Champaign IL
1 → 4 Chicago IL
5 → 5 Detroit MI
3 → 6 Evanston IL
10 → 7 Green Bay WI
8 → 8 Milwaukee WI
6 → 9 New York NY
12 → 10 Rockford MI
13 → 11 Rockford IA
14 → 12 Rockford TN
15 → 13 Rockford MN
2 → 14 Rockford IL
11 → 15 Syracuse NY
Sorted Alphabetically by City, then State
Original
vs.
Sort
then
Another
stable sort
City
State
9 → 1 → 1 Albany NY
7 → 2 → 2 Buffalo NY
4 → 3 → 3 Champaign IL
1 → 4 → 4 Chicago IL
5 → 5 → 5 Detroit MI
3 → 6 → 6 Evanston IL
10 → 7 → 7 Green Bay WI
8 → 8 → 8 Milwaukee WI
6 → 9 → 9 New York NY
13 → 11 → 10 Rockford IA
2 → 14 → 11 Rockford IL
12 → 10 → 12 Rockford MI
15 → 13 → 13 Rockford MN
14 → 12 → 14 Rockford TN
11 → 15 → 15 Syracuse NY

Derived from Jeffery S. Leon's Sorting Algorithms — Stability". [10]

To sort by the above tables, click on the triangle. Then hold the Shift key and click on the triangle to sort by another column, while keeping the order for the first column when values of the second column are equal.

References

[edit]
  1. ^ r2WPadmin. "Walter Annenberg". Immigrant Entrepreneurship. Retrieved 7 December 2021.{{cite web}}: CS1 maint: numeric names: authors list (link)
  2. ^ Changes in Organisation of Chicago Tribune Enterprises. Fourth Estate Publishing Company. 7 November 1925. p. 4. Retrieved 7 December 2021. The directorates of the different companies will remain as now consitituted with Mr. William H. Field and Mr. Max Annenberg added to that of Liberty weekly. ... Max Annenberg, circulation manager and director of circulation of the Tribune publications, will move his resident from Chicago to New York to become second vice-president and general manager of Liberty Weekly, Inc. {{cite book}}: |work= ignored (help)
  3. ^ Polo Grounds: Pearl Harbor Attack News During NFL Game, with Announcer Arthur Daley Interview | 1941, retrieved 7 December 2021, New York Giants vs. Brooklyn Dodgers (NFL) football game: Arthur Daley says second announcement was for Max Annenberg's chauffeur to report. Third announcement "Will all members of the armed services report to their unit headquarters".
  4. ^ Staff, S. I. (24 October 1966). "The Day War Came to the Polo Grounds". Sports Illustrated Vault | SI.com. Retrieved 7 December 2021.
  5. ^ "? T49858 Enable jquery.tablesorter on mobile". phabricator.wikimedia.org. Retrieved 2020-02-29.
  6. ^ "? T111565 [EPIC] Enable mediawiki.page.ready on Minerva (collapsible templates (including infoboxes) and sortable tables)". phabricator.wikimedia.org. Retrieved 2020-02-29.
  7. ^ a b "Postal History | Post Offices and Facilities" (PDF). about.usps.com. Retrieved 2020-02-29 – via https://about.usps.com/who-we-are/postal-history/. {{cite web}}: External link in |via= (help)CS1 maint: url-status (link)
  8. ^ United States Postal Service, Historian (May 2019). "State Abbreviations - Who We Are - USPS". about.usps.com. Retrieved 2020-02-29. To allow space for the ZIP Code in the last line of an address, state names needed to be abbreviated. Previously, the Post Office Department preferred that state names be written in full, to avoid confusion.
  9. ^ "Features". Kiwi Browser. Retrieved 2020-02-29.
  10. ^ Leon, Jeffrey S. (13 January 2008). "Sorting Algorithms — Stability" (PDF). Department of Mathematics, Statistics, and Computer Science | University of Illinois at Chicago. Archived (PDF) from the original on 27 November 2014. Retrieved 28 February 2020. Our sorting software might allow sorting on only one field at a time. We may 1) First sort the array A alphabetically by city. 2) Then sort the array A alphabetically by state, using a stable sorting algorithm.


Temp workspace

[edit]

Over here User:Lent/sandbox/temp

VisualEditor vs. Citation bot

[edit]

As per the Tutorial VisualEditor, a reference [can be generated] from an ISBN. The resulting cite may include both an oclc parameter and a url pre-filled with a Worldcat OCLC query. User:Citation bot will later remove the url as a duplicate.

This automatic insert of the url and later bot based removal seems counterproductive. Actually, it seems to be a automation-driven WP:EDITWAR.

Automatic insertion of Worldcat OCLC URL

[edit]

A user may use Wikipedia:VisualEditor and an ISBN to automatic generate a filled Template:cite book.

Using VisualEditor, with example ISBN 978-0-06-246439-2 as the desired source, selecting Cite, Add a citation, Automatic, filling in the ISBN as 978-0-06-246439-2, clicking Generate, VisualEditor generates this Cite:

<ref>{{Cite book|last=Hampton, Dan,|url=https://www.worldcat.org/oclc/957504448|title=The flight : Charles Lindbergh's daring and immortal 1927 Transatlantic crossing|isbn=978-0-06-246439-2|edition=First edition|location=New York, NY|oclc=957504448}}</ref>

The rendered citation looks like this:

<ref>Hampton, Dan,. The flight : Charles Lindbergh's daring and immortal 1927 Transatlantic crossing (First edition ed.). New York, NY. ISBN 978-0-06-246439-2. OCLC 957504448. {{cite book}}: |edition= has extra text (help)CS1 maint: extra punctuation (link) CS1 maint: multiple names: authors list (link)</ref>

Automatic removal of Worldcat OCLC URL

[edit]

When User:Citation_bot runs, it removes the url as a duplicate, resulting in this:

{{Cite book|last=Hampton, Dan,|title=The flight : Charles Lindbergh's daring and immortal 1927 Transatlantic crossing|isbn=978-0-06-246439-2|edition=First edition|location=New York, NY|oclc=957504448}}</ref>

We see this in this difference in the automatically generated, then manually edited, reformatted and expanded cite:

https://en.wikipedia.org/w/index.php?title=Valentia_Island&diff=next&oldid=944499350

Media prank victims

[edit]

https://en.wikipedia.org/w/index.php?search=Arthur+Chi%27en

https://en.wikipedia.org/w/index.php?search=bryant+gumbel+letterman

https://en.wikipedia.org/wiki/Suicide_of_Jacintha_Saldanha

Failures of Flight Recorders

[edit]

"ASN Aircraft accident Lockheed L-188C Electra N183H Ardmore Municipal Airport, OK (ADM)". Aviation-safety.net. 1966-04-22. Retrieved 2012-12-22.

[1]

  1. ^ "Baffling details emerge in report on fatal 2019 air ambulance crash in Southeast Alaska". Anchorage Daily News. 2020-11-19. Retrieved 2020-11-24.