🙄Разминка для ума!
Треугольник Серпинского, интересная фигура которую построить достаточно просто.
Алгоритм такой:
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
#ReactJS
⚙️React, visualized – interaktiv o'rganish!
— React konseptlarini grafik va interaktiv tarzda o'rganing
— Props, State, Components, JSX va boshqa asosiy mavzularni vizual tarzda tushuning
— Har bir mavzu misollar va diagrammalar bilan tushuntirilgan
Sayt:react.gg/visualized
💡 Oson va qiziqarli tarzda React’ni o‘rganing!
💻@dasturlash_hayoti— dasturchilar hayoti va IT memlari aralash kanal😉
https://gist.github.com/genomics-geek/98929a9e7ba9602fed7bfa4a5a1c5c4e
Guide on how to create and set up a Dockerized web app using #Django_REST_APIs and #ReactJS
#Docker
#typescript#electron#material_you#music#music_player#netease_cloud_music#react#reactjs
Music You is a free desktop music player that lets you enjoy all the features of NetEase Cloud Music on your computer, with a modern, easy-to-use design that follows Google’s Material You style. You can log in with your phone, browse recommendations, manage your music library, listen to podcasts and radio, see lyrics (including word-by-word highlights), play local files, and access your cloud music. The app is built with React and Electron, works on Windows, macOS, and Linux, and is open source—so you can even download and modify the code yourself. This gives you a smooth, full-featured music experience right on your desktop, with regular updates and a clean, customizable interface.
https://github.com/GuMengYu/music-you
#typescript#cinny#cinnyapp#client#hacktoberfest#matrix#matrix_client#matrix_org#reactjs
Cinny is a simple, elegant, and secure Matrix messaging client with end-to-end encryption and open-source code. Use the web app at app.cinny.in, download the desktop version, or self-host easily via GitHub releases, Docker, or your webserver for full control. This lets you chat privately and modernly without relying on big tech apps, giving you privacy, customization, and easy setup on your own server for secure, ad-free messaging.
https://github.com/cinnyapp/cinny
#typescript#agent#agents#ai#assistant#assistant_chat_bots#generative_ui#js#react#reactjs#ui#ui_components
Tambo AI is a free React SDK that lets AI generate and control your app's UI from natural language chats, like showing charts or updating notes without clicks. Register components with simple Zod schemas, wrap in TamboProvider, and use hooks for streaming chats. It beats manual wiring with MCP tools, self-hosting, and templates. You save hours prototyping adaptive apps that fit every user—newbies see basics, pros get advanced views—cutting support needs and boosting speed.
https://github.com/tambo-ai/tambo
#java#distributed_systems#durable_execution#grpc#java#javascript#microservice_orchestration#orchestration_engine#orchestrator#reactjs#spring_boot#workflow_automation#workflow_engine#workflow_management#workflows
Conductor is an open-source tool that helps you manage and automate complex workflows involving many microservices and systems. It makes your workflows flexible, reliable, and scalable by handling retries, errors, and monitoring automatically. You can define workflows as code in JSON, use various task types, and manage workflows dynamically without tightly coupling services. It offers an easy-to-use web interface and supports multiple databases like Redis and MySQL. This helps you build, run, and monitor workflows efficiently, saving time and reducing errors in managing distributed applications. It also has SDKs for Java, Python, JavaScript, Go, and C# to integrate easily with your projects.
https://github.com/conductor-oss/conductor
#python#blocknotejs#collaborative#django#documentation#g2g#government#knowledge#knowledge_base#mit#mit_license#opensource#reactjs#realtime_collaboration#self_hosted#wiki#yjs
Docs is a collaborative online text editor that helps you and your team write, edit, and organize documents together in real time, even offline. It offers easy formatting, AI tools like summarizing and rephrasing, and secure sharing with controlled access. You can export documents in various formats and create structured knowledge with subpages. Docs is open source, easy to self-host, and used by public organizations, ensuring your data stays secure and private. This tool saves time, improves teamwork, and turns your notes into organized knowledge you can access anytime. It’s great for teams wanting efficient, secure, and collaborative document editing.
https://github.com/suitenumerique/docs
#python#api#bracket#brackets#docker#docusaurus#fastapi#json#mantine#nextjs#postgresql#python#react#reactjs#selfhosted#sports#tournament_bracket#tournament_manager#tournaments#web#yarn
Bracket is a tool for organizing tournaments. It supports different formats like single elimination, round-robin, and Swiss. You can create teams, add players, and manage multiple clubs with several tournaments. The system allows you to drag-and-drop matches to different courts or reschedule them. It also provides customizable dashboard pages for public viewing. This makes it easier to manage and engage with tournaments, offering more flexibility and control for organizers and participants.
https://github.com/evroon/bracket
#typescript#boilerplate#boilerplate_code#jamstack#javascript#js_boilerplate#netlify_template#next_js#next_theme#nextjs#nextjs_starter#nextjs_template#react#react_boilerplate#reactjs#starter_kit#starter_project#starter_template#tailwind_css#tailwindcss#typescript
You can quickly start a modern web project using a ready-made Next.js boilerplate that includes the latest Next.js 15 features, Tailwind CSS 4, and TypeScript. It offers built-in user authentication, multi-language support, type-safe database tools, error monitoring, AI code reviews, and security features like bot protection. The setup is easy with local and remote database options, automatic testing, and deployment guides. This saves you time and effort by providing a flexible, production-ready foundation with best practices, letting you focus on building your app instead of configuring tools and infrastructure. It also supports smooth development with live reload and VSCode integration.
https://github.com/ixartz/Next-js-Boilerplate