This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"recentlyPlayedEpisodes": [{ | |
"title": "Enabled Play for everyone with Alex Dunn", | |
"pubDate": "2022-06-23 21:00:00", | |
"link": "https://www.hanselminutes.com/", | |
"guid": "da1fc5cf-6b28-404b-b733-5a34d70fcd1f", | |
"author": "scott@hanselman.com (Scott Hanselman)", | |
"thumbnail": "https://image.simplecastcdn.com/images/e464c34b-2f32-411b-bdd2-dcf02e5301eb/c4810f0e-6832-4e5a-a754-f5ad93db86b4/3000x3000/846.jpg?aid=rss_feed", | |
"description": "\n<p>Enabled Play helps people turn anything into a new input for their computers, game consoles, and more. Powered by offline, private, and personalized Artificial Intelligence and distributed services – all packed into affordable devices and apps. Imagine playing Elden Ring with just your facial expressions! Or enabling keyboards, mice, and game pads with whatever devices will best set you up for success. Enabled Play enable folks with disabilities, different levels of abilities, basically everyone to be their best selves on any device. Scott talks to Alex Du |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sortByProperty(property) { | |
var sortOrder = 1; | |
if(property[0] === "-") { | |
sortOrder = -1; | |
property = property.substr(1); | |
} | |
return function (a,b) { | |
/* next line works with strings and numbers, | |
* and you may want to customize it to your needs | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
var request = URLRequest(url: URL(string: "https://the-one-api.dev/v2/movie")!) | |
request.addValue("Bearer <Replace this with your Token for the API>", forHTTPHeaderField: "Authorization") | |
URLSession.shared.dataTask(with: request) { data, response, error in | |
guard error == nil, | |
let data = data else { | |
print(error) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"title": "Japji Sahib", | |
"image": "https://firebasestorage.googleapis.com/v0/b/xl-gurbani-server.appspot.com/o/JapjiSahib.png?alt=media", | |
"track": "https://punjabicloud.com/play.php?q=ywbtFzu8gYc.mp3" | |
}, | |
{ | |
"title": "Japji Sahib", | |
"image": "https://firebasestorage.googleapis.com/v0/b/xl-gurbani-server.appspot.com/o/JapjiSahib.png?alt=media", | |
"track": "https://punjabicloud.com/play.php?q=ywbtFzu8gYc.mp3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"code": "DEL", | |
"lat": "28.5603", | |
"lon": "77.1027", | |
"name": "Indira Gandhi International Airport", | |
"city": "New Delhi", | |
"state": "Madhya Pradesh", | |
"country": "India" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HomeViewBuilder.swift | |
// Viper_Basic_Slider | |
// | |
// Created by jc on 2020-12-16. | |
// | |
import UIKit | |
// view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreTelephony | |
let info: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo() | |
guard let carrier: CTCarrier = info.subscriberCellularProvider else { | |
// No carrier info available | |
return | |
} | |
print(carrier.carrierName) | |
print(carrier.mobileCountryCode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
func loadData() { | |
do { | |
guard let url = URL(string: "https://reqres.in/api/users/1") else { return } | |
var request = URLRequest(url: url) | |
request.httpMethod = "DELETE" | |
NewerOlder