I hereby claim:
- I am akaralar on github.
- I am akaralar (https://keybase.io/akaralar) on keybase.
- I have a public key ASDSU8BbxnG9RIOwq0y7uAUzfZt1W6pFpzFAlYt6fhosvgo
To claim this, I am signing this object:
Pod::Spec.new do |s| | |
s.name = "PayPal-iOS-SDK" | |
s.version = "2.0.5" | |
s.summary = "Accept credit cards and PayPal in your iOS app." | |
s.description = " The PayPal iOS SDK provides a software library that makes it easy for an iOS developer to accept both credit cards and PayPal directly within their mobile app." | |
s.homepage = "https://developer.paypal.com/webapps/developer/docs/integration/mobile/mobile-sdk-overview/" | |
s.license = { :type => 'Commercial', :file => 'acknowledgments.md' } | |
s.author = 'Paypal' | |
s.source = { :git => "https://github.com/paypal/PayPal-iOS-SDK.git", :tag => "2.0.5" } | |
s.platform = :ios, '6.0' |
var data1 = [1, 4, 7] | |
var data2 = [123, -2, 477, 3, 14, 6551] | |
/* | |
* Write a recursive function which loops over the list adding the first element | |
* to all remaining elements | |
* until there is only 1 element remaining which is then returned | |
*/ | |
func doStuff(input: [Int]) -> Int { |
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
let input = """ | |
Step X must be finished before step C can begin. | |
Step C must be finished before step G can begin. | |
Step F must be finished before step G can begin. | |
Step U must be finished before step Y can begin. | |
Step O must be finished before step S can begin. | |
Step D must be finished before step N can begin. | |
Step M must be finished before step H can begin. |
var numbers = [1, 2, 3, 4, 5] | |
numbers.forEach { num in | |
print("num: \(num)") | |
print("numbers: \(numbers)") | |
if num == 2 { | |
numbers = numbers.reversed() | |
} | |
print("numbers: \(numbers)") |
import Foundation | |
enum Operation: String { | |
case noOperation = "nop" | |
case accumulator = "acc" | |
case jump = "jmp" | |
} | |
struct Instruction { | |
let operation: Operation |
import Foundation | |
final class Day1020: Day { | |
override func perform() { | |
let input = String.input(forDay: 10, year: 2020) | |
var joltages = input | |
.split(separator: "\n") | |
.map(String.init) | |
.map(Int.init) |
import Foundation | |
final class Day1320: Day { | |
override func perform() { | |
let components = String.input(forDay: 13, year: 2020).split(separator: "\n") | |
let estimate = Int(String(components[0]))! | |
let buses = components[1] | |
.split(separator: ",") | |
.map(String.init) | |
.map(Int.init) |
import Foundation | |
extension String { | |
var asUInt64: UInt64 { UInt64(self, radix: 2)! } | |
func masking(with mask: String, mapper: (Character, Character) -> Character) -> [Element] { | |
zip(padded(with: "0", toLength: 36), mask).map(mapper) | |
} | |
func padded(with character: String, toLength length: Int) -> String { |
import Foundation | |
final class Day1520: Day { | |
override func perform() { | |
let numbers = String.input(forDay: 15, year: 2020) | |
.split(separator: ",") | |
.map(String.init) | |
.map(Int.init) | |
.compactMap { $0 } |