Tutorial by Examples: st

Content has been moved back to good 'ol Servlets wiki page
Content has been moved back to good 'ol Servlets wiki page
Strategy: Strategy is a behavioural pattern, which allows to change the algorithm dynamically from a family of related algorithms. UML of Strategy pattern from Wikipedia : import java.util.*; /* Interface for Strategy */ interface OfferStrategy { public String getName(); public dou...
The type alias keyword combination gives a new name for a type, but the type keyword in isolation declares a new type. Let's examine one of the most fundamental of these types: Maybe type Maybe a = Just a | Nothing The first thing to note is that the Maybe type is declared with a type ...
Fired when the component or directive instance is destroyed. import { Component, OnDestroy } from '@angular/core'; @Component({ selector: 'so-ondestroy-component', templateUrl: 'ondestroy-component.html', styleUrls: ['ondestroy-component.'] }) class OnDestroyComponent implements...
Check the app's authorization status with: //Swift let status: CLAuthorizationStatus = CLLocationManager.authorizationStatus() //Objective-C CLAuthorizationStatus status = [CLLocationManager authorizationStatus]; Test the status against the follow constants: //Swift switch status { case ...
(in-package #:asdf-user) (defsystem #:foo :components ((:file "foo")) :in-order-to ((asdf:test-op (asdf:load-op :foo))) :perform (asdf:test-op (o c) (uiop:symbol-call :foo-tests 'run-tests))) (defsystem #:foo-tests :name "foo-test" :compo...
ASDF provides the package ASDF-USER for developers to define their packages in.
The fmt.Stringer interface requires a single method, String() string to be satisfied. The string method defines the "native" string format for that value, and is the default representation if the value is provided to any of the fmt packages formatting or printing routines. package main ...
Notepad++ can be installed: From the installer downloaded from the project's web site From Ninite, which would download and automatically install the latest version available: https://ninite.com/notepadplusplus/ Built from sources who are available in the GitHub Repo of this project.
Background ============ WebStorm is lightweight yet powerful Integrated Development Environment (IDE) perfectly equipped for complex client-side development and server-side development, it is cross-platform and works on Windows, Mac OS X, and Linux. WebStorm features advanced support for JavaScri...
Observe the notifications UIKeyboardWillShowNotification and UIKeyboardWillHideNotification, update the scrollView content insets according to keyboard height, then scroll to the focused control. - (void)viewDidLoad { [super viewDidLoad]; // register for keyboard notifications [[...
Detailed instructions on getting oauth set up or installed.
Given a Person struct struct Person { let name: String let birthYear: Int? } and an Array of Person(s) let persons = [ Person(name: "Walter White", birthYear: 1959), Person(name: "Jesse Pinkman", birthYear: 1984), Person(name: "Skyler White&quo...
HTTP describes how an HTTP client, such as a web browser, sends an HTTP request via a network to an HTTP server, which then sends an HTTP response back to the client. The HTTP request is typically either a request for an online resource, such as a web page or image, but may also include additiona...
Custom Renderers let developers customize the appearance and behavior of Xamarin.Forms controls on each platform. Developers could use features of native controls. For example, we need to disable scroll in ListView. On iOS ListView is scrollable even if all items are placed on the screen and user s...
Cheatsheet DODON'TControl flow with control statementsControl flow with exceptionsKeep track of ignored (absorbed) exception by loggingIgnore exceptionRepeat exception by using throwRe-throw exception - throw new ArgumentNullException() or throw exThrow predefined system exceptionsThrow custom exce...
RxJava is handy when making serial request. If you want to use the result from one request to make another you can use the flatMap operator: api.getRepo(repoId).flatMap(repo -> api.getUser(repo.getOwnerId()) .subscribe(/*do something with the result*/);
You can use the zip operator to make request in parallel and combine the results eg: Observable.zip(api.getRepo(repoId1), api.getRepo(repoId2), (repo1, repo2) -> { //here you can combine the results }).subscribe(/*do something with the result*/);
C++11 introduced core language and standard library support for moving an object. The idea is that when an object o is a temporary and one wants a logical copy, then its safe to just pilfer o's resources, such as a dynamically allocated buffer, leaving o logically empty but still destructible and co...

Page 103 of 369