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
var arr = [1, 2, 3, 3, 3, 4, 3, 5, 4, 6, 5]; | |
//solution with 2 for loop | |
var counts = {}; | |
for (var i = 0; i < arr.length; i++) { | |
for (var j = i; j < arr.length; j++) { | |
if (arr[i] === arr[j]) { | |
if (counts[arr[i]]) { | |
counts[arr[i]]++; | |
} else { | |
counts[arr[i]] = 1; |
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
//1 function without name anonymous | |
(function () { | |
}); | |
//2 function that with Immediately invocation | |
(function () { | |
console.log("Immediately invocation function") | |
})(); |
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
#! /bin/bash | |
VBR="1500k" | |
FPS="24" | |
QUAL="superfast" | |
YOUTUBE_URL="rtmp://x.rtmp.youtube.com/live2" | |
KEY="-=-=-this-isis-keyy-=-=-" | |
VIDEO_SOURCE="/root/yt/cover.gif" |