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
Afghanistan: AF[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){5}\s? | |
Albania: AL[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){2}([a-zA-Z0-9]{4}\s?){4}\s? | |
Algeria: DZ[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? | |
Andorra: AD[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){2}([a-zA-Z0-9]{4}\s?){3}\s? | |
Angola: AO[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){5}\s? | |
Anguilla: AI[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? | |
Antarctica: AQ[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? | |
Antigua and Barbuda: AG[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? | |
Argentina: AR[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? | |
Armenia: AM[a-zA-Z0-9]{2}\s?([0-9]{4}\s?){4}\s? |
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 backToTopButton = document.getElementById("btn-back-to-top"); | |
window.onscroll = function () { | |
scrollFunction() | |
}; | |
function scrollFunction() { | |
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { | |
backToTopButton.style.display = "block"; | |
} else { |
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
docker login azure -- логин през конзолата в азур | |
docker context create aci nginxacicontext -- създаване на nginx контекст(билд-имидж) през конзолата, където `nginxacicontext` е името на контекста, aci е запазена дума за създаване на контекста | |
docker context ls -- списък на контекстите | |
docker context use nginxacicontext -- използва контекст с име `nginxacicontext` | |
docker context ls -- работещият контекст в списъка има `*` след името си | |
docker logout -- поради странни обстоятелства, не трябва да сме логнати в докерхъб, за да сработи следващата команда. | |
docker run -d -p 80:80 nginxdemos/hello -- вдигаме имидж nginxdemos/hello | |
docker context use default -- използва контекста по подразбиране | |
docker context rm nginxacicontext -- изтрива nginxacicontext |
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 int BinarySearchIterative(int[] array, int target) | |
{ | |
int left = 0; | |
int right = array.Length - 1; | |
while (left <= right) | |
{ | |
int mid = left + (right - left) / 2; | |
if (array[mid] == target) |
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
using System.Text; | |
public class Trie | |
{ | |
private TrieNode root; | |
public Trie() | |
{ | |
this.root = new TrieNode(); | |
} |
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 PriorityQueue<T> | |
{ | |
private List<T> heap; | |
private IComparer<T> comparer; | |
public PriorityQueue() | |
{ | |
heap = new List<T>(); | |
comparer = Comparer<T>.Default; | |
} |
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
// tested and working correcty with Node.js | |
let fs = require('fs'); | |
let path = require('path'); | |
let dir = __dirname; // `current directory` global variable | |
for (let i = 1; i <= 480; i++) { | |
let folderName = String(i).padStart(3, '0'); | |
let folderPath = path.join(dir, folderName); | |
if (!fs.existsSync(folderPath)) { |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Animated Background</title> | |
</head> | |
<body> |
NewerOlder