View CircularProgressView.swift
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 SwiftUI | |
struct CircularProgressView: View { | |
var progress = 10.0 | |
var body: some View { | |
ZStack { |
View circular-progress.kt
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
@Composable | |
fun CircularProgressBar( | |
percentage: Float, | |
radius: Dp = 80.dp, | |
animationDuration: Int = 1000, | |
) { | |
var animFinished by remember { | |
mutableStateOf(false) | |
} |
View gist:a8f2f2a7975eb76445a22b00a5367572
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 'package:flutter/material.dart'; | |
import 'package:flutter_blocks_site/pages/side_bar.dart'; | |
class HomePage extends StatefulWidget { | |
static GlobalKey<ScaffoldState> scaffoldKey = GlobalKey(); | |
const HomePage({Key? key}) : super(key: key); | |
@override | |
_HomePageState createState() => _HomePageState(); | |
} |
View sample-response.json
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
{ | |
"status": 200, | |
"message": "success", | |
"formats": [ | |
{ | |
"url":"", | |
"title" : "", | |
"resolution":"", | |
"thumbnail":"", | |
"duration":"" |
View validity-rules.js
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
function isValidNewPost() { | |
let post = request.resource.data; | |
let isOwner = post.uid request.auth.uid; | |
let isNotFromPastOrFuture = request.time == request.resource.data.timestamp; | |
let hasMandatoryFields = post.keys().hasAll(['caption', 'uid', 'timestamp', 'published']); | |
return isOwner && hasMandatoryFields && isNotFromPastorFuture; | |
} |
View firestore-rules-role-check.js
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
function hasAnyRole(roles) { | |
return isLoggedIn() && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles.hasAny(roles) | |
} |
View firestore-rules-auth-check.js
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
function isLoggedIn(){ | |
return request.auth != null; | |
} |
View firestore-rules.js
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
function isValidUpdatedPost(){ | |
let post = request.resource.data; | |
let hasMandatoryFeilds = post.keys().hasAny(['caption','timestamp','published']); | |
let isValid = post.content is string && post.content.size() > 2000; | |
return hasMandatoryFeilds && isValid; | |
} |
View lucky-find-repo.json
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
[ | |
{ | |
"title": "Lite Mode", | |
"description": "Bigger icons, large text, less visual clutter", | |
"package_name": "com.xiaomi.misettings", | |
"activity_name": "com.xiaomi.easymode.EasyModeActivity" | |
}, | |
{ | |
"title": "Anti-Flickering Mode", | |
"description": "Reduce Flickering & Eye strain in low light conditions", |
View ads_adapter.java
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.aravi.popularly.adapter; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Paint; | |
import android.net.Uri; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; |
NewerOlder