Skip to content

Instantly share code, notes, and snippets.

public protocol Error: ErrorProtocol {
var status: Status { get }
}
public enum ClientError: Error {
case badRequest
case unauthorized
case paymentRequired
case forbidden
case notFound

{{name}}

[![Swift][swift-badge]][swift-url] [![Zewo][zewo-badge]][zewo-url] [![Platform][platform-badge]][platform-url] [![License][mit-badge]][mit-url] [![Slack][slack-badge]][slack-url]

Installation

Problem

ModuleA

extension String {
    public func capitalized() -> String {
        return "ModuleA"
    }
}
func getDateTime() -> (String, String) {
let now = NSDate()
let dayTimePeriodFormatter = NSDateFormatter()
dayTimePeriodFormatter.dateFormat = "E, d MMM yyyy"
let date = dayTimePeriodFormatter.string(from: now)
dayTimePeriodFormatter.dateFormat = "HH:mm:ss Z"
let time = dayTimePeriodFormatter.string(from: now)
#!/usr/bin/swift
#if os(Linux)
@_exported import Glibc
#else
@_exported import Darwin.C
#endif
public struct Environment {
public subscript(variable: String) -> String? {
public func solution(N : Int) -> Int {
let bytes = String(N, radix: 2)
var max = 0
var current = 0
for n in bytes.characters {
if n == "0" {
current += 1
} else {
if current > max {
protocol A {
static var a: String { get }
}
extension A {
static var a: String {
return "a"
}
}

Plugin integration

Integrating the plugin with AVPlayer is done by linking SenseKit framework to your player. Here we describe how to integrate your player with SenseKit.

Pre-Requisites

  • A valid Sense CID

Installing SenseKit

import Foundation
struct HTTPRequest {
enum Method {
case get
case post
case put
case patch
case delete
import Foundation
extension String : CodingKey {
public var stringValue: String {
return self
}
public var intValue: Int? {
return Int(self)
}