git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)
api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});
GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3
How to approach updating UI for changes within objects held within a collection? After experimenting a bit, I think there are basically two approaches.
BindableObject
by the object that contains the collection needs to be deep and not shallow. It needs to fire didChange if the collection, or anything recursively within the collection, changes. In my example from yesterday, this means that MainViewModel
would need to figure out how to fire didChange if anything within any of its existing rows changes - not just changes to the collection itself.
orBindableObject
if the row model themselves conform to BindableObject
and the row view declares the dependency with @ObjectBinding
.You must do one or the other if you want a row to refresh when isTyping
changes value. I suspect that in the general case, #2 will be simpler.
//Trying out a prefix operator | |
//I thought vertical elipses made sense, representative of rbg | |
prefix operator ⋮ | |
prefix func ⋮(hex:UInt32) -> Color { | |
return Color(hex) | |
} | |
extension Color { | |
init(_ hex: UInt32, opacity:Double = 1.0) { | |
let red = Double((hex & 0xff0000) >> 16) / 255.0 |
// Date extension | |
extension Date { | |
static func getStringFromDate(date: Date) -> String { | |
let dateFormatter = DateFormatter() | |
dateFormatter.dateFormat = "EEEE, MMM d, yyyy" | |
let dateString = dateFormatter.string(from: date) | |
return dateString | |
} | |
static func getDateFromString(dateString: String) -> Date? { | |
let formatter = ISO8601DateFormatter() |