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/bash | |
set -e # Exit on error | |
## stable release links | |
tss="https://github.com/tpm2-software/tpm2-tss/archive/2.0.0_rc0.tar.gz" | |
abrmd="https://github.com/tpm2-software/tpm2-abrmd/archive/1.3.1.tar.gz" | |
tools="https://github.com/tpm2-software/tpm2-tools/archive/3.0.4.tar.gz" | |
sudo apt-get -qq -y install autoconf-archive libcmocka0 libcmocka-dev build-essential git pkg-config gcc g++ m4 libtool automake liburiparser-dev autoconf libgcrypt11-dev #> /dev/null |
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> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
<style type="text/css"> | |
#map { | |
height: 100%; | |
width: 100%; | |
} |
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
<?php | |
// overwrite current location to myCurrentLocation.json | |
$myfile = fopen("resources/myCurrentLocation.json", "w"); | |
$time = $_POST["time"]; | |
$lat = $_POST["lat"]; | |
$lng = $_POST["lng"]; | |
$arr = array('time' => $time, 'lat' => $lat, 'lng' => $lng); | |
fwrite($myfile, json_encode($arr)); | |
fwrite($myfile, "\n"); | |
fclose($myfile); |
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
try { | |
// Create a new HttpClient | |
OkHttpClient client = new OkHttpClient(); | |
// Define request being sent to the server | |
RequestBody postData = new FormBody.Builder() | |
.add("lat", "Test") | |
.add("lng", "Test") | |
.build(); | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
tools:context="com.example.android.androidlocation.MainActivity"> |
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
public class FeedTask extends AsyncTask<Void, Void, String> { | |
double lat; | |
double lng; | |
public FeedTask(double lat, double lng) { | |
this.lat = lat; | |
this.lng = lng; | |
} | |
@Override |
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
// find the root of the external storage | |
File root = android.os.Environment.getExternalStorageDirectory(); | |
myRootFolder.append("\nExternal file system root: " + root); | |
//make a new directory | |
File dir = new File (root.getAbsolutePath() + "/testDownload"); | |
dir.mkdirs(); | |
File file = new File(dir, "testData.txt"); | |
try { | |
FileOutputStream f = new FileOutputStream(file); |