This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Store | |
| localStorage.setItem( 'name', 'Smith' ); | |
| // Retrieve | |
| console.log( localStorage.getItem( 'name' ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "SD.h" | |
| #include "SPI.h" | |
| #include "TMRpcm.h" | |
| #define SD_ChipSelectPin 10 | |
| TMRpcm tmrpcm; | |
| void setup() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create an Element | |
| let ele = document.createElement( 'div' ); // Replace 'div' with required element | |
| // Insert Text | |
| ele.innerText = 'Hello World!'; | |
| // or | |
| ele.innerHTML = 'Hello World!'; | |
| // or, not recommended | |
| let textNode = document.createTextNode( 'Hello World!' ); // Create a text node | |
| ele.appendChild( textNode ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .wp-caption | |
| { | |
| margin-bottom: 1.5em; | |
| max-width: 100%; | |
| } | |
| .wp-caption-text | |
| { | |
| text-align: center; | |
| } | |
| .sticky |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header( 'Access-Control-Allow-Origin: *' ); | |
| echo 'Hello World!'; | |
| // Ref: https://www.php.net/manual/en/reserved.variables.post.php#125651 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header( 'Access-Control-Allow-Origin: *' ); | |
| $received = file_get_contents( 'php://input' ); | |
| echo $received; | |
| // Ref: https://www.php.net/manual/en/reserved.variables.post.php#125651 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="icon" href="src/favicon.ico"> | |
| <link rel="icon" href="src/favicon.svg" type="image/svg+xml"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function qs( cls ) | |
| { | |
| return document.querySelector( cls ); | |
| } | |
| function qsa( cls ) | |
| { | |
| return document.querySelectorAll( cls ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let s = document.createElement( 'style' ); | |
| s.innerText = ` | |
| .box | |
| { | |
| display: none; | |
| } | |
| `; | |
| document.head.appendChild( s ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // One time event | |
| setTimeout( function(){}, 1000 ); | |
| // Repetitive event | |
| setInterval( function(){}, 1000 ); | |
| // If these need to be canceled, then assign them | |
| // to a variable and then clear them like this. | |
| clearTimeout( assignedVar ); | |
| clearInterval( assignedVar ); |