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
/// This is a simple Heap implementation which can be used as a priority queue. | |
class Heap<T:Comparable> { | |
typealias HeapComparator<T:Comparable> = (_ l:T,_ r:T) -> Bool | |
var heap = [T]() | |
var count:Int { | |
get { | |
heap.count | |
} | |
} | |
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
self.photo.clipsToBounds = true | |
if let img = employee.photoUrlSmall { | |
ImageLoader.getEmployeeImage(img: img) { [weak self] data, err in | |
if let data = data { | |
DispatchQueue.main.async { | |
self?.photo.image = UIImage(data: data) | |
} | |
} | |
else { | |
DispatchQueue.main.async { |