Skip to content

Instantly share code, notes, and snippets.

View huberflores's full-sized avatar

Huber Flores (El Magico) huberflores

View GitHub Profile
/*
* author Huber Flores
*/
#This is a set of instruction to utilize the code offloading converter at https://github.com/huberflores/CodeOffloadingAnnotations.git
1) Clone the repository and built the tool using mvn install
2) Create an Android project with the code to offload. Annotated the required method to offload with "@Cloud"
for example
/*
* author Huber Flores
*/
Android-maven development environment.
-Requirements
1) Eclipse Juno with Eclipse Market Place
Help -> EclipseMarketPlace,
@huberflores
huberflores / dalvikvm.sh
Last active August 29, 2015 13:57
dalvikvm wrapper
#!/bin/sh
#This wrapper works with our Dalvik x86 image running in Amazon
#Please contact at huber AT ut DOT ee for granting access to the image
# base directory, at top of source tree; replace with absolute path
base=`pwd`
root=$base/out/host/linux-x86
export ANDROID_ROOT=$root
package symlab.ust.hk.abstract.profiler;
import java.lang.reflect.Method;
import java.util.Random;
/*
* author Huber Flores
*/
@huberflores
huberflores / RandomExample.java
Created July 7, 2014 12:42
Quick random example in java
import java.util.*;
/*
* @author Huber Flores
*/
public class RandomDemo {
public static void main( String args[] ){
Random randomNo= new Random();
@huberflores
huberflores / Energy
Created July 14, 2014 17:21
Moonson Power Meter Calculations
#
# @author Huber Flores
# source: http://electronicsclub.info/power.htm
#
#Calculate energy consumed from power
The amount of energy used depends on the power and the time:
<Energy = Power × Time>
@huberflores
huberflores / gcmkeys.as
Last active August 29, 2015 14:06
Google Cloud Messaging Keys
#
# author Huber Flores
#
Go to: https://code.google.com/apis/console/
###Server
- API access
package ee.ut.cs.mc.exercise;
public class NQueens {
static int[] x;
public NQueens(int N) {
x = new int[N];
}
@huberflores
huberflores / Uninstall-Linux-Software
Created November 11, 2014 23:15
Uninstall software in Linux
#
# author Huber Flores
#
#Instructions to Uninstall in Linux (Debian)
#use the utility "purge"
#Example
@huberflores
huberflores / CheckSumTest.java
Last active August 29, 2015 14:10
Checksum of a Java Object
package ee.ut.cs.mc.example;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Random;