Skip to content

Instantly share code, notes, and snippets.

@philippludwig
philippludwig / sdl2_sinewave.c
Created February 6, 2023 08:17 — forked from superzazu/sdl2_sinewave.c
Playing a sine wave with the SDL2
#include <stdio.h>
#include <SDL.h>
int main(void) {
SDL_Init(SDL_INIT_AUDIO);
// the representation of our audio device in SDL:
SDL_AudioDeviceID audio_device;
// opening an audio device:
@philippludwig
philippludwig / WeightTest.java
Last active April 22, 2020 22:04
Small example on how to use a CustomScoreQuery to influence lucene's ranking.
package luceneTest;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.FieldType;