Skip to content

Instantly share code, notes, and snippets.

View akerenyi's full-sized avatar

Adam Kerenyi akerenyi

  • Berlin, Germany
View GitHub Profile
@akerenyi
akerenyi / String+stringByDecodingHTMLEntities.swift
Created October 12, 2017 10:14
Swift 4 version of Job van der Voort's "Decode HTML entities in swift" (https://gitlab.com/snippets/32429)
private let characterEntities : [String: Character] = [
// XML predefined entities:
""" : "\"",
"&" : "&",
"'" : "'",
"&lt;" : "<",
"&gt;" : ">",
// HTML character entity references:
private let characterEntities : [String: Character] = [
// XML predefined entities:
"&quot;" : "\"",
"&amp;" : "&",
"&apos;" : "'",
"&lt;" : "<",
"&gt;" : ">",
@akerenyi
akerenyi / C-quickSort
Created February 2, 2015 11:57
Quick sort in C
#include <stdio.h>
#include <stdlib.h>
#define SIZE 10
// function needed for quick sort
int compare(const void *a, const void *b);
int main() {
@akerenyi
akerenyi / C-bubbleSort
Created February 2, 2015 11:52
Bubble sort in C
#include <stdio.h>
#define SIZE 10
int main() {
// helper variables
int outer, inner, temp;
// array with SIZE
int numbers[SIZE];
@akerenyi
akerenyi / vehicles_V3.json
Created September 26, 2014 19:42
Vehicles_V3 (JSON/XML)
[
{
"type": "car",
"license_plate": "LLZ-680",
"year": 2012,
"brand": "Skoda",
"name": "Fabia 1.4 TSI",
"color": "white",
"engine": "1397 cc",
"owner": "Sonny Liston",