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 слични објави

Пребарај: #rights

当前筛选 #rights清除筛选
TALKS

@talks · Post #21 · 01.08.2016 г., 15:12

◼ Women's Rights. In 19th Century America used to call itself a democracy, but did not allow women to vote. Even now in some parts of the world women are still struggling for equality. This speech was given by Susan B. Anthony. It's considered as one of the greatest speeches of all times by Times magazine. She was fined $100 for casting an illegal ballot in the 1872 presidential election. Seething at the injustice, she embarked on a speaking tour in support of female voting rights, during which she gave this speech.#women#rightshttps://youtu.be/T57dwhJBtts

Addis Standard

@addisstandardeng · Post #21353 · 10.02.2026 г., 05:34

#Rights groups call on Interior Ministry to freeze #deportation of #Ethiopian migrants Rights activists are calling on the Interior Minister not to act on a High Court decision to deport Ethiopian migrants, saying the security situation in the African country is too volatile. In November 2021, Israel granted group protection to Ethiopian nationals in light of the bloody civil war between the Ethiopian armed forces and the TPLF (Tigray People’s Liberation Front) from 2020 to 2022. In January 2024, Israel’s then-interior minister, Moshe Arbel, withdrew protection, following professional advice that the security situation in Ethiopia was sufficiently stable for nationals to return. In December, the High Court upheld that decision, rejecting an appeal by three organizations — the Hotline for Refugees and Migrants, HIAS Israel, and ASSAF – Aid Organization for Refugees and Asylum Seekers in Israel. Saying they took no position on the rights of the Ethiopians concerned, the three High Court judges gave the migrants four months to prepare to leave. However, the refugee and migrant organizations charge that Ethiopia is still too volatile. Israel’s Foreign Ministry itself says on its Addis Ababa website that Israelis should avoid non-essential travel to Tigray following the renewal of fighting between the Ethiopian army and the TPLF, which began on January 27. Conflict is also raging between Ethiopian authorities and Amhara militia groups in the Amhara region, and between security forces and armed groups in the Oromia region. https://www.timesofisrael.com/rights-groups-call-on-interior-ministry-to-freeze-deportation-of-ethiopian-migrants/

英國港僑協會香港人就業問卷調查2024 📊 HKB's Employment Survey on Hongkongers 2024 問卷連結 Link for the survey: https://forms.gle/a7vi1vZ9nouJHQs2A 本問卷調查由英國港僑協會發起,目的係了解各位住喺英國並持有 BN(O) 簽證嘅香港人喺就業及培訓上嘅需要,及後向英國各級政府及全英十二個香港歡迎中心 (Hong Kong Welcome Hub) 反映大家嘅需要,為 BN(O) 香港人制訂更加友善嘅就業及培訓政策,以及撥款安排。 為保障大家私隱,本問卷調查只會收集電郵地址作個案聯絡用途。請留意,我哋可能會將經整理後嘅資料 ( 不包括你嘅電郵 ) 轉交俾英國各級政府 ( 包括英國中央政府及各級地方政府 ) 及英國國會議員 ( 包括上議院及下議院 ) 作政策遊說、申請撥款、計劃活動用。 英國港僑協會會確保從本問卷調查所收集嘅有關資料,只用於上述用途。如果你喺問卷調查第一條問題回答「同意」,即表示你同意英國港僑協會按上述條款處理有關資料。 本問卷調查截止時間為 2024 年 2 月 29 日晚上 11 時 59 分。只需要十分鐘就可以完成問卷。請大家踴躍支持,並轉發俾其他在英香港人填寫,助人自助。 如果你喺英國就業或培訓上,需要英國港僑協會就業小組嘅協助,請你透過電郵 ([email protected]) 聯絡我哋。 英國港僑協會 2024 年 1 月 #英國港僑協會#移英港人#移民#英國#BNO#求職#工作#career#就業#job#work#勞工#權益#HongkongersinBritain#Employment#Rights#HKB#搵工#學徒#培訓#apprentice#apprenticeship#traning#AEB#問卷#問卷調查#survey#questionnaire#sportpersons#advancedlearnerloan