This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let image:CGImage = representation.fullScreenImage().takeUnretainedValue() | |
NSLog("%d: size %u x %u", index, CGImageGetWidth(image), CGImageGetHeight(image)) | |
let latestPhoto = UIImage(CGImage: image) | |
NSLog("%d size: %lu x %lu", index, latestPhoto.size.height, latestPhoto.size.width) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dob" : "1970-01-08", | |
"spendgo_id" : "52463", | |
"first_name" : "John-383", | |
"last_name" : "Doe-886", | |
"email_opt_in" : false, | |
"sms_opt_in" : false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"research_opt_in" : false, | |
"is_activated" : true, | |
"favorite_store" : { | |
"id" : 563, | |
"state" : "IL", | |
"street" : "[redacted]", | |
"name" : "[redacted]", | |
"city" : "Bengaluru", | |
"zip" : "60626" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ chmod 755 hello.swift | |
$ ./hello.swift | |
Hello world! | |
$ swiftc hello.swift | |
$ ./hello | |
Hello world! | |
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add callback support to Asset.css for all browsers | |
Asset.css = function(source, onLoad) { | |
var link = new Element('link', { rel: 'stylesheet', media: 'screen', type: 'text/css', href: source }); | |
if (("onload" in link) && !Browser.Engines.webkit()) { | |
if (onLoad) link.onload = onLoad; | |
} else { | |
(function() { | |
try { | |
link.sheet.cssRules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module_load_include('inc', 'path', 'path'); | |
module_load_include('inc', 'pathauto', 'pathauto'); | |
$terms = taxonomy_get_tree(1); | |
foreach($terms as $term) { | |
$cleaned = pathauto_cleanstring($term->name); | |
path_set_alias("taxonomy/term/{$term->tid}", "categorias/$cleaned"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -sL swift.vapor.sh/ubuntu | bash | |
Swift 3 Quick Installer | |
🖥 Operating System: ubuntu1404 | |
📦 Installing Dependencies | |
🔒 Sudo required | |
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty InRelease | |
Get:1 http://eu-west-1.ec2.archive.ubuntu.com trusty-updates InRelease [65.9 kB] | |
Get:2 http://eu-west-1.ec2.archive.ubuntu.com trusty-backports InRelease [65.9 kB] | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release.gpg | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -sL swift.vapor.sh/ubuntu | bash | |
Swift 3 Quick Installer | |
🖥 Operating System: ubuntu1404 | |
📦 Installing Dependencies | |
🔒 Sudo required | |
Ign http://eu-west-1.ec2.archive.ubuntu.com trusty InRelease | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-updates InRelease | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty-backports InRelease | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release.gpg | |
Hit http://eu-west-1.ec2.archive.ubuntu.com trusty Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Constructor Standings | |
alter table constructorstandings add index (constructorid); | |
alter table constructorstandings add index (raceid); | |
alter table constructorstandings add unique index constructorrace (constructorid, raceid); | |
-- Drivers | |
alter table drivers add unique index driverref (driverref); | |
-- Driver Standings | |
alter table driverstandings add index (driverid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
fileprivate class CachedItem<T> { | |
let value: T | |
fileprivate init(value: T) { | |
self.value = value | |
} | |
} |
OlderNewer