This file contains hidden or 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
// ensure backup manager is enabled (emulator) | |
adb shell bmgr enable true | |
// request a backup from manager | |
adb shell bmgr backup your.package.name | |
// force backup manager to run queued requests | |
adb shell bmgr run | |
// uninstall app |
This file contains hidden or 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
// Assets and Icons | |
http://romannurik.github.io/AndroidAssetStudio/ | |
https://github.com/google/material-design-icons | |
http://developer.android.com/design/downloads/index.html | |
// Material Design | |
http://www.materialpalette.com/ | |
http://www.google.com/design/spec/material-design/introduction.html |
This file contains hidden or 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
/** | |
* Creating and passing a Parcelable with an Intent | |
*/ | |
// Creating an instance of Student class with user input data | |
Student student = new Student(mNameTV.getText().toString(), | |
Integer.parseInt(mAgeTV.getText().toString()), | |
mAddressTV.getText().toString(), | |
mCourseTV.getText().toString()); | |
// Creating an intent to open the activity StudentViewActivity |
This file contains hidden or 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
# To add navigation back to the main activity using the | |
# Toolbar (material design), we do three things: | |
# 1. Declare the parent activity in the AndroidManifest.xml | |
# | |
# <activity android:name=".MySubActivity" android:label="@string/title_sub_activity" > | |
# <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> | |
# </activity> | |
# 2. Configure the Toolbar in MySubActivity: |
This file contains hidden or 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
# Hierarchy Viewer only works by default with phones running a developer version of the Android OS. | |
# | |
# 1. Phone running Jellybean or higher: add the environment variable: ANDROID_HVPROTO=ddm | |
# 2. You can run Hierarchy Viewer on an emulated phone. | |
# 3. Use the ViewServer library for pre Jellybean phone | |
# https://github.com/romainguy/ViewServer | |
# set this environment variable | |
$ export ANDROID_HVPROTO=ddm; |
This file contains hidden or 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
./couchbase-cli cluster-init -c 127.0.0.1:8091 --user=[CURRENT_USERNAME] --password=[CURRENT_PASSWORD] --cluster-init-username=[NEW_USERNAME] --cluster-init-password=[NEW_PASSWORD] |
This file contains hidden or 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
workon venv | |
pip install git+git://github.com/couchbase/[email protected] | |
pip install flask | |
pip install flask-restful |
This file contains hidden or 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
# example of inserting documents from zip file into a couchbase bucket | |
sudo /opt/couchbase/bin/cbdocloader -u <username> -p <password> -n localhost:8091 -b <bucket> -s 100 ~path/to/data.zip |
This file contains hidden or 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
/** | |
* It's possible to combine recent and custom search suggestions. One way is to | |
* write a custom provider that extends SearchRecentSuggestionsProvider. If the | |
* custom provider has the same columns as SearchRecentSuggestionsProvider | |
* then the cursors can be easily 'merged'. | |
* | |
* In the .query() method of custom search provider, return the combined results: | |
*/ | |
Cursor recentCursor = super.query(uri, projection, sel, selArgs, sortOrder); | |
Cursor[] cursors = new Cursor[] { recentCursor, customCursor}; |
This file contains hidden or 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
Error running Android emulator on Linux: | |
libGL.so cannot open shared object file | |
$ sudo apt-get install libgl1-mesa-dev |