Tutorial by Examples: er

OperatorComparisonExample==Equali == 0===Equal Value and Typei === "5"!=Not Equali != 5!==Not Equal Value or Typei !== 5>Greater thani > 5<Less thani < 5>=Greater than or equali >= 5<=Less than or equali <= 5
================== TODO: Link each of the drawing commands below to their individual examples. I don't know how to do this since the links to the individual examples point towards the "draft" folder. TODO: Add examples for these path "action" commands: stroke(), fill(), clip() ...
context.bezierCurveTo(control1X, control1Y, control2X, control2Y, endingX, endingY) Draws a cubic Bezier curve starting at the current pen location to a given ending coordinate. Another 2 given control coordinates determine the shape (curviness) of the curve. <!doctype html> <html&gt...
It's possible to perform elementary set operations with Matlab. Let's assume we have given two vectors or arrays A = randi([0 10],1,5); B = randi([-1 9], 1,5); and we want to find all elements which are in A and in B. For this we can use C = intersect(A,B); C will include all numbers which ...
The previous examples demonstrated the individual features of a Future, handling success and failure cases. Usually, however, both features are handled much more tersely. Here's the example, written in a neater and more realistic way: object Calculator { def calculateAndReport(a: Int, b: Int...
To convert exceptions into Either or Option types, you can use methods that provided in scala.util.control.Exception import scala.util.control.Exception._ val plain = "71a" val optionInt: Option[Int] = catching(classOf[java.lang.NumberFormatException]) opt { plain.toInt } val eitherI...
A very interesting type of JOIN is the LATERAL JOIN (new in PostgreSQL 9.3+), which is also known as CROSS APPLY/OUTER APPLY in SQL-Server & Oracle. The basic idea is that a table-valued function (or inline subquery) gets applied for every row you join. This makes it possible to, for example...
If you implement a text-search as LIKE-query, you usually do it like this: SELECT * FROM T_Whatever WHERE SomeField LIKE CONCAT('%', @in_SearchText, '%') However, (apart from the fact that you shouldn't necessarely use LIKE when you can use fulltext-search) this creates a problem when someb...
SOAP services can publish metadata that describes the methods that may be invoked by clients. Clients can use tools such as Visual Studio to automatically generate code (known as client proxies). The proxies hide the complexity of invoking a service. To invoke a service, one merely invokes a metho...
You can create your own tag helpers by implementing ITagHelper or deriving from the convenience class TagHelper. The default convention is to target an html tag that matches the name of the helper without the optional TagHelper suffix. For example WidgetTagHelper will target a <widget> ta...
The alert() method of the window object displays an alert box with a specified message and an OK or Cancel button. The text of that button depends on the browser and can't be modified. Syntax alert("Hello world!"); // Or, alternatively... window.alert("Hello world!"); Prod...
<svg width="400" height="400"> <defs> <pattern id="pattern1" width="0.2" height="0.2" patternUnits="objectBoundingBox"> <circle cx="10" cy="10" r="10" fill="#0000ff" /&...
Most examples will work across multiple versions, if you are using a "new" feature you should mention when this was introduced. Example: sort_values.
Use ionic serve to start a local development server for app dev and testing. This is useful for both desktop browser testing, and to test within a device browser which is connected to the same network. Additionally, this command starts LiveReload which is used to monitor changes in the file system. ...
In the example below we use std::string and operator>> to read items from the file. std::ifstream file("file3.txt"); std::vector<std::string> v; std::string s; while(file >> s) // keep reading until we run out { v.push_back(s); ...
//iterates over a map, getting the key and value at once var map = hashMapOf(1 to "foo", 2 to "bar", 3 to "baz") for ((key, value) in map) { println("Map[$key] = $value") }
<svg width="900px" height="400px" viewBox="0 0 900 400"> <defs> <filter id="basicGaussian"> <feGaussianBlur stdDeviation="5"/> </filter> </defs> <image xlink:href=&q...
<svg width="900px" height="400px" viewBox="0 0 900 400"> <defs> <filter id="xAxisGaussian"> <feGaussianBlur stdDeviation="5 0"/> </filter> </defs> <image xlink:href=...
// Get the battery API navigator.getBattery().then(function(battery) { // Battery level is between 0 and 1, so we multiply it by 100 to get in percents console.log("Battery level: " + battery.level * 100 + "%"); });

Page 135 of 417