- [Data Structures] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#data-structures)
- [Linked Lists] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#linked-lists)
- [Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#trees)
- [Binary Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-trees)
- [Binary Search Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-search-tree)
- [Red-Black Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#red-black-tree)
- [AVL Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#avl-tree)
- [Tries] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#tries)
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
[ | |
{ | |
"name": "Reticulated Giraffe", | |
"species": "Giraffa camelopardalis reticulata", | |
"description": "The reticulated giraffe (Giraffa camelopardalis reticulata), also known as the Somali giraffe, is a subspecies of giraffe native to Somalia, southern Ethiopia, and northern Kenya. Reticulated giraffes can interbreed with other giraffe subspecies in captivity or if they come into contact with populations of other subspecies in the wild. \nThe reticulated giraffe is among the most well-known of the nine giraffe subspecies. Together with the Rothschild giraffe, it is by far the giraffe most commonly seen in zoos. Its coat consists of large, polygonal, liver-colored spots outlined by a network of bright-white lines. The blocks may sometimes appear deep red and may also cover the legs. The extraordinary height of giraffes is attributed to a ritual known as \"necking\", where two males fight for reproduction rights by slamming their necks into one another. The giraffes with the tallest and |
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
[ | |
{ | |
"thumbnail": "https://raw.githubusercontent.com/PaulTR/GettingStartedWithAndroid/master/images/gallery/thumbnail_grizzly.jpg", | |
"image": "https://raw.githubusercontent.com/PaulTR/GettingStartedWithAndroid/master/images/gallery/grizzly.jpg", | |
"caption": "The grizzly bear is ative to North America and the official animal for my home state of California" | |
}, | |
{ | |
"thumbnail": "https://raw.githubusercontent.com/PaulTR/GettingStartedWithAndroid/master/images/gallery/thumbnail_blackfootedcat.jpg", | |
"image": "https://raw.githubusercontent.com/PaulTR/GettingStartedWithAndroid/master/images/gallery/blackfootedcat.jpg", |
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
[ | |
{ | |
"name": "Elephants", | |
"latitude": 39.749157, | |
"longitude": -104.953616 | |
}, | |
{ | |
"name": "Tigers", | |
"latitude": 39.749817, | |
"longitude": -104.949195 |
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
<PreferenceScreen | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:title="This is a test"> | |
<PreferenceCategory | |
android:title="Inline Preference"> | |
<CheckBoxPreference | |
android:key="checkbox_preference" | |
android:title="CheckboxPreference" |
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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mVideo = (Video) getActivity().getIntent().getSerializableExtra( EXTRA_VIDEO ); | |
row = new DetailsOverviewRow( mVideo ); | |
//addAction has been deprecated | |
row.setActionsAdapter(new SparseArrayObjectAdapter() { |
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
private void detectBeacons() { | |
List<BeaconState.TypeFilter> filters = new ArrayList<>(); | |
filters.add(BeaconState.TypeFilter.with( | |
//"2F234454F4911BA9FFA6", | |
"EDDYSTONE_UID", | |
"reflected-disk-355/Test2")); | |
Awareness.SnapshotApi.getBeaconState(mGoogleApiClient, filters ) | |
.setResultCallback(new ResultCallback<BeaconStateResult>() { | |
@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
import os | |
import time | |
import requests | |
from slackclient import SlackClient | |
# add bot id and slack bot token | |
BOT_ID = | |
SLACK_BOT_TOKEN = | |
# constants | |
AT_BOT = "<@" + BOT_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
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.IOT_LAUNCHER" /> | |
<category android:name="android.intent.category.DEFAULT" /> |
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 Activity implements HCSR501.OnMotionDetectedEventListener { | |
private HCSR501 mMotionDetector; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
try { | |
mMotionDetector = new HCSR501(BoardDefaults.getMotionDetectorPin() ); |
OlderNewer