Skip to content

Instantly share code, notes, and snippets.

View bhakes's full-sized avatar

BHakes bhakes

View GitHub Profile
@bhakes
bhakes / gist:3ba0463d95dc12e1146b4692bfb180c8
Created July 31, 2017 05:58
Verifying that "hakes.id" is my Blockstack ID. https://onename.com/hakes
Verifying that "hakes.id" is my Blockstack ID. https://onename.com/hakes
Verifying my Blockstack ID is secured with the address 19Fp37jqbQGW4Vpzt82z36ebrm8Sc7vGdV https://explorer.blockstack.org/address/19Fp37jqbQGW4Vpzt82z36ebrm8Sc7vGdV
Verifying my Blockstack ID is secured with the address 1NFtzygLHt3bSUjwE736JbDVNXTWiYrput https://explorer.blockstack.org/address/1NFtzygLHt3bSUjwE736JbDVNXTWiYrput
AR Quick Look
https://developer.apple.com/videos/play/wwdc2018/603/
Preview 3D content in AR
Deeply integrated within the operating system.
available on iOS 12 on AR compatible devices
new 3D file format USDZ - invites you to 3D view your content and see what it looks like in your world.
/** iOS4CodeChallenge-18.11.06.md
* By Ben H
*/
// instantiate testing arrays
let stringArray = ["test", "test1", "test2", "test33"]
let stringArray2 = ["test", "test133", "test2", "test33"]
let stringArray3 = ["test", "test1", "test2", "test3"]
// function to find the longest string in a string array
import Cocoa
// trying to implement test cases
var intPairArray = [[],["",""],["",2],[2,""],[1,1],[1,1],[1,2],[1,3],[4,1]]
var intPairArray2 = [12,15]
// main function here
public func sumAndProduct(_ pIntPairArray: [Array<Int>])->[Int]{
for intPair in intPairArray{
import UIKit
func sumOf35Multiples(_ number: Int) -> Int {
// Check to make sure some joker didn't put zero or negative
// or a really big number. return -1 if it might be a joker
guard number > 0, number < 100000 else { return -1 }
// instantiate local vars
var matches: Array<Int> = []
// I did this the hard way and it would have been a lot
// easier to do it using this Hint:
// Hint: In order for a word to be a palindrome, is needs to have an even amount of the same letters on each side with the exception of a single letter in the middle
// pseudo code of easier way:
// for each letter in the string
// save it to a key pair array
// key being letter
// pair being count
// if all key pairs have even values
// assumption:
// - I will only get passed ints
// - I can get passed both negative and positive ints
//
//
import Foundation
// main funct
func expandedNumber(_ number: Int) -> [Int]{
// assumptions:
// - I will get passed an array of ints
// - ints can be positive, negative or zero
// - If only one item in the array is passed early return 0
import UIKit
// main function
func getProduct(for intArray: [Int])->[Int]{