This file contains 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
document.querySelectorAll('[value="Setuju"]').forEach((setuju) => (setuju.checked = true)); | |
document.getElementById("securityCode").scrollIntoView(); |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#undef max | |
struct Node_AVL | |
{ | |
int value; | |
int height; | |
struct Node_AVL *left, *right; |
This file contains 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
{ | |
"TSX Function Component for React Web": { | |
"prefix": "cmp-web", | |
"body": [ | |
"interface $1Props {}\n", | |
"export default function $1(props: $1Props) {", | |
"\treturn (", | |
"\t\t<div>", | |
"\t\t\t<p>$1</p>", | |
"\t\t</div>", |
This file contains 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
/** | |
* It binds the function to the class instance. | |
*/ | |
function AutoBind(_: any, __: string, descriptor: PropertyDescriptor) { | |
const originalMethod = descriptor.value | |
const adjustedDescriptor: PropertyDescriptor = { | |
configurable: true, | |
enumerable: false, | |
get() { | |
const boundFunction = originalMethod.bind(this) |
This file contains 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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Composer; | |
use Symfony\Component\Finder\Finder; | |
use Illuminate\Filesystem\Filesystem; | |
use Symfony\Component\Console\Input\InputArgument; |
This file contains 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
/** | |
* Convert a string to a URL slug | |
* @param {string} str - The string to be slugified. | |
* @returns {string} The slugified string. | |
*/ | |
function toSlug(str) { | |
str = str.replace(/^\s+|\s+$/g, ""); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc |
NewerOlder