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
// | |
// GSSimpleImageView.swift | |
// GSSimpleImage | |
// | |
// Created by 胡秋实 on 16/1/2016. | |
// Copyright © 2016 CocoaPods. All rights reserved. | |
// | |
import UIKit |
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
/* 3.1 */ | |
// 1. Write Pseudo code find a given element in an array | |
func linearSearch<T: Equatable>(target: T, in array: [T]) { | |
for (index, element) in array.enumerated() { | |
if element == target { | |
print("Found \(element) at \(index)") | |
break | |
} else if (index == array.count) { | |
print("The target \(target) not found") |
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 | |
let jsonString = | |
""" | |
{ | |
"name": "Tim", | |
"age": "28" | |
} | |
""" |
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
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
OlderNewer