Evgenii Legotckoi
Evgenii LegotckoiOct. 9, 2018, 3:16 p.m.

QtQt/C++ - Tutorial 083. Creating a dynamic library and connecting it to another project

Qt, DLL, dll, Windows, dynamic

The forum raised the question of how to create a dynamic library and correctly connect it to a third-party project. Periodically, such questions arise, so consider one option of creating a dynamic dll for Windows using the standard wizards in …

Read
Evgenii Legotckoi
Evgenii LegotckoiOct. 1, 2018, 4:34 a.m.

Design PatternsStructural Design Patterns - Adapt

шаблоны проектирования, приспособленец, flyweight

Goals

  • Using sharing to effectively use a large number of objects.
  • Motif's GUI strategy to replace heavyweight widgets with lightweight widgets.

Problems

Designing objects down to the lowest levels of system "granularity" provides optimal flexibility, but can be prohibitively expensive …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 27, 2018, 5:11 a.m.

Design PatternsStructural Design Patterns - Facade

шаблоны проектирования

Goals

  • Provide a unified interface for a set of interfaces in a subsystem. A facade defines a higher-level interface that makes the subsystem easier to use.
  • Wrap a complex subsystem with a simpler interface.

Problems

The client access segment requires …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 26, 2018, 7:55 a.m.

PythonExample - Object Pool in Python

python, pool, пул, шаблоны проектирования

Example of the design pattern An object pool in the Python programming language.


"""
Offer a significant performance boost; it is most effective in
situations where the cost of initializing a class instance is high, the
rate of instantiation of …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 26, 2018, 7:53 a.m.

JavaExample - Object Pool in Java

Java, пул, шаблоны проектирования

Example of the design pattern An object pool in the Java programming language.


// ObjectPool Class

public abstract class ObjectPool<T> {
  private long expirationTime;

  private Hashtable<T, Long> locked, unlocked;

  public ObjectPool() {
    expirationTime = 30000; // 30 seconds
    locked = …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 26, 2018, 6:55 a.m.

C++Example - Object Pool in C++

шаблоны проектирования, пул, C++

Example of the design pattern An object pool in the C ++ programming language.


#include <string>
#include <iostream>
#include <list>
class Resource
{
    int value;
    public:
        Resource()
        {
            value = 0;
        }
        void reset()
        {
            value = 0;
        }
        int …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 26, 2018, 6:01 a.m.

Design PatternsStructural Design Patterns - Decorator

шаблоны проектирования, decorator, декоратор

Goals

  • Add additional features and functionality to the object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
  • Client-specified decoration of the interface of the main object by recursively wrapping it.
  • Wrap the gift, put it in the …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 25, 2018, 6:16 a.m.

PHPExample - Factory method in PHP

шаблоны проектирования, factory, method, PHP

In the Factory Method Pattern, a factory method defines what functions must be available in the non-abstract or concrete factory. These functions must be able to create objects that are extensions of a specific class. Which exact subclass is created …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 25, 2018, 6:09 a.m.

DelphiExample - Factory method in Delphi

Delphi, шаблоны проектирования, factory, method

This pattern is useful when you want to encapsulate the construction of a class and isolate knowledge of the concrete class from the client application through an abstract interface.

Один из примеров этого может возникнуть, если у вас есть объектно-ориентированное …

Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 25, 2018, 5:46 a.m.

Design PatternsStructural Design Patterns - Composite

шаблоны проектирования, composite, компоновщик

Goals

  • Arrange objects into tree structures to represent entire parts of the hierarchy. The linker allows clients to treat individual objects and compositions of objects in the same way.
  • Recursive composition
  • "Directories contain entries, each of which can be a …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 24, 2018, 10:43 a.m.

PythonExample - Factory method in Python

шаблоны проектирования, factory, Python, method

An example of a factory method in the Python programming language


"""
Define an interface for creating an object, but let subclasses decide
which class to instantiate. Factory Method lets a class defer
instantiation to subclasses.
"""

import abc


class …
Read
Evgenii Legotckoi
Evgenii LegotckoiSept. 24, 2018, 10:34 a.m.

JavaExample - Factory Method in Java

шаблоны проектирования, factory, method, Java, JAVA

In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done …

Read
AD

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

  • Result:50points,
  • Rating points-4
m

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

  • Result:80points,
  • Rating points4
m

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

  • Result:20points,
  • Rating points-10
Last comments
ИМ
Игорь МаксимовNov. 23, 2024, 12:51 a.m.
Django - Tutorial 017. Customize the login page to Django Добрый вечер Евгений! Я сделал себе авторизацию аналогичную вашей, все работает, кроме возврата к предидущей странице. Редеректит всегда на главную, хотя в логах сервера вижу запросы на правильн…
Evgenii Legotckoi
Evgenii LegotckoiNov. 1, 2024, 2:37 a.m.
Django - Lesson 064. How to write a Python Markdown extension Добрый день. Да, можно. Либо через такие же плагины, либо с постобработкой через python библиотеку Beautiful Soup
A
ALO1ZEOct. 19, 2024, 8:19 p.m.
Fb3 file reader on Qt Creator Подскажите как это запустить? Я не шарю в программировании и кодинге. Скачал и установаил Qt, но куча ошибок выдается и не запустить. А очень надо fb3 переконвертировать в html
ИМ
Игорь МаксимовOct. 5, 2024, 7:51 p.m.
Django - Lesson 064. How to write a Python Markdown extension Приветствую Евгений! У меня вопрос. Можно ли вставлять свои классы в разметку редактора markdown? Допустим имея стандартную разметку: <ul> <li></li> <li></l…
d
dblas5July 5, 2024, 11: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
m
moogoNov. 22, 2024, 8:17 p.m.
Mosquito Spray System Effective Mosquito Systems for Backyard | Eco-Friendly Misting Control Device & Repellent Spray - Moogo ; Upgrade your backyard with our mosquito-repellent device! Our misters conce…
Evgenii Legotckoi
Evgenii LegotckoiJune 25, 2024, 3:11 a.m.
добавить qlineseries в функции Я тут. Работы оень много. Отправил его в бан.
t
tonypeachey1Nov. 15, 2024, 7:04 p.m.
google domain [url=https://google.com/]domain[/url] domain [http://www.example.com link title]
NSProject
NSProjectJune 4, 2022, 3:49 p.m.
Всё ещё разбираюсь с кешем. В следствии прочтения данной статьи. Я принял для себя решение сделать кеширование свойств менеджера модели LikeDislike. И так как установка evileg_core для меня не была возможна, ибо он писался…

Follow us in social networks