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
//@version=5 | |
indicator("3-Candle Pattern with Horizontal Rectangle Box", overlay=true) | |
// === Pattern Detection === | |
isValidBullishPattern() => | |
close[2] > open[2] and close[1] > open[1] and close > open and low[1] > low[2] and low > low[1] | |
isValidBearishPattern() => | |
close[2] < open[2] and close[1] < open[1] and close < open and high[1] < high[2] and high < high[1] |
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
var detector: FaceDetector? = null | |
val highAccuracyOpts = | |
FaceDetectorOptions.Builder() | |
.setPerformanceMode(FaceDetectorOptions.PERFORMANCE_MODE_ACCURATE) | |
.setLandmarkMode(FaceDetectorOptions.LANDMARK_MODE_NONE) | |
.setClassificationMode(FaceDetectorOptions.CLASSIFICATION_MODE_NONE) | |
.build() | |
detector = FaceDetection.getClient(highAccuracyOpts) | |
fun performFaceDetection(inputImage: Bitmap) { | |
val mutableBmp = inputImage.copy(Bitmap.Config.ARGB_8888, true) |
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.os.Bundle | |
import android.util.Log | |
import android.view.LayoutInflater | |
import android.view.Menu | |
import android.view.View | |
import android.widget.ImageView | |
import android.widget.TextView | |
import androidx.activity.viewModels |
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.animation.ObjectAnimator | |
import android.animation.PropertyValuesHolder | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.os.Build | |
import android.util.Log | |
import android.view.View | |
import android.view.animation.AccelerateDecelerateInterpolator | |
import com.prepladder.medical.prepladder.model.DataItem |
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
class LeaderRankView @JvmOverloads constructor( | |
context: Context, | |
val attrs: AttributeSet? = null | |
) : ConstraintLayout(context, attrs) { | |
var binding: ViewLeaderRankBinding | |
private var leaderIcon: Drawable? = null | |
set(value) { |
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
@Override | |
public void onTrimMemory(int level) { | |
Map<Integer, String> constantMap = getConstantMap(); | |
switch (level) { | |
case TRIM_MEMORY_RUNNING_MODERATE: | |
Log.e(TAG, getConstantName(constantMap, TRIM_MEMORY_RUNNING_MODERATE)); | |
break; | |
case TRIM_MEMORY_RUNNING_LOW: | |
Log.e(TAG, getConstantName(constantMap, TRIM_MEMORY_RUNNING_LOW)); |
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
Works on macOS : | |
You can manually edit .zshrc file and revert the changes you made to PATH. | |
Open TextEdit app. | |
Go to folder: cmd + shift + g | |
type: ~/ |
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
startActivity(Intent("android.settings.PICTURE_IN_PICTURE_SETTINGS", Uri.parse("package:${packageName}"))) |
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
fun convertLinkToHls(youtubeLiveLink: String, activity: Activity) { | |
val hlsLink = arrayOf("") | |
val runnableCode = Runnable { | |
try { | |
val url = URL(youtubeLiveLink) | |
val con: HttpURLConnection = url.openConnection() as HttpURLConnection | |
con.requestMethod = "GET" | |
val `in` = BufferedReader( | |
InputStreamReader(con.inputStream) |
NewerOlder