Skip to content

Instantly share code, notes, and snippets.

A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
<!--
#argh {
margin:20px;
padding:20px;
-moz-border-radius: 10px;
@ala747
ala747 / gist:1382103
Created November 21, 2011 09:07
Algoritmo político de España, versión Sinclair Spectrum BASIC
5 OVER 1
10 REM Primero los POKEs, por lo que pudiera pasar
20 REM Vidas infinitas
30 POKE 50437,1
40 REM Dinero infinito
50 POKE 51181,24
60 REM No morir de hambre
70 POKE 60298,201
80 REM Ahora, al tajo
90 LET VIDAS=3
@ala747
ala747 / gist:3832676
Created October 4, 2012 10:01
Creación programática de usuario en WP made simple!
<?php
// Disclaimer: no está probado en las últimas versiones de WP, pero antes se hacía así.
// Para el registro del user volviendo desde Paypal.
require_once( ABSPATH . WPINC . '/registration.php' );
$user_pass = wp_generate_password();
$userdata = array(
#!/bin/bash
#
# Script that checks GitHub's status API before continuing. If GitHub does not return "good" then
# you will be prompted whether you want to continue.
#
# Information messages are echoed to stderr so it is still possible to pipe the results of stdout to
# a file.
#
# Example Usage:
# $ if-github-up make clean
@ala747
ala747 / build.sh
Created December 13, 2012 12:21 — forked from badsyntax/build.sh
#! /usr/bin/env bash
#clone the repo
git clone -q "${1}" "clones/${2}"
cd "clones/${2}"
#update the submodules (how do we handle errors here?)
git submodule --quiet update --init --recursive
function format(ms) {
//console.log(t[5])
var d = new Date(ms + t[5]).toString()
.replace(/.*([0-9][0-9]:[0-9][0-9]:[0-9][0-9]).*/, '$1');
var x = ms % 1000;
d += '.' + addZeros(Math.round(x), 3);
return d;
}
function addZeros(number, digits, place) {
# Custom Stopwatch Scope
## As Simple Stopwatch
* Show total session time and lap count
* Show current lap time
* Show last lap time and time diff with previous
* Show best lap, time diff between last and best lap, and average lap time
* Log every session related data locally
* Transmit every session related data to remote server [^2]
* Share live session web page on FB, Twitter [^2]
function graph(data, w, h, color) {
var canvas = document.createElement('canvas');
var max = 0;
// normalize
var len = data.length, i;
for(i = 0; i < len; ++i) {
max = Math.max(data[i], max);
}
for(i = 0; i < len; ++i) {
@ala747
ala747 / example.php
Last active August 29, 2015 14:14 — forked from dphiffer/example.php
<?php
// 1. The class name must match the filename (i.e., "foo.php" for JSON_API_Foo_Controller)
// 2. Save this in your themes folder
// 3. Activate your controller under Settings > JSON API
class JSON_API_Example_Controller {
public function get_posts_by_meta_query() {
global $json_api;