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'%Никол%'
9007199254740991 // максимальное безопасное целое
17848907461544179 // ваш ID больше – происходят округления
post_id
в кавычках, как строки. A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.
Всегда тело запроса ассоциировалось с методом POST
Возможно ли отправлять тело запроса
const ProtectedRoute = ({isAllowed, redirectTo, ...props}) => {
return isAllowed ?
<Route {...props}/> : <Redirect to={redirectTo}/>
};
const App = () => {
const user = useSelector(state => state.users.user);
return (
<Switch>
<ProtectedRoute
isAllowed={user}
redirectTo="/"
path="/new-artist"
component={NewArtist}
/>
<Route path="/register" component={Register}/>
<Route path="/login" component={Login}/>
<Route component={() => <h2>Not Found.</h2>}/>
</Switch>
);
};
const url = new URL(window.location);
url.searchParams.set('qna', 'habr');
window.history.pushState({}, '', url);
// в адресной строке теперь ?qna=habr