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 os | |
import re | |
def replace_html_elements(content): | |
replacements = { | |
'<div': '<View', | |
'</div>': '</View>', | |
'<p': '<Text', | |
'</p>': '</Text>', | |
'<span': '<Text', |
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
package com.maple.wordtrek.esports.utils | |
import com.maple.wordtrek.R | |
object AllControls { | |
fun getControls(): ArrayList<Control> { | |
val controls: ArrayList<Control> = ArrayList<Control>() | |
controls.add(Control(1, R.drawable.baseline_cottage_24, "Home")) | |
controls.add(Control(2, R.drawable.baseline_cottage_24, "Contact Us")) |
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
fun readRawDocFile(context: Context, rawResourceId: Int, encoding: String? = "UTF-8"): String? { | |
val stringBuilder = StringBuilder() | |
try { | |
// Open the input stream using the resource ID | |
val inputStream = context.resources.openRawResource(rawResourceId) | |
val reader = BufferedReader(InputStreamReader(inputStream, Charset.forName(encoding))) | |
// Read the lines and append them to the StringBuilder | |
var line: String? | |
while (reader.readLine().also { line = it } != null) { |
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
package com.urbanmatrix.android.launchpad.test | |
import android.util.Log | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.padding |
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
<!-- Add the Code in application Tag -> | |
<!-- This will store autostore the locale changes if you open the app for next time--> | |
<Application> | |
<!-- | |
//..... | |
--> | |
<service | |
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService" |
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
package com.maple.kashin.home | |
import android.app.Activity | |
import com.google.android.gms.tasks.Task | |
import com.google.android.material.snackbar.Snackbar | |
import com.google.android.play.core.appupdate.AppUpdateInfo | |
import com.google.android.play.core.appupdate.AppUpdateManager | |
import com.google.android.play.core.appupdate.AppUpdateOptions | |
import com.google.android.play.core.install.InstallStateUpdatedListener | |
import com.google.android.play.core.install.model.AppUpdateType |
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
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |
super.onActivityResult(requestCode, resultCode, data) | |
} | |
override fun onResume() { | |
super.onResume() | |
when (getUpdateType()) { | |
AppUpdateType.FLEXIBLE -> setupFlexibleUpdateSuccessListener() | |
AppUpdateType.IMMEDIATE -> setupImmediateUpdateSuccessListener() | |
} |
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 CountArmStrongNumbers { | |
public static int countArmStrongNumbers(int start, int range){ | |
int count = 0; | |
for(int i=start; i<range; i++){ | |
if(isArmsStrongNumberMyWAy(extractIndividualDigits(i), i)){ | |
count++; | |
} |
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 java.util.HashSet; | |
class DuplicateInList { | |
public static boolean doDuplicateExists(int[] arr){ | |
HashSet<Integer> numbers = new HashSet<Integer>(); | |
for(int i=0; i<arr.length; i++){ | |
if(numbers.contains(arr[i])){ | |
return true; |
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
package com.maple.kashin.learning.recyclerview_learning | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import androidx.recyclerview.widget.LinearLayoutManager | |
import com.maple.kashin.databinding.ActivityFaheemRvactivityBinding | |
import com.maple.kashin.learning.recyclerview_learning.adapters.FaheemRecyclerViewLearningAdapter | |
import com.maple.kashin.learning.recyclerview_learning.models.NewsPost | |
class FaheemRVActivity : AppCompatActivity() { |
NewerOlder