Tutorial by Examples: e

SELECT IDENT_CURRENT('dbo.person'); This will select the most recently-added identity value on the selected table, regardless of connection or scope.
$ 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...
Now that you're running Parse Server, it is time to save your first object. We'll use the REST API, but you can easily do the same using any of the Parse SDKs. Run the following: curl -X POST \ -H "X-Parse-Application-Id: APPLICATION_ID" \ -H "Content-Type: application/json" \...
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...
function wait(ms) { return new Promise(function (resolve, reject) { setTimeout(resolve, ms) }) }
file:write_file("myfile.txt", ["Hi " [<<"there">>], $\n]).
["Guten Tag " | [<<"Hello">>]]. [<<"Guten Tag ">> | [<<"Hello">>]]. [$G, $u, $t, $e, $n , $T, $a, $g | [<<"Hello">>]]. [71,117,116,101,110,84,97,103,<<"Hello">>].
Data_1 = [<<"Hello">>]. Data_2 = [Data_1,<<" Guten Tag ">>].
["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...
Data = ["Guten tag ",<<"Hello">>], Len = iolist_size(Data), [<<Len:32>> | Data]. The size of an iolist can be calculated using the iolist_size/1. This snippet calculates the size of a message and creates and appends it to the front as a four byte bina...
<<"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 ...
The following example uses expect and receive to mock an Order's call to a CreditCardService, so that the test passes only if the call is made without having to actually make it. class Order def cancel CreditCardService.instance.refund transaction_id end end describe Order do des...
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...
The following examples use HAL to express HATEOAS, and make use of: CURIE (Compact URI): used to provide links to API documentation URI templates: URI that includes parameters that must be substituted before the URI is resolved Get blog 123 Request GET https://example.com/api/v1.2/blogs/123...
Most Common Lisp implementations will try to load an init file on startup: ImplementationInit fileSite/System Init fileABCL$HOME/.abclrcAllegro CL$HOME/.clinit.clECL$HOME/.eclrcClasp$HOME/.clasprcCLISP$HOME/.clisprc.lispClozure CLhome:ccl-init.lisp or home:ccl-init.fasl or home:.ccl-init.lispCMUCL$...

Page 701 of 1191