Evgenii Legotckoi
Evgenii LegotckoiJune 13, 2022, 5:15 a.m.

C++Leet Code Solutions - 003 - Longest Substring Without Repeating Characters

cpp, LeetCode, C++, C++17, string

Solution "Longest Substring Without Repeating Characters" on Leet Code


class Solution {
public:
    int lengthOfLongestSubstring(string s) {
        string candidate_str = "";
        string checking_str = "";
        size_t position = std::string::npos;
        for (auto& ch : s)
        {
            position = checking_str.find(ch);
            if (position …
Read
Evgenii Legotckoi
Evgenii LegotckoiJune 13, 2022, 4:13 a.m.

C++Leed Code Solutions - 002 - Add Two Numbers

LeetCode, cpp, C++

Solution "Add Two Numbers" on Leet Code


/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode() : val(0), next(nullptr) {}
 *     ListNode(int x) : val(x), next(nullptr) {}
 *     ListNode(int x, ListNode …
Read
Evgenii Legotckoi
Evgenii LegotckoiJune 13, 2022, 3:58 a.m.

C++Leet Code Solutions - 001 - Two Sum

cpp, LeetCode, C++

Two Sum solution on Leet Code


The simple solution

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        for (int i = 0; i < nums.size(); ++i)
        {
            for (int j = i + 1; j < nums.size(); ++j) …
Read
Evgenii Legotckoi
Evgenii LegotckoiJune 1, 2022, 4:30 a.m.

DjangoDjango - Lesson 059. Saving the selected language in user settings

python, language, django, translation

In this article, I would like to show an example of how you can make a link on the site so that the user can switch between languages on the site.

But I will show a more advanced version of …

Read
Павел Дорофеев
Павел ДорофеевMay 29, 2022, 11:28 a.m.

Projects based on QtHow to implement TLSv1.2 on Qt 4.8.1

qssl

Initially, QSsl in Qt 4.8.1 (released about 13 years ago) used only the maximum of TLS v1.0.

Today is 2022 and Tls v1.0 and v1.1 are being blocked by almost every decent site on the internet.

Qt in QSsl uses …

Read
Evgenii Legotckoi
Evgenii LegotckoiApril 18, 2022, 5:39 p.m.

DjangoDjango - Tutorial 058. Database Growth Due to django_session Table

Django, Postgres, garbage collection, Python, PostgreSQL

Lately, I have noticed that the fatal moment is approaching, when the disk space for the site on the hosting will catastrophically cease to be enough. And the database dump becomes incredibly huge, although there are no obvious prerequisites for …

Read
Evgenii Legotckoi
Evgenii LegotckoiFeb. 14, 2022, 4:24 a.m.

DjangoDjango Rest Framework - Tutorial 001. Adding Token Authentication

Django Rest Framework, QML, Authentication, Token, drf, Felgo

At the moment I am actively working on an application that will work with the REST API of a Django site. And one of the first steps was to set up user authentication by token, but in order for this …

Read
Evgenii Legotckoi
Evgenii LegotckoiFeb. 10, 2022, 4:13 a.m.

DjangoDjango - Lesson 057. Multilanguage support in MarkdownField with auto populate functionality

MarkdownField, markdown, modeltranslation, Django

The article How to write auto populate field functionality described the simplest functionality of the MarkdownField field to support markdown syntax on a site with automatic generation of html content.

I did not immediately show advanced functionality to make it …

Read
Evgenii Legotckoi
Evgenii LegotckoiFeb. 9, 2022, 6:11 a.m.

DjangoDjango - Tutorial 056. How to convert image to WEBP format when saving to ImageField

ImageField, Django, WEBPField, webp, Python

WEBP is an image compression format that was introduced by Google in 2010. Its main advantage is its low size without visible loss of quality compared to formats such as JPEG or PNG. Therefore, it is quite logical to use …

Read
Evgenii Legotckoi
Evgenii LegotckoiFeb. 8, 2022, 6:55 a.m.

DjangoDjango - Tutorial 055. How to write auto populate field functionality

field, Django, python, auto, Python

For a long time I wanted to write an article on how to write auto populate field functionality for a Django project. This is a very useful feature that allows you to change the content of other model fields in …

Read
e
  • ehot
  • April 1, 2024, 2:29 a.m.

C++ - Тест 003. Условия и циклы

  • Result:78points,
  • Rating points2
B

C++ - Test 002. Constants

  • Result:16points,
  • Rating points-10
B

C++ - Test 001. The first program and data types

  • Result:46points,
  • Rating points-6
Last comments
k
kmssrFeb. 9, 2024, 7:43 a.m.
Qt Linux - Lesson 001. Autorun Qt application under Linux как сделать автозапуск для флэтпака, который не даёт создавать файлы в ~/.config - вот это вопрос ))
Qt WinAPI - Lesson 007. Working with ICMP Ping in Qt Без строки #include <QRegularExpressionValidator> в заголовочном файле не работает валидатор.
EVA
EVADec. 25, 2023, 11:30 p.m.
Boost - static linking in CMake project under Windows Ошибка LNK1104 часто возникает, когда компоновщик не может найти или открыть файл библиотеки. В вашем случае, это файл libboost_locale-vc142-mt-gd-x64-1_74.lib из библиотеки Boost для C+…
J
JonnyJoDec. 25, 2023, 9:38 p.m.
Boost - static linking in CMake project under Windows Сделал всё по-как у вас, но выдаёт ошибку [build] LINK : fatal error LNK1104: не удается открыть файл "libboost_locale-vc142-mt-gd-x64-1_74.lib" Хоть убей, не могу понять в чём дел…
G
GvozdikDec. 19, 2023, 10:01 a.m.
Qt/C++ - Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers Для решения твой проблемы добавь в файл .pro строчку "LIBS += -lws2_32" она решит проблему , лично мне помогло.
Now discuss on the forum
a
a_vlasovApril 14, 2024, 6:41 p.m.
Мобильное приложение на C++Qt и бэкенд к нему на Django Rest Framework Евгений, добрый день! Такой вопрос. Верно ли следующее утверждение: Любое Android-приложение, написанное на Java/Kotlin чисто теоретически (пусть и с большими трудностями) можно написать и на C+…
Павел Дорофеев
Павел ДорофеевApril 14, 2024, 2:35 p.m.
QTableWidget с 2 заголовками Вот тут есть кастомный QTableView с многорядностью проект поддерживается, обращайтесь
f
fastrexApril 4, 2024, 4:47 p.m.
Вернуть старое поведение QComboBox, не менять индекс при resetModel Добрый день! У нас много проектов в которых используется QComboBox, в версии 5.5.1, когда модель испускает сигнал resetModel, currentIndex не менялся. В версии 5.15 при resetModel происходит try…
AC
Alexandru CodreanuJan. 20, 2024, 12:57 a.m.
QML Обнулить значения SpinBox Доброго времени суток, не могу разобраться с обнулением значение SpinBox находящего в делегате. import QtQuickimport QtQuick.ControlsWindow { width: 640 height: 480 visible: tr…

Follow us in social networks