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:
@implementation UITextView (RSExtras) | |
static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
/*[s length] is assumed to be 0 or 1. s may be nil. | |
Totally not a strict check.*/ | |
if (s == nil || [s length] < 1) | |
return NO; |
public final static RuntimeException ᚇ = new RuntimeException("┻━┻"); | |
public void ノಠ益ಠノ彡(RuntimeException t) { throw t; } | |
public void ノಠ益ಠノ彡(Throwable t) { throw new RuntimeException(t); } | |
public int hashCode() { | |
ノಠ益ಠノ彡(ᚇ); | |
return 0; | |
} |
javascript:(function(){ var body=document.getElementsByTagName("body")[0];var mckayla="http://f.cl.ly/items/1A1w013w0Q3p380a2N3x/mckayla.png";var mckaylaDiv=document.createElement("img");mckaylaDiv.src=mckayla;mckaylaDiv.style.position="absolute";mckaylaDiv.style.width="300px";mckaylaDiv.style.right=0;mckaylaDiv.style.bottom=0;body.appendChild(mckaylaDiv) })(); |
Today I gave a keynote at ACCU in Oxford. In the midst of it I made two (count them) two statements that I should have known better than to make. I was describing the late '70s, and the way we felt about the C language at the time. My slide said something like: "C was for real men." Emily Bache, whom I know and hold in high regard, spoke up and said "What about women?". And I said something like: "We didn't allow women in those days." It was a dumb crack, and should either not have been said, or should have been followed up with a statement to the effect that that was wrong headed. | |
The second mistake I made was while describing Cobol. I mentioned Adm. Grace Hopper. I said something like "May she rest in peace." I don't know that any of the words were actually demeaning, but the tone was not as respectful as it should have been to an Admiral in the United State Navy, and one who was so instrumental in our industry; despite what I feel about Cobol. | |
I am a 59 year old programmer who was brought up |
// Bind another function as the `this` context for `construct` to create | |
// a method that will construct the given function and return the object | |
// directly, enabling immediate chaining. | |
// | |
// A bound version of `construct` can be thought of as a Functor, converting data in (the function) | |
// to a new kind of data out (the constructed object). | |
// | |
// Before: | |
// | |
// var f = new F(); |
cons = (h, t) -> (m) -> m(h, t) | |
car = (x) -> x((h, t) -> h) | |
cdr = (x) -> if x then x((h, t) -> t) else null | |
map = (ls, f) -> | |
cons (f car ls), if cdr ls then map cdr(ls), f else null | |
foldl = (ls, f, n) -> | |
f (car ls), if cdr ls then foldl (cdr ls), f, n else n |
OxJs (speak: HexaJs) is a utility library for javascript, that facilitates parsing and creation of binary data in Javascript. While this sounds weird in the first moment, there are a few areas where OxJs can come in handy:
If you need to transfer huge amounts of numercial data via AJAX, binary encoding can be much more space-efficient than transfering it in JSON. The number 41239 for example needs 5 Bytes in JSON, but only 2 Bytes in binary encoding (unsigned short). A more practical example is the The Google Maps Polyline Utility, which saves over 80% of the json payload by binary encoding. However, de- and encoding binary information can be a quite tricky and this is were OxJs helps.
For client-side file parsing: Recent enhancements in Javascript allow us byte access for to-be-uploaded files. This can be used to perform enhanced sanity che