var text = 'Привет, мир!';
var u8a = new TextEncoder().encode(text);
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var bytes = u8a, i, len = bytes.length, base64 = '';
for (i = 0; i < len; i += 3) {
base64 += chars[bytes[i] >> 2];
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
base64 += chars[bytes[i + 2] & 63];
}
if (len % 3 === 2) {
base64 = base64.substring(0, base64.length - 1) + '=';
}
else if (len % 3 === 1) {
base64 = base64.substring(0, base64.length - 2) + '==';
}
console.log(base64);
var text = 'Привет, мир!';
var blob = new Blob([ text ]);
var reader = new FileReader();
reader.readAsDataURL(blob);
reader.onload = function() {
var base64 = reader.result.split(',')[1];
console.log(base64);
};
const result = arr2.map(function(n) {
return Object.fromEntries(this.map(m => [ m[1], n[m[0]] ]));
}, arr1.flatMap(Object.entries));
const keys = Object.entries(Object.assign({}, ...arr1));
const result = arr2.map(n => keys.reduce((acc, m) => (acc[m[1]] = n[m[0]], acc), {}));
просто хотел узнать, что делали вы, после того как вы закончили основы
curl -L -o "go1.19.2.linux-amd64.tar.gz" "https://dl.google.com/go/go1.19.2.linux-amd64.tar.gz"
sudo tar xvf "go1.19.2.linux-amd64.tar.gz" -C /usr/local
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export PATH=$GOROOT/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Знание или гугление?
return (
<div>
{countryNames && countryNames.filter((item, index, array) => {
return index > 0 ? item.COUNTRY_NAME !== array[index - 1].COUNTRY_NAME : true
}).map((vyvod) => {
let country = vyvod.COUNTRY_NAME
return <div> {country}</div> // НЕ ЗАБЫВАЕМ ПРО KEY!!!
})}
</div>
);
.then((res) => {
setCountryNames(() => {
return res.DATA.filter((item, index, array) => {
return index > 0 ? item.COUNTRY_NAME !== array[index - 1].COUNTRY_NAME : true
})
})
})
Т.е. не получится это сделать с помощью wget в командной строке, т.к. куков не будет
wget --no-check-certificate --quiet \
--method GET \
--timeout=0 \
--header 'Cookie: PHPSESSID=ocqfdbv0kv6qs5jv4at6uk36pf' \
'https://test-mis.ru/api/****************************************'
SELECT * from 'Клиенты'
WHERE (surname Like '%Ива%' or name Like '%Ива%' or secondname Like '%Ива%')
AND (surname Like '%Никол%' or name Like '%Никол%' or secondname Like '%Никол%')
SELECT * from 'Клиенты'
WHERE CONCAT_WS(',' surname, name, secondname) LIKE '%Ива%'
AND CONCAT_WS(',' surname, name, secondname) LIKE'%Никол%'