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
{ | |
"categories": [ | |
"Decorative Trays & Bowls", | |
"Electronics", | |
"Other Dresses", | |
"Pants", | |
"Musical Instruments", | |
"Shirts", | |
"Tabletop", | |
"Other Lighting", |
When you create a tableCell object for each row all you have to do is call dequeueReusableCellWithIdentifier on your tableView object. But this approach is only aviable when you work with storyboar. If you want to use a fully code-based cell class and one from .xib file, you need to register these identifiers to your tableView object.
self.tableView.registerClass(<YourCellClass.self, forCellReuseIdentifier: "Cell")
###swift
$ curl https://raw.githubusercontent.com/github/gitignore/master/Swift.gitignore -o .gitignore
###objective-C
$ curl https://raw.githubusercontent.com/github/gitignore/master/Objective-C.gitignore -o .gitignore
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
while read path | |
do | |
if [ -f "$path" ]; then | |
echo "Pruning $path.." | |
brew prune “$path” | |
else | |
echo "$path not found" | |
fi | |
done < "$1" |
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
cd $(dirname "$(which npm)") |
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
### 二つの点の距離 | |
``` swift | |
func distance(pointA: CGPoint, pontB: CGPoint) -> Float { | |
let dx: Float = abs(pointA.x - pontB.x) | |
let dy: Float = abs(pointA.y - pontB.y) | |
let dist = sqrt(dx*dx + dy*dy) | |
return dist | |
} |
OlderNewer