Skip to content

Instantly share code, notes, and snippets.

@IndiceeCoder
IndiceeCoder / currencyExchange1.txt
Created July 19, 2011 23:15
iBIOS Customization Example - Currency Exchange 1
/**
* Perform a currency conversion
* If an error occurs a NaN is returned
*/
exchangeRateConversion :: String -> String -> Double -> Double;
exchangeRateConversion fromCurrency toCurrency amount =
let
response = getMethod ("http://www.exchangerate-api.com/" ++ fromCurrency ++ "/" ++ toCurrency ++ "/" ++ (doubleToString amount) ++ "?k=yu9Nt-z826L-W4QHk");
in
case response of
@IndiceeCoder
IndiceeCoder / DeleteAllData.java
Last active September 26, 2015 11:58
Java Example - Delete All Data from User's Library
package com.indicee.api.examples;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import javax.net.ssl.SSLContext;
@IndiceeCoder
IndiceeCoder / reportConnector.html
Created July 19, 2011 22:52
Indicee Report Connector for the Google Visualization API
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="<server>/indicee_report_gconnector.js"></script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['columnChart']});
google.setOnLoadCallback(refreshChart);
function refreshChart() {
indicee.report.googleConnector.getDataTable("<server>/api/report/show.json?report_id=<id>", drawChart);
@IndiceeCoder
IndiceeCoder / ShowReport.java
Last active September 26, 2015 11:58
Java Example - Print first 100 rows of data from first report
package com.indicee.api.examples;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
@IndiceeCoder
IndiceeCoder / ListDashboards.java
Last active September 26, 2015 11:58
Java Example - Print list of user's dashboards
package com.indicee.api.examples;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
@IndiceeCoder
IndiceeCoder / printReports.java
Created July 19, 2011 22:32
Java Example - Print list of user's reports
import oauth.signpost.basic.DefaultOAuthConsumer;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
public class ListReports {
private static CommonsHttpOAuthConsumer commonsHttpConsumer;
@IndiceeCoder
IndiceeCoder / DataSetUploader.java
Created July 19, 2011 21:46
Java Example - Data Set Uploader
/*
* Copyright (c) 2010- Indicee Inc. All Rights Reserved.
*
* Indicee, Inc.
* #2200-1050 West Pender Street
* Vancouver, BC, V6E 3S7, Canada
* 1-888-681 3840
*
* IMPORTANT: This Indicee software is supplied to you by Indicee, Inc. ("Indicee") in
* consideration of your agreement to the following terms, and your use, installation,
@IndiceeCoder
IndiceeCoder / AvatarUploader.java
Created July 19, 2011 21:44
Java Example - Avatar Uploader
/*
* Copyright (c) 2010- Indicee Inc. All Rights Reserved.
*
* Indicee, Inc.
* #2200-1050 West Pender Street
* Vancouver, BC, V6E 3S7, Canada
* 1-888-681 3840
*
* IMPORTANT: This Indicee software is supplied to you by Indicee, Inc. ("Indicee") in
* consideration of your agreement to the following terms, and your use, installation,
@IndiceeCoder
IndiceeCoder / UploadContribution.java
Last active August 13, 2020 14:30
Java Example - Upload Contribution
package com.indicee.api.examples;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.xml.parsers.DocumentBuilderFactory;
@IndiceeCoder
IndiceeCoder / ListReports.java
Last active September 26, 2015 11:57
Java Example - API
package com.indicee.api.examples;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;