UNUserNotification
@available(iOS 10.0, *)
import UserNotifications
NSUserNotification API Reference
UNNotificationSound API Reference
UNUserNotificationCenter API Reference
@available(iOS 10.0, *)
import UserNotifications
NSUserNotification API Reference
UNNotificationSound API Reference
UNUserNotificationCenter API Reference
Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki
NSHashTable & NSMapTable - NSHipsterの超意訳。
[2014-08-26 18:45]
NSSet
は値を強参照でもつ。NSDictionary
は値は強参照で、キーはコピーされる。
開発者が弱参照の値を保持したいとか、NSCopying
に適合しないオブジェクトをキーにしたい場合はNSValue +valueWithNonretainedObject:
を使う必要があった。
このようなケースにおいて、iOS 6(MacではOS X 10.5)以降だと、NSHashTable
とNSMapTable
を使用できる。
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
diff --git configure.ac configure.ac | |
index 62f53a3..850eaa4 100644 | |
--- configure.ac | |
+++ configure.ac | |
@@ -1571,7 +1571,7 @@ if test "${HAVE_NS}" = yes; then | |
leimdir="\${ns_appresdir}/leim" | |
INSTALL_ARCH_INDEP_EXTRA= | |
fi | |
- NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" | |
+ NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>iOS6 Safari Photo Capture Demo</title> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var input = document.getElementById("input"); | |
input.addEventListener("change", handleFile); | |
} |
#!/bin/sh | |
# 初期設定 | |
EMACS_VER=24.2 | |
WORK_DIR=$HOME/Builds/Emacs | |
BUILD_DIR=$WORK_DIR/build | |
PATCH_DIR=$WORK_DIR/patch | |
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
export CC='/usr/bin/clang' |
// Add support for subscripting to the iOS 5 SDK. | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000 | |
@interface NSObject (PSPDFSubscriptingSupport) | |
- (id)objectAtIndexedSubscript:(NSUInteger)idx; | |
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx; | |
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key; | |
- (id)objectForKeyedSubscript:(id)key; | |
@end |
;;; フォントセットを作る | |
(let* ((fontset-name "myfonts") ; フォントセットの名前 | |
(size 12) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...] | |
(asciifont "Menlo") ; ASCIIフォント | |
(jpfont "Hiragino Maru Gothic ProN") ; 日本語フォント | |
(font (format "%s-%d:weight=normal:slant=normal" asciifont size)) | |
(fontspec (font-spec :family asciifont)) | |
(jp-fontspec (font-spec :family jpfont)) | |
(fsn (create-fontset-from-ascii-font font nil fontset-name))) | |
(set-fontset-font fsn 'japanese-jisx0213.2004-1 jp-fontspec) |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el | |
index 157b2dd..f3807b7 100644 | |
--- a/lisp/term/ns-win.el | |
+++ b/lisp/term/ns-win.el | |
@@ -1263,6 +1263,11 @@ the operating system.") | |
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system)) | |
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ()) | |
+(defun ns-toggle-fullscreen () |