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

Резултати

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

Пребарај: #microservices

当前筛选 #microservices清除筛选
Go

@golang · Post #40 · 17.02.2018 г., 22:40

Very interesting article calls “From monoliths to microservices: an architectural strategy.” The structure of this post: - Adopting Microservices; - Microservices Architectural Patterns; - Architectural & Implementation Considerations; - Developer Productivity During Microservices Adoption; #architecture#development#microservices https://thenewstack.io/from-monolith-to-microservices

Go

@golang · Post #38 · 12.02.2018 г., 19:51

The article by Paul Dix calls “The Decomposable Monolith: Long Live the Monolith, Long Live Services!” Code examples are available but without a code highlighting 🙂 #architecture#development#microservices https://www.influxdata.com/blog/decomposable-monolith-long-live-monolith-long-live-services/

Go

@golang · Post #31 · 31.01.2018 г., 20:13

Great article about the architecture inside of Golang microservice, based on the Bob's Clean Architecture Concept (https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html) Main points: Your GoLang microservice has 4 layers: - Models, data structures, and their methods; - Repository, the provider of DB operations and data management, - Usecase for business logic implementation; - Delivery, protocol, and algorithms for message handling (HTTP, gRPC, etc). Each layer should be independent and be available for mocking, for internal communications between application layers. An example project here: https://github.com/bxcodec/go-clean-arch Full article on the Hackernoon website: https://hackernoon.com/golang-clean-archithecture-efd6d7c43047 #development#microservices#architecture

Go

@golang · Post #37 · 11.02.2018 г., 15:25

How can we track our microservice activity and monitor some processes inside of the service? The Prometheus can helps us in it: the next following article discovers an step-by-step flow for set up, configure and usage this excellent product: #development#microservices#monitoring https://www.google.ru/amp/s/blog.alexellis.io/prometheus-monitoring/amp/

Go

@golang · Post #23 · 25.01.2018 г., 20:13

Are you a beginner in GoLang? Then it requires your attention 🙂. Good and simple for understanding article about microservice-based API development; just simple and work solution with code examples and couple of advices #development#microservices#architecture#practice https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3?source=linkShare-b636419a57de-1516910445

Go

@golang · Post #19 · 22.01.2018 г., 21:32

Do you think about gRPC usage? Here is a great post about step-by-step guide to gRPC framework development. You’ll find here code examples, theory introductions and useful tips. Enjoy learning! 🙂 #manual#development#microservices#examples https://medium.com/@shijuvar/building-high-performance-apis-in-go-using-grpc-and-protocol-buffers-2eda5b80771b?source=linkShare-b636419a57de-1516656055

Go

@golang · Post #28 · 28.01.2018 г., 20:33

Interesting step-by-step guide about design and development API with Docker containers, Swarm cluster and Traefik (HTTP reverse proxy and load balancer). In this article you’ll know how to configure the Traefik in the Docker environment with 3 following nodes: one manager and two workers #architecture#configuration#docker#microservices https://hackernoon.com/architecting-a-highly-scalable-golang-api-with-docker-swarm-traefik-875d1871cc1f?source=linkShare-b636419a57de-1517171008

Go

@golang · Post #18 · 22.01.2018 г., 11:56

Up-to-date article about data-stream processing: Apache Kafka, microservices, JVM to GoLang migrations, ES & Cassandra. What they did when they got 6x traffic increasing in 6 month #design#cases#microservices#scalability https://medium.com/@magicpineng/in-depth-look-at-a-scalable-robust-data-stream-processing-pipeline-using-golang-processing-500k-9e68310a0675

IT Events RU

@iteventsru · Post #257 · 03.03.2018 г., 16:13

✅ Завтра JBreak 2018 📅 4 марта / 10:00 (время Новосибирское, МСК+4) / Новосибирск, Станционная ул., 104 + онлайн-трансляция 💵 Платно 📝 Регистрация тут: https://goo.gl/J22JGQ JBreak — единственная сибирская технологическая Java-конференция для опытных разработчиков. Все доклады будут посвящены только востребованным Java-технологиям и проблемам: производительность, concurrency, тестирование, распределённые системы и высокие нагрузки в мире Java, а также будущее платформы. Спикеры: ~ Simon Ritter ~ Sebastian Daschner ~ Никита Липский ~ Алексей Зиновьев ~ Дмитрий Бугайченко и другие 🔗 Программа: https://goo.gl/tYhuCR #backend#java#spring#JDK#Hibernate#microservices#Новосибирск#онлайн

12
ПретходнаСтраница 1 од 2Следна