Tutorial by Examples: e

git show shows various Git objects. For commits: Shows the commit message and a diff of the changes introduced. CommandDescriptiongit showshows the previous commitgit show @~3shows the 3rd-from-last commit For trees and blobs: Shows the tree or blob. CommandDescriptiongit show @~3:shows the ...
Whatever you do to customize Vim, it should NEVER happen outside of $HOME: on Linux, BSD and Cygwin, $HOME is usually /home/username/, on Mac OS X, $HOME is /Users/username/, on Windows, $HOME is usually C:\Users\username\. The canonical location for your vimrc and your vim directory is at ...
Like most scripting languages, vimscript has variables. One can define a variable with the :let command: let variable = value and delete it with :unlet: unlet variable In Vim, variables can be scoped by prepending a single letter and a colon to their name. Plugin authors use that feature to...
Some formats can take additional parameters, such as the width of the formatted string, or the alignment: >>> '{:.>10}'.format('foo') '.......foo' Those can also be provided as parameters to format by nesting more {} inside the {}: >>> '{:.>{}}'.format('foo', 10) '.......
By default the built-in Request Localization middleware only supports setting culture via query, cookie or Accept-Language header. This example shows how create a middleware which allows to set the culture as part of the path like in /api/en-US/products. This example middleware assumes the locale t...
Avoid Ambiguity The name of classes, structures, functions and variables should avoid ambiguity. Example: extension List { public mutating func remove(at position: Index) -> Element { // implementation } } The function call to this function will then look like this: li...
Using natural language Functions calls should be close to natural English language. Example: list.insert(element, at: index) instead of list.insert(element, position: index) Naming Factory Methods Factory methods should begin with the prefix `make`. Example: factory.makeObject() ...
By default, one should subscribe to event using inspector, but sometimes it's better to do it in code. In this example we subscribe to click event of a button in order to handle it. using UnityEngine; using UnityEngine.UI; [RequireComponent(typeof(Button))] public class AutomaticClickHandler :...
In case we want to use enum with more information and not just as constant values, and we want to be able to compare two enums. Consider the following example: public enum Coin { PENNY(1), NICKEL(5), DIME(10), QUARTER(25); private final int value; Coin(int value){ this....
The angular.equals function compares and determines if 2 objects or values are equal, angular.equals performs a deep comparison and returns true if and only if at least 1 of the following conditions is met. angular.equals(value1, value2) If the objects or values pass the === comparison If b...
<svg xmlns="http://www.w3.org/2000/svg"> <text x="40" y="60" font-size="28">Hello World!</text> </svg> The x and y coordinate specifies the position of the bottom-left corner of the text (unless text-anchor has been modified). ...
Using the baseline-shift parameter, you can specify super- or subscript. But this is not supported by all major browsers. <svg xmlns="http://www.w3.org/2000/svg"> <text x="10" y="20">x<tspan baseline-shift="super">2</tspan></te...
The rotate property rotates each character by the specified angle. <svg xmlns="http://www.w3.org/2000/svg"> <text x="10" y="20" rotate="30">Each character is rotated</text> </svg> To rotate the whole text element, you have to ...
In cases such as restoring a database dump, or otherwise wishing to push some information through a pipe from the host, you can use the -i flag as an argument to docker run or docker exec. E.g., assuming you want to put to a containerized mariadb client a database dump that you have on the host, in...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <line x1="10" y1="10" x2="100" y2="100" stroke="red" stroke-width="10" /> <line x1="100" y1="10&...
docker inspect <image> The output is in JSON format. You can use jq command line utility to parse and print only the desired keys. docker inspect <image> | jq -r '.[0].Author' The above command will shows author name of the images.
Parameters AttributeRequiredTypeDefaultDescriptionindextruestringVariable name for the loop's index. Defaults to the variables scope.fromtruenumericStarting value for the index.totruenumericEnding value for the index.stepfalsenumeric1Value by which to increase or decrease the index per iteration.Ba...
Example for date or time range.
Consider the table dbo.state_zip, which contains the columns city, statecode and zipcode and has over 80,000 records. Parameters AttributeRequiredTypeDefaultDescriptionquerytruestringThe variable name of a query object.startrowfalsenumericThe starting row index of the query object.endrowfalsenumer...
<cfloop list="#myFile#" index="FileItem" delimiters="#chr(10)##chr(13)#"> <cfoutput> #FileItem#<br /> </cfoutput> </cfloop>

Page 348 of 1191