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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

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

Пребарај: #emerald

当前筛选 #emerald清除筛选
SIGNAL

@finsignal · Post #2856 · 11.02.2024 г., 16:40

What is ERC-404? The developers position ERC-404 as a new standard designed to combine the best qualities of interchangeable tokens (ERC-20) and NFT (ERC-721) ERC-404 aims to solve the problem of liquidity of NFT collections and expand the possibilities of their use in the DeFi ecosystem 📌 Interesting: The idea of creating a hybrid token format was submitted by the #Emerald project, which subsequently collapsed. Its founder claimed that he was able to combine interchangeable and non-exchangeable tokens, but, in fact, he simply organized a rug pull scheme. The #Pandora team picked up on this idea and refined it by introducing a new smart contract standard From a technical point of view, ERC-404 is a smart contract template that combines operations with ERC—721 and ERC-20 tokens The contract does not change the parameters of existing standards, but in a sense synchronizes transactions using different types of assets It is important to note that ERC-1155 already exists on the #Ethereum network — it also allows you to combine different types of tokens within a single smart contract, thus creating fractional (fractional) NFTs The key difference between ERC-1155 and ERC-404 is that the former concerns a specific unique NFT, and the new standard can be applied at the scale of the collection ERC-404 has not yet been recognized by either the Ethereum Foundation or the community The page on Ethereum.org the corresponding offer (EIP) is no longer available, in addition, this smart contract template has not been audited, so the question of its vulnerability remains open Pandora is the first and so far the largest project using ERC-404, so it is too early to talk about an established standard — it is possible that in subsequent implementations ERC-404 will receive new features and mechanisms.

12
ПретходнаСтраница 1 од 2Следна