Friday, November 2, 2018

XBRL is the eXtensible Business Reporting Language

EDGAR, the "Electronic Data Gathering, Analysis, and Retrieval" database of the SEC (U.S. Securities and Exchange Commission), takes in records in an XBRL format and public companies have to know how to get their records into XBRL to report to the SEC (or hire a consultant or consultancy to do it for them).

Thursday, November 1, 2018

AirDrop photos at modern iOS orchestrations.

On an iPhone 10 when you tap at the icon of a box with an arrow pointing skyward to send a photo you will see an AirDrop banner above the familiar message and mail icons. At least this is true with the version of iOS I have. I bought my iPhone 10 earlier this year and have not been the best about updating the iOS honestly. I’m not on version 12 as of yet. Anyways, this banner is pretty boring unless someone is holding their ear open to listen for airdropped photos, but if someone is listening you will see them at this banner and may push your photo into their photos library. To hold my ear open on my own phone, I drag down from the amount-of-battery-life symbol at the upper right and then press and hold in the dead space between four circles with icons (for airplane mode, cellular, Wi-Fi, and Bluetooth) that are in a box at the upper left together. This eventually opens up more options, one of them is AirDrop, and tapping that reveals options for Everyone to open up an ear and Receiving Off to close it again.

card trick interview question

An interview question that I recently botched had to do with sorting a deck of cards programmatically. Assuming we start with an array of 52 card objects in order and we want to end up with an array of 52 card objects in a random order, how should we do it? The best way is to make the sorted array a List<Card> in C# and then one by one randomly remove items from the list and add them to the slots of the end array. You could have a number in a loop incrementing down from 51 and that could both denote the slot in the shuffled array to fill and a range for a random number with which to grab a position from the list.

.charCodeAt is the way to get an ASCII character number off of a character in JavaScript.

See this and this.