See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| #import <objc/runtime.h> | |
| @interface DebuggingOverlay: NSObject | |
| @end | |
| @implementation DebuggingOverlay | |
| + (void)toggleOverlay { | |
| id debugInfoClass = NSClassFromString(@"UIDebuggingInformationOverlay"); |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <dict> | |
| <key>com.google.Chrome</key> |
windows
| import AppKit | |
| class PreferencesViewController: NSTabViewController { | |
| private lazy var tabViewSizes: [NSTabViewItem: NSSize] = [:] | |
| override func tabView(_ tabView: NSTabView, didSelect tabViewItem: NSTabViewItem?) { | |
| super.tabView(tabView, didSelect: tabViewItem) | |
| if let tabViewItem = tabViewItem { |
| -- 脚本介绍 | |
| -- 功能:获取所选文件、文件夹的目录路径,支持多选 | |
| -- 如果仅仅想获取文件的目录路径,可以调用 isDirectory() 过滤掉文件夹的路径 | |
| tell application "Finder" to set selectedItems to selection as alias list | |
| -- 没选择的话直接退出脚本 | |
| if selectedItems is {} then return | |
| -- 获得所选文件/文件夹的父目录。 | |
| set parentPath to do shell script "dirname " & quoted form of POSIX path of (item 1 of selectedItems) | |
| -- 用于拼接多个路径 |
JavaScriptCore is a built-in iOS library that enables you to use JavaScript in apps alongside Objective-C and Swift. It lets developers read JavaScript from a string, execute it from Objective-C or Swift, and share data structures and functions across languages. We JavaScriptCore to share code between Web and iOS.
| // | |
| // NSStackView+Animations.swift | |
| // | |
| // Created by Martin Höller on 18.06.16. | |
| // Copyright © 2016 blue banana software. All rights reserved. | |
| // | |
| // Based on http://prod.lists.apple.com/archives/cocoa-dev/2015/Jan/msg00314.html | |
| import Cocoa |
| set -e | |
| title='千尋影視' # dmg 文件 mount 了之后在文件系统中显示的名称 | |
| background_picture_name='mac-dmg-bg.png' # dmg 文件在 mount 了之后界面中显示的背景图片路径 | |
| application_name='千尋影視.app' # 应用程序的名称 | |
| # Developer ID 证书的名称(名字的一部分即可,但是需要能在 Keychain Access 中唯一定位到该证书) | |
| developer_id='Developer ID Application: Shanghai Truecolor Multimedia' | |
| # dmg 窗口相关的一些设置,需要根据实际情况做变更 | |
| window_left=200 # 窗口位置的 x 坐标 |
Method cascades offer a method-based counterpart to functional chaining. In functional chaining, partial results pass from one step to the next. In cascades, object scope is maintained through a series of sequential calls. Both approaches support fluent interfaces, providing readable streamlined code.