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:
From https://docs.google.com/document/d/1Nsv52MvSjbLb2PCpHlat0gkzw0EvtSgpKHu4mk0MnrA/ | |
Save Page Now 2 Public API Docs Draft | |
Vangelis Banos, updated: 2022-04-05 | |
Capture a web page as it appears now for use as a trusted citation in the future. Changelog: https://docs.google.com/document/d/19RJsRncGUw2qHqGGg9lqYZYf7KKXMDL1Mro5o1Qw6QI/edit# | |
Contents | |
Glossary 1 | |
Basic API Reference 1 | |
Capture request 1 |
// Example usage: | |
// Swizzler<NSString *, NSDateFormatter *, NSDate *> NSDateFormatter_stringFromDate_ { | |
// NSDateFormatter.class, @selector(stringFromDate:), [&](auto self, auto date) { | |
// if ([NSCalendar.currentCalendar components:NSCalendarUnitWeekday fromDate:date].weekday == 4) { | |
// return @"It Is Wednesday My Dudes"; | |
// } else { | |
// return NSDateFormatter_stringFromDate_(self, date); | |
// } | |
// } | |
// }; |
Python Stream object act like Java Stream, features include lazy calculating, slicing, chain-call etc.
stream.py
:
import functools
import itertools
class Stream(object):
if(!String.prototype.matchAll) { | |
String.prototype.matchAll = function (rx) { | |
if (typeof rx === "string") rx = new RegExp(rx, "g"); // coerce a string to be a global regex | |
rx = new RegExp(rx); // Clone the regex so we don't update the last index on the regex they pass us | |
let cap = []; // the single capture | |
let all = []; // all the captures (return this) | |
while ((cap = rx.exec(this)) !== null) all.push(cap); // execute and add | |
return all; // profit! | |
}; | |
} |
#!/usr/bin/env python3 | |
import z3 | |
import pprint | |
# 9x9 matrix of integer variables | |
X = [ [ z3.Int("x_%s_%s" % (i+1, j+1)) for j in range(9) ] | |
for i in range(9) ] | |
# each cell contains a value in {1, ..., 9} | |
cells_c = [ z3.And(1 <= X[i][j], X[i][j] <= 9) |
(() => { | |
const isNotUndefined = typeofResult => typeofResult !== 'undefined'; | |
if(isNotUndefined(typeof globalThis) && globalThis.globalThis === globalThis) { return; } | |
const g = (isNotUndefined(typeof window) && window) | |
|| (isNotUndefined(typeof global) && global) | |
|| (isNotUndefined(typeof self) && self) | |
|| Function('return this')(); | |
g.globalThis = g; | |
})(); |
/* Version 3. Updated Sep 5, 2022 */ | |
#search a:has(>br):has(>h3):has(>div) br { | |
display: none; | |
} | |
#search a:has(>br):has(>h3):has(>div) h3 { | |
display: block; | |
} |
Structure is [PixelFormatTitle: DescriptionDictionary]. PixelFormatTitle is the kCVPixelFormatType_ suffix (if known) and the FourCharCode as a string or int if the string is too short. | |
[["32ARGB / 32": { | |
BitsPerBlock = 32; | |
BitsPerComponent = 8; | |
BlackBlock = <ff000000>; | |
CGBitmapContextCompatibility = 1; | |
CGBitmapInfo = 16388; | |
CGImageCompatibility = 1; | |
ContainsAlpha = 1; |
/* | |
Code to paste and run in the Browser Console | |
Requires devtools.chrome.enabled => true in about:config | |
Tested in Firefox 68.0.1 on Windows | |
*/ | |
// Create references to APIs we'll use | |
var ss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); | |
var io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); | |
var ds = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties); |