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
interface IResettable { | |
fun reset() | |
} | |
open class ResettableAspect: IResettable { | |
val delegateManager by lazy { | |
ResettableDelegateManager() | |
} | |
override fun reset() { | |
delegateManager.reset() |
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 android.content.Context | |
import android.graphics.* | |
import android.text.style.ReplacementSpan | |
import kotlin.math.roundToInt | |
class RoundedBackgroundSpan( | |
private val context: Context, | |
private val borderRadius: Float = 0f, | |
private val backgroundColorInt: Int? = null, | |
private val textColorInt: Int = Color.BLACK, |
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 android.content.Context | |
import android.util.AttributeSet | |
import android.view.Gravity | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.view.inputmethod.EditorInfo | |
import android.widget.EditText | |
import android.widget.ImageView | |
import android.widget.TextView |
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 android.content.Context | |
import android.net.Uri | |
import android.text.Spannable | |
import android.text.SpannableString | |
import android.text.SpannableStringBuilder | |
import java.util.regex.Pattern | |
import java.util.regex.Pattern.LITERAL | |
/** | |
* variable definition (for easy understanding): |
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 DialogBuilder(val activityContext: FragmentActivity) { | |
class TextBuilder(val context: Context) { | |
sealed class TextConfig { | |
data class TitleConfig( | |
val text: String, | |
val bold: Boolean = true, | |
@DimenRes val textSizeSdp: Int = R.dimen._16sdp | |
): TextConfig() |
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
interface IContracts | |
interface ICalculator { | |
fun calculate(vararg contracts: IContracts): Int | |
} | |
data class FixedPriceContract( | |
val costPerYear: Int | |
) : IContracts |
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
interface IReportVisitable { | |
fun accept(visitor: IReportVisitor): Int | |
} | |
data class FixedPriceContract( | |
val costPerYear: Int | |
) : IReportVisitable { | |
override fun accept(visitor: IReportVisitor): Int { | |
return visitor.visit(this) | |
} |
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
#!/bin/sh | |
sudo ps aux | grep Netskope | grep -v grep | awk '{ print "kill -9", $2 }' | sudo sh | |
echo '[✓] Kill Netskope Process' | |
sudo rm -rf /Applications/Remove\ Netskope\ Client.app | |
echo '[✓] Removed Remove Netskope Client.app' | |
sudo rm -rf /Library/Application\ Support/Netskope | |
echo '[✓] Removed Agent of Netskope Client.app' |
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 android.os.Build | |
import androidx.annotation.RequiresApi | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.PaddingValues | |
import androidx.compose.foundation.layout.size | |
import androidx.compose.foundation.lazy.grid.GridCells | |
import androidx.compose.foundation.lazy.grid.GridItemSpan | |
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid |