Skip to content

Instantly share code, notes, and snippets.

View stefc's full-sized avatar

Stefan B\u+00F6ther stefc

View GitHub Profile
@stefc
stefc / Bundesland.R
Created April 26, 2016 09:50
Bundesländer Geo-Chart
library(googleVis)
# Bundesländer
countries <- factor(c(
"Schleswig-Holstein","Hamburg","Niedersachsen","Bremen",
"Nordrhein-Westfalen","Hessen","Rheinland-Pfalz",
"Baden-Württemberg","Bayern","Saarland","Berlin","Brandenburg",
"Mecklenburg-Vorpommern","Sachsen","Sachsen-Anhalt",
"Thüringen"))
@stefc
stefc / IdSequence.swift
Created March 12, 2016 19:54
sequence for generate int32 identifiers in Swift
//
// IdGenerator.swift
// Created by Stefan Böther on 21.12.15.
//
import Foundation
class IdSequence : SequenceType {
func generate() -> AnyGenerator<Int32> {
var value : Int32 = 0
@stefc
stefc / ServiceLocator.swift
Last active March 17, 2016 21:29
ligthweight IoC Container & ServiceLocator in Swift
//
// ServiceLocator.swift
//
// Created by Stefan Böther on 12.03.16.
//
// Inspired by the following =>
// https://github.com/DivineDominion/mac-appdev-code/blob/master/DDDViewDataExample/ServiceLocator.swift
// https://gist.github.com/werediver/66ff8f13c900e9871070
// https://github.com/Swinject/Swinject
@stefc
stefc / BitArray.swift
Last active January 10, 2023 11:55
BitArray based on CFBitVector Swift implementation
//
// BitArray.swift
// xFuncs
//
import Foundation
public class BitArray : CollectionType {
public typealias Index = Int