Tutorial by Examples: ed

The key to correctly stretching is in the top and left border. The top border controls horizontal stretching and the left border controls vertical stretching. This example creates rounded corners suitable for a Toast. The parts of the image that are below the top border and to the right of the ...
INSERT INTO Customers (FName, LName, Email, PreferredContact) VALUES ('Zack', 'Smith', '[email protected]', 'EMAIL'); This statement will insert a new row into the Customers table. Data will only be inserted into the columns specified - note that no value was provided for the PhoneNumber column. ...
$.ajax({ url: 'https://api.dropboxapi.com/2/sharing/add_folder_member', type: 'POST', processData: false, data: JSON.stringify({"shared_folder_id": "84528192421","members": [{"member": {".tag": "email","email":...
You will first need to create a directory, access it in your shell and install Express using npm by running npm install express --save Create a file and name it app.js and add the following code which creates a new Express server and adds one endpoint to it (/ping) with the app.get method: const e...
Python 3.2+ has support for %z format when parsing a string into a datetime object. UTC offset in the form +HHMM or -HHMM (empty string if the object is naive). Python 3.x3.2 import datetime dt = datetime.datetime.strptime("2016-04-15T08:27:18-0500", "%Y-%m-%dT%H:%M:%S%z"...
Dates don't exist in isolation. It is common that you will need to find the amount of time between dates or determine what the date will be tomorrow. This can be accomplished using timedelta objects import datetime today = datetime.date.today() print('Today:', today) yesterday = today - date...
Given that the module from the Defining a Module section exists in the file test.js, you can import from that module and use its exported members: import {doSomething, MyClass, PI} from './test' doSomething() const mine = new MyClass() mine.test() console.log(PI) The somethingPrivate()...
Sometimes you may encounter members that have really long member names, such as thisIsWayTooLongOfAName(). In this case, you can import the member and give it a shorter name to use in your current module: import {thisIsWayTooLongOfAName as shortName} from 'module' shortName() You can import m...
The class template std::shared_ptr defines a shared pointer that is able to share ownership of an object with other shared pointers. This contrasts to std::unique_ptr which represents exclusive ownership. The sharing behavior is implemented through a technique known as reference counting, where the...
If you don't want to add Unix commands to your PATH on Windows, you can download a standalone SSH client like PuTTY. Download PuTTY here, then follow the instructions below to get a build machine. Call meteor admin get-machine <os-architecture> --json Copy and save the private key from the...
To mark text as inserted, use the <ins> tag: <ins>New Text</ins> To mark text as deleted, use the <del> tag: <del>Deleted Text</del> To strike through text, use the <s> tag: <s>Struck-through text here</s>
If you are using the PASSWORD_DEFAULT method to let the system choose the best algorithm to hash your passwords with, as the default increases in strength you may wish to rehash old passwords as users log in <?php // first determine if a supplied password is valid if (password_verify($plaintex...
Lazy stored properties have values that are not calculated until first accessed. This is useful for memory saving when the variable's calculation is computationally expensive. You declare a lazy property with lazy: lazy var veryExpensiveVariable = expensiveMethod() Often it is assigned to a retu...
Different from stored properties, computed properties are built with a getter and a setter, performing necessary code when accessed and set. Computed properties must define a type: var pi = 3.14 class Circle { var radius = 0.0 var circumference: Double { get { ret...
You can nest output buffers and fetch the level for them to provide different content using the ob_get_level() function. <?php $i = 1; $output = null; while( $i <= 5 ) { // Each loop, creates a new output buffering `level` ob_start(); print "Current nest level: &quo...
If you have already added a file to your Git repository and now want to stop tracking it (so that it won't be present in future commits), you can remove it from the index: git rm --cached <file> This will remove the file from the repository and prevent further changes from being tracked by...
<script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id="PLAYER_DIV_ID"></div> <script type="text/javascript"> var options = { width: 854, height: 480, video: "v53336925", };...
The following is how to properly use the java.util.Scanner class to interactively read user input from System.in correctly( sometimes referred to as stdin, especially in C, C++ and other languages as well as in Unix and Linux). It idiomatically demonstrates the most common things that are requested ...
1. Lists 2. Can be 3. Numbered Lists Can be Numbered Note that the numbers themselves are ignored: 1. This is the first item 5. This is the fifth item 7. This is the seventh item This is the first item This is the fifth item This is the seventh item However, the firs...
<script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id="{PLAYER_DIV_ID}"></div> <script type="text/javascript"> var options = { width: 854, height: 480, channel: "{CHANNEL}" ...

Page 7 of 145