Skip to content

Instantly share code, notes, and snippets.

import Foundation
let allCodes: [(Int, String)] = [
(NSFileNoSuchFileError,"NSFileNoSuchFileError"),
(NSFileLockingError,"NSFileLockingError"),
(NSFileReadUnknownError,"NSFileReadUnknownError"),
(NSFileReadNoPermissionError,"NSFileReadNoPermissionError"),
(NSFileReadInvalidFileNameError,"NSFileReadInvalidFileNameError"),
(NSFileReadCorruptFileError,"NSFileReadCorruptFileError"),
(NSFileReadNoSuchFileError,"NSFileReadNoSuchFileError"),
var nsqpd,
nsqpdp,
nspdbbpddp,
nsdqq = {},
nsdqqbdqqd = {},
nsdqbp,
nsqpbpd,
nsdqqb,
nsqpbpdqqd,
nsdbpdbqd,
@serjepatoff
serjepatoff / wfreq.cpp
Last active March 9, 2017 13:10
Word frequency counter
//
// word_freq.cpp
//
// Created by Serj Epatov on 3/7/17.
// Copyright © 2017 Serj Epatov. All rights reserved.
//
// This small piece of code counts case–insensitive word frequency from UTF8 input file.
// It is locale-agnostic.
// It performs lowercase conversion for Latin, Eastern & Western European with díâçrïtìćš, Greek, Cyrillic and Armenian scripts.