TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #164 · 14 окт.

🙄Разминка для ума! Треугольник Серпинского, интересная фигура которую построить достаточно просто. Алгоритм такой: 1. создаём любые 3 точки на плоскости 2. из этих точек случайно выбираем любую, как начальную 3. случайно выбираем любую точку из этих же трёх точек как цель 4. перемещаемся в сторону цели на половину расстояния 5. повторяем бесконечно с пункта 3 Если сделать достаточно много итераций то вырисовывается интересная фигура. Треугольник, в который вписаны более мелкие треугольники. Это самый настоящий фрактал! Я собрал пример построения такой фигуры на базе Qt. 🌎 Код можно посмотреть здесь. С помощью paintEvent я рисую точки по озвученному алгоритму. Каждые 10 секунд либо по клику на виджете строится следующий треугольник. Особенности примера: 🔸 Атрибут Qt.WA_OpaquePaintEvent позволяет сохранить то, что было нарисовано в прошлой итерации. Таким образом мы видим постепенное наполнение точек а не мелькающую одну точку. 🔸QTimer позволяет создавать отложенные вызовы один раз или с повторением через интервал. 🔸QColor.fromHsv() позволяет создать рандомный но предсказуемый цвет с помощью HSV схемы. Не слишком светлый и не слишком тёмный но всегда с разный. Рандомизации подвергается только смещение по цветовому кругу (Hue), яркость (Value) и насыщенность (Saturation) можно контролировать отдельно в своих пределах или оставить статичными. Обычный рандом цвета по RGB не даёт такой предсказуемый результат. 🔸 Каждый новый цикл с новым треугольником предварительно затемняет предыдущие через этот вызов painter.fillRect(rec, QColor(0, 0, 0, 100)) То есть полупрозрачный цвет. Таким образом, чем старше треугольник, тем он темней. Если сделать виджет фулскрин, то у нас получится некий ScreenSaver))) 🔸 Да, я знаю, что рисование в Qt не самый лучший способ сделать этот пример) Скорее всего самый НЕподходящий. Попробуйте сделать тоже самое но другими средствами. #qt#source#tricks

Резултати

Пронајдени 5 слични објави

Пребарај: #controller

当前筛选 #controller清除筛选
GitHub Trends

@githubtrending · Post #15125 · 07.09.2025 г., 11:30

#cplusplus#controller#gamepad#gamepad_api#games#gaming#keyboard_emulation AntiMicroX lets you use a gamepad to control your computer by mapping gamepad buttons to keyboard keys, mouse actions, scripts, or macros. It works on Linux and Windows, supports many gamepads, and allows you to create multiple profiles for different apps or games. This makes it easier to play games that don’t support controllers or to control desktop apps with a gamepad, improving comfort and accessibility. You can install it easily on various systems, including Windows, Linux (via Flatpak, AppImage, or package managers), and customize it to fit your needs. It’s open-source and free to use. https://github.com/AntiMicroX/antimicrox

Crypto M - Crypto News

@CryptoM · Post #64847 · 10.04.2026 г., 03:50

🚀 Overview of SBTI's 28 Personality Types PANews posted on X (formerly Twitter) about the 28 distinct personality types identified by SBTI. These include the 'Controller' who excels in task management and situation handling, and the 'ATM-er' who invests time and emotional value. The 'Dior-s' represents a self-deprecating narrative under pressure, while the 'BOSS' is goal-oriented with strong organizational skills. The 'Thanker' leans towards positive feedback and gratitude, whereas the 'Oh-No' personality anticipates risks and negative outcomes. The 'GoGo' is action-driven, and the 'Sexy' emphasizes style and attraction. The 'Lover' is emotionally invested, and the 'Mum' is nurturing and concerned. The 'Fake' wears a social mask, and the 'OJBK' is conflict-averse. The 'Malo' resonates with the working class, while the 'Joker' uses humor to mask vulnerability. The 'WOC!' is highly reactive, and the 'Thinker' is analytical. The 'Shit' is cynical but often cleans up messes, while the 'ZZZZ' strategically disconnects. The 'Poor' is resource-conscious, and the 'Monk' is restrained and detached. The 'IMSB' is self-deprecating, and the 'Solo' is independent. The 'FUCK' is direct and rebellious, while the 'Dead' feels drained. The 'IMFW' has a low self-assessment, and the 'HHHH' finds humor first. The 'Drunk' is a hidden personality, and the 'Kanye' remains mysterious. #SBTI#PersonalityTypes#Controller#ATM#Dior#BOSS#Thanker#OhNo#GoGo#Sexy#Lover#Mum#Fake#OJBK#Malo#Joker#WOC#Thinker#Shit#ZZZZ#Poor#Monk#IMSB#Solo#FUCK#Dead#IMFW#HHHH#Drunk#Kanye