90°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • channel-order-example.txt

    February 15, 2018
    1. Given a list:
    2.  
    3. [a b c d e f g h]
    4.  
    5. and a command to set the order of the following in the list: [d a c g]
    6.  
    7. Assign the items in the initial list a numeric index:
    8.  
    9. [a b c d e f g h]
    10. [1 2 3 4 5 6 7 8]
    11.  
    12. Build a new map with the input items and their existing numeric order:
    13.  
    14. [
    15. 1 => a
    16. 3 => c
    17. 4 => d
    18. 7 => g
    19. ]
    20.  
    21. For each item in the input list in the given order, set the value in the map:
    22.  
    23. [
    24. 1 => d
    25. 3 => a
    26. 4 => c
    27. 7 => g
    28. ]
    29.  
    30. For each item in the new map, change the value at the corresponding numeric index of the list:
    31.  
    32. [d b a c e f g h]
    33. [1 2 3 4 5 6 7 8]
    Portland, Oregon • 40°F
    Thu, Feb 15, 2018 7:38am -08:00
Posted in /code using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv