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
| @Published private (set) var brokenRules: [BrokenRule] = [BrokenRule]() | |
| func validate() { | |
| brokenRules.removeAll() | |
| let rules = [ | |
| "Firstname": _firstname.validationError, | |
| "Lastname": _lastname.validationError, | |
| "Username": _username.validationError, |
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 Foundation | |
| import ValidatedPropertyKit | |
| class RegistrationViewModel: ObservableObject { | |
| @Validated(.nonEmpty) | |
| var firstname: String? = "" | |
| @Validated(.nonEmpty) |
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 requests | |
| import os | |
| import shutil | |
| import numpy as np | |
| from numpy import save | |
| import turicreate as tc | |
| random_state = np.random.RandomState(100) | |
| current_directory = os.getcwd() |
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 'package:flutter/material.dart'; | |
| void main() => runApp(App()); | |
| class _AppState extends State<App> { | |
| int _counter = 0; | |
| @override | |
| Widget build(BuildContext context) { |
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 'package:flutter/material.dart'; | |
| void main() => runApp(App()); | |
| class App extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
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
| struct ContentView: View { | |
| var body: some View { | |
| VStack { | |
| Text("0") | |
| .font(.largeTitle) | |
| Button("Increment") { | |
| }.padding() | |
| .background(Color.green) | |
| .foregroundColor(Color.white) |
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
| const redux = require('redux') | |
| const createStore = redux.createStore // returns a function which allows to create a global store | |
| console.log(createStore) | |
| const initialState = { | |
| count: 0, | |
| isAuthenticated: false | |
| } |
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,{ Component } from "react"; | |
| class DisplayName extends Component { | |
| render() { | |
| return <h1>Hello {this.props.name}, age is {this.props.age}</h1> | |
| } | |
| } | |
| export default DisplayName |
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
| // | |
| // BarGraphView.swift | |
| // bar-graph-azamsharp-weekly | |
| // | |
| // Created by Mohammad Azam on 1/25/20. | |
| // Copyright © 2020 Mohammad Azam. All rights reserved. | |
| // | |
| import SwiftUI |