Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ | |
git clone git://github.com/wbond/sublime_package_control.git Package\ Control | |
cd Package\ Control | |
git checkout python3 | |
# restart Sublime Text 3 and you should have Package Control working |
html.css('em,strong').each do |e| | |
if e.content.split.length <= 3 | |
e.search('//text()').each do |n| | |
if ends_with_space | |
n.content = n.text.gsub(/^\s/,"\u00A0") | |
end | |
n.content = n.text.gsub(/(?<=[\s\u00A0])\s/,"\u00A0") | |
ends_with_space = n.text.match(/\s$/) | |
end | |
end |
##Create a migration | |
### rails g migration make_unicode_friendly | |
class MakeUnicodeFriendly < ActiveRecord::Migration | |
def change | |
alter_database_and_tables_charsets "utf8", "utf8_general_ci" | |
end | |
private | |
def alter_database_and_tables_charsets charset = default_charset, collation = default_collation |
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
Nat Buckley
Video: https://www.youtube.com/watch?v=WU4vDTxLIdE
tl;dr: think about what you're building and who you're building it for
Browser is a very hostile environment to program against because lots of things are outside of our control, the network connection, the browser/runtime environment, screen size, etc...
What does it mean then when we say "a site doesn't work"? It means you can't complete a task, the reason why you came to the website in the first place. There are multiple reasons why that could be:
import CoreLocation | |
extension CLLocationCoordinate2D: Codable { | |
public func encode(to encoder: Encoder) throws { | |
var container = encoder.unkeyedContainer() | |
try container.encode(longitude) | |
try container.encode(latitude) | |
} | |
/* | |
This is an update to an example found on http://www.jairobjunior.com/blog/2016/03/05/how-to-rotate-only-one-view-controller-to-landscape-in-ios-slash-swift/ | |
The code there works, with some updating to the latest Swift, but the pattern isn't very Swifty. The following is what I found to be more helpful. | |
*/ | |
/* | |
First, create a protocol that UIViewController's can conform to. | |
This is in opposition to using `Selector()` and checking for the presence of an empty function. | |
*/ |
// Either put this in a separate file that you only include in your macOS target | |
// or wrap the code in #if os(macOS) / #endif | |
import Cocoa | |
// Step 1: Typealias UIImage to NSImage | |
typealias UIImage = NSImage | |
// Step 2: You might want to add these APIs that UIImage has but NSImage doesn't. | |
extension NSImage { |
import SwiftUI | |
/// Example of how to get Dynamic Type with custom fonts in SwiftUI. | |
struct ContentView: View { | |
var body: some View { | |
VStack(spacing: 20) { | |
Text("A large title").customFont(.largeTitle) // "Optima-ExtraBlack", 28 | |
Text("A body").customFont(.body) // "Kailasa", 16 | |
Text("A caption").customFont(.caption2) // "IowanOldStyle-Italic", 11 | |
} |