Tutorial by Examples: er

The parent axis contains only the parent of a node. The following expression selects the html element by taking a detour over the body element: /child::html/child::body/parent::html .. is a shortcut for parent::node() The ancestor and ancestor-or-self axes traverse all ancestors of a node. The ...
The following-sibling and preceding-sibling axes contain the siblings before or after the context node, and the following and preceding axes contain all nodes in the document before or after the context node, but: None of these axes contain attribute or namespace nodes. The following axis doesn'...
The attribute and namespace axes contain all attribute and namespace nodes of an element. The shortcut @ stands for attribute::, so the following are equivalent: child::div/attribute::class div/@class
Why do we need this? The current way to do unit testing in Xamarin.Forms is via a platform runner, so your test will have to run within an ios, android, windows or mac UI environment : Running Tests in the IDE Xamarin also provides awesome UI testing with the Xamarin.TestCloud offering, but when ...
const options = require("commander"); options .option("-v, --verbose", "Be verbose"); options .command("convert") .alias("c") .description("Converts input file to output file") .option("-i, --in-file <file_name&...
Assuming a abstract class: class ILogger { virtual ~ILogger() = default; virtual Log(const std::string&) = 0; }; Instead of void doJob(ILogger* logger) { if (logger) { logger->Log("[doJob]:Step 1"); } // ... if (logger) { logge...
Swift let image = UIGraphicsGetImageFromCurrentImageContext() imageView.image = image //assuming imageView is a valid UIImageView object Objective-C UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); imageView.image = image; //assuming imageView is a valid UIImageView object
You may wish to update your custom setting's during the execution of your code, to switch off validation or workflow rules. In the below code, I have created a Schedulable Apex Class which will update the Close Date of any Opportunities whose Close Date is less than or equal to 6 days from the curr...
Xamarin sturio opens Xib file and Storyboards by default in the Xamarin Designer. User can right click on the file and Open With -> `Xcode Interface Builder'
The Bridge pattern is one of the most basic Inversion of Control design patterns. For Xamarin, this pattern is used to reference platform-dependent code from a platform-independent context. For example: using Android's AlertDialog from a Portable Class Library or Xamarin Forms. Neither of those cont...
The Service Locator design pattern is very nearly dependency injection. Like the Bridge Pattern, this pattern can be used to reference platform-dependent code from a platform-independent context. Most interestingly, this pattern relies on the singleton pattern -- everything you put into the service ...
Mediator pattern defines an object (Mediator) that encapsulates how a set of objects interact. It enables many-to-many communication. UML diagram: Key components: Mediator: Defines an interface for communication between Colleagues. Colleague: Is an abstract class, which defines the events to b...
The Monostate pattern is usually referred to as syntactic sugar over the Singleton pattern or as a conceptual Singleton. It avoids all the complications of having a single instance of a class, but all the instances use the same data. This is accomplished mostly by using static data members. One o...
In contrasto to the Singleton, the Monostate is suitable to be inherited to extend its functionalities, as long as member methods are not static. It follows a minimal example in C++: struct Settings { virtual std::size_t width() const noexcept { return width_; } virtual std::size_t heigh...
When only a single argument is supplied to numpy's where function it returns the indices of the input array (the condition) that evaluate as true (same behaviour as numpy.nonzero). This can be used to extract the indices of an array that satisfy a given condition. import numpy as np a = np.arang...
Installation npm install forever -g cd /node/project/directory Usages forever start app.js
SOAP is an acronym for Simple Object Access Protocol which defines a protocol that is used to exchange data via a Remote Procedure Call (RPC) with other SOAP services or clients. It is available in two version: SOAP 1.1 [IETF] SOAP 1.2 [IETF] SOAP 1.2 obsoletes SOAP 1.1 it is therefore recomm...
1. Logs: By default, Heroku allows only 1500 lines of consolidated logs. When more than 1500 lines of logs are required, one has to use addons provided Heroku. 2. Router: HTTP request have 30s timeout for initial response and 55s timeout thereafter. Maximum of 1MB buffer allowed for response. 3....
To use the value stored in a variable, use the dollar sign followed by the variable name enclosed by parentheses or curly braces. x = hello y = $(x) # y now contains the value "hello" y = ${x} # parentheses and curly braces are treated exactly the same If a variable's name is only ...

Page 267 of 417