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
--- CREATE SELF-SIGNED ECDSA CERTIFICATE WITH PRIVATE KEY INSIDE ---- | |
1. Open openssl.exe. | |
2. If you haven't chosen a curve, you can list them with this command: | |
ecparam -list_curves | |
I picked sect571r1 for this example. Use this to generate an EC private key if you don't have one already: |
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
//Based on: https://www.youtube.com/watch?v=s6SH72uAn3Q | |
let promiseToCleanRoom = new Promise(function(resolve, reject) { | |
//cleaning the room | |
let isClean = false; | |
if (isClean) | |
resolve('Clean'); | |
else | |
reject('Dirty'); |
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
//Destructing arrays | |
const myArray = [1,2,3,4,5]; | |
const [x,y,z] = myArray; | |
console.log(`${x} ${y} ${z}`); | |
const names = ["Parrot", "Dolpin", "Cat"]; | |
//let name1, name2, name3, name4; | |
let [name1, name2, name3, name4="default"] = names; |
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
const div3 = document.getElementById('div3'); | |
const para = div3.querySelector('p'); | |
const textarea = div3.querySelector('textarea'); | |
const paraText = "User is typing"; | |
let timer; | |
textarea.addEventListener("keyup", addText); | |
textarea.addEventListener("keydown", removeText); | |
function addText(e){ |
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
const paraText = "User is typing"; | |
let timer; | |
textarea.addEventListener("keyup", addText); | |
textarea.addEventListener("keydown", removeText); | |
function addText(e){ | |
para.innerText = paraText; | |
} | |
function removeText(e){ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<style> | |
.dummy { | |
color: red; |
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
3-33-333" | |
"123-33-333" | |
[object Object] { | |
1: "Chris", | |
age: 17, | |
xRay: "zray" | |
} | |
"Yummy!" | |
"Type: coconut" |
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
#This is ecommerce/__init__.py file | |
#If there is a __init__.py in a folder, it makes it a package :) |
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
npm version | |
npm config get msvs_version | |
npm config get msvs_version --global | |
npm config set msvs_version 2013 | |
npm config set msvs_version 2013 --global | |
npm i -g npm@latest //Update to the latest version | |
npm run build //refresh typescript |
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
public class Solution { | |
private int compx; | |
public int MinDepth(TreeNode root) { | |
compx = 0; | |
if (root is null) | |
return 0; | |
Queue queue = new Queue(); |
NewerOlder