This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@State var editMode = EditMode.inactive | |
@State private var selection = Set<String>() | |
let names = [ | |
"Cyril", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int countNaNs(const std::vector<float>& values) { | |
int count = 0; | |
for (const float& value : values) { | |
if (std::isnan(value)) { | |
count++; | |
} | |
} | |
return count; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void testFormantShifter() { | |
AudioFile<float> audioFile, audioFileReference, audioFileResult; | |
string filename = "../" + std::string("test1") + ".wav"; | |
string filenameResult = "../" + std::string("formantResult") + ".wav"; | |
audioFile.load(filename); | |
auto& audioFrames = audioFile.samples; | |
const int channels = audioFrames.size(); // the number of channels is determined by the size of audioFrames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void FFTTest() { | |
AudioFile<float> audioFile, audioFileReference, audioFileResult; | |
string filename = "../" + std::string("test1mono") + ".wav"; | |
string filenameResult = "../" + std::string("fftResult") + ".wav"; | |
audioFile.load(filename); | |
using namespace SMP; | |
FormantFFTProcessor m_fftProcessor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
class AppState:ObservableObject { | |
@Published var showLoadingOverlay = false | |
func loadData() { | |
self.showLoadingOverlay = true | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { | |
self.showLoadingOverlay = false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <list> | |
#include <vector> | |
using namespace std; | |
class graph | |
{ | |
vector<list<int>> edges; |
NewerOlder