Qt → Qt/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 …
ReadDesign Patterns → Structural 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 …
ReadDesign Patterns → Structural 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 …
ReadPython → Example - Object Pool in Python
python, pool, пул, шаблоны проектирования
Example of the design pattern An object pool in the Python programming language.
Read""" 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 …
Java → Example - Object Pool in Java
Java, пул, шаблоны проектирования
Example of the design pattern An object pool in the Java programming language.
Read// ObjectPool Class public abstract class ObjectPool<T> { private long expirationTime; private Hashtable<T, Long> locked, unlocked; public ObjectPool() { expirationTime = 30000; // 30 seconds locked = …
C++ → Example - Object Pool in C++
шаблоны проектирования, пул, C++
Example of the design pattern An object pool in the C ++ programming language.
Read#include <string> #include <iostream> #include <list> class Resource { int value; public: Resource() { value = 0; } void reset() { value = 0; } int …
Design Patterns → Structural 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 …
PHP → Example - 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 …
ReadDelphi → Example - 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.
Один из примеров этого может возникнуть, если у вас есть объектно-ориентированное …
ReadDesign Patterns → Structural 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 …
Python → Example - Factory method in Python
шаблоны проектирования, factory, Python, method
An example of a factory method in the Python programming language
Read""" 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 …
Java → Example - 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- Akiv Doros
- Nov. 12, 2024, 3:58 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:50points,
- Rating points-4
- molni99
- Oct. 26, 2024, 1:37 p.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:80points,
- Rating points4
- molni99
- Oct. 26, 2024, 1:29 p.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:20points,
- Rating points-10