I hereby claim:
- I am lemonspike on github.
- I am britcoin (https://keybase.io/britcoin) on keybase.
- I have a public key ASAbL14RLrCxXP7Utx6xq8zEzFjoe4Fh48wAHJB28J_ouAo
To claim this, I am signing this object:
import Foundation | |
enum NumericEitherEnum<Left, Right> { | |
case left(Left) | |
case right(Right) | |
var left: Left? { | |
switch self { | |
case .left(let left) where left is NumericEitherEnum: | |
return (left as? NumericEitherEnum)?.left |
enum RecursiveEither<Left, Right> { | |
case left(ValueOrRecursiveEither<Left, Left, Right>) | |
case right(ValueOrRecursiveEither<Right, Left, Right>) | |
var left: Left? { | |
switch self { | |
case .left(.value(let left)): | |
return left | |
case .left(.either(let left)): | |
return left.left |
# 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) |
import Foundation | |
let dateFormatter = ISO8601DateFormatter() | |
let timestamp = "2021-04-30T18:11:29-06:00" | |
let date = dateFormatter.date(from: timestamp) | |
print(date) // 🎉 🤔 🎊 |
let view = UIView() | |
view.backgroundColor = .white | |
let gradient = CAGradientLayer() | |
gradient.frame = view.bounds | |
gradient.colors = [UIColor.black.cgColor, UIColor.white.cgColor] | |
gradient.locations = [0, 1] | |
gradient.startPoint = CGPoint(x: 1, y: 1) | |
gradient.endPoint = CGPoint(x: 0, y: 0) |
import UIKit | |
// 🤔 | |
class ChangeConstants { | |
private final int[] orderedCoinLabels = { FIFTY_POUNDS_VALUE, | |
TWENTY_POUNDS_VALUE, | |
TEN_POUNDS_VALUE, | |
FIVE_POUNDS_VALUE, | |
TWO_POUNDS_VALUE, | |
ONE_POUND_VALUE, |
import UIKit | |
import simd | |
var p = SIMD2<Float>(Float(1), Float(1)) | |
var v = SIMD2<Float>(Float(2), Float(1)) | |
var y = simd_reflect(v, p) | |
var x = CGPoint(x: CGFloat(v[0]), y: CGFloat(v[1])) |
public class QOneSolutionOne { | |
func fourSum(_ nums: [Int], target: Int) -> [[Int]] { | |
let nums = nums.sorted() | |
return kSum(nums, target, 0, 4) | |
} | |
func kSum(_ nums: [Int], _ target: Int, _ start: Int, _ kValue: Int) -> [[Int]] { | |
var res: [[Int]] = [] | |
if (start == nums.count) || (nums[start] * kValue > target) || |
include: package:pedantic/analysis_options.yaml | |
analyzer: | |
exclude: | |
# Exclude json serializable files, and generated files. | |
strong-mode: | |
implicit-casts: false | |
implicit-dynamic: false | |
errors: | |
prefer_const_constructors: error |
I hereby claim:
To claim this, I am signing this object: