Skip to content

Instantly share code, notes, and snippets.

View Anticom's full-sized avatar
🤖
code machine

Timo Mühlbach Anticom

🤖
code machine
View GitHub Profile
@Anticom
Anticom / geo.sql
Created July 31, 2014 15:09
location based search
SELECT
dest.sn,
dest.ort,
dest.kreis,
ACOS(
SIN(RADIANS(src.lat)) * SIN(RADIANS(dest.lat))
+ COS(RADIANS(src.lat)) * COS(RADIANS(dest.lat))
* COS(RADIANS(src.lon) - RADIANS(dest.lon))
) * 6380 AS distance
FROM
@Anticom
Anticom / app.css
Created July 4, 2014 10:30
AngularJS - Timed $watch test
body {
background-color: white;
}
.model-box {
padding: 1em;
border: 1px solid #ccc;
-webkit-border-radius: 10px;
@Anticom
Anticom / CoffeeCounter.coffee
Created May 8, 2014 08:51
NoFlo counting component
noflo = require 'noflo'
class CoffeeCounter extends noflo.Component
description: 'This is my test description.'
icon: 'gear'
constructor: ->
@current = 0
@inPorts =
<?php
$fmt = new NumberFormatter('de_DE', NumberFormatter::DECIMAL);
$float = 123.456;
echo $fmt->format($float);
@Anticom
Anticom / Runner.java
Created May 27, 2013 15:33
interploate spherical coordinates
import java.util.ArrayList;
import javax.vecmath.Point3d;
import javax.vecmath.Point3d_karthesian;
import javax.vecmath.Point3d_spherical;
import javax.vecmath.Vector3d;
public class Runner {
/**
@Anticom
Anticom / Point3d_karthesian.java
Last active December 17, 2015 18:49
Java convert karthesian coordinate to spherical back and forth failure
package javax.vecmath;
import com.sun.corba.se.impl.interceptors.PICurrent;
public class Point3d_karthesian extends Point3d {
public Point3d_karthesian() {
super();
}
public Point3d_karthesian(double[] arg0) {
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;