Skip to content

Instantly share code, notes, and snippets.


Nils Hayat nilsou

View GitHub Profile
View array_partition.c
#include <stdlib.h>
#include <stdio.h>
int compare_function(const void *a,const void *b) {
int *x = (int *) a;
int *y = (int *) b;
return *x - *y;
int array_partition_possible(int *array, int count) { //array needs to be already sorted
View max_subarray.c
#include <stdlib.h>
#include <stdio.h>
typedef struct solution {
int start;
int end;
int sum;
} solution;
int sum_array(int *array, int count) {
View edit-distance.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static inline unsigned int
min(unsigned int a, unsigned int b, unsigned int c)
unsigned int m = a;
if (m > b) m = b;
if (m > c) m = c;
nilsou / view-xcode-5.xib
Created Jul 22, 2013
What Xib files look like in XCode 5
View view-xcode-5.xib
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="" version="3.0" toolsVersion="4471.1" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<deployment defaultVersion="1552" identifier="iOS"/>
<plugIn identifier="" version="3697.3"/>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="1">
nilsou / view-xcode-4.xib
Last active Dec 20, 2015
What Xib files look like in XCode 4
View view-xcode-4.xib
<?xml version="1.0" encoding="UTF-8"?>
<archive type="" version="8.00">
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12E55</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0"></string>