Много лет назад я делал игру ВКонтакте про домики. Одно общее изометрическое поле, где у каждого свой участок, на котором можно строить дом, выбирать его размеры, материалы, форму окон и крыши. И обставлять мебелью.
Поле было квадратным 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
swap.coffee — #Decentralized OTC Platform
swap.coffee is the ultimate #DeFi hub in the #TON ecosystem 🏅
👨💻 Now you can compare top TON yield protocols, choose the best fit, track APR, deposit and withdraw assets and manage your positions — all in one seamless interface.
😳 they already support 15 protocols, and the list keeps growing: STON.fi, TONCO, EVAA, Storm Trade, Tonstakers, Hipo, Bemo, Torch Finance, Moon.cx, Stakee, KTON, DeDust, KirkaFi, Colossus, Coffin.
🐸Try it now: swap.coffee/earn
We love, the swap.coffee team 😀
swap.coffee — #Decentralized OTC Platform
swap.coffee is the ultimate #DeFi hub in the #TON ecosystem 🏅
👨💻 Now you can compare top TON yield protocols, choose the best fit, track APR, deposit and withdraw assets and manage your positions — all in one seamless interface.
😳 they already support 15 protocols, and the list keeps growing: STON.fi, TONCO, EVAA, Storm Trade, Tonstakers, Hipo, Bemo, Torch Finance, Moon.cx, Stakee, KTON, DeDust, KirkaFi, Colossus, Coffin.
🐸Try it now: swap.coffee/earn
We love, the swap.coffee team 😀
🎉 GPT360 acquires ownership of gpt360.bit
We now have a unified #decentralizedidentity in #Web3to protect our brand now and into the future. Check 🔗d.id/gpt360.bit
Huge shout out to https://twitter.com/DIDbasedfor gifting us the #DIDfor our brand! 💚
We are absolutely thrilled to announce our support for Yield Guild Games to further develop its soulbound reputation token.
We believe that #blockchain has the potential to transform the #gaming industry by enabling players to own their own assets and earn #rewards.
Through YGG’s partnerships with #NFT games and ecosystems like Axie Infinity, The Sandbox and League of Kingdoms, the guild is at the forefront of blockchain-based game economies.
Our goal is to support YGG and help the guild expand its offerings such as the Guild Advancement Program to connect even more players and provide them with an opportunity to participate in a #decentralized gaming ecosystem and get rewarded from their gaming activities.
Play-to-earn is the #future of gaming 🏆
Full read here.
🚀 Welcome to the Future of Communication & Payments with Liberdus
🔐 A decentralized messaging + payment platform built for privacy, speed, and freedom.
✨ Features: • End-to-end encrypted messaging
• Instant crypto payments
• Decentralized network
• Ultra low transaction fees
• Built on powerful Shardus technology
• Community-driven ecosystem
➡️ No central control. No censorship. Just secure communication and financial freedom.
⚡️ Liberdus is combining blockchain technology with real-world messaging utility to create the next generation of Web3 communication.
🔵Telegram: https://t.me/liberdusofficial
🔴 Website: http://liberdus.com
🐦 X: https://x.com/liberdus
#Liberdus#Web3#Crypto#Blockchain#DeFi#Messaging#Decentralized#Shardus#Privacy#CryptoPayments
🔐 Is Your Data Secure? 🔐
🫰 Discover peace of mind with #Cloudatabox – the #future of #secure, #decentralized storage powered by innovative #Web3 solutions! 🌐✨
🚀Register Now to explore how Cloudatabox keeps your data protected and accessible like never before. 📂🔒
Secure your future, secure your data!
#Cloudatabox#DataSecurity#Web3Solutions#DecentralizedStorage#RegisterToday#FutureOfStorage
🔥TOP 10 Trending RUNES ON #Bitcoin!
1️⃣#DOGGOTOTHEMOON
2️⃣#PUPSWORLDPEACE
3️⃣#RSICGENESISRUNE
4️⃣#THEDONALDTRUMP
5️⃣#CATSINTHESATS
6️⃣#ZZZZZFEHUZZZZZ
7️⃣#RUNESXBITCOIN
8️⃣#DECENTRALIZED
9️⃣#LOBOTHEWOLFPUP
🔟#WADDLEWADDLEPENGU
💥DATA SOURCE: MagicEden
Easily add your #RUNES to your TokenPocket #Bitcoin wallet and enjoy the trading services provided by MagicEden all in one place!
Guide👉https://help.tokenpocket.pro/en/wallet-faq-en/btc-wallet/runes-use-guide
Trump Calls for Ross Ulbricht's Release
Senator Rand Paul urges President Trump to free Ross Ulbricht, the founder of Silk Road. Meanwhile, Coinbase CEO Brian Armstrong states Trump is excited about a Strategic Bitcoin Reserve, aiming to be the first Bitcoin President. Additionally, Binance's CEO predicts a crypto all-time high in 2025 amid clearer U.S. regulation under Trump. Critical Metals Corp raises $500M for Bitcoin reserve strategy as they accept BTC as treasury asset—first Nasdaq company in critical minerals sector to do so.
🔗 Related articles from Watcher Guru and CoinDesk.
#Bitcoin#USDC#Crypto#Trump#Coinbase#Binance#HesterPeirce#SEC#Decentralization#Finance#Investment#CriticalMetals#Aviation#Regulation#Liberty#Decentralized#Blockchain#CryptoNews#VC
#Bitcoin#USDC#Crypto#Trump#Coinbase#Binance#HesterPeirce#SEC#Decentralization#Finance#Investment#CriticalMetals#Aviation#Regulation#Liberty#Decentralized#Blockchain#CryptoNews#VC
Funding Rounds Announced for Multiple Startups
Andesite AI raises $23M for cybersecurity enhancements. Comulate secures $20M for revenue automation in large broker teams. Jolly garners $16.50M, leveraging AI to boost employee performance. ConverzAI obtains $16M to automate staffing with AI agents. ACCURE gathers $16M, transforming battery data into business insights. Legend Labs closes $15M for decentralized finance solutions. ScorePlay raises $13M for AI-powered sports asset management. Swanston Labs and Levee Medical each acquire $10M, focusing on investment ventures and recovery technologies, respectively.
Read more about Andesite AI here, Comulate here, Jolly here, ConverzAI here, ACCURE here, Legend Labs here, ScorePlay here, Swanston Labs here, and Levee Medical here.
#AI#Cybersecurity#Finance#Automation#DataScience#Sports#Tech#Investments#Sustainability#Recruitment#Decentralized#Media#Production#Innovation#Recovery#VC
Thai SEC Considers Bitcoin ETF Approval
The Thai Securities and Exchange Commission is evaluating a proposal to approve a Bitcoin ETF for listing on its local exchange. Currently, Thai investors can only access overseas Bitcoin ETFs through a fund of funds product launched in mid-2024. Read more
#Thailand#Bitcoin#ETF#Crypto#Investing#Finance#USDC#fxUSD#XRP#WhaleAlert#Assets#Trading#Decentralized#Yield#Securities#Exchange#LocalMarket#DigitalAssets#BlueChip#Stablecoin#VC