Evgenii Legotckoi
Evgenii LegotckoiSept. 14, 2018, 3:35 a.m.

Design PatternsGenerative Design Patterns - Builder

Builder, шаблоны проектирования, Строитель

The reasons

  • Separating the construction of a complex object from its representation so that the same construction process can create different representations.
  • Dismantling a complex representation, creating one goal from several variations.

Problems

Separation of the object interpretation algorithm (for …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 13, 2018, 8:03 a.m.

PythonExample - Abstract Factory in Python

abstract, factory, abc, python

An example of an abstract factory in the Python programming language


"""
Provide an interface for creating families of related or dependent
objects without specifying their concrete classes.
"""

import abc


class AbstractFactory(metaclass=abc.ABCMeta):
    """
    Declare an interface for operations that …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 13, 2018, 6:12 a.m.

C++Example - Abstract Factory in C ++

cpp, шаблоны проектирования, abstract, new

Discussion. "Think of object creation as a factory that spawns those same objects."

Here we assign object creation responsibilities to the factory object, and then use inheritance functions and virtual members to provide a "virtual constructor" capability. So there are …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 13, 2018, 6:01 a.m.

Design PatternsGenerative Design Patterns - Abstract Factory

шаблоны проектирования, абстрактная, abstract, new, фабрика

The reasons

  • Providing an interface for creating families of related or dependent objects without specifying their specific classes.
  • Hierarchy that encapsulates: many possible "platforms" and building a set of "products".
  • The new operator is considered harmful.

Problems

If an application …

Read
Evgenii Legotckoi
Evgenii LegotckoiAug. 9, 2018, 4:29 a.m.

LinuxBash script for creating and downloading a dump of a database and media files from a remote server

Bash, rsync, Linux

During the development of the site on Django had to start to understand the Bash scripts to automate routine tasks. For example, creating and downloading a database dump from a site, as well as reserving media files.

We assume that …

Read
Evgenii Legotckoi
Evgenii LegotckoiAug. 7, 2018, 3:10 a.m.

LinuxCounting the number of commits for authors in Git

Git, Fun, Linux

Just for fun.

What can programmers measure? Of course, with their commits, at least their number in the Git repository.

To do this, you can use the git shortlog command, which summarizes the output of git log, providing a more …

Read
Evgenii Legotckoi
Evgenii LegotckoiAug. 6, 2018, 2:52 a.m.

C++The idiom RAII and the principle of structured programming that a function must have one entry point and one exit point

template, lambda, C++11

The world of programming in C ++ in the new standards allows us to get up a variety of things, thanks to which we can safely abandon some old statements or principles, or simply flexibly approach these principles.

I would …

Read
Evgenii Legotckoi
Evgenii LegotckoiAug. 3, 2018, 4:05 a.m.

QtProfiling memory usage on Linux with Qt Creator 4.7

Profiling, Qt, Профилирование

Performance Analyzer

You may have heard of the Performance Analyzer (named “CPU Usage Analyzer” in Qt Creator 4.6 and earlier). It's about profiling applications using the excellent "perf" tool in Linux. You can use it locally on Linux - the …

Read
Arrow
ArrowJuly 31, 2018, 4:57 a.m.

PostgreSQLWorking with trigger functions in PostgreSQL

PostgreSQL, Триггерные функции, База данных

In the process of developing one application for accounting for time norms, it became necessary to create a pivot table with a selection of data from the existing one.

PostgreSQL was used as the database.

The source table base_table is …

Read
Evgenii Legotckoi
Evgenii LegotckoiJuly 31, 2018, 2:56 a.m.

DjangoOpen source EVILEG

ESNF-ICO, ESNF-DOC, ESNF-C, ESNF, ESNF-LD, Django, EVILEG

There was probably something that many users of the resource EVILEG would like to see among Web developers.

It was decided to open the sources of EVILEG, especially since I repeatedly received requests to show the source of the resource …

Read
Ua

Qt - Test 001. Signals and slots

  • Result:84points,
  • Rating points4
Ua

Qt - Test 001. Signals and slots

  • Result:42points,
  • Rating points-8
ОК

Qt - Test 001. Signals and slots

  • Result:47points,
  • Rating points-6
Last comments
ИМ
Игорь МаксимовNov. 22, 2024, 5:51 p.m.
Django - Tutorial 017. Customize the login page to Django Добрый вечер Евгений! Я сделал себе авторизацию аналогичную вашей, все работает, кроме возврата к предидущей странице. Редеректит всегда на главную, хотя в логах сервера вижу запросы на правильн…
Evgenii Legotckoi
Evgenii LegotckoiOct. 31, 2024, 7:37 p.m.
Django - Lesson 064. How to write a Python Markdown extension Добрый день. Да, можно. Либо через такие же плагины, либо с постобработкой через python библиотеку Beautiful Soup
A
ALO1ZEOct. 19, 2024, 2:19 p.m.
Fb3 file reader on Qt Creator Подскажите как это запустить? Я не шарю в программировании и кодинге. Скачал и установаил Qt, но куча ошибок выдается и не запустить. А очень надо fb3 переконвертировать в html
ИМ
Игорь МаксимовOct. 5, 2024, 1:51 p.m.
Django - Lesson 064. How to write a Python Markdown extension Приветствую Евгений! У меня вопрос. Можно ли вставлять свои классы в разметку редактора markdown? Допустим имея стандартную разметку: <ul> <li></li> <li></l…
d
dblas5July 5, 2024, 5:02 p.m.
QML - Lesson 016. SQLite database and the working with it in QML Qt Здравствуйте, возникает такая проблема (я новичок): ApplicationWindow неизвестный элемент. (М300) для TextField и Button аналогично. Могу предположить, что из-за более новой верси…
Now discuss on the forum
NW
Nayo WaiJan. 30, 2025, 3:22 p.m.
не запускается компьютер!!! Не запускается компьютер (точнее работает блок , но сам монитор вообще жесть)В общем я ничего с интернета не скачивала в последнее время. На компе никаких левых пр…
n
nklyJan. 3, 2025, 8:52 a.m.
Нужно запретить перемещение только некоторых итемов, остальные перемещать можно. Вопрос решен. Узнать QModelIndex элемента на который мы перетаскиваем другой элемент, можно с помощью функции indexAt(event->position().toPoint()) представления QTreeViev вызываемой в переопр…
M
MarselAug. 16, 2023, 8:26 p.m.
OAuth2.0 через VK, получение email Спасибо большое за помощь и простите за то что отнял время своей невнимательностью.
Evgenii Legotckoi
Evgenii LegotckoiJune 24, 2024, 9:11 p.m.
добавить qlineseries в функции Я тут. Работы оень много. Отправил его в бан.
t
tonypeachey1Nov. 15, 2024, 12:04 p.m.
google domain [url=https://google.com/]domain[/url] domain [http://www.example.com link title]

Follow us in social networks