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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Търсене: #puente

当前筛选 #puente清除筛选
Savino Balzano

@savinobalzano · Post #1265 · 29.01.2026 г., 11:16

https://x.com/SavinoBalzano/status/2016831997277089939?s=20 Il più famoso di tutti è lui, #Puente: il fact-checker più noto, quasi quello per definizione. Io non credo nel #FactChecking: penso sia un modo maldestro per derubricare e squalificare alcune idee a vantaggio di altre. Ma se proprio deve esserci, quali titoli dovrebbe avere un arbitro della verità? Basta, secondo voi, una laurea triennale conseguita in undici anni? Ad esempio, uno che fa #debunking praticamente su ogni argomento, che cosa dovrebbe aver letto prima? Che cosa dovrebbe aver studiato prima di esercitare la funzione di sacerdote del vero? Non è meglio fidarsi delle persone e della loro capacità di farsi, liberamente e democraticamente, un’idea? Chi pensa, in generale, di poter prescrivere la verità come fosse una pastiglia (forse più una supposta) si fida davvero delle persone? O forse è mosso dalla supponenza, dalla presunzione, dall’arroganza: dalla convinzione di essere migliore degli altri? Domando. E, soprattutto, ritenete più democratico un sistema in cui trovino spazio tutti i punti di vista o uno in cui qualcuno decide cosa potete leggere e cosa deve essere censurato? Alla gente l’ardua sentenza. Io della gente mi fido.

la fionda📗

@lafionda · Post #7099 · 29.01.2026 г., 11:18

https://x.com/SavinoBalzano/status/2016831997277089939?s=20 Il più famoso di tutti è lui, #Puente: il fact-checker più noto, quasi quello per definizione. Io non credo nel #FactChecking: penso sia un modo maldestro per derubricare e squalificare alcune idee a vantaggio di altre. Ma se proprio deve esserci, quali titoli dovrebbe avere un arbitro della verità? Basta, secondo voi, una laurea triennale conseguita in undici anni? Ad esempio, uno che fa #debunking praticamente su ogni argomento, che cosa dovrebbe aver letto prima? Che cosa dovrebbe aver studiato prima di esercitare la funzione di sacerdote del vero? Non è meglio fidarsi delle persone e della loro capacità di farsi, liberamente e democraticamente, un’idea? Chi pensa, in generale, di poter prescrivere la verità come fosse una pastiglia (forse più una supposta) si fida davvero delle persone? O forse è mosso dalla supponenza, dalla presunzione, dall’arroganza: dalla convinzione di essere migliore degli altri? Domando. E, soprattutto, ritenete più democratico un sistema in cui trovino spazio tutti i punti di vista o uno in cui qualcuno decide cosa potete leggere e cosa deve essere censurato? Alla gente l’ardua sentenza. Io della gente mi fido.

American Оbserver

@american_observer · Post #4894 · 19.01.2026 г., 18:03

Two High-Speed Trains Collided in Southern Spain At least 39 people have been killed and 24 others seriously injured after two trains collided in southern Spain on Sunday night in what the prime minister, Pedro Sánchez, called “a night of deep pain for our country”. A high-speed Iryo train travelling from Málaga to Madrid derailed near the municipality of Adamuz in Córdoba province, crossing on to the other track where it hit an oncoming train, Adif, Spain’s rail infrastructure authority, posted on X. The second train, which was operated by the state rail company, Renfe, also derailed and went down an embankment, authorities said. The accident happened about 10 minutes after the Iryo left Málaga at 6.40pm (1740 GMT), Adif said. “Approximately 300 people were on board at the time of the accident,” Iryo said. “The derailment affected cars six through eight. The Guardia Civil and firefighters are currently working intensively at the scene to evacuate all passengers and have set up a joint emergency response team. “Iryo deeply regrets the incident, has activated all its emergency protocols, and is collaborating closely with Adif, Renfe, and the relevant authorities to determine the causes and manage the situation as effectively as possible.” Another witness told the public broadcaster RTVE that one of the carriages of the first train had completely overturned. An unidentified passenger on the second train – which was going from Madrid to Huelva – told public broadcaster TVE: “There were people screaming, their bags fell from the shelves. I was travelling to Huelva in the fourth carriage – the last, luckily.” Television images showed medical crews and fire services at the scene. Spain’s transport minister, Óscar Puente, said the cause of the accident had yet to be established. Speaking at a press conference at Atocha station in Madrid, he added it was “really strange” that a derailment should have happened on a straight stretch of track. This section of track was renewed in May, he said. Puente said most of those killed and injured had been in the first two carriages of the second train. #trains#collided#spain#puente#Iryo 📱American Оbserver - Stay up to date on all important events 🇺🇸