Tutorial by Examples: f

HeroChildComponent has two input properties, typically adorned with @Input decorations. import { Component, Input } from '@angular/core'; import { Hero } from './hero'; @Component({ selector: 'hero-child', template: ` <h3>{{hero.name}} says:</h3> <p>I, {{hero.nam...
First you add System.Security.Cryptography and System.IO to your project public string GetSha1Hash(string filePath) { using (FileStream fs = File.OpenRead(filePath)) { SHA1 sha = new SHA1Managed(); return BitConverter.ToString(sha.ComputeHash(fs...
first you add System.Security.Cryptography namespace to your project public string GetSha1Hash(string filePath) { using (FileStream fs = File.OpenRead(filePath)) { SHA1 sha = new SHA1Managed(); return BitConverter.ToString(sha.ComputeHash(fs)); ...
public static string TextToHash(string text) { var sh = SHA1.Create(); var hash = new StringBuilder(); byte[] bytes = Encoding.UTF8.GetBytes(text); byte[] b = sh.ComputeHash(bytes); foreach (byte a in b) { var h = a.ToString(&...
You can try Azure Functions for free by accessing the link: Try Azure Functions It will open the following page: For this trial, you can create your functions using C# or JavaScript, however Azure Functions also supports F#, Node.js, Python, PHP, batch, bash, or any executable. After selection ...
The code example below demonstrate how you can get a lighter and darker shade of a given color, useful in applications having dynamic themes For Darker Color + (UIColor *)darkerColorForColor:(UIColor *)c { CGFloat r, g, b, a; if ([c getRed:&r green:&g blue:&b alpha:&a]) ...
As stated above Functions are smaller procedures that contain small pieces of code which may be repetitive inside a Procedure. Functions are used to reduce redundancy in code. Similar to a Procedure, A function can be declared with or without an arguments list. Function is declared as a return ty...
In Sprite-Kit, there is the concept of collisions which refers to the SK physics engine handling how physics objects interact when they collide i.e. which ones bounce off which other ones. It also has the concept of contacts, which is the mechanism by which your program gets informed when 2 physics...
const languages = [ 'JavaScript', 'Python', 'Java', 'Elm', 'TypeScript', 'C#', 'F#' ] // one liner const Language = ({language}) => <li>{language}</li> Language.propTypes = { message: React.PropTypes.string.isRequired } /** * If there are more ...
The C99 and C11 standards specify the following length modifiers for printf(); their meanings are: ModifierModifiesApplies tohhd, i, o, u, x, or Xchar, signed char or unsigned charhd, i, o, u, x, or Xshort int or unsigned short intld, i, o, u, x, or Xlong int or unsigned long intla, A, e, E, f, F, ...
Gin is a web framework written in Golang. It features a martini-like API with much better performance, up to 40 times faster. If you need performance and good productivity, you will love Gin. There will be 8 packages + main.go controllers core libs middlewares public routers services...
Animation below shows what is happening when you use IDataInput interface methods to access data form ByteArray and other classes which implement this interface.
There is a way to simplify defining autolayout for views using VFL. It may seem hard at first, but it is actually really easy to use. Some definitions first: | represents superview H: or V: represent current orientation - horizontal or vertical view names should be enclosed in square brackets ...
Checkpointing configuration is done in two steps. First, you need to choose a backend. Then, you can specify the interval and mode of the checkpoints in a per-application basis. Backends Available backends Where the checkpoints are stored depends on the configured backend: MemoryStateBackend...
Before 1.2, the only way to persist state/retain a checkpoint after a job termination/cancellation/persistant failure was through a savepoint, which is triggered manually. Version 1.2 introduced persistent checkpoints. Persistent checkpoints behave very much like regular periodic checkpoints except...
import Foundation enum Breed: String { case bulldog = "Bulldog" case doberman = "Doberman" case labrador = "Labrador" } struct Dog { let name: String let breed: String let age: Int }
import Foundation protocol DoggyView: NSObjectProtocol { func startLoading() func finishLoading() func setDoggies(_ doggies: [DoggyViewData]) func setEmpty() }
import Foundation typealias Result = ([Dog]) -> Void class DoggyService { func deliverDoggies(_ result: @escaping Result) { let firstDoggy = Dog(name: "Alfred", breed: Breed.labrador.rawValue, age: 1) let secondDoggy = Dog(name: "Vinny&quot...
import Foundation class DoggyPresenter { // MARK: - Private fileprivate let dogService: DoggyService weak fileprivate var dogView: DoggyView? init(dogService: DoggyService){ self.dogService = dogService } func attachView(_ attach: Bool, view: DoggyView...
import UIKit class DoggyListViewController: UIViewController, UITableViewDataSource { @IBOutlet weak var emptyView: UIView? @IBOutlet weak var tableView: UITableView? @IBOutlet weak var spinner: UIActivityIndicatorView? fileprivate let dogPresenter = DoggyPresenter(dogSe...

Page 406 of 457