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 "../JuceLibraryCode/JuceHeader.h" | |
int main () | |
{ | |
var json = JSON::parse("{\"a\":[ {\"b\":[1,2,3,4,5]}, {\"c\":[6,7,8,9]} ] }"); | |
std::cout << static_cast<int>(json["a"][0]["b"][4]) << std::endl; // 5 | |
return 0; | |
} |
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
Add-Type -AssemblyName presentationframework | |
[xml]$xaml = @' | |
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="100" Width="200" ResizeMode="NoResize"> | |
<Grid> | |
<Button Name="button1" Content="XAML"/> | |
</Grid> | |
</Window> |
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
# create lowpass filter | |
function create_lowpass_filter( | |
[double]$samplerate, | |
[double]$cutoff_freq, | |
[double]$resonance) | |
{ | |
# a0 + a1*z^-1 + a2*z^-2 | |
# H(z) = ------------------------ | |
# 1 + b1*z^-1 + b2*z^-2 | |
$s = [Math]::Tan($cutoff_freq*3.14159265/$samplerate) |
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
# -*- coding: utf-8 -*- | |
import scipy.io, numpy as np, numpy.linalg as nl | |
name = 'hcircuit' | |
eps = 1.0e-3 | |
# read matrix and vector | |
print '#A:', scipy.io.mminfo(name + '.mtx.gz') | |
print '#b:', scipy.io.mminfo(name + '_b.mtx.gz') | |
A = scipy.io.mmread(name + '.mtx.gz').tocsr() |
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
# | |
# elixir_wav_read_test.exs | |
# | |
# Created by fukuroda (https://github.com/fukuroder) | |
# | |
# >elixir elixir_wav_read_test.exs | |
use Bitwise |
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
(* | |
* ocaml_alsa_test.ml | |
* | |
* Created by fukuroda (https://github.com/fukuroder) | |
*) | |
(* sudo apt-get install libalsa-ocaml-dev *) | |
(* ocamlfind ocamlopt -o ocaml_alsa_test ocaml_alsa_test.ml -package alsa -linkpkg *) |
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
/* | |
* alsa_filter_test.cpp | |
* | |
* Created by fukuroda (https://github.com/fukuroder) | |
*/ | |
// g++ alsa_filter_test.cpp -std=c++0x -O3 -lasound -lsndfile | |
#include<alsa/asoundlib.h> // sudo apt-get install libasound2-dev | |
#include<sndfile.h> // sudo apt-get install libsndfile1-dev |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>SoundCloud + Web Audio API test</title> | |
<script src='http://code.jquery.com/jquery-2.1.1.min.js'></script> | |
<script src='http://connect.soundcloud.com/sdk.js'></script> | |
<script> | |
$(function(){ | |
// default URL |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>local wave file streaming test</title> | |
<script src='http://code.jquery.com/jquery-2.1.1.min.js'></script> | |
<script> | |
$(function(){ | |
// HTML5 audio |
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
/* | |
* alsa_flac_test.cpp | |
* | |
* Created by fukuroda (https://github.com/fukuroder) | |
*/ | |
// g++ alsa_flac_test.cpp -std=c++0x -O3 -lasound -lsndfile | |
#include<alsa/asoundlib.h> // sudo apt-get install libasound2-dev | |
#include<sndfile.h> // sudo apt-get install libsndfile1-dev |