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
#!/bin/bash | |
dns1=(78.157.42.100 78.157.42.101) | |
dns2=(178.22.122.100 185.51.200.2) | |
dns3=(172.29.2.100 172.29.0.100) | |
dns4=(185.55.226.26 185.55.225.25) | |
echo "0) Reset to default" | |
echo "1) Electro" | |
echo "2) Shecan" |
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
const rectanglesInsideRectangle = (M, N) => { | |
let rectangles = (M*(M+1)/2) * (N*(N+1)/2); | |
let min = Math.min(M, N); | |
let squares = min*(min+1)*(2*min+1)/6; | |
return rectangles + squares; | |
} |
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
function ConvertToFaNumber(str: string): string { | |
const FaDigits = ['۰','۱','۲','۳','۴','۵','۶','۷','۸','۹']; | |
return str.replace(/\d/g, d => FaDigits[parseInt(d)]); | |
} | |
function ConvertToEnNumber(str: string): string { | |
const FaDigits = ['۰','۱','۲','۳','۴','۵','۶','۷','۸','۹']; | |
return str.replace(/[۰-۹]/g, d => FaDigits.indexOf(d).toString()); | |
} |