I hereby claim:
- I am multitudes on github.
- I am multitudes (https://keybase.io/multitudes) on keybase.
- I have a public key ASDRExgTkkwQv_1nAcGkgh7T58lKw6DHI56bxc0eyHAJ9go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Project Euler: Problem 4: Largest palindrome product | |
//A palindromic number reads the same both ways. | |
// The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. | |
// Find the largest palindrome made from the product of two n-digit numbers. | |
function largestPalindromeProduct(n) { | |
let largest = 0 | |
let inputString = "9".repeat(n) | |
let inputNumber = +inputString |
enum ScreenSize { | |
static let width = UIScreen.main.bounds.size.width | |
static let height = UIScreen.main.bounds.size.height | |
static let maxLength = max(ScreenSize.width, ScreenSize.height) | |
static let minLength = min(ScreenSize.width, ScreenSize.height) | |
} | |
enum DeviceType { | |
static let idiom = UIDevice.current.userInterfaceIdiom | |
static let nativeScale = UIScreen.main.nativeScale |
# A Best in Class Checklist | |
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
> To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
## iOS Core Technology | |
_Things any iOS app can benefit from_ | |
- [ ] iCloud Sync | |
- [ ] [Core Spotlight integration](https://github.com/DreamingInBinary/Spend-Stack/issues/120) |
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
import Foundation | |
enum TargetEnum: Codable { | |
case first(SomeObject) | |
case second(OtherObject) | |
enum CodingKeys: CodingKey { | |
case type | |
} |
/** | |
* I needed a property wrapper that fulfilled the following four requirements: | |
* | |
* 1. Values are stored in UserDefaults. | |
* 2. Properties using the property wrapper can be used with SwiftUI. | |
* 3. The property wrapper exposes a Publisher to be used with Combine. | |
* 4. The publisher is only called when the value is updated and not | |
* when_any_ value stored in UserDefaults is updated. | |
* | |
* First I tried using SwiftUI's builtin @AppStorage property wrapper |
// | |
// AudioPlayerView.swift | |
// AccessibleAudioPlayer | |
// | |
// Created by Laurent B on 30/10/2021. | |
// | |
import SwiftUI | |
import AVKit |
Currently it doesn't seem possible to execute additional logic when a navigation link is tapped with the new NavigationLink(value:)
initializer. When the link is tapped it updates path state all the way back at the root NavigationStack
to drive navigation, but there are many times where we need to perform logic after the tap and before the drill down.
For example, after tapping a link we may want to pre-emptively load some data to show on the drill down screen. Or we may want to perform some form validation. Or we may want to track some analytics. This does not seem possible with the current link API.
A workaround is to use Button
s instead of NavigationLink
s, but then you lose all of the styling and affordances given to links, such as chevrons when used in List
.
If the API for NavigationLink
cannot be changed to accomodate for this, perhaps a new ButtonStyle
could be introduced that allows regular buttons to take on the sty
long long y = 0xaabbccddeeff0123LL; | |
/* | |
compile the above with cc -c ctest.c | |
and open your binary editor. in VIM open the object file with | |
vim -b ctest.o | |
then :%! xxd | |
and look for the line with your variable | |
This is how it looks like on my mac m1 |