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
# | |
# @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> |
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
import java.util.*; | |
/* | |
* @author Huber Flores | |
*/ | |
public class RandomDemo { | |
public static void main( String args[] ){ | |
Random randomNo= new Random(); | |
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
# | |
# author Huber Flores | |
# | |
###Download JDK latest version | |
Upload the files to the server | |
put /home/huber/setups/jdk-6u22-linux-i586.bin.zip /home/murakas/huber/software | |
put /home/huber/setups/apache-tomcat-7.0.4.tar.gz /home/murakas/huber/software | |
put /home/huber/setups/jdk-6u22-linux-x64.bin /home/murakas/huber/software |
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
# | |
# author Huber Flores | |
# | |
#To upload files to remote server | |
$ scp -i /home/huber/Desktop/TechnicalInformation/HuberFlores/Ireland/pk-huber_flores.pem -r /home/huber/Desktop/code.zip ubuntu@ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:/home/ubuntu/android-x86/ | |
#To download files from remote server | |
$ scp -i /home/huber/Desktop/TechnicalInformation/HuberFlores/Ireland/pk-huber_flores.pem -r ubuntu@ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:/home/ubuntu/android-x86/code.zip /home/huber/Desktop/code.zip |
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
# | |
# author Huber Flores | |
# | |
# 1) Basic commands | |
$ cd yourrepo/ | |
#file that contains instructions, licenses, etc. | |
$ touch README.md |
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
/* | |
* author Huber Flores | |
*/ | |
#Wrapping a java class into dex. | |
#Remember to add "dex" command to .bashrc file so that you can call the command from any place | |
#dex is an utility that comes with the Android SKD, and it's located in .../android-linux-x86_64/sdk/platform-tools/ | |
#export PATH=$PATH:/home/ubuntu/android-sdk-linux/platform-tools:/home/ubuntu/CyanogenModBuild/environment/bin |
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 symlab.ust.hk.abstract.profiler; | |
import java.lang.reflect.Method; | |
import java.util.Random; | |
/* | |
* author Huber Flores | |
*/ |
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
#!/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 |
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
/* | |
* author Huber Flores | |
*/ | |
Android-maven development environment. | |
-Requirements | |
1) Eclipse Juno with Eclipse Market Place | |
Help -> EclipseMarketPlace, |
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
/* | |
* 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 |