Tutorial by Examples: e

Recursive joins are often used to obtain parent-child data. In SQL, they are implemented with recursive common table expressions, for example: WITH RECURSIVE MyDescendants AS ( SELECT Name FROM People WHERE Name = 'John Doe' UNION ALL SELECT People.Name FROM Peopl...
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...
Over the course of time B-Tree indexes may become fragmented because of updating/deleting/inserting data. In SQLServer terminology we can have internal (index page which is half empty ) and external (logical page order doesn't correspond physical order). Rebuilding index is very similar to dropping...
You can override the default vmoptions with your own personal settings by choosing Help > Edit Custom VM Options from the Android Studio toolbar. This will create a local copy which you are free to edit. Alternatively, you can edit the default vmoptions directly using the paths given below. Note...
If your array or array-like object is numeric, that is, if all its elements are numbers, then you can use Math.min.apply or Math.max.apply by passing null as the first argument, and your array as the second. var myArray = [1, 2, 3, 4]; Math.min.apply(null, myArray); // 1 Math.max.apply(null, my...
To read default configuration properties: package com.example; public class ExampleApplication { private Properties getDefaults() throws IOException { Properties defaults = new Properties(); try (InputStream defaultsStream = ExampleApplication.class.getResou...
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...
To find the largest or smallest element stored in a vector, you can use the methods std::max_element and std::min_element, respectively. These methods are defined in <algorithm> header. If several elements are equivalent to the greatest (smallest) element, the methods return the iterator to th...
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...
View components encapsulate reusable pieces of logic and views. They are defined by: A ViewComponent class containing the logic for fetching and preparing the data for the view and deciding which view to render. One or more views Since they contain logic, they are more flexible than partial v...
The default project template creates a partial view _LoginPartial.cshtml which contains a bit of logic for finding out whether the user is logged in or not and find out its user name. Since a view component might be a better fit (as there is logic involved and even 2 services injected) the followin...
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...
Prompt will display a dialog to the user requesting their input. You can provide a message that will be placed above the text field. The return value is a string representing the input provided by the user. var name = prompt("What's your name?"); console.log("Hello, " + name); ...
A hello world topic should consist of the most basic, complete, runnable, starter program available, that may be achieved by the widest amount of versions of the language, framework or system being documented. If necessary, the remarks should include basic instructions on how to prepare and execute ...
Move a rectangle 10 units to the right and 20 units down: <svg xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="30" height="30" transform="translate(10, 20)" /> </svg> Move it 0 units horizontally and...
Scale a rectangle horizontally by factor 2 and vertically by factor 0.5: <svg xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="40" height="40" transform="scale(2, 0.5)" /> </svg> The result is equiv...
Rotate a polygon clockwise by 90 degrees around the origin: <svg xmlns="http://www.w3.org/2000/svg"> <polygon points="0,0 30,0 15,20" transform="rotate(90)" /> </svg> The result is equivalent to <svg xmlns="http://www.w3.org/2000/svg...
skew a polygon horizontally by 45 degrees: <svg xmlns="http://www.w3.org/2000/svg"> <polygon points="0,0 30,0 30,30 0,30" transform="skewX(45)" /> </svg> The result is equivalent to <svg xmlns="http://www.w3.org/2000/svg"> ...
Transformations can be concatenated and are applied right to left Rotate a rectangle by 90 degrees and then move it down by 20 units and to the right by 20 units: <svg xmlns="http://www.w3.org/2000/svg"> <rect x="-10" y="-20" width="20" height=...
<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" /&...

Page 377 of 1191