Tutorial by Examples: er

Local variables - Those declared within a procedure (subroutine or function) of a class (or other structure). In this example, exampleLocalVariable is a local variable declared within ExampleFunction(): Public Class ExampleClass1 Public Function ExampleFunction() As Integer Dim exa...
$ npm install -g parse-server mongodb-runner $ mongodb-runner start $ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with...
You can also create an instance of Parse Server, and mount it on a new or existing Express website: var express = require('express'); var ParseServer = require('parse-server').ParseServer; var app = express(); var api = new ParseServer({ databaseURI: 'mongodb://localhost:27017/dev', // Conn...
'use strict'; const http = require('http'); const PORT = 8080; const server = http.createServer((request, response) => { let buffer = ''; request.on('data', chunk => { buffer += chunk; }); request.on('end', () => { const responseString = `Received string ${buffe...
["Guten tag " | <<"Hello">>]. In the shell this will be printed as ["Guten tag "|<<"Hello">>] instead of ["Guten tag ",<<"Hello">>]. The pipe operator will create an improper list if the last element o...
<<"Guten tag, Hello">> = iolist_to_binary(["Guten tag, ",<<"Hello">>]). An IO list can be converted to a binary using the iolist_to_binary/1 function. If the data is going to be stored for a long period or sent as a message to other processes ...
In greeter.rb (wherever that goes in your project): class Greeter def greet "Hello, world!" end end In spec/greeter_spec.rb: require_relative '../greeter.rb' RSpec.describe Greeter do describe '#greet' do it "says hello" do expect(Greeter.new.gr...
Clear the canvas using compositing operation. This will clear the canvas independent of transforms but is not as fast as clearRect(). ctx.globalCompositeOperation = 'copy'; anything drawn next will clear previous content.
Lazy, or irrefutable, patterns (denoted with the syntax ~pat) are patterns that always match, without even looking at the matched value. This means lazy patterns will match even bottom values. However, subsequent uses of variables bound in sub-patterns of an irrefutable pattern will force the patter...
CLISP has an integration with GNU Readline. For improvements for other implementations see: How to customize the SBCL REPL.
REST is a protocol-agnostic architecture proposed by Roy Fielding in his dissertation (chapter 5 being the presentation of REST), that generalizes the proven concept of web browsers as clients in order to decouple clients in a distributed system from servers. In order for a service or API to be RES...
All arrays implement the non-generic IList interface (and hence non-generic ICollection and IEnumerable base interfaces). More importantly, one-dimensional arrays implement the IList<> and IReadOnlyList<> generic interfaces (and their base interfaces) for the type of data that they cont...
Rust's coherence rule requires that either the trait or the type for which you are implementing the trait must be defined in the same crate as the impl, so it is not possible to implement Serialize and Deserialize for a type in a different crate directly. The newtype pattern and Deref coercion provi...
HTML: <div class="container"> <div class="child"></div> </div> CSS: .container { height: 500px; width: 500px; display: flex; // Use Flexbox align-items: center; // This centers children vertically in the parent. ...
In features/step_definitions/documentation.rb: When /^I go to the "([^"]+)" documentation$/ do |section| path_part = case section when "Documentation" "documentation" else raise "Unknown documentation section: #{section...
Messages can be written with; Write-Verbose "Detailed Message" Write-Information "Information Message" Write-Debug "Debug Message" Write-Progress "Progress Message" Write-Warning "Warning Message" Each of these has a preference variable; $Ve...
Here is an example of how to define a different action for each Marker's InfoWindow click event. Use a HashMap in which the marker ID is the key, and the value is the corresponding action it should take when the InfoWindow is clicked. Then, use a OnInfoWindowClickListener to handle the event of a ...
Data providers allow creating multiple test inputs to be run within a test. Let's consider a test which verifies that numbers are doubled correctly. To create data provider provide a static method which returns either Object[][] or Iterator<Object[]> (the latter allows for lazy computation of ...
There are many time zones around the world, it is important to make sure your server is set to the right one. This is done in .htaccess by using: SetEnv TZ America/Indianapolis A few example of possible other time zones: America/Los_Angeles America/Los_Angeles - Pacific Time Pacific/Honolulu...
ExecutorService ExecutorService executor = Executors.newFixedThreadPool(50); It is simple and easy to use. It hides low level details of ThreadPoolExecutor. I prefer this one when number of Callable/Runnable tasks are small in number and piling of tasks in unbounded queue does not increase m...

Page 250 of 417