Skip to content

Instantly share code, notes, and snippets.

View nipun2003's full-sized avatar

Nipun Kumar nipun2003

View GitHub Profile
def getFileType(file):
if file is None:
return None
file_extension = file.name.split('.')[-1]
if file_extension is None:
return None
file_type = None
for ft in FileType:
if ft.value == file_extension.upper():
file_type = ft
import android.graphics.Paint
import android.util.Log
import android.view.MotionEvent
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.size
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
@nipun2003
nipun2003 / partitionlow.cpp
Created April 12, 2022 16:54
Partition code for quick sort with first index as pivot
int partition (int arr[], int low, int high)
{
int pivot = arr[low];
int i = low;
int j = high;
while (i<j)
{
while(arr[i]<=pivot){
i++;
}

Kotlin basics

Intro to kotlin

  1. C
  2. A
  3. B,C,D,E
  4. B
  5. C
  6. A