TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #242 · 7 мај

Теперь запакуем строку. В этом случае следует передавать тип данных bytes. >>> struct.pack('=s', b'a') b'a' Для записи слова следует указывать количество символов. >>> struct.pack('=5s', b'hello') b'hello' Кстати, запакованный вид соответствует исходному тексту. Всё верно, символ есть в таблице ASCII, то есть его код попадает в диапазон 0-127, он может быть записан одним байтом и имеет визуальное представление. А вот что будет если добавить символ вне ASCII >>> struct.pack(f'=s', b'ё') SyntaxError: bytes can only contain ASCII literal characters. Ошибка возникла еще на этапе создания объекта bytes, который не может содержать такой символ. Поэтому надо кодировать эти байты из строки. >>> enc = 'ёжик'.encode('utf-8') >>> struct.pack(f'={len(enc)}s', enc) b'\xd1\x91\xd0\xb6\xd0\xb8\xd0\xba' Заметьте, длина такой строки в байтах отличается от исходной длины, так как символы вне ASCII записываются двумя байтами и более. Поэтому здесь формат создаём на лету, используя получившуюся длину как каунтер токена. #libs#basic

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #edl

当前筛选 #edl清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #254 · 01.03.2024 г., 05:33

EDL Unbrick Guide | Nothing Phone (2) [Outdated] Did you mess up your device playing around with flashing tools or pull a "fastboot erase xbl" dance move? Maybe this can help🤣 ⬇️ Download: Links dead 🗒 XDA Thread: Here 🏷 Tags: #Unbrick#EDL ❗️ Requirements: - You need be on a machine running Windows. - Make sure to install the appropriate Qualcomm EDL drivers (Import the .inf file manually after extracting) - If your device can access the bootloader / fastboot, you can proceed using the stock cable. - If your device is unresponsive and cannot be triggered into EDL mode with a button press, a v2 EDL cable is required. ✍️ Instructions: 1. Download the file from the link above. 2. Extract the package. Password is password. 3. Open the NothingFlashTool.exe and run it and then select your phone. 4. Power off your Nothing Phone 2 and then press and hold both the volume keys together to boot into EDL mode. If it does not shows up as Qualcomm HS-USB 9008 under device manager then please install the drivers. For EDL mode volume keys shall work or else you can use a modified cable. 5. Click on Start Button to Flash the phone and let the flashing complete. The phone shall automatically reboot after flash is complete. Note: - Target NOS version post successful flashing is 2.5.1. - DIY for EDL Cable - If the tool stops working or you mess up, dont blame the management here. We dont have any responsibility for the same! 🤓 Provided by: Pong TG Development Team 👤 Posted by: Mvikrant 🐙 Pong Community » CLICK HERE

Hashtags

EU in Kazakhstan 🇪🇺🇰🇿

@euinkazakhstan · Post #190 · 26.09.2022 г., 08:03

Today the European Day of Languages. This day means promoting awareness among the general public of the importance of language learning and protecting linguistic heritage. Did you know that the 🇪🇺EU has 24 official languages? They are: Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Irish, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish and Swedish. **** Бүгін Еуропалық тілдер күні. Бұл күн жалпы қоғамның арасында тіл үйренудің және тілдік мұраны қорғаудың маңыздылығын насихаттайды. 🇪🇺Еуропалық Одақта 24 ресми тіл бар екенін білесіз бе? Олар: болгар, хорват, чех, дат, нидерланд, ағылшын, эстон, фин, француз, неміс, грек, венгр, ирланд, итальян, латыш, литва, мальта, поляк, португал, румын, словак, словен, испан және швед тілдері. #europeandayoflanguages#EDL