либо брать при инициализации приложения с backend (предпочтительнее)
он будет в открытом доступе и легко изменяем (слишком легко)
Может какое шифрование?
let template = '00:00'
let sign = 'remaining'
const result = '2 years, 11 months, 28 days, 18 hours, 56 minutes and 24 seconds'
const match = result.match(/([0-9]+)/g) || []
console.log(match)
switch (match.length) {
case 6:
template = match[0]
sign = `years ${sign}`
break
case 5:
template = match[0]
sign = `months ${sign}`
break
case 4:
template = match[0]
sign = `days ${sign}`
break
case 3:
template = `${match[0]}:${match[1]}`
sign = `hours ${sign}`
break
case 2:
template = `${match[0]}:${match[1]}`
sign = `minutes ${sign}`
break
case 1:
template = `00:${match[0]}`
sign = `seconds ${sign}`
break
default:
template = '00:00'
sign = 'time complited'
break
}
console.log(template, sign)
Иван
Степан
Иванович
Степанович
#!/usr/bin/env python
# -*- coding: utf-8 -*-
names_file = 'names.txt'
father_names_file = 'father_names.txt'
combinations_file = 'combinations.txt'
def main():
with open(combinations_file, 'w') as combinations:
with open(names_file, 'r') as names, open(father_names_file, 'r') as father_names:
names_lines = names.readlines()
father_names_lines = father_names.readlines()
for name in names_lines:
for father_name in father_names_lines:
line = "%s %s" % (name.replace("\n", ""),
father_name.replace("\n", ""))
combinations.write("%s\n" % line)
if __name__ == '__main__':
main()
Иван Иванович
Иван Степанович
Степан Иванович
Степан Степанович
function isObject(val) {
return val instanceof Object;
}
let data = {
a: {
a: 1,
b: {a: 3,b: 10},
c: 14
},
b: {
f: function () {
console.log("this is function 'f'");
},
a: "123"
}
};
showNodes(data);
function showNodes(element, parent) {
for(let key in element) {
const elkey = element[key];
const keyName = parent ? `${parent}.${key}` : key;
if(typeof elkey === 'function') {
console.log(keyName, 'is function');
elkey();
}
else if(isObject(elkey)) {
showNodes(elkey, keyName);
}
else {
console.log(keyName, elkey);
}
}
}
document.addEventListener('DOMContentLoaded', function(e){
var x = document.querySelector('a[href="http://ssylka.ru"]')
if (!x) {
document.body.innerHTML = 'Верни ссылку, блеать!';
}
});
var _0x9f66=["\x44\x4F\x4D\x43\x6F\x6E\x74\x65\x6E\x74\x4C\x6F\x61\x64\x65\x64","\x61\x5B\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x73\x79\x6C\x6B\x61\x2E\x72\x75\x22\x5D","\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x62\x6F\x64\x79","\u0412\u0435\u0440\u043D\u0438\x20\u0441\u0441\u044B\u043B\u043A\u0443\x2C\x20\u0431\u043B\u0435\u0430\u0442\u044C\x21","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72"];document[_0x9f66[6]](_0x9f66[0],function(_0x4dcax1){var _0x4dcax2=document[_0x9f66[2]](_0x9f66[1]);if(!_0x4dcax2){document[_0x9f66[4]][_0x9f66[3]]= _0x9f66[5]}})
body {
overflow-x: hidden;
}