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
alert("hello world"); |
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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, 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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, 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
#!/bin/bash | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |
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
sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ |
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
// Needed in AndroidManifest: | |
<!-- Permission for using NFC hardware --> | |
<uses-permission android:name="android.permission.NFC"/> | |
<!-- Forcing device to have NFC hardware --> | |
<uses-feature android:name="android.hardware.nfc" android:required="true"/> | |
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent --> | |
<intent-filter> | |
<action android:name="android.nfc.action.TAG_DISCOVERED"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
</intent-filter> |
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 DBHelper extends SQLiteOpenHelper{ | |
// Database Information | |
private static final int DATABASE_VERSION = 1; | |
private static final String DATABASE_NAME = "sensor_data"; | |
// Table and Column Names | |
public static final String TABLE_ACC = "acc"; | |
private static final String CURRENT_TIMESTAMP = "CURRENT_TIMESTAMP"; | |
private static final String KEY_ID = "id"; |
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
<service android:name=".myService"> | |
<intent-filter> | |
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> | |
</intent-filter> | |
</service> |
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 android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
public class MyReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
// assumes WordService is a registered service | |
// Your Action Here |
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 MainActivity extends AppCompatActivity | |
SharedPreferences sharedpreference; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this); |
OlderNewer