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

TGINSIGHT SIMILAR POSTS

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

Изходен канал @clockstackwheels · Post #266 · 21.03

Много лет назад я делал игру ВКонтакте про домики. Одно общее изометрическое поле, где у каждого свой участок, на котором можно строить дом, выбирать его размеры, материалы, форму окон и крыши. И обставлять мебелью. Поле было квадратным 100 на 100, соответственно у каждого квартала был номер по одной оси X от 0 до 99 и по другой Y от 0 до 99. По какой-то причине мне тогда нужно было сохранить это в одном числе как идентификатор квартала, и я подумал, что изобрёл гениальный способ: A = X*100 + Y. Извлечь обратно тоже было легко: поделить A на 100 и округлить вниз, это получался X. А потом Y = A - X*100. Например, квартал с координатами 13-29, собственно, так и записывался: 1329. Важно, что это математические операции, а не строковые. Они и сами по себе быстрее выполняются программой, и позволяют, например, удобно отсортировать участки. Я считал себя очень умным, не зная тогда, что по сути изобрёл системы исчисления, и вообще подобный подход очень банален и прост. Мы куда чаще видим это в битовых масках, потому что и сама задача для двузначных свойств возникает чаще, и компьютер существенно быстрее работает с битами, но от того, какая там база системы исчисления, математический смысл не меняется. Если тебе надо записать в одно число несколько свойств, каждое из которых может быть в N значениях, то в это число должно влезать N*N*N... сколько там у тебя этих свойств. Ты пишешь первое свойство n1, потом прибавляешь n2*N, потом n3*N*N и так далее. Величины существуют в разных разрядах N-ричной системы исчисления, поэтому не пересекаются, и их можно разделить. Игра, кстати, поначалу хорошо набирала пользователей, а потом перестала. Я думал, что она не интересная, и закрыл проект. А сильно позже уже выяснилось, что был баг в коде регистрации игрока, из-за чего новые приходить не смогли начиная с какого-то момента. В том самом коде, который извлекал координаты квартала из его идентификатора, да. #dev

Hashtags

Резултати

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

Търсене: #officals

当前筛选 #officals清除筛选
American Оbserver

@american_observer · Post #4953 · 25.01.2026 г., 13:00

Trump Administration Officials Are Showing Their Bare-Faced Effrontery Two witnesses to the killing of Alex Pretti have said in sworn testimony that the 37-year-old intensive care nurse was not brandishing a weapon when he approached federal agents in Minneapolis on Saturday, contradicting a claim made by Trump administration officials as they sought to cast the shooting of a prone man as an act of self-defense. Their accounts came in sworn affidavits that were filed in federal court in Minnesota late Saturday, just hours after Pretti’s killing, as part of a lawsuit brought by the ACLU on behalf of Minneapolis protesters against Kristi Noem and other homeland security officials directing the immigration crackdown in the city. One witness is a woman who filmed the clearest video of the fatal shooting; the other is a physician who lives nearby and said they were initially prevented by federal officers from rendering medical aid to the gunshot victim. The names of both witnesses were redacted in the publicly available filings. In her testimony, the woman who filmed the shooting from just behind Pretti wearing a pink coat identified herself as “a children’s entertainer who specializes in face painting”. She testified that she came to the scene on her way to work because “I’ve been involved in observing in my community, because it is so important to document what ICE is doing to my neighbors”. The woman testified that she saw no sign of Pretti holding a gun at any point. She said: “The agents pulled the man on the ground. I didn’t see him touch any of them – he wasn’t even turned toward them. It didn’t look like he was trying to resist, just trying to help the woman up. I didn’t see him with a gun. They threw him to the ground. Four or five agents had him on the ground and they just started shooting him. They shot him so many times (…) I don’t know why they shot him. He was only helping. I was five feet from him and they just shot him (…) The witness testimony, combined with video evidence reviewed by American Observer, directly contradicts claims by senior Trump administration officials, including the president, the homeland security secretary and Greg Bovino, a border patrol commander, who called Pretti a “gunman” who approached federal officers “brandishing” a gun and threatened to “massacre” them. #pretti#minnesota#gunshot#trump#officals 📱American Оbserver - Stay up to date on all important events 🇺🇸