Tutorial by Examples

Swift: var centralManager:CBCentralManager! centralManager = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionRestoreIdentifierKey : "com.companyname.appname.central"]) Objective C: @property (nonatomic, strong) CBCentralManager *centralManager; self....
This simple example will remove the service with name "visualizer": docker service rm visualizer
<div class="container"> <div class="row" id="features-strip"> <div class="col s12 l4"> <h1>Feature 1</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, unde facere tempore vero...
<div class="container"> <div class="row"> <div class="col s6"> <div class="card"> <div class="card-image"> <!-- Card Image --> <img src="image.png" alt="Image&...
<div class="container"> <div class="row"> <div class="col s12"> <div class="card horizontal"> <div class="card-image"><img src="image.png"></div> <div class=&quot...
<div class="container"> <div class="row"> <div class="col s5"> <div class="card"> <div class="card-image"> <img src="image.png"> ...
This example will scale the service to 4 instances: docker service scale visualizer=4 In Docker Swarm Mode we do not stop a service. We scale it down to zero: docker service scale visualizer=0
success and Error : A success callback that gets invoked upon successful completion of an Ajax request. A failure callback that gets invoked in case there is any error while making the request. Example: $.ajax({ url: 'URL', type: 'POST', data: yourData, datat...
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css"> <style media="screen"> .sidebar { height: 100vh; } </style> <div class="row"> <div class...
If you are using Bootstrap Modal then be sure that Model tabindex=-1 is removed. $('#targetId').select2({ width: '100%', dropdownParent: $("#myModal") })
“Adapter” as the name suggests is the object which lets two mutually incompatible interfaces communicate with each other. For example: if you buy a Iphone 8 (or any other Apple product) you need alot of adapters. Because the default interface does not support audio jac or USB. With these a...
If you already have access to your Document class from your workspace (Using Workspaces) it is easy to access the root of your Syntax tree. Document document = ... // Get document from workspace or other source var syntaxRoot = await document.GetSyntaxRootAsync();
You can easily navigate the a Syntax Tree using LINQ. For example it is easy to get all the ClassDeclarationSyntax nodes (declared classes), that have a name starting with the letter A: var allClassesWithNameStartingWithA = syntaxRoot.DescendantNodes() .OfType<ClassDeclarationSyntax>()...
The CSharpSyntaxWalker class is out of the box implementation of the Visitor pattern, that we can use to traverse our Syntax Tree. Here is a simple example of a Syntax Walker that collects all the struct-s that have a name, starting with the letter A: public class StructCollector : CSharpSyntaxWa...
Each individual connection can be accessed via the connection method on the DB facade, even when there are multiple connections defined. The name passed to the connection method should correspond to one of the connections listed in the config/database.php configuration file: $users = DB::connection...
Prerequisite This guide assumes you have already used BuildTools and have run the Spigot server at least once. It also assumes that you have the Spigot-API jar file which we will use. 1) Start Eclipse; you may change the workspace location if desired. 2) Create a new Project Set the project na...
v6.0.0 Promises are a tool for async programming. In JavaScript promises are known for their then methods. Promises have two main states 'pending' and 'settled'. Once a promise is 'settled' it cannot go back to 'pending'. This means that promises are mostly good for events that only occur once. The...
Inline expansion (also known as inlining) is compiler optimisation that replaces a call to a function with the body of that function. This saves the function call overhead, but at the cost of space, since the function may be duplicated several times. // source: int process(int value) { ret...
Steps: Add dependency to Mockito version 2.x in your gradle (at the time of writing this text the latest version is 2.7.22): testCompile "org.mockito:mockito-core:$versions.mockito" Create a file in test resources with name org.mockito.plugins.MockMaker: Add next line i...
Replace operator: The -replace operator replaces a pattern in an input value using a regular expression. This operator uses two arguments (separated by a comma): a regular expression pattern and its replacement value (which is optional and an empty string by default). "The rain in Seattle&quo...

Page 1225 of 1336