Skip to content

Instantly share code, notes, and snippets.

@confile
confile / Transformations.java
Last active August 29, 2015 14:26 — forked from oschrenk/Transformations.java
Transforming a WGS84 coordinate into geocentric cartesian coordinate
import org.geotools.geometry.jts.JTS;
import org.geotools.geometry.jts.JTSFactoryFinder;
import org.geotools.referencing.CRS;
import org.geotools.referencing.crs.DefaultGeocentricCRS;
import org.geotools.referencing.crs.DefaultGeographicCRS;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.TransformException;
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.github.j2objccontrib.j2objcgradle'
apply from: 'native.gradle'
sourceCompatibility = 1.7
version = '1.0'
eclipse {
classpath {
@confile
confile / gist:32c4817b4075b492123a
Created September 11, 2015 14:23
native-gradle
apply plugin: 'objective-cpp'
// See https://github.com/j2objc-contrib/j2objc-gradle
// Modified version of j2objc-gradle NativeCompilation.groovy.
// Original notice follows.
/*
* Copyright (c) 2015 the authors of j2objc-gradle (see AUTHORS file)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@confile
confile / gist:a8f74bf355e22b052f47
Last active September 21, 2015 14:42
DBQueryBuilder a query builder for SQlighter
public class DBQueryBuilder {
public enum QueryType {
SELECT, DELETE, UPDATE, INSERT;
}
private SQLighterDb db;
public DBQueryBuilder(SQLighterDb db) {
@confile
confile / gist:c52bad81212011b9efd3
Created September 25, 2015 00:09
HttpURLConnection Test for Redirect URLs between http and https
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
package com.lorentzos.swipecards;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
------------------------------------------------------------
All tasks runnable from root project
------------------------------------------------------------
Android tasks
-------------
app:androidDependencies - Displays the Android dependencies of the project.
app:signingReport - Displays the signing info for each variant.
app:sourceSets - Prints out all the source sets defined in this project.
@confile
confile / init.lua
Created November 25, 2015 09:18
Connect to WiFi
-- init.lua --
WIFI_SSID = "fill out"
WIFI_PASS = "fill out"
wifiReady = 0
WIFI_LED = 0
WIFI_ALARM_ID = 0
@confile
confile / init.lua
Created December 20, 2015 15:37
Connect to local wifi
-- init.lua --
WIFI_SSID = "ssid"
WIFI_PASS = "1232134123"
wifiReady = 0
WIFI_LED = 0
WIFI_ALARM_ID = 0
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:mgwt="urn:import:com.googlecode.mgwt.ui.client.widget"
xmlns:p='urn:import:com.vaadin.polymer.paper.widget'
xmlns:i='urn:import:com.vaadin.polymer.iron.widget'
ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
ui:generateKeys='com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator'
ui:generateLocales='default'>