(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /* | |
| * Apex doesn't expose dependent picklist info directly, but it's possible to expose. | |
| * Approach: | |
| * * Schema.PicklistEntry doesn't expose validFor tokens, but they are there, and can be accessed by serializing to JSON | |
| * (and then for convenience, deserializing back into an Apex POJO) | |
| * * validFor tokens are converted from base64 representations (e.g. gAAA) to binary (100000000000000000000) | |
| * each character corresponds to 6 bits, determined by normal base64 encoding rules. | |
| * * The binary bits correspond to controlling values that are active - e.g. in the example above, this dependent option | |
| * is available for the first controlling field only. | |
| * |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #include <string> | |
| using namespace std; | |
| int main(){ | |
| cout << "If someone sees this, I have no idea what I'm even doing..." << endl; | |
| return (0); | |
| } |
| import CoreTelephony | |
| let info: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo() | |
| guard let carrier: CTCarrier = info.subscriberCellularProvider else { | |
| // No carrier info available | |
| return | |
| } | |
| print(carrier.carrierName) | |
| print(carrier.mobileCountryCode) |
| let test = "Mr John Smith "; | |
| function urlify(string) { | |
| let stringArray = string.split(" "); | |
| let filteredArray = stringArray.filter(x => x != "") | |
| let newFilteredArray = filteredArray.join(" ").split("") | |
| for (let x = 0; x < newFilteredArray.length; x++) { | |
| if (newFilteredArray[x] === " ") { | |
| newFilteredArray[x] = "%20" |