Skip to content

Instantly share code, notes, and snippets.

View vatbub's full-sized avatar

Frederik Kammel vatbub

View GitHub Profile
@vatbub
vatbub / allGrayImages.m
Last active July 2, 2021 13:55
A Matlab/Octave program that generates all possible gray images for a given image size.
clc
clear all
close all
format long
imageProperties.height = 2;
imageProperties.width = 2;
output_folder = 'image_output';
% only used for estimations, not for the actual image calculation
@vatbub
vatbub / SingletonDemo.cs
Created December 25, 2018 22:51
A Singleton superclass in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace SingletonDemo
{
public class Program
{
public static void Main(string[] args)
@vatbub
vatbub / Spinner.java
Last active February 9, 2018 22:12 — forked from vedant1811/Spinner.java
Custom Spinner to differentiate between user selected and prorammatically selected item. Make sure to call correct method to use this feature
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
/**
* Used this to differentiate between user selected and prorammatically selected
* Call {@link Spinner#programmaticallySetPosition} to use this feature.
* Created by vedant on 6/1/15.