Tutorial by Examples: pre

Making a sequence of HTTP requests has two primary reasons: Requests are depending on each other (the result from one requests is required for a consecutive request). We want to spread server load into multiple requests. 1. Making multiple dependent requests This can be performed usi...
If you installed Laravel via Composer or the Laravel installer, below configuration you will need. Configuration for Apache Laravel includes a public/.htaccess file that is used to provide URLs without the index.php front controller in the path. Before serving Laravel with Apache, be sure to enabl...
The preprocessor is an important part of the compiler. It edits the source code, cutting some bits out, changing others, and adding other things. In source files, we can include preprocessor directives. These directives tells the preprocessor to perform specific actions. A directive starts with a ...
UILabel, UITextField, & UITextView classes have a new property starting from iOS 10 for automatically resizing their font when a user changes their preferred reading size named adjustsFontForContentSizeCategory. Swift @IBOutlet var label:UILabel! if #available(iOS 10.0, *) { label.adju...
Download WordPress core $ wp core download --locale=nl_NL Install WordPress $ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword [email protected] Display the WordPress version $ wp core version Transform a single-site i...
Nested for loops may be used to iterate over a number of unique iterables. result = [] for a = iterable_a for b = iterable_b push!(result, expression) end end Similarly, multiple iteration specifications may be supplied to an array comprehension. [expression for a = iterabl...
Generator comprehensions follow a similar format to array comprehensions, but use parentheses () instead of square brackets []. (expression for element = iterable) Such an expression returns a Generator object. julia> (x^2 for x = 1:5) Base.Generator{UnitRange{Int64},##1#2}(#1,1:5) Fun...
As node.js is often used to build API, proper CORS setting can be a life saver if you want to be able to request the API from different domains. In the exemple, we'll set it up for the wider configuration (authorize all request types from any domain. In your server.js after initializing express: ...
Requirement is to check if in a form, ‘Online_date’ field is blank or filled. If it is blank, then fill it with current date, on form load. Controller calls ‘$form->createForm()” with type “folder”. In “FolderType”, event subscriber “FolderSubscriber” is added. Controller: $form =...
func Recovery(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request){ defer func() { if err := recover(); err != nil { // respondInternalServerError } }() h.ServeHTTP(w , r) }...
public class Person { private final String salutation; private final String firstName; private final String middleName; private final String lastName; private final String suffix; private final Address address; private final boolean isFemale; private final boolean isEmployed; private final ...
A frequent question about StackViews inside Scrollviews comes from ambiguous with/heigh alerts on interface builder. As this answer explained, it is necessary to: Add in the UIScrollView a UIView (the contentScrollView); In this contentScrollView, set top, bottom, left and right margins to 0 Se...
Let's define a grammar enabling us to perform additions, multiplications with the usage of parenthesis. To add more value to this example, we are going to compute the result of the arithmetic expression. Summary of the grammar: expression → times expression → times '+' expression times → elemen...
Install Firebase resource in the the AppScript To do that click on Resources and then on Libraries. Firebase has a unique project library key that need to be installed in the AppScript. Click on Libraries The following pop-up appears. Enter the following project key in the textbox. MYeP8ZEE...
A savepoint stores two things: (a) the positions of all datasources, (b) the states of operators. Savepoints are useful in many circonstances: slight application code updates Flink update changes in parallelism ... As of version 1.3 (also valid for earlier version): checkpoint must be ...
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...
This is a tutorial to create a hello world example: Used for this example: Android Studio 2.3; To Start use Android Studio to create a new Project with an empty activity. Then we add some simple functionality to the App that we can test: We add a button which when clicks displays "Hello World...
file_unzip = 'filename.zip' unzip = zipfile.ZipFile(file_unzip, 'r') unzip.extractall() unzip.close()
file_untar = 'filename.tar.gz' untar = tarfile.TarFile(file_untar) untar.extractall() untar.close()
Within JShell, you can evaluate Java expressions, with or without semicolons. These can range from basic expressions and statements to more complex ones: jshell> 4+2 jshell> System.out.printf("I am %d years old.\n", 421) Loops and conditionals are fine, too: jshell> for (int...

Page 31 of 34