Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| import Foundation | |
| // Export running app as .ipa, then return path to exported file. | |
| // Returns String because app crashes when returning URL from async function for some reason... | |
| func exportIPA() async throws -> String | |
| { | |
| // Path to app bundle | |
| let bundleURL = Bundle.main.bundleURL | |
| // Create Payload/ directory |
| 日時: | 2024-02-01 |
|---|---|
| 作: | 時雨堂 |
| 資料 バージョン: | 2024.1 |
| GitHub URL: | https://github.com/shiguredo/momo |
| 製品 URL: | https://momo.shiguredo.jp/ |
Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo.
First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git) or simply downloading it as a zip (from its GitHub page).
Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim directory by default).
For example, if the layout of a plugin foo is as follows:
foo/autoload/foo.vim
foo/plugin/foo.vim
| # coding: utf-8 | |
| import photos | |
| import console | |
| from objc_util import * | |
| CIFilter, CIImage, CIContext, CIDetector, CIVector = map(ObjCClass, ['CIFilter', 'CIImage', 'CIContext', 'CIDetector', 'CIVector']) | |
| def take_photo(filename='.temp.jpg'): | |
| img = photos.capture_image() |
| void callEntryPointOfImage(char *path, int argc, char **argv) | |
| { | |
| void *handle; | |
| int (*binary_main)(int binary_argc, char **binary_argv); | |
| char *error; | |
| int err = 0; | |
| printf("Loading %s…\n", path); | |
| handle = dlopen (path, RTLD_LAZY); |
| 日時: | 2016-01-23 |
|---|---|
| 作: | @voluntas |
| バージョン: | 0.1.2 |
| url: | https://voluntas.github.io/ |
| # coding: utf-8 | |
| from objc_util import * | |
| import console | |
| import urllib | |
| import dialogs | |
| WKWebView = ObjCClass('WKWebView') | |
| UIViewController = ObjCClass('UIViewController') | |
| UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
| NSURLRequest = ObjCClass('NSURLRequest') |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
| # var がないことによる問題 | |
| # 関数sum内の x がローカル変数であることをいつも保証できない | |
| # このコメントアウトを外すと sum 内の x はローカル変数でなくなる | |
| # x = 100 | |
| sum = (n) -> | |
| x = 0 | |
| for i in [1..n] | |
| x += i |