Aug. 26, 2019, 3:51 a.m.

Django

user, Django, Backend, Model

Imagine that for an authenticated user, when opening pages, some requests are constantly being executed, for example, an additional list of notifications is loaded, as well as his profile. And we use this information in templates, for example this way.

{% if user.is_authenticated %}
    {{ user.profile.avatar }}
    {{ user.notices.count }}
{% endif %}
Aug. 23, 2019, 3:17 a.m.

Qt

Announce, Qt, Qt Company

21 august Qt Company announce the launch of Qt for MCUs – a comprehensive toolkit to deliver smartphone-like user experience on displays powered by microcontrollers. What started as a research project is now in the final leg of its journey to being released as a product.

Connected devices found in vehicles, wearables, smart home, industrial and healthcare often have requirements that include real-time processing capabilities, low power consumption, instant boot time and low bill of materials. These requirements can be fulfilled by a microcontroller architecture. However, as devices get smarter and offer more features and capabilities, users expect an enhanced and intuitive experience on par with today’s smartphones. Qt for MCUs delivers an immersive and enriching user interface by utilizing a new runtime specifically developed for ARM Cortex-M microcontrollers and leveraging on-chip 2D graphics accelerators such as PxP on NXP’s i.MX RT series, Chrom-Art Accelerator on STM32 series and RGL on Renesas RH850.

Aug. 22, 2019, 3:42 a.m.

C++

C++17, lambda, auto, functor

Developing the idea of caching the result of calculations of heavy functions , I propose to write a small template class, which will take the function as an argument, namely the lambda function, as the most universal an instrument within which a heavy function will be performed.

In this case, the result of the function will not be calculated at the time of creation of the Functor, but at the time of calling the operator parentheses () . And at the same time, the result will be cached. That will allow not to call a heavy function more than once as part of the execution of a method.

Aug. 21, 2019, 5:45 a.m.

C++

lambda, auto, cache, C++14, C++

Suppose we wrote a function that calculates some value or uses a function to calculate this value, while the function_ which calculates the value is quite expensive to calculate and works for a long time. In this case, we call the lambda function several times in some code.

To avoid multiple calls to the heavy function, we can cache the value that the heavy function returns.

Aug. 21, 2019, 3:56 a.m.

C++

C++, C++14, auto, lambda

Let's look at an interesting construction from the C++14 standard, which allows you to return the structure used in one place of the code, but you need to return an object with named fields.

Such a construction can serve as a replacement for std::tuple. At the same time, we will not need to declare any additional structures that we are not going to transfer anywhere, since we need to get only a set of data that we will somehow use immediately at the place of return and will not transfer further in the same form.

Aug. 19, 2019, 4:41 a.m.

Qt

Qt, Qt Design Studio, design, Releases

Qt Design Studio is a UI design and development tool that enables designers and developers to rapidly prototype and develop complex UIs. Both designers and developers use Qt Design Studio and this makes collaboration between the two a lot simpler and more streamlined.

Qt Design Studio 1.3 comes with a new advanced curve editor for animations.

Aug. 16, 2019, 6:26 a.m.

Qt

Snippet, Qt, Qtime

Snippet program code. Task Get the number of milliseconds in the current minute of the day. Used operator remainder of division.

Aug. 15, 2019, 4:22 a.m.

Algorithms

Дерево, Алгоритм, Tree

Алгоритм Дейкстры позволяет нам найти кратчайший путь между любыми двумя вершинами графа.

Он отличается от минимального остовного дерева тем, что кратчайшее расстояние между двумя вершинами может не включать все вершины графа.

Aug. 9, 2019, 6:09 p.m.

CMake

cpp, C++, cmake

I propose to consider the option of using variables declared in the CMakeLists.txt file in C ++ code.

To begin with, what is it for? For example, you want to specify the version of the program and some other auxiliary information that is set during the assembly of the program, but at the same time you want to use this information in your C ++ code? Is it possible to do this? For example, to make it look like the image shows.

Aug. 9, 2019, 9:16 a.m.

Development diaries

QTableWidget, Qt, xlsx, export

Просмотр наименований топлива.

После обработки запросов на получение наименований, формируем таблицу для отображения информации пользователю.

Donate

Hello, Dear Users of EVILEG!!!

If the site helped you, then support the development of the site financially, please.

You can do it by following ways:

Thank you, Evgenii Legotckoi

LP
Nov. 12, 2019, 8:22 a.m.
Lev Parhimovich

C++ - Test 006. Enumerations

  • Result:50points,
  • Rating points-4
LP
Nov. 12, 2019, 7:35 a.m.
Lev Parhimovich

C++ - Test 005. Structures and Classes

  • Result:66points,
  • Rating points-1
LP
Nov. 12, 2019, 7:26 a.m.
Lev Parhimovich

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:50points,
  • Rating points-4
Last comments
b
Nov. 9, 2019, 8:28 a.m.
bastonc

спасибо ещё раз. огромное, за уделённое время
b
Nov. 9, 2019, 8:24 a.m.
bastonc

Спасибо Вам большое. Буду изучать.
Nov. 9, 2019, 5:58 a.m.
Evgenij Legotskoj

Добрый день. По первым двум вопросам вы найдёте ответ в этой статье - PyQt5 - Урок 008. Работа с QTableWidget (Обновление урока 006) Что касается последнего вопроса, то я вам…
Nov. 9, 2019, 2:50 a.m.
Evgenij Legotskoj

Как и обещал, вы можете посмотреть новую статью QML - Урок 037. Кастомизация кнопок в QML (Обновление урока 002) . Там же найдёте ссылку на Git репозиторий. Не забудьте поставить звёз…
b
Nov. 8, 2019, 7:40 a.m.
bastonc

Приветствую. Подскажите пожалуйста пару моментов. 1. Как сделать столбец не редактируемый, а остальные ячейки остаются редактируемыми 2. Как оталвливать события двойного клика для реда…
Now discuss on the forum
Nov. 14, 2019, 4:23 a.m.
Ruslan Polupan

Я уже понял это, ковыряюсь сижу....
Nov. 14, 2019, 3:56 a.m.
Evgenij Legotskoj

Добрый день. Я уже очень давно не создавал инсталляторы, но на данный момент поведение Maintenance Tool выглядит так, что он имеет свой собственный пакет в репозитории. Но честно, я могу с…
Nov. 14, 2019, 2:16 a.m.
Ruslan Polupan

посмотрите тут http://www.prog.org.ru/topic_6637_15.html И гдето на Гитхабе я видел исходни класса который это реализует
Nov. 13, 2019, 9:33 a.m.
Pavel.K

Приложение трэкинг задач. Есть вложения. Добавляем вложение и отправляем его на сервер. Для синхронного вызова методов в синхронизации, используем QEventLoop при отправке вложений. В момент син…
Nov. 13, 2019, 3:13 a.m.
Evgenij Legotskoj

Добрый день. Думаю, что да. Выбранный стиль можно подгружать при запуске программы. Во всяком случае, есть такой пример на C++ - Controls Gallery . И там есть такой код #incl…
EVILEG
About
Services
© EVILEG 2015-2019
Recommend hosting TIMEWEB