let
: Variables can be reassigned, but canโt be redeclared in the same scope.const
: Variables must be assigned an initial value, but canโt be redeclared in the same scope, and canโt be reassigned.- Hoisting: Before any JavaScript code is executed, all variables are hoisted, which means they're raised to the top of the function scope.
- Temporal dead zone: If a variable is declared using
let
orconst
inside a block of code, then the variable is stuck in what is known as the temporal dead zone until the variableโs declaration is processed. - Suggested to ditch
var
in place of usinglet
andconst
. - Template literals: Denoted with backticks ( `` ), template literals can contain placeholders which are represented using
${expression}
. - Examples:
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
* MCrypt API available online: | |
* http://linux.die.net/man/3/mcrypt | |
*/ | |
#include <mcrypt.h> |
// Creating subarrays for input array given based on variable size k.
// Example: Input: [8, 2, 4, 20] & k=2 it should output to[[8, 2], [2, 4], [4, 20]]
const subArr = (arr, k) => {
return arr.map((a, i) => {
return arr.slice(i, k + i).length === k ? arr.slice(i, k + i) : '';
}).filter((a) => a.length);
}
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
docker image dockerdev-enp.bin.cloud.barco.com/tfnnxt/system-manager-open-api:0.0.1-setup-NET0101-589-85e5dd9bb4-jenkins-10 | |
docker image dockerdev-enp.bin.cloud.barco.com/tfnnxt/wall-space:0.0.0-ui-screen-work-flow-b3533838a9-jenkins-5 |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
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
import React, { useState, useEffect } from 'react'; | |
const ImageLoad = React.memo(({ src, placeholder, alt = "" }) => { | |
const [loading, setLoading] = useState(true); | |
const [currentSrc, updateSrc] = useState(placeholder); | |
useEffect(() => { | |
// start loading original image | |
const imageToLoad = new Image(); | |
imageToLoad.src = src; |
Since we want to keep this challenge rather less time consuming, we want you to create a small React app and display popular repositories of the week from Github. The user should have an opportunity to filter the repositories by the programming language of choice.
That would be nice to see some information about the repositories such as repository name, descriptions, etc.
- Please have a look at Github documentation to find out the desired endpoint.
- Feel free to experiment anything concerning the styles.
OlderNewer