Skip to main content

Posts

Showing posts from January, 2020

Mac OSX some key shortcut Android Studio, Sublime Text, show Image dimension size...

Android studio column mode: Alt + Shift + 8, then press All and mouse select for column edit. Press combined above to restore normal mode Sublime Text Ctrl + Shift + Key up/down Damn Magic mouse did not have middle mouse or require 3rd party software to work. Show Image dimension size: In finder view in mode column -> click chose image -> see in right preview area to get size. Or open in Preview then > Menu Edit > Adjust size ... In bash: $ identify photo_.png

Swift observer change

https://stackoverflow.com/questions/45422286/did-set-isnt-observing-model-propertys-change-swift https://www.swiftbysundell.com/articles/observers-in-swift-part-1/ https://www.swiftbysundell.com/articles/observers-in-swift-part-2/ https://www.swiftbysundell.com/articles/property-observers-in-swift/

Swift Google Map reuse/cache marker

Custom marker seem quite slow. Caching and reusing marker on update / refreshing data that existing in current marker list.        // Caching/reusing spot         // TODO order by creation time                 // List old spots that not reusable         var oldSpotIndexes = self.mNearSpotMyMapList.map { $0.shopId }         var newSpotIndexes = nearSpotMyMapList.map { $0.shopId }         print(newSpotIndexes)         let reusableOldSpotIndexes = newSpotIndexes.filter{ oldSpotIndexes.contains($0) }         print(reusableOldSpotIndexes)                 // Exclude reusable spot in new fetched Spots data  ...