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 DropdownOption: Hashable { | |
let key: String | |
let value: String | |
public static func == (lhs: DropdownOption, rhs: DropdownOption) -> Bool { | |
return lhs.key == rhs.key | |
} | |
} |
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 android.annotation.SuppressLint | |
import androidx.compose.animation.core.animateDpAsState | |
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.gestures.awaitFirstDown | |
import androidx.compose.foundation.gestures.forEachGesture | |
import androidx.compose.foundation.gestures.horizontalDrag | |
import androidx.compose.foundation.layout.Arrangement.spacedBy | |
import androidx.compose.foundation.layout.Box |
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
// The code below was inspired by my swift implementation https://gist.github.com/CassiusPacheco/4378d30d69316e4a6ba28a0c3af72628 | |
// and Avdosev's Dart Either https://github.com/avdosev/either_dart/blob/master/lib/src/either.dart | |
import 'package:equatable/equatable.dart'; | |
abstract class Failure extends Equatable implements Exception { | |
@override | |
String toString() => '$runtimeType Exception'; | |
@override |
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
name: ios/deploy | |
# | |
# GOOD TO KNOW | |
# | |
# This workflow is supposed to: | |
# 1. Help ensure the quality of the code changes; and | |
# 2. Deploy a variant of this application depending on | |
# which branch was changed. | |
# |
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
activate application "SF Symbols" | |
tell application "System Events" | |
tell process "SF Symbols" | |
-- Click the “list” radio button. | |
click radio button 2 of radio group 1 of group 3 of toolbar 1 of window 0 | |
tell outline 1 of scroll area 1 of splitter group 1 of window 0 | |
select (row 1 where value of static text 1 of UI element 1 starts with "All") |
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
/** | |
* Have the function PalindromeCreator(str) take the str parameter being passed and determine if it is possible to create a palindromic string of minimum length 3 characters by removing 1 or 2 characters. For example: if str is "abjchba" then you can remove the characters jc to produce "abhba" which is a palindrome. For this example your program should return the two characters that were removed with no delimiter and in the order they appear in the string, so jc. If 1 or 2 characters cannot be removed to produce a palindrome, then return the string not possible. If the input string is already a palindrome, your program should return the string palindrome. | |
* <p> | |
* The input will only contain lowercase alphabetic characters. Your program should always attempt to create the longest palindromic substring by removing 1 or 2 characters (see second sample test case as an example). The 2 characters you remove do not have to be adjacent in the string. | |
* Examples | |
* Input: "mmop" | |
* Output: not possible | |
* Input |
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 PhotoCapture { | |
// here some stuff for capture image, such as capture session, configurations, photo output | |
// More detail : https://github.com/trilliwon/ArtCamera/blob/master/Camera/Controllers/PhotoCapture.swift | |
} | |
// MARK: - AVCapturePhotoCaptureDelegate | |
extension PhotoCapture: AVCapturePhotoCaptureDelegate { | |
func photoOutput(_ output: AVCapturePhotoOutput, willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) { | |
AudioServicesDisposeSystemSoundID(1108) | |
} |
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 se.hellsoft.jetpackcomposeintro | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.compose.Composable | |
import androidx.compose.Model | |
import androidx.compose.state | |
import androidx.compose.unaryPlus | |
import androidx.ui.core.* | |
import androidx.ui.foundation.shape.border.Border |
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
// | |
// URLRequest+Multipart.swift | |
// | |
// Created by Artur Mkrtchyan on 1/16/19. | |
// Copyright © 2019 arturdev. All rights reserved. | |
// | |
import Foundation | |
import MobileCoreServices |
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
// | |
// TokenAcquisitionService.swift | |
// | |
// Created by Daniel Tartaglia on 16 Jan 2019. | |
// Copyright © 2022 Daniel Tartaglia. MIT License. | |
// | |
import Foundation | |
import RxSwift |
NewerOlder