TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #296 · 11.04

Паттерн Декоратор — специальный способ организации модулей в программе, который позволяет подставить какую-то новую функцию прямо в середину цепочки вызовов, тем самым чуть-чуть подкорректировав поведение. Например, в реальном мире очки для чтения это декоратор. Вы ставите их между вашими глазами и текстом. Глобально взаимодействие ваших глаз и текста не меняется: отражённые световые лучи от страницы книги попадают в ваши зрачки, что с очками, что без них. Но очки располагаются посередине: они принимают лучи на вход и преломляют их, передавая дальше вам в глаза уже изменёнными. Важной особенностью является тот факт, что очки можно снять. Они не требуют ни модификации вашего тела, ни модификации книги. Вообще никакие условия не нужны, кроме наличия самих очков. А если вы в линзах, то внешний наблюдатель может даже этого не знать. Класс-декоратор должен быть спроектирован так, чтобы не требовать никаких изменений в объектах, с которыми он работает. Его можно отключить, чаще всего буквально закомментировав одну строку. В примере ниже программа выведет текст "Привет, мир, в натуре.", и вот это дополнение в конце как раз дописано декоратором. Можно убрать или закомментировать подчёркнутую строчку, не трогая остальной код, для всех внешних вызовов сигнатуры останутся теми же самыми, но выводиться будет уже просто "Привет, мир". В декораторы можно прятать логику, которую буквально навешивают поверх основной функции программы. Например, проверку прав на выполнение операции. Перевод на другой язык, логирование, поддержку обратной совместимости при обновлении и так далее. #dev

Hashtags

Резултати

Намерени 6 подобни публикации

Търсене: #mauritius

当前筛选 #mauritius清除筛选
Voyage.Travel.Tourism

@VOYAGE · Post #1114 · 29.09.2024 г., 12:14

🗺Mauritius 🇲🇺 The emotions of being in the open ocean surrounded by a pod of whales are indescribable. The most common whales around Mauritius are sperm whales. Swimming with them is completely safe. #Mauritius @voyage

Hashtags

American Оbserver

@american_observer · Post #4903 · 20.01.2026 г., 13:59

Trump Called the UK “very stupid” Trump has suggested Britain’s decision to cede the Chagos Islands to Mauritius is among the reasons he wants to take over Greenland. The US president, who is travelling to Davos in Switzerland for the World Economic Forum, made the claim as he ramped up his rhetoric on acquiring the Arctic territory. Trump fired off a flurry of posts on his Truth Social platform overnight on Tuesday about taking over Greenland, which is a territory of Denmark, the US’s Nato ally. Writing on the website, Trump said “Shockingly, our “brilliant” Nato Ally, the United Kingdom, is currently planning to give away the Island of Diego Garcia, the site of a vital US Military Base, to Mauritius, and to do so FOR NO REASON WHATSOEVER. “There is no doubt that China and Russia have noticed this act of total weakness. These are International Powers who only recognise STRENGTH, which is why the United States of America, under my leadership, is now, after only one year, respected like never before. “The UK giving away extremely important land is an act of GREAT STUPIDITY, and is another in a very long line of National Security reasons why Greenland has to be acquired.” The move will come as a huge shock to No 10 after the US secretary of state, Marco Rubio, gave his warm endorsement of the handover when it was first approved. It will also add fuel to Conservative and Reform criticisms of the move, which have cited US concerns as a reason to deny the deal with Mauritius. Immediately after Trump’s comments, the shadow foreign secretary, Priti Patel, said: “President Trump has said what we’ve said all along – Labour’s £35bn Chagos surrender is a bad deal for Britain and bad for our national security. We’ve opposed it from day one and it’s time Starmer put the security of our country first and scrap his rotten deal.” Nigel Farage, the Reform UK leader, said: “Thank goodness Trump has vetoed the surrender of the Chagos islands.” The UK has signed a £3.4bn agreement to cede sovereignty over the Chagos Islands to Mauritius but the deal is facing significant opposition in the House of Lords. On Monday, the MP Andrew Rosindell, who defected from the Conservatives to Reform UK, cited a failure to stand up for the Chagos Islands as a major factor in leaving the party. At the time of the agreement in May 2025, Rubio said the US “welcomed the historic agreement”. It went on : “This is a critical asset for regional and global security. President Trump expressed his support for this monumental achievement during his meeting with prime minister Starmer at the White House. “This milestone reflects the enduring strength of the US-UK relationship.” Critics of the handover have said the deal gives China an opening in the region because of its close relations with Mauritius. Trump has regularly cited fears of Chinese influence as a reason he intends the US to take over Greenland. #trump#britain#mauritius#chagos 📱American Оbserver - Stay up to date on all important events 🇺🇸

Addis Standard

@addisstandardeng · Post #21773 · 19.03.2026 г., 13:25

News: #WB debars PwC #Africa affiliates over ‘collusive and fraudulent practices’ linked to Ethiopia–Kenya power project The World Bank Group has announced a 21-month debarment with conditional release of three Africa-based affiliates of PricewaterhouseCoopers over what it described as “collusive and fraudulent practices” connected to a major regional electricity project involving #Ethiopia and #Kenya. In a statement issued on 18 March, the Bank said #Mauritius-based PricewaterhouseCoopers Associates Africa Ltd., PricewaterhouseCoopers Limited, Kenya, and PricewaterhouseCoopers #Rwanda Limited were sanctioned “in connection with collusive and fraudulent practices” related to the Eastern Electricity Highway Project, part of the first phase of the #Eastern_Africa Power Integration Program in Ethiopia. Read more: https://addisstandard.com/?p=55961

AI match predictions

@ai_match_prediction · Post #11195 · 27.03.2026 г., 05:05

Africa Cup of Nations - Qualification🌍 2026-03-27 13:00 UTC Somalia vs. Mauritius Predicted outcome: Mauritius❌ Predicted score: 0:1 Actual: Draw 0:0 #Somalia#Mauritius 2026-03-27 13:00 UTC Chad vs. Burundi Predicted outcome: Draw❌ Predicted score: 1:1 Actual: Burundi 0:4 #Chad#Burundi 2026-03-27 16:00 UTC Sao Tome and Principe vs. Ethiopia Predicted outcome: Ethiopia✅ Predicted score: 1:2 Actual: Ethiopia 0:3 #SaoTomeandPrincipe#Ethiopia #Football#AfricaCupofNations

AI match predictions

@ai_match_prediction · Post #11226 · 31.03.2026 г., 05:05

Africa Cup of Nations - Qualification🌍 2026-03-31 13:00 UTC Ethiopia vs. Sao Tome and Principe Predicted outcome: Ethiopia✅ Predicted score: 3:1 Actual: Ethiopia 1:0 #Ethiopia#SaoTomeandPrincipe 2026-03-31 13:00 UTC Burundi vs. Chad Predicted outcome: Draw❌ Predicted score: 1:1 Actual: Burundi 4:0 #Burundi#Chad 2026-03-31 14:00 UTC Eswatini vs. Eritrea Predicted outcome: Eswatini❌ Predicted score: 2:1 Actual: Eritrea 1:2 #Eswatini#Eritrea 2026-03-31 15:00 UTC Mauritius vs. Somalia Predicted outcome: Somalia❌ Predicted score: 0:1 Actual: Draw 0:0 #Mauritius#Somalia #Football#AfricaCupofNations