Tutorial by Examples: er

Bold Text To bold text, use the <strong> or <b> tags: <strong>Bold Text Here</strong> or <b>Bold Text Here</b> What’s the difference? Semantics. <strong> is used to indicate that the text is fundamentally or semantically important to the surrounding...
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>
To offset text either upward or downward you can use the tags <sup> and <sub>. To create superscript: <sup>superscript here</sup> To create subscript: <sub>subscript here</sub>
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...
password_verify() is the built-in function provided (as of PHP 5.5) to verify the validity of a password against a known hash. <?php if (password_verify($plaintextPassword, $hashedPassword)) { echo 'Valid Password'; } else { echo 'Invalid Password.'; } ?> All supported hashi...
Spoilers are used to hide text or images that would otherwise negatively impact another user's experience. They can be created using >! >!This is hidden until your cursor hovers on top of it This is hidden until your cursor hovers on top of it Note: This is not part of standard markup...
Properties can be added to a class or struct (technically enums too, see "Computed Properties" example). These add values that associate with instances of classes/structs: class Dog { var name = "" } In the above case, instances of Dog have a property named name of type...
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...
Type properties are properties on the type itself, not on the instance. They can be both stored or computed properties. You declare a type property with static: struct Dog { static var noise = "Bark!" } print(Dog.noise) // Prints "Bark!" In a class, you can use the c...
Mathematical operations on values other than numbers return NaN. "a" + 1 "b" * 3 "cde" - "e" [1, 2, 3] * 2 An exception: Single-number arrays. [2] * [3] // Returns 6 Also, remember that the + operator concatenates strings. "a" + "b&...
- (void)methodWithBlock:(returnType (^)(paramType1, paramType2, ...))name;
Output buffering allows you to store any textual content (Text, HTML) in a variable and send to the browser as one piece at the end of your script. By default, php sends your content as it interprets it. <?php // Turn on output buffering ob_start(); // Print some output to the buffer (via...
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...
In this example, we have an array containing some data. We capture the output buffer in $items_li_html and use it twice in the page. <?php // Start capturing the output ob_start(); $items = ['Home', 'Blog', 'FAQ', 'Contact']; foreach($items as $item): // Note we're about to step &q...
ob_start(); $user_count = 0; foreach( $users as $user ) { if( $user['access'] != 7 ) { continue; } ?> <li class="users user-<?php echo $user['id']; ?>"> <a href="<?php echo $user['link']; ?>"> <?php echo $user...
<?php ob_start(); ?> <html> <head> <title>Example invoice</title> </head> <body> <h1>Invoice #0000</h1> <h2>Cost: £15,000</h2> ... </body> </html> <?php...
<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...

Page 22 of 417