This file contains hidden or 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
// | |
// ImageDraggableModifier.swift | |
// Pictura | |
// | |
// Created by Jonathan Benavides Vallejo on 25.08.23. | |
// | |
import SwiftUI | |
import AppKit |
This file contains hidden or 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 Vision | |
import AppKit | |
final class FaceDetector { | |
private enum Error: Swift.Error { | |
case couldNotFindFace | |
case couldNotGetCIImage | |
case couldNotProcessImageRequest | |
case didNotGetAnyObservation |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/// Solves the problem https://leetcode.com/problems/count-of-smaller-numbers-after-self/ | |
/// keeping track of elements in sorted order. | |
/// Ex: A: [4,2,3,1] -> [3,1,1,0] | |
/// We traverse A in reversed order keeping track of each element in a sorted manner. | |
/// using the index where the new element was inserted as a counter for the elements after Self. | |
/// | |
/// 0 1 2 3 | |
/// A: [1,3,2,4] | |
/// i | |
/// i | sortedArray | result |