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
@year_api_blueprint.route('/all') | |
@app.app_context() | |
@cache.cached(timeout=500, key_prefix="years") | |
# @requires_login - this need to be public | |
def get_all_years(): | |
data = Database.find("years", {}) | |
if data is not None: | |
return jsonify([year for year in data]) |
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
$ adb logcat ActivityManager:S LocationManager:S *:V |
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
$ adb logcat -s ActivityManager:V |
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
$ adb logcat > log_to_be_shared.txt |
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
$ adb shell setprop log.tag.MainActivity DEBUG | |
$ adb logcat -s MainActivity:V | |
05–13 22:54:51.539 2885 11072 I MainActivity: MainActivity=> onCreate() |
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
$ adb logcat -s *:V #Verbose filter | |
$ adb logcat -s *:D #Debug filter | |
$ adb logcat -s *:I #Info filter | |
$ adb logcat -s *:W #Warning filter | |
$ adb logcat -s *:E #Error 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
$adb devices | |
List of devices attached | |
192.168.1.5:5555 device |
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
$ adb tcpip 5555 | |
$ adb connect <Mobile Device IP Address>:5555 | |
# Example: | |
$ adb connect 192.168.1.5:5555 |
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
class MainActivity : AppCompatActivity() { | |
companion object { | |
val TAG = MainActivity::class.java.simpleName | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
if (Log.isLoggable(TAG, Log.DEBUG)) { | |
Log.d(TAG, "$TAG=> onCreate()") | |
} |
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
list_ = list(range(6)) | |
for idx, val in enumerate(list_): | |
print(idx, val) | |
if idx%2: #we think we wrote code that deletes every item at odd indices | |
del list_[idx] | |
print(list_) | |
#compare to |
NewerOlder