This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.liu.locationexample; | |
import android.content.Context; | |
import android.location.Location; | |
import android.location.LocationManager; | |
import java.lang.reflect.Method; | |
/** | |
* Reference & Credits: http://mobiarch.wordpress.com/2012/07/17/testing-with-mock-location-data-in-android/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
USAGE: | |
DatabaseHelper databaseHelper = new DatabaseHelper(getActivity()); | |
SQLiteDatabase sqLiteDatabase; | |
try { | |
databaseHelper.createEmptyDataBase(); | |
sqLiteDatabase = databaseHelper.openDataBase(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.liu.MyArcGISTemplate; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import com.esri.android.map.GraphicsLayer; | |
import com.esri.android.map.MapView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.liu.shapefileexample; | |
// Note: | |
// This is my modified version for educational purpose by Kiichi Takeuchi. I removed swing dependency and changed class name. | |
// | |
// ********************************************************************** | |
// | |
// <copyright> | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body style="background-color:gray"> | |
<div class="col-md-6 col-md-offset-3"> | |
<p class="lead ultra-bold" style="color: #fff; text-align: center; margin-top: 17px; font-size: 36px;"> | |
<span id="ct-days"></span><span style="color: #b5e2e4;">DAYS</span> | |
<span id="ct-hours"></span><span style="color: #b5e2e4;">HOURS</span> | |
<span id="ct-mins"></span><span style="color: #b5e2e4;">MINS</span> | |
</p> | |
</div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------------------------------------------- | |
// show benchmark result of function | |
// e.g. benchMe(heavyFunc,null,5) | |
function benchMe(myFunc, myArgs, cnt){ | |
if (!cnt || cnt <= 0){ | |
cnt = 1; | |
} | |
var startTime = (new Date()).getTime(); | |
for (var i=0; i<cnt; i++){ | |
myFunc(myArgs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this is svn hook script - post-commit by Kiichi | |
#[Instructions] | |
#In slack, create incoming webhook integration, and grab the url | |
#cd /var/svnrepos/hooks | |
#cp post-commit.tpl post-commit | |
#chmod +x post-commit | |
REPOS="$1" | |
REV="$2" | |
SVNTMP="/var/log/svn-post.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is script to run postman unittest from CLI | |
#Send the results to Slack | |
#by Kiichi | |
#[Instructions] | |
#In slack, create incoming webhook integration, and grab the url | |
#Create a complete postman unittest and environment then export it to a directory | |
#Make sure install node and newman. | |
#Save this script and give a permission, such as chmode +x unittest.sh | |
TMP="postman.out" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install These packages | |
//sudo npm install -g newman | |
//sudo npm install -g node-slack | |
// For mac set either $NODE_PATH or use the function below | |
module.paths.push('/usr/local/lib/node_modules'); | |
var fs = require('fs'); | |
var newman = require('newman'); | |
var Slack = require('node-slack'); | |
var slack = new Slack('mydomain','mytoken'); // setup Incomin Web Hooks and token is at the end of the url |
OlderNewer