for item in response.json()['Employees']:
first_name = item["User"]["FullName"]["FirstName"]
last_name = item["User"]["FullName"]["LastName"]
if "MiddleName" in item["User"]["FullName"]:
middle_name = item["User"]["FullName"]["MiddleName"]
else:
middle_name = "отчество отсутствует"
print(f"Имя: {first_name}, фамилия: {last_name}, отчество: {middle_name}")
# Имя: Иван, фамилия: Иванов, отчество: Иванович
# Имя: Петр, фамилия: Петров, отчество: отчество отсутствует Required, except for statically imported images or images with the fill property.
PageSpeed ругается на данную вещь, по времени занимает 3 секунды на мобильной версии
На сайте есть виджет чата от Битрикса, в нём есть ссыль на чат в ВК клиента. Может ли это быть оно?
Now that Babel 7.x is out, I'll just say that this should essentially be resolved. The only time you should see this, with Babel 7.x, is if you're doing one of:
You've actually using import and module.exports in the same file, which is not allowed by Webpack. You can sidestep this by setting "modules": "commonjs", which will make Babel compile the import to a require. This breaks tree shaking, as mentioned above though, so fixing your code would be a better idea.
You're using useBultins: 'entry'/'usage, or @babel/plugin-transform-runtime, and you are running Babel on CommonJS files (either your own, or in random node_modules, if you're trying to compile that). Babel assumes files are ES modules by default, meaning those transforms would insert import statements into your file, triggering case 1. above. You can avoid this issue by setting sourceType: "unambiguous" in your Babel configuration, which will tell it to guess the type, like Webpack does, instead of assuming all files are modules.
global $wpdb;
$data = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}table", ARRAY_A);
file_put_contents($path . '/' . $this->backup_filename . '.json', json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); <?php echo do_shortcode( '[gridmaster grid_style="style-2" post_type="game" posts_per_page="10" orderby="date" order="DESC" content_from="excerpt" excerpt_type="characters" excerpt_length="15" show_read_more="yes" read_more_text="Скачать" grid_image_size="medium" grid_image_width="350" grid_image_height="200" link_thumbnail="no" link_thumbnail_to="post" show_filter="yes" filter_style="default" btn_all="no" taxonomy="category" hide_empty="1" multiple_select="no" toggle_filter_items="no" pagination_type="load_more" infinite_scroll="true" animation="true" heading_font_size=\'{"xs":"16px","sm":"18px","md":"20px","lg":"22px","xl":"24px"}\' grid_col_gap=\'{"xs":"30","sm":"30","md":"30","lg":"30","xl":"30"}\' grid_row_gap=\'{"xs":"30","sm":"30","md":"30","lg":"30","xl":"30"}\' grid_item_per_row=\'{"xs":"1","sm":"2","md":"3","lg":"3","xl":"3"}\' slider_args=\'{"arrows":"1","autoplaySpeed":"3000","infinite":"1","slidesToShow":{"xs":"1","sm":"2","md":"3","lg":"3","xl":"3"},"slidesToScroll":{"xs":"1","sm":"1","md":"1","lg":"1","xl":"1"}}\']' ); ?><?php echo do_shortcode( '[gridmaster grid_style="style-2" post_type="game" posts_per_page="10" orderby="date" order="DESC" content_from="excerpt" excerpt_type="characters" excerpt_length="15" show_read_more="yes" read_more_text="Скачать" grid_image_size="medium" grid_image_width="350" grid_image_height="200" link_thumbnail="no" link_thumbnail_to="post" show_filter="yes" filter_style="default" btn_all="no" taxonomy="category" hide_empty="1" multiple_select="no" toggle_filter_items="no" pagination_type="load_more" infinite_scroll="true" animation="true" heading_font_size=\'{"xs":"16px","sm":"18px","md":"20px","lg":"22px","xl":"24px"}\' grid_col_gap=\'{"xs":"30","sm":"30","md":"30","lg":"30","xl":"30"}\' grid_row_gap=\'{"xs":"30","sm":"30","md":"30","lg":"30","xl":"30"}\' grid_item_per_row=\'{"xs":"1","sm":"2","md":"3","lg":"3","xl":"3"}\' slider_args=\'{"arrows":"1","autoplaySpeed":"3000","infinite":"1","slidesToShow":{"xs":"1","sm":"2","md":"3","lg":"3","xl":"3"},"slidesToScroll":{"xs":"1","sm":"1","md":"1","lg":"1","xl":"1"}}\']' ); ?>
Количество посещений ~ 3М в месяц.
Предназначен ли Next для таких нагрузок?
Какие альтернативы?
Какой мощности сервер понадобится для такой нагрузки?
Часть формируются из-за незначащих GET-параметров, и на сайте вообще никакая страница кроме поисковой не зависит от GET-параметров, поэтому хотелось бы им всем поставить disallow, но встретил не мало аргументов против такого решения.
Стандартными методами css это не сделать. Может через less? Но как?
.fn(@aspect-class) {
@matches: ~`@{aspect-class}.match(/\d+/g)`;
@a: e(%(`@{matches}[0]`));
@b: e(%(`@{matches}[1]`));
// остальная логика
}
.fn(aspect-43-34); скажите как бороться с этим? Как удалить эти ссылки?
Я ещё не пробовала react. Некоторые говорят на нём писать, некоторые на чистом js.
Что нужно изучить чтобы написать онлайн-доску?
Немного могу на python и php
Но появилась идея запрашивать не все посты, а в зависимости от нужной категории. Все существующие ~ 2000 постов разделить на категории. Будет ли такая реализация работать быстрее?
Либо есть какие-то другие идеи?
$cache = get_transient('all_posts_cache');
if (!$cache) {
$posts = get_posts([
'numberposts' => -1,
'orderby' => 'date',
'order' => 'DESC',
'post_type' => 'post-item',
// Искать по слагу категории
'category_name' => 'category_name',
// Или искать по id категории
// 'cat' => 123,
]);
// Кэширование на 1 час
set_transient('all_posts_cache', $posts, HOUR_IN_SECONDS);
}
else {
$posts = $cache;
}