Tutorial by Examples: ti

Returns a new deque object initialized left-to-right (using append()) with data from iterable. If iterable is not specified, the new deque is empty. Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, me...
In the following example we will create a service with the name visualizer. We will specify a custom label and remap the internal port of the service from 8080 to 9090. In addition we will bind mount an external directory of the host into the service. docker service create \ --name=visual...
This simple exampe will create a hello world web service that will listen on the port 80. docker service create \ --publish 80:80 \ tutum/hello-world
You can install mocha either globally or in your project folder. The latter is the preferred way. In all the example let's assume that all the test files are in a test folder within the project folder. Install Mocha locally To install mocha in your project folder, you can use the following npm co...
This example will show you how to use Dependency Inject to use other services registered in the Drupal environment. Imagine you have an SVG image file that changes colors depending on some random CSS/Javascript thing in your project. To be able to target the SVG with CSS you have to actually have t...
There are several ways to mark a comment block as a detailed description, so that this comment block is parsed by Doxygen and added as a description of the following code item to the documentation. The first and most common one are C style comments with an extra asterisk in the comment start sequenc...
Detailed instructions on getting split set up or installed.
Using the Flyable example as a starting point, we can add a second interface, Swimmable, with the following code: Sub Swim() ' No code End Sub The Duck object can Implement both flying and swimming: Implements Flyable Implements Swimmable Public Sub Flyable_Fly() Debug.Print &quo...
In tables recording events there is often a datetime field recording the time an event happened. Finding the single most recent event can be difficult because it's always possible that two events were recorded with exactly identical timestamps. You can use row_number() over (order by ...) to make su...
Typically, before developing a new HERE SDK application, you need to acquire a set of credentials by registering your application on http://developer.here.com. Each application requires a unique set of credentials. When you register your app, the registered bundle identifier must match the package n...
The PERCENTILE_DISC function lists the value of the first entry where the cumulative distribution is higher than the percentile that you provide using the numeric_literal parameter. The values are grouped by rowset or partition, as specified by the WITHIN GROUP clause. The PERCENTILE_CONT functi...
Lets following are the class definition class A def a; end end module B def b; end end class C < A include B def c; end end What are the instance methods of C? C.instance_methods # [:c, :b, :a, :to_json, :instance_of?...] What are the instance methods that declare...
In SQL, you use date and time data types to store calendar information. These data types include the time, date, smalldatetime, datetime, datetime2, and datetimeoffset. Each data type has a specific format. Data typeFormattimehh:mm:ss[.nnnnnnn]dateYYYY-MM-DDsmalldatetimeYYYY-MM-DD hh:mm:ssdatetim...
Haystack: The string in which given pattern needs to be searched. Needle: The pattern to be searched. Time complexity: Search portion (strstr method) has the complexity O(n) where n is the length of haystack but as needle is also pre parsed for building prefix table O(m) is required for building p...
Callback functions in JavaScript Callback functions are common in JavaScript. Callback functions are possible in JavaScript because functions are first-class citizens. Synchronous callbacks. Callback functions can be synchronous or asynchronous. Since Asynchronous callback functions may be more c...
Detailed instructions on getting nuget set up or installed.
Debugging questions. When question is related to debugging specific exception always provide relevant traceback. While it is advisable to remove duplicated outputs (from different executors or attempts) don't cut tracebacks to a single line or exception class only. Performance questions. Dependin...
An example of a configuration function in SQL is the @@SERVERNAME function. This function provides the name of the local server that's running SQL. SELECT @@SERVERNAME AS 'Server' ServerSQL064 In SQL, most data conversions occur implicitly, without any user intervention. To perform any convers...
In your routes/index.js Here user is the model for the userSchema router.post('/login', function(req, res, next) { if (!req.body.username || !req.body.password) { return res.status(400).json({ message: 'Please fill out all fields' }); } passpor...
A common requirement for a Java application is that can be deployed by copying a single file. For simple applications that depend only on the standard Java SE class libraries, this requirement is satisfied by creating a JAR file containing all of the (compiled) application classes. Things are not ...

Page 415 of 505