Install Node.js version manager
Install Node.js version 6
nvm install 6
or n 6.11
let attrString = try AttributedString(markdown: markdown) | |
for (intentBlock, intentRange) in attrString.runs[\.presentationIntent] { | |
guard let intentBlock else { continue } | |
for intent in intentBlock.components { | |
switch intent.kind { | |
case .paragraph: | |
case let .header(level): | |
case .orderedList: | |
case .unorderedList: |
protocol LensType { | |
associatedtype Container | |
associatedtype View | |
func get() -> View | |
func set(_ newValue: View) -> Container | |
} | |
protocol KeyPathInstantiatable { | |
init(mapper: KeyPathMapper<Self>) |
import os.log | |
import Foundation | |
public struct Log { | |
static let log = OSLog(subsystem: "domain", category: "App") | |
static public func debug(_ message: Any) { | |
os_log("⚪️ DEBUG - %@", log: log, type: .debug, "\(message)") | |
} |
This update includes support for iOS 7, 64bit binaries and most importantly faster build time! Clean compilation takes 1/3 of the time compared to previous version.
The most widely used open source projects for iOS is going to release its first major update later this week. This includes better serialization, real-time connection support and more. Interestingly it supports iOS 7 only.
Test
using System; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using HtmlAgilityPack; | |
namespace EmbedHtml | |
{ | |
public class Embeder | |
{ |
NSString *url = @"http://brandontreb.com"; | |
NSString *apiEndpoint = [NSString stringWithFormat:@"http://api.tr.im/v1/trim_simple?url=%@",url]; | |
NSString *shortURL = [NSString stringWithContentsOfURL:[NSURL URLWithString:apiEndpoint] | |
encoding:NSASCIIStringEncoding | |
error:nil]; | |
NSLog(@"Long: %@ - Short: %@",url,shortURL); | |
// Outputs Long: http://brandontreb.com - Short: http://tr.im/MRDd |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Untitled Document</title> | |
<style type="text/css"> | |
<!-- | |
body { | |
background-color: #FCF8E0; | |
margin-left: 10px; |