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 |
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
// | |
// MakeTransparentHoleOnOverlayView.swift | |
// | |
// Created by James Laurenstin on 2015-04-10. | |
// Copyright (c) 2015 Aldo Group Inc. All rights reserved. | |
// | |
import UIKit | |
class MakeTransparentHoleOnOverlayView: UIView { |
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
extension AppDelegate { | |
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { | |
guard let audioCallIntent = userActivity.interaction?.intent as? INStartAudioCallIntent else { | |
return false | |
} | |
if let contact = audioCallIntent.contacts?.first { | |
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
import Intents | |
class IntentHandler: INExtension, INStartAudioCallIntentHandling { | |
func handle(intent: INStartAudioCallIntent, completion: @escaping (INStartAudioCallIntentResponse) -> Void) { | |
let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartAudioCallIntent.self)) | |
let response = INStartAudioCallIntentResponse(code: .continueInApp, userActivity: userActivity) | |
completion(response) | |
} |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
INPreferences.requestSiriAuthorization { (status) in | |
if status == .authorized { | |
print("Siri access allowed") | |
} else { | |
print("Siri access denied") |
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
import Foundation | |
import Intents | |
class DataManager { | |
static let sharedManager = DataManager() | |
static let sharedSuiteName = "group.com.akdsouza.SiriDemo" | |
let userDefaults = UserDefaults(suiteName: sharedSuiteName) | |
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
class IntentHandler: INExtension, INStartAudioCallIntentHandling { | |
func handle(intent: INStartAudioCallIntent, completion: @escaping (INStartAudioCallIntentResponse) -> Void) { | |
let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartAudioCallIntent.self)) | |
let response = INStartAudioCallIntentResponse(code: .continueInApp, userActivity: userActivity) | |
completion(response) | |
} | |
func resolveContacts(for intent: INStartAudioCallIntent, with completion: @escaping ([INPersonResolutionResult]) -> Void) { |
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
import Intents | |
class IntentHandler: INExtension, INStartAudioCallIntentHandling { | |
} |
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
/** | |
* A one color image. | |
* @param width | |
* @param height | |
* @param color | |
* @return A one color image with the given width and height. | |
*/ | |
public static Bitmap createImage(int width, int height, int color) { | |
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(bitmap); |
NewerOlder