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
/// Faster mask for string | |
/// Example: CreateMask("Password123") | |
/// Return: Pas******** | |
/// | |
/// https://www.youtube.com/watch?v=Kd8oNLeRc2c | |
/// | |
public static string CreateMask(string stringValue) => | |
string.Create( | |
stringValue.Length, |
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
<ul class="countries_modal_members_list"> | |
<!----><li class="countries_modal_country_wrap clearfix" ng-repeat="country in countries | limitTo : slice.limit track by $index" style=""> | |
<a class="countries_modal_country" ng-click="$close(country)"> | |
<span class="countries_modal_country_code pull-right" ng-bind="country.code">+7 840</span> | |
<span class="countries_modal_country_name" ng-bind="country.name">Abkhazia</span> | |
</a> | |
</li><!----><li class="countries_modal_country_wrap clearfix" ng-repeat="country in countries | limitTo : slice.limit track by $index"> | |
<a class="countries_modal_country" ng-click="$close(country)"> | |
<span class="countries_modal_country_code pull-right" ng-bind="country.code">+7 940</span> |
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
function getClientRectOffsetY(elem, part, offset) { | |
elem = ge(elem); | |
offset = offset || 0; | |
var ey = getXY(elem)[1], | |
eh = getSize(elem)[1], | |
w = window, de = document.documentElement, | |
ch = Math.max(intval(w.innerHeight), intval(de.clientHeight)), | |
fixed_head = ge('page_header_cont'), | |
hh = getSize(fixed_head)[1], | |
st = (de.scrollTop || bodyNode.scrollTop || window.scrollY || 0); |
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
// Helper > | |
function isArray(obj) { | |
return Object.prototype.toString.call(obj) === '[object Array]'; | |
} | |
// Helper /> | |
function trim(text) { | |
return (text || '').replace(/^\s+|\s+$/g, ''); | |
} |
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
function replaceEntities(str) { | |
return se('<textarea>' + ((str || '').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"')) + '</textarea>').value; | |
} | |
function clean(str) { | |
return str ? (str+'').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''') : ''; | |
} | |
function unclean(str) { | |
return replaceEntities((str+'').replace(/\t/g, "\n")); |
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
function formatTime(t) { | |
var res, sec, min, hour; | |
t = Math.max(t, 0); | |
sec = Math.round(t % 60); | |
res = (sec < 10) ? '0'+sec : sec; | |
t = Math.floor(t / 60); | |
min = t % 60; | |
res = min+':'+res; | |
t = Math.floor(t / 60); |
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
function isRetina() { | |
return window.devicePixelRatio >= 2; | |
} |
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
function throttle(func, ms) { | |
let isThrottled = false, | |
savedArgs, | |
savedThis; | |
function wrapper() { | |
if (isThrottled) { // (2) | |
savedArgs = arguments; |
NewerOlder