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 androidx.compose.animation.core.LinearEasing | |
| import androidx.compose.animation.core.RepeatMode | |
| import androidx.compose.animation.core.animateFloat | |
| import androidx.compose.animation.core.infiniteRepeatable | |
| import androidx.compose.animation.core.rememberInfiniteTransition | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.Image | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Box |
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 readFileLineByLineUsingForEachLine(fileName: String) | |
| = File(fileName).forEachLine { println(it) } |
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 androidx.compose.animation.core.Animatable | |
| import androidx.compose.animation.core.AnimationVector2D | |
| import androidx.compose.animation.core.TwoWayConverter | |
| import androidx.compose.ui.geometry.Offset | |
| private val offsetToVector: TwoWayConverter<Offset, AnimationVector2D> = | |
| TwoWayConverter({ AnimationVector2D(it.x, it.y) }, | |
| { Offset(it.v1, it.v2) }) | |
| fun Animatable(initialValue: Offset): Animatable<Offset, AnimationVector2D> = |
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 androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Row | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.ui.Modifier | |
| import kotlin.math.ceil | |
| @Composable | |
| fun GridLayout( | |
| modifier: Modifier = Modifier, | |
| rowModifier: Modifier = Modifier, |
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
| /** | |
| * extension function to provide TAG value | |
| */ | |
| val Any.TAG: String | |
| get() { | |
| return if (!javaClass.isAnonymousClass) { | |
| val name = javaClass.simpleName | |
| if (name.length <= 23) name else name.substring(0, 23)// first 23 chars | |
| } else { | |
| val name = javaClass.name |
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
| package com.codingwithmitch.cleannotes.business.data.util | |
| import com.codingwithmitch.cleannotes.business.data.cache.CacheConstants.CACHE_TIMEOUT | |
| import com.codingwithmitch.cleannotes.business.data.cache.CacheErrors.CACHE_ERROR_TIMEOUT | |
| import com.codingwithmitch.cleannotes.business.data.cache.CacheErrors.CACHE_ERROR_UNKNOWN | |
| import com.codingwithmitch.cleannotes.business.data.cache.CacheResult | |
| import com.codingwithmitch.cleannotes.business.data.network.ApiResult | |
| import com.codingwithmitch.cleannotes.business.data.network.NetworkConstants.NETWORK_TIMEOUT | |
| import com.codingwithmitch.cleannotes.business.data.network.NetworkErrors.NETWORK_ERROR_TIMEOUT | |
| import com.codingwithmitch.cleannotes.business.data.network.NetworkErrors.NETWORK_ERROR_UNKNOWN |
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
| /* | |
| * Copyright (C) 2019 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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 React, { useState, useEffect } from 'react'; | |
| import { useStaticQuery, graphql } from 'gatsby'; | |
| import { prepareBlogs, state } from './util'; | |
| const LoadingScreen = () => { | |
| return <div>Still Loading</div>; | |
| }; | |
| const EmptyScreen = () => { |
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
| #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
| import androidx.recyclerview.widget.RecyclerView | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import androidx.recyclerview.widget.AsyncListDiffer | |
| import androidx.recyclerview.widget.DiffUtil | |
| #parse("File Header.java") |
NewerOlder