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
public class VendorNewAdapter extends FirebaseRecyclerAdapter<NewsPaper, NewsPaperHolder> implements SimpleAlertDialog.SingleChoiceArrayItemProvider{ | |
private static final int REQUEST_CODE_SINGLE_CHOICE_LIST = 34005; | |
private static final int REQUEST_CODE_SINGLE_Any_CHOICE_LIST = 340005; | |
private static final java.lang.String CHOICE_DIALOG = "dialogTagChoice"; | |
private boolean isColorsInverted = false; |
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
public class MainClass { | |
public static void main(String[] args) { | |
Scanner lop = new Scanner(System.in); | |
List<Pair> pairList = new ArrayList<>(); | |
System.out.println("Enter number total number of people to group"); |
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
extension Array { | |
func chunked(by chunkSize: Int) -> [[Element]] { | |
return stride(from: 0, to: self.count, by: chunkSize).map { | |
Array(self[$0 ..< Swift.min($0 + chunkSize, self.count)]) | |
} | |
} | |
} | |
extension Array { | |
mutating func shuffle () { |
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
func isValidEmailAddress(email: String) -> Bool { | |
var returnValue = true | |
let emailRegEx = "[A-Z0-9a-z.-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,3}" | |
do { | |
let regex = try NSRegularExpression(pattern: emailRegEx) | |
let nsString = email as NSString | |
let results = regex.matches(in: email, range: NSRange(location: 0, length: nsString.length)) | |
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 { Injectable } from "@angular/core"; | |
import { Component } from "@angular/core"; | |
import { Http } from "@angular/http"; | |
import { facebookVariables } from "../../getFBSDK"; | |
import { Router } from "@angular/router"; | |
import { LocalStorage, JSONSchema } from "@ngx-pwa/local-storage"; | |
import { User } from "../models/User"; | |
import {GoogleAuthService} from "ng-gapi/lib/GoogleAuthService"; | |
import GoogleUser = gapi.auth2.GoogleUser; |
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
| |
typealias Param = [AnyHashable: Any]? | |
| |
/// We use `CordinatorActionFactory` in AppDelegate to process data | |
final class CordinatorActionFactory { | |
| |
/// make a CoordinatorAction from url scheme data gotten from `CordinatorActionFactory` | |
func make(from urlSchemeHost: String, parameters: [String: Any]) -> CoordinatorAction? { | |
var params = parameters | |
params["type"] = urlSchemeHost |
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 UIKit | |
@IBDesignable | |
open class GradientView: UIView { | |
@IBInspectable | |
public var startColor: UIColor = .white { | |
didSet { | |
gradientLayer.colors = [startColor.cgColor, endColor.cgColor] | |
setNeedsDisplay() | |
} |
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 UIKit | |
final class ColorSelectionControl: UIControl { | |
private var buttons = [UIButton]() | |
private let colors: [UIColor] | |
lazy var currentSelectedColor: UIColor = colors[0] | |
init(colors: [UIColor]) { |
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 UIKit | |
import RxSwift | |
import RxCocoa | |
final class DropdownTextField: CustomTextField, UIPickerViewDataSource, UIPickerViewDelegate { | |
var onDoneClicked: BehaviorRelay<Void?> = BehaviorRelay(value: nil) | |
var source: [String] = [] | |
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 CoreML | |
import Foundation | |
import UIKit | |
public class Lesion { | |
public static let inputWidth = 416 | |
public static let inputHeight = 416 | |
public static let maxBoundingBoxes = 4 | |
// Tweak these values to get more or fewer predictions. |
OlderNewer