Skip to content

Instantly share code, notes, and snippets.

View maq796113's full-sized avatar
🚴

Muhammad Abdullah Qureshi maq796113

🚴
View GitHub Profile
package com.example.qurantutor
import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.media.MediaRecorder
import android.os.Build
import android.os.Bundle
import android.os.Environment
import android.util.Log
@maq796113
maq796113 / BaseURL.kt
Created January 8, 2023 14:46
I am trying to access my smb server running on my azure vm. I am uploading the file there from the android mobile app. Ignore the MainActivity.kt, I have shared a snippet of the code which is relevant to the issue.
package com.example.qurantutor.network
object BaseURL {
const val smbbaseUrl = "smb://$publicIP/shared/"
}
def int_palindrome(num: int):
_list = []
i = 1
int_length = int(math.log10(num)) + 1
size_zeroes = 10**int_length
for j in range(size_zeroes):
if i >= size_zeroes:
break
digit = (num%(10*i))//i
@maq796113
maq796113 / readTxtFile.c
Last active October 10, 2023 15:53
Read Text File
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
bool isTerminator(char ch) {
bool result = false;
char terminators[5] = { ';', '.', '!' , '?'};
for (int j = 0; j < sizeof(terminators) / sizeof(terminators[0]); j++) {
if (ch == terminators[j]) {
result = true;
@Composable
fun PhotoBottomSheetContent(
bitmaps: List<Bitmap>,
context: Context,
geminiAIViewModel: GeminiAIViewModel1 = hiltViewModel(),
modifier: Modifier,
) {
val uiState by geminiAIViewModel.uiState.collectAsStateWithLifecycle()
val scope = rememberCoroutineScope()
@Composable
fun GridCellTable(
ingredientState: IngredientState
) {
val items = mutableListOf<IngredientState>()
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
) {