process handle -p true -s false SIGSTOP
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
let merger = FoldersMerger(actionType: .copy, conflictResolution: .keepSource) | |
merger.merge(atPath: sourceFolder, toPath: destinationFolder) | |
class FoldersMerger { | |
enum ActionType { case move, copy } | |
enum ConflictResolution { case keepSource, keepDestination } | |
private let fileManager = FileManager() |
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 UIKit | |
// [^] Negated set - Match any character that is not in the set. | |
// @ Character - Matches "@" character (char code 64). | |
// * Quantifier - Match 0 or more of pending token. | |
// $ End - Matches the end of the string, or the end of a line if the multiline flag (m) is enabled. This matches a position, not a character. | |
func matchesRegex(_ regex: String, in text: String) -> String { | |
do { | |
let regex = try NSRegularExpression(pattern: regex) |
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
func drawTableHeaderTitles(titles: [String], drawContext: CGContext, pageRect: CGRect) { | |
// prepare title attributes | |
let textFont = UIFont.systemFont(ofSize: 16.0, weight: .medium) | |
let paragraphStyle = NSMutableParagraphStyle() | |
paragraphStyle.alignment = .left | |
paragraphStyle.lineBreakMode = .byWordWrapping | |
let titleAttributes = [ | |
NSAttributedString.Key.paragraphStyle: paragraphStyle, | |
NSAttributedString.Key.font: textFont | |
] |
Welcome to Stack Overflow. Thanks for writing the answer! However, while answering the question please try to be more explicit and provide some more details e.g. code samples, output, documentation links, screenshots. I would recommend you to check SO's [official How to Answer article](https://stackoverflow.com/help/how-to-answer).
Welcome to Stack Overflow. Your question should have your effort to solve the task. Here you post abstract question which people will likely delete rather answer. Code is good, environment, screenshots, error codes if any. I would recommend you to check SO's [official How to Ask article](https://stackoverflow.com/help/how-to-ask).
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
ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY |
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
#!/usr/bin/env python3 | |
import PyPDF2 | |
import re | |
import sys | |
import os | |
import shutil | |
dir_path = os.getcwd() | |
rotatedDir_path = dir_path + '/rotated' |
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
If you’ve enabled iCloud, they’re stored in Mobile Documents folder. | |
Here’s the full path to books you've added: | |
~/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/ | |
Here's the full path to books purchased through the iBooks store: | |
~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks | |
The path is only accessible via Terminal. Going through Finder will only redirect you to the iCloud folder. So open up Terminal: |
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
tell application "System Events" to tell appearance preferences to set dark mode to not dark mode |
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
Start by adding a label to your LaunchScreen.storyboard: | |
Format the label however you like. I like to use something subtle that you can read when you need to but that isn’t very noticeable otherwise. | |
Set Document/Label to APP_VERSION. You will use this value in the Build Phase script. | |
Continue by adding the custom Build Phase: | |
Select your project in the upper-left-hand corner of Xcode. |
NewerOlder