character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
SHOW VARIABLES LIKE 'character_set_%';
SHOW VARIABLES LIKE 'collation%';
var history = [];
history.push(redirect_url);
if (history.length > 1) {
var previous_url = history.pop();
$.ajax({
url: "index.php",
async: false,
context: $("#content"),
success: function() {
$("#content").load(previous_url + " #content");
}
});
} else {
window.location.replace(history[0]);
}
function Favorites({ cardsFavorites }: CardsProps ): JSX.Element{
const groupedCards = cardsFavorites.reduce<{ [key: string ]: Offer[] }>((acc, curr) => {
const city = curr.city.name;
if (!(city in acc)) {
acc[city] = [];
}
acc[city].push(curr);
return acc;
}, {});
return(
<main>
<div>other code</div>
</main>
);
}
const result = array.reduce((acc, item) => {
if (!acc.some(i => i.itemUniqId === item.itemUniqId)) {
acc.push(item);
}
return acc;
}, []);
const result = array.filter((item, index, self) =>
index === self.findIndex(i => i.itemUniqId === item.itemUniqId)
);
@c.on_callback_query(filters.regex("^aff_.*"))
async def callback_handler(client, callback_query):
aff_id = callback_query.data.split("_")[1]
# Здесь можешь обрабатывать aff_id
# .................
from pyrogram import Message
def get_args(message: Message) -> str:
if message.text and "?" in message.text:
return message.text.split("?")[1]
return ""
args = get_args(message)
if args:
if "aff_" in args:
print("debug #1")
parts = args.split("aff_")
# Далее вы можете использовать переменную `parts` для дальнейшей обработки
# .................
from pyrogram import Client, filters
# ......
# ......
c = Client("bot"...)
hd = MessageHandler(main_handler)
c.add_handler(hd)
# ......
async def main_handler(client, message):
try:
# Получаем параметры, переданные в ссылке
args = message.get_args()
if args:
# Проверяем, есть ли параметр "aff_"
if "aff_" in args:
print("debug #1")
parts = args.split("aff_")
# Далее вы можете использовать переменную `parts` для дальнейшей обработки
# .................
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /$1/ [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
<?php
header('Content-Type: text/html; charset=utf-8');
$index_html = file_get_contents('include/small_site/index.html');
$index_html = str_replace('href="style.css"', 'href="include/small_site/style.css"', $index_html);
$index_html = str_replace('src="image.jpg"', 'src="include/small_site/image.jpg"', $index_html);
echo $index_html;
RewriteCond %{REQUEST_URI} !^/$
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
ANCGAmmo* Item = Cast<ANCGAmmo>(CurrentAmmo.AmmoType);
if (Item != nullptr) {
ANCGBaseCharacter* CharOwner = Cast<ANCGBaseCharacter>(GetOwner());
if (CharOwner != nullptr) {
CharOwner->StorageComponent->GetItemByType(UsingAmmo, Qt);
}
}
const trs = document.querySelectorAll('tr');
const prem1 = [];
trs.forEach(tr => {
const dataPrem = tr.getAttribute('data-prem');
if (dataPrem === '1') {
prem1.push({
city: tr.getAttribute('data-city'),
brand: tr.getAttribute('data-brand'),
});
}
});
trs.forEach(tr => {
const dataPrem = tr.getAttribute('data-prem');
if (dataPrem === '0') {
const dataCity = tr.getAttribute('data-city');
const dataBrand = tr.getAttribute('data-brand');
const match = prem1.find(prem => prem.city === dataCity && prem.brand === dataBrand);
if (match) {
tr.classList.add('false');
}
} else {
tr.classList.add('true');
}
});
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36'
}
response = requests.get(url, headers=headers)
soup = b(response.text, "html.parser")
parsprice = soup.find_all("div", class_="css-1ee59nr")
print(parsprice)
yum install virt-manager libosinfo
SELECT table1.id, table1.pagetitle, table2.*
FROM table1
JOIN table2 ON table1.id = table2.id
JOIN table3 ON table2.id = table3.id
ORDER BY table3.rating DESC;
async def on_startup(dp):
await bot.send_message(chat_id, "Bot is starting...")
await asyncio.create_task(scheduler())
await dp.loop.create_task(scheduler())
if __name__ == '__main__':
executor.start_polling(dp, on_startup=on_startup)
number_of_digits = int(input('Введите количество чисел: '))
max_num = 0
max_sum = 0
for i in range(number_of_digits):
print('Введите число: ', end=' ')
number = int(input())
this_num = number
summ = 0
while number > 0:
digit = number % 10
summ += digit
number //= 10
if summ > max_sum:
max_sum = summ
max_num = this_num
print('Число', max_num, 'имеет максимальную сумму цифр:', max_sum)
Сайт защищен с помощью Cloudflare, и HTTP_CF_RAY доступен в $_SERVER.?