Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>
@svenoaks
svenoaks / preorder.cpp
Last active August 29, 2015 14:10
preorder traversal using custom function
//
// main.cpp
// preorder
//
// Created by Steve Myers on 11/20/14.
#include <iostream>
#include <array>
#include "binarySearchTree.h"
@svenoaks
svenoaks / postorder.cpp
Created November 22, 2014 17:15
non recursive post order traversal of a binary tree
// Created by Steve Myers on 11/22/14.
#include <iostream>
#include <stack>
#include <stdexcept>
#include <array>
#include "binarySearchTree.h"
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
#include <utility>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#include <iostream>
#include <list>
#include <vector>
using namespace std;
class graph
{
vector<list<int>> edges;
@svenoaks
svenoaks / gist:4194946c53d7d75d85d084b80708a09c
Created September 10, 2016 13:31 — forked from shliama/gist:bf30566d7c7202a4e0ab
ffmpeg audio-only decoders, demuxers, parsers
--enable-decoder=aac,aac,aac_latm,ac3,adpcm_4xm,adpcm_adx,adpcm_afc,adpcm_ct,adpcm_dtk,adpcm_ea,adpcm_ea,adpcm_ea,adpcm_ea_r1,adpcm_ea,adpcm_ea_r2,adpcm_ea,adpcm_ea_r3,adpcm_ea,adpcm_ea_xas,adpcm_g722,adpcm_g726,adpcm_g726,adpcm_g726le,adpcm_ima_amv,amv,adpcm_ima_apc,adpcm_ima_dk3,adpcm_ima_dk4,adpcm_ima_ea_eacs,adpcm_ima_ea_sead,adpcm_ima_iss,adpcm_ima_oki,adpcm_ima_qt,adpcm_ima_rad,adpcm_ima_smjpeg,mjpeg,adpcm_ima_wav,adpcm_ima_ws,adpcm_ms,adpcm_sbpro_2,adpcm_sbpro_3,adpcm_sbpro_4,adpcm_swf,adpcm_thp,thp,adpcm_vima,vima,adpcm_xa,adpcm_yamaha,alac,ape,atrac1,ac3,atrac3,ac3,atrac3,atrac3p,bink,binkaudio_dct,bink,binkaudio_rdft,bmv_audio,comfortnoise,cook,dsd_lsbf,dsd_lsbf,dsd_lsbf_planar,dsd_msbf,dsd_msbf,dsd_msbf_planar,sicinaudio,ac3,eac3,evrc,flac,g723_1,g729,gsm,gsm,gsm_ms,iac,imc,interplay_dpcm,mace3,mace6,metasound,mlp,mp1,mp2,mp3,mp3,mp3adu,mp3,p3on4,als,nellymoser,opus,paf_audio,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_lxf,pcm_mulaw,pcm_s16be,pcm_s16be,pcm_s16be_planar,p
@svenoaks
svenoaks / gist:6ef23d38c333837e7df183f9d430f50e
Created June 20, 2018 11:20 — forked from joeykrim/gist:5dbd7a685b8d057182e4
AdMob Mediation Workaround for Smart Banner Ad Types
//Constants for tablet sized ads (728x90)
//AdMob name: LEADERBOARD
final int IAB_LEADERBOARD_WIDTH = 728;
final int IAB_LEADERBOARD_HEIGHT = 90;
//AdMob name: FULL_BANNER
final int MED_BANNER_WIDTH = 480;
final int MED_BANNER_HEIGHT = 60;
//Constants for phone sized ads (320x50)
//AdMob name: BANNER
final int BANNER_AD_WIDTH = 320;
@svenoaks
svenoaks / android-string-wc.py
Created August 4, 2020 19:16
Count words in Android strings.xml
from xml.dom.minidom import parse
import sys
import os
import codecs
import re
def count( files ):
for f in files:
if not os.path.exists( f ):
print "File %s does not exist" % f
struct MultiWheelPicker: UIViewRepresentable {
var selections: Binding<[Double]>
let data: [[Double]]
func makeCoordinator() -> MultiWheelPicker.Coordinator {
Coordinator(self)
}
func makeUIView(context: UIViewRepresentableContext<MultiWheelPicker>) -> UIPickerView {
let picker = UIPickerView()
import SwiftUI
class AppState:ObservableObject {
@Published var showLoadingOverlay = false
func loadData() {
self.showLoadingOverlay = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.showLoadingOverlay = false
}