In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and
returning the cached result when the same
inputs occur again.
— wikipedia
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
| import android.os.Environment; | |
| import android.os.Handler; | |
| import android.os.HandlerThread; | |
| import android.text.TextUtils; | |
| import androidx.annotation.NonNull; | |
| import androidx.annotation.Nullable; | |
| import com.orhanobut.logger.DiskLogStrategy; |
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
| adb help // List all comands | |
| == Adb Server | |
| adb kill-server | |
| adb start-server | |
| == Adb Reboot | |
| adb reboot | |
| adb reboot recovery | |
| adb reboot-bootloader |
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.
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
| import android.annotation.SuppressLint; | |
| import android.media.MediaCodec; | |
| import android.media.MediaExtractor; | |
| import android.media.MediaFormat; | |
| import android.media.MediaMetadataRetriever; | |
| import android.media.MediaMuxer; | |
| import android.util.Log; | |
| import java.io.IOException; | |
| import java.nio.ByteBuffer; |
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
| package ly.umbrella.opencvtest2; | |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.media.Image; | |
| import android.media.ImageReader; | |
| import android.util.Log; | |
adb-scripts
This repository consists of useful adb scripts/commands for the Samsung Galaxy S8.
Feel free to fork this repository and submit your own scripts.
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
| import WebKit | |
| public class CustomWebView: WKWebView { | |
| // var javascript: Javascript! | |
| public override init(frame: CGRect, configuration: WKWebViewConfiguration = WKWebViewConfiguration()) { | |
| super.init(frame: frame, configuration: configuration) | |
| doInit() |
Last updated: 2021-02-21, tested with socket.io v3.1.1
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links:
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
| watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache |
NewerOlder