问:
Installing eth-brownie error | ERROR: Failed building wheel for yarl
I am trying to install eth-brownie to follow the Patrick Collins Solidity Course however I can't get past this error I have been googling for a few days.

This is the error:

```<code>note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build yarl
ERROR: Could not build wheels for yarl, which is required to install pyproject.toml-based projects
</code>```

This is the full report:

```Collecting eth-brownie
  Using cached eth_brownie-1.19.2-py3-none-any.whl (232 kB)
Requirement already satisfied: aiohttp==3.8.3 in c:\python311\lib\site-packages (from eth-brownie) (3.8.3)
Collecting aiosignal==1.2.0
  Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting asttokens==2.0.5
  Using cached asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: async-timeout==4.0.2 in c:\python311\lib\site-packages (from eth-brownie) (4.0.2)
Collecting attrs==22.1.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Requirement already satisfied: base58==2.1.1 in c:\python311\lib\site-packages (from eth-brownie) (2.1.1)
Collecting bitarray==2.6.0
  Using cached bitarray-2.6.0.tar.gz (102 kB)
  Preparing metadata (setup.py) ... done
Collecting black==22.10.0
  Using cached black-22.10.0-cp311-cp311-win_amd64.whl (1.2 MB)
Collecting certifi==2022.9.24
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Requirement already satisfied: charset-normalizer==2.1.1 in c:\python311\lib\site-packages (from eth-brownie) (2.1.1)
Requirement already satisfied: click==8.1.3 in c:\python311\lib\site-packages (from eth-brownie) (8.1.3)
Collecting cytoolz==0.12.0
  Using cached cytoolz-0.12.0.tar.gz (502 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting dataclassy==0.11.1
  Using cached dataclassy-0.11.1-py3-none-any.whl (23 kB)
Collecting eip712==0.1.0
  Using cached eip712-0.1.0-py3-none-any.whl (13 kB)
Requirement already satisfied: eth-abi==2.2.0 in c:\python311\lib\site-packages (from eth-brownie) (2.2.0)
Requirement already satisfied: eth-account==0.5.9 in c:\python311\lib\site-packages (from eth-brownie) (0.5.9)
Collecting eth-event==1.2.3
  Using cached eth_event-1.2.3-py3-none-any.whl (7.3 kB)
Collecting eth-hash[pycryptodome]==0.3.3
  Using cached eth_hash-0.3.3-py3-none-any.whl (8.9 kB)
Requirement already satisfied: eth-keyfile==0.5.1 in c:\python311\lib\site-packages (from eth-brownie) (0.5.1)
Requirement already satisfied: eth-keys==0.3.4 in c:\python311\lib\site-packages (from eth-brownie) (0.3.4)
Requirement already satisfied: eth-rlp==0.2.1 in c:\python311\lib\site-packages (from eth-brownie) (0.2.1)
Requirement already satisfied: eth-typing==2.3.0 in c:\python311\lib\site-packages (from eth-brownie) (2.3.0)
Collecting eth-utils==1.10.0
  Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting execnet==1.9.0
  Using cached execnet-1.9.0-py2.py3-none-any.whl (39 kB)
Collecting frozenlist==1.3.1
  Using cached frozenlist-1.3.1.tar.gz (66 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting hexbytes==0.2.3
  Using cached hexbytes-0.2.3-py3-none-any.whl (6.4 kB)
Collecting hypothesis==6.27.3
  Using cached hypothesis-6.27.3-py3-none-any.whl (384 kB)
Requirement already satisfied: idna==3.4 in c:\python311\lib\site-packages (from eth-brownie) (3.4)
Collecting inflection==0.5.0
  Using cached inflection-0.5.0-py2.py3-none-any.whl (5.8 kB)
Collecting iniconfig==1.1.1
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Requirement already satisfied: ipfshttpclient==0.8.0a2 in c:\python311\lib\site-packages (from eth-brownie) (0.8.0a2)
Collecting jsonschema==3.2.0
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting lazy-object-proxy==1.7.1
  Using cached lazy-object-proxy-1.7.1.tar.gz (41 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lru-dict==1.1.8 in c:\python311\lib\site-packages (from eth-brownie) (1.1.8)
Requirement already satisfied: multiaddr==0.0.9 in c:\python311\lib\site-packages (from eth-brownie) (0.0.9)
Collecting multidict==6.0.2
  Using cached multidict-6.0.2.tar.gz (50 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: mypy-extensions==0.4.3 in c:\python311\lib\site-packages (from eth-brownie) (0.4.3)
Collecting mythx-models==1.9.1
  Using cached mythx_models-1.9.1-py2.py3-none-any.whl (82 kB)
Requirement already satisfied: netaddr==0.8.0 in c:\python311\lib\site-packages (from eth-brownie) (0.8.0)
Collecting packaging==21.3
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Requirement already satisfied: parsimonious==0.8.1 in c:\python311\lib\site-packages (from eth-brownie) (0.8.1)
Collecting pathspec==0.10.1
  Using cached pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting platformdirs==2.5.2
  Using cached platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting pluggy==1.0.0
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting prompt-toolkit==3.0.31
  Using cached prompt_toolkit-3.0.31-py3-none-any.whl (382 kB)
Requirement already satisfied: protobuf==3.19.5 in c:\python311\lib\site-packages (from eth-brownie) (3.19.5)
Collecting psutil==5.9.2
  Using cached psutil-5.9.2.tar.gz (479 kB)
  Preparing metadata (setup.py) ... done
Collecting py==1.11.0
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting py-solc-ast==1.2.9
  Using cached py_solc_ast-1.2.9-py3-none-any.whl (10 kB)
Requirement already satisfied: py-solc-x==1.1.1 in c:\python311\lib\site-packages (from eth-brownie) (1.1.1)
Collecting pycryptodome==3.15.0
  Using cached pycryptodome-3.15.0-cp35-abi3-win_amd64.whl (1.9 MB)
Collecting pygments==2.13.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting pygments-lexer-solidity==0.7.0
  Using cached pygments_lexer_solidity-0.7.0-py3-none-any.whl
Collecting pyjwt==1.7.1
  Using cached PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting pyparsing==3.0.9
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting pyrsistent==0.18.1
  Using cached pyrsistent-0.18.1.tar.gz (100 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pytest==6.2.5
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting pytest-forked==1.4.0
  Using cached pytest_forked-1.4.0-py3-none-any.whl (4.9 kB)
Collecting pytest-xdist==1.34.0
  Using cached pytest_xdist-1.34.0-py2.py3-none-any.whl (36 kB)
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting python-dotenv==0.16.0
  Using cached python_dotenv-0.16.0-py2.py3-none-any.whl (18 kB)
Collecting pythx==1.6.1
  Using cached pythx-1.6.1-py2.py3-none-any.whl (39 kB)
Collecting pyyaml==5.4.1
  Using cached PyYAML-5.4.1-cp311-cp311-win_amd64.whl
Requirement already satisfied: requests==2.28.1 in c:\python311\lib\site-packages (from eth-brownie) (2.28.1)
Requirement already satisfied: rlp==2.0.1 in c:\python311\lib\site-packages (from eth-brownie) (2.0.1)
Requirement already satisfied: semantic-version==2.10.0 in c:\python311\lib\site-packages (from eth-brownie) (2.10.0)
Requirement already satisfied: six==1.16.0 in c:\python311\lib\site-packages (from eth-brownie) (1.16.0)
Collecting sortedcontainers==2.4.0
  Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting toml==0.10.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting tomli==2.0.1
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Requirement already satisfied: toolz==0.12.0 in c:\python311\lib\site-packages (from eth-brownie) (0.12.0)
Collecting tqdm==4.64.1
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting urllib3==1.26.12
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Requirement already satisfied: varint==1.0.2 in c:\python311\lib\site-packages (from eth-brownie) (1.0.2)
Collecting vvm==0.1.0
  Using cached vvm-0.1.0-py3-none-any.whl (11 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.19.1-py3-none-any.whl (232 kB)
Collecting aiohttp==3.8.1
  Using cached aiohttp-3.8.1.tar.gz (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting black==22.6.0
  Using cached black-22.6.0-py3-none-any.whl (156 kB)
Collecting certifi==2022.6.15
  Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting charset-normalizer==2.1.0
  Using cached charset_normalizer-2.1.0-py3-none-any.whl (39 kB)
Collecting hexbytes==0.2.2
  Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Collecting idna==3.3
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting pathspec==0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting prompt-toolkit==3.0.30
  Using cached prompt_toolkit-3.0.30-py3-none-any.whl (381 kB)
Collecting protobuf==3.20.1
  Using cached protobuf-3.20.1-py2.py3-none-any.whl (162 kB)
Collecting psutil==5.9.1
  Using cached psutil-5.9.1.tar.gz (479 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pygments==2.12.0
  Using cached Pygments-2.12.0-py3-none-any.whl (1.1 MB)
Collecting semantic-version==2.8.5
  Using cached semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
Collecting tqdm==4.64.0
  Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting urllib3==1.26.11
  Using cached urllib3-1.26.11-py2.py3-none-any.whl (139 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.19.0-py3-none-any.whl (232 kB)
Collecting attrs==21.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting bitarray==1.2.2
  Using cached bitarray-1.2.2.tar.gz (48 kB)
  Preparing metadata (setup.py) ... done
Collecting black==22.3.0
  Using cached black-22.3.0-py3-none-any.whl (153 kB)
Collecting certifi==2022.5.18.1
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting charset-normalizer==2.0.12
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting cytoolz==0.11.2
  Using cached cytoolz-0.11.2.tar.gz (481 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-abi==2.1.1
  Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Collecting eth-account==0.5.7
  Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Collecting eth-hash[pycryptodome]==0.3.2
  Using cached eth_hash-0.3.2-py3-none-any.whl (8.8 kB)
Collecting frozenlist==1.3.0
  Using cached frozenlist-1.3.0.tar.gz (65 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting lru-dict==1.1.7
  Using cached lru_dict-1.1.7-cp311-cp311-win_amd64.whl
Collecting prompt-toolkit==3.0.29
  Using cached prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
Collecting pycryptodome==3.14.1
  Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting requests==2.27.1
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting toolz==0.11.2
  Using cached toolz-0.11.2-py3-none-any.whl (55 kB)
Collecting urllib3==1.26.9
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.18.2-py3-none-any.whl (230 kB)
Collecting certifi==2021.10.8
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting psutil==5.9.0
  Using cached psutil-5.9.0.tar.gz (478 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-brownie
  Using cached eth_brownie-1.18.1-py3-none-any.whl (225 kB)
Collecting black==22.1.0
  Using cached black-22.1.0-py3-none-any.whl (160 kB)
Collecting charset-normalizer==2.0.11
  Using cached charset_normalizer-2.0.11-py3-none-any.whl (39 kB)
Collecting click==8.0.3
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting platformdirs==2.4.1
  Using cached platformdirs-2.4.1-py3-none-any.whl (14 kB)
Collecting prompt-toolkit==3.0.26
  Using cached prompt_toolkit-3.0.26-py3-none-any.whl (375 kB)
Collecting protobuf==3.19.4
  Using cached protobuf-3.19.4-py2.py3-none-any.whl (162 kB)
Collecting pygments==2.11.2
  Using cached Pygments-2.11.2-py3-none-any.whl (1.1 MB)
Collecting pyparsing==3.0.7
  Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting tomli==2.0.0
  Using cached tomli-2.0.0-py3-none-any.whl (12 kB)
Collecting tqdm==4.62.3
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting typing-extensions==4.0.1
  Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.8
  Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.18.0-py3-none-any.whl (225 kB)
  Using cached eth_brownie-1.17.2-py3-none-any.whl (221 kB)
Collecting async-timeout==4.0.1
  Using cached async_timeout-4.0.1-py3-none-any.whl (5.7 kB)
Collecting asynctest==0.13.0
  Using cached asynctest-0.13.0-py3-none-any.whl (26 kB)
Collecting attrs==21.2.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting black==21.11b1
  Using cached black-21.11b1-py3-none-any.whl (155 kB)
Collecting cached-property==1.5.2
  Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting charset-normalizer==2.0.9
  Using cached charset_normalizer-2.0.9-py3-none-any.whl (39 kB)
Collecting eth-account==0.5.6
  Using cached eth_account-0.5.6-py3-none-any.whl (101 kB)
Collecting eth-keys==0.3.3
  Using cached eth_keys-0.3.3-py3-none-any.whl (20 kB)
Collecting eth-typing==2.2.2
  Using cached eth_typing-2.2.2-py3-none-any.whl (6.2 kB)
Collecting frozenlist==1.2.0
  Using cached frozenlist-1.2.0.tar.gz (65 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting importlib-metadata==4.8.2
  Using cached importlib_metadata-4.8.2-py3-none-any.whl (17 kB)
Collecting lazy-object-proxy==1.6.0
  Using cached lazy_object_proxy-1.6.0-cp311-cp311-win_amd64.whl
Collecting multidict==5.2.0
  Using cached multidict-5.2.0.tar.gz (49 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting platformdirs==2.4.0
  Using cached platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting prompt-toolkit==3.0.23
  Using cached prompt_toolkit-3.0.23-py3-none-any.whl (374 kB)
Collecting protobuf==3.19.1
  Using cached protobuf-3.19.1-py2.py3-none-any.whl (162 kB)
Collecting psutil==5.8.0
  Using cached psutil-5.8.0-cp311-cp311-win_amd64.whl
Collecting pycryptodome==3.12.0
  Using cached pycryptodome-3.12.0-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting pygments==2.10.0
  Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting pyparsing==3.0.6
  Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting pyrsistent==0.18.0
  Using cached pyrsistent-0.18.0-cp311-cp311-win_amd64.whl
Collecting pytest-forked==1.3.0
  Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting regex==2021.11.10
  Using cached regex-2021.11.10.tar.gz (702 kB)
  Preparing metadata (setup.py) ... done
Collecting requests==2.26.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting tomli==1.2.2
  Using cached tomli-1.2.2-py3-none-any.whl (12 kB)
Collecting typed-ast==1.5.1
  Using cached typed_ast-1.5.1.tar.gz (252 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.10.0.2
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting urllib3==1.26.7
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.17.1-py3-none-any.whl (221 kB)
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-py3-none-any.whl
Collecting asttokens==2.0.4
  Using cached asttokens-2.0.4-py2.py3-none-any.whl (20 kB)
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting base58==2.1.0
  Using cached base58-2.1.0-py3-none-any.whl (5.6 kB)
Collecting black==21.9b0
  Using cached black-21.9b0-py3-none-any.whl (148 kB)
Collecting chardet==4.0.0
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting charset-normalizer==2.0.7
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting cytoolz==0.11.0
  Using cached cytoolz-0.11.0.tar.gz (477 kB)
  Preparing metadata (setup.py) ... done
Collecting hypothesis==6.24.0
  Using cached hypothesis-6.24.0-py3-none-any.whl (381 kB)
Collecting packaging==21.0
  Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting prompt-toolkit==3.0.21
  Using cached prompt_toolkit-3.0.21-py3-none-any.whl (374 kB)
Collecting protobuf==3.19.0
  Using cached protobuf-3.19.0-py2.py3-none-any.whl (162 kB)
Collecting py==1.10.0
  Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting pycryptodome==3.11.0
  Using cached pycryptodome-3.11.0-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting pyparsing==3.0.3
  Using cached pyparsing-3.0.3-py3-none-any.whl (96 kB)
Collecting regex==2021.10.23
  Using cached regex-2021.10.23.tar.gz (703 kB)
  Preparing metadata (setup.py) ... done
Collecting toolz==0.11.1
  Using cached toolz-0.11.1-py3-none-any.whl (55 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.17.0-py3-none-any.whl (221 kB)
Collecting dataclassy==0.11.0
  Using cached dataclassy-0.11.0-py3-none-any.whl (23 kB)
Collecting hypothesis==6.23.2
  Using cached hypothesis-6.23.2-py3-none-any.whl (381 kB)
Collecting idna==3.2
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting prompt-toolkit==3.0.20
  Using cached prompt_toolkit-3.0.20-py3-none-any.whl (370 kB)
Collecting protobuf==3.18.1
  Using cached protobuf-3.18.1-py2.py3-none-any.whl (174 kB)
Collecting pyparsing==2.4.7
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting regex==2021.10.8
  Using cached regex-2021.10.8.tar.gz (703 kB)
  Preparing metadata (setup.py) ... done
Collecting rlp==1.2.0
  Using cached rlp-1.2.0-py2.py3-none-any.whl (19 kB)
Collecting tomli==1.2.1
  Using cached tomli-1.2.1-py3-none-any.whl (11 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.16.4-py3-none-any.whl (219 kB)
Collecting certifi==2021.5.30
  Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting charset-normalizer==2.0.6
  Using cached charset_normalizer-2.0.6-py3-none-any.whl (37 kB)
Collecting click==8.0.1
  Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting dataclassy==0.10.4
  Using cached dataclassy-0.10.4-py3-none-any.whl (23 kB)
Collecting eth-account==0.5.5
  Using cached eth_account-0.5.5-py3-none-any.whl (100 kB)
Collecting hypothesis==6.21.6
  Using cached hypothesis-6.21.6-py3-none-any.whl (381 kB)
Collecting multidict==5.1.0
  Using cached multidict-5.1.0-cp311-cp311-win_amd64.whl
Collecting platformdirs==2.3.0
  Using cached platformdirs-2.3.0-py3-none-any.whl (13 kB)
Collecting protobuf==3.18.0
  Using cached protobuf-3.18.0-py2.py3-none-any.whl (174 kB)
Collecting py-solc-x==1.1.0
  Using cached py_solc_x-1.1.0-py3-none-any.whl (15 kB)
Collecting pycryptodome==3.10.1
  Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting regex==2021.8.28
  Using cached regex-2021.8.28-cp311-cp311-win_amd64.whl
Collecting urllib3==1.26.6
  Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting vyper==0.2.16
  Using cached vyper-0.2.16-py3-none-any.whl (236 kB)
Collecting wcwidth==0.2.5
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting web3==5.23.1
  Using cached web3-5.23.1-py3-none-any.whl (486 kB)
Requirement already satisfied: websockets==9.1 in c:\python311\lib\site-packages (from eth-brownie) (9.1)
Collecting wrapt==1.12.1
  Using cached wrapt-1.12.1-cp311-cp311-win_amd64.whl
Collecting yarl==1.6.3
  Using cached yarl-1.6.3.tar.gz (176 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: colorama in c:\python311\lib\site-packages (from click==8.0.1->eth-brownie) (0.4.6)
Requirement already satisfied: setuptools in c:\python311\lib\site-packages (from jsonschema==3.2.0->eth-brownie) (65.5.0)
Collecting atomicwrites>=1.0
  Using cached atomicwrites-1.4.1-py2.py3-none-any.whl
Requirement already satisfied: pywin32>=223 in c:\python311\lib\site-packages (from web3==5.23.1->eth-brownie) (305)
WARNING: The candidate selected for download or install is a yanked version: 'protobuf' candidate (version 3.18.0 at https://files.pythonhosted.org/packages/74/4e/9f3cb458266ef5cdeaa1e72a90b9eda100e3d1803cbd7ec02f0846da83c3/protobuf-3.18.0-py2.py3-none-any.whl (from https://pypi.org/simple/protobuf/))
Reason for being yanked: This version claims to support Python 2 but does not
Building wheels for collected packages: yarl
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      C:\Users\shark\AppData\Local\Temp\pip-build-env-7jfcsmi9\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      **********************
      * Accellerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_py.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_url.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\__init__.py -> build\lib.win-amd64-cpython-311\yarl
      running egg_info
      writing yarl.egg-info\PKG-INFO
      writing dependency_links to yarl.egg-info\dependency_links.txt
      writing requirements to yarl.egg-info\requires.txt
      writing top-level names to yarl.egg-info\top_level.txt
      reading manifest file 'yarl.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl\*.html'
      warning: no previously-included files found matching 'yarl\*.so'
      warning: no previously-included files found matching 'yarl\*.pyd'
      no previously-included directories found matching 'docs\_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info\SOURCES.txt'
      copying yarl\__init__.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.c -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyx -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\py.typed -> build\lib.win-amd64-cpython-311\yarl
      building 'yarl._quoting_c' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\yarl
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcyarl/_quoting_c.c /Fobuild\temp.win-amd64-cpython-311\Release\yarl/_quoting_c.obj
      _quoting_c.c
      yarl/_quoting_c.c(196): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build yarl
ERROR: Could not build wheels for yarl, which is required to install pyproject.toml-based projects
```

I have already downloaded cytoolz, cython and yarl and attempted to pip3 install eth-brownie but still have this error. I have looked at many stackoverflow reponses to this error but haven't found anything that has resolved my error.

Any help will be greatly appreciated.

Body:
I am trying to install eth-brownie to follow the Patrick Collins Solidity Course however I can't get past this error I have been googling for a few days.

This is the error:

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build yarl
ERROR: Could not build wheels for yarl, which is required to install pyproject.toml-based projects

This is the full report:

Collecting eth-brownie
  Using cached eth_brownie-1.19.2-py3-none-any.whl (232 kB)
Requirement already satisfied: aiohttp==3.8.3 in c:\python311\lib\site-packages (from eth-brownie) (3.8.3)
Collecting aiosignal==1.2.0
  Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting asttokens==2.0.5
  Using cached asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: async-timeout==4.0.2 in c:\python311\lib\site-packages (from eth-brownie) (4.0.2)
Collecting attrs==22.1.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Requirement already satisfied: base58==2.1.1 in c:\python311\lib\site-packages (from eth-brownie) (2.1.1)
Collecting bitarray==2.6.0
  Using cached bitarray-2.6.0.tar.gz (102 kB)
  Preparing metadata (setup.py) ... done
Collecting black==22.10.0
  Using cached black-22.10.0-cp311-cp311-win_amd64.whl (1.2 MB)
Collecting certifi==2022.9.24
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Requirement already satisfied: charset-normalizer==2.1.1 in c:\python311\lib\site-packages (from eth-brownie) (2.1.1)
Requirement already satisfied: click==8.1.3 in c:\python311\lib\site-packages (from eth-brownie) (8.1.3)
Collecting cytoolz==0.12.0
  Using cached cytoolz-0.12.0.tar.gz (502 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting dataclassy==0.11.1
  Using cached dataclassy-0.11.1-py3-none-any.whl (23 kB)
Collecting eip712==0.1.0
  Using cached eip712-0.1.0-py3-none-any.whl (13 kB)
Requirement already satisfied: eth-abi==2.2.0 in c:\python311\lib\site-packages (from eth-brownie) (2.2.0)
Requirement already satisfied: eth-account==0.5.9 in c:\python311\lib\site-packages (from eth-brownie) (0.5.9)
Collecting eth-event==1.2.3
  Using cached eth_event-1.2.3-py3-none-any.whl (7.3 kB)
Collecting eth-hash[pycryptodome]==0.3.3
  Using cached eth_hash-0.3.3-py3-none-any.whl (8.9 kB)
Requirement already satisfied: eth-keyfile==0.5.1 in c:\python311\lib\site-packages (from eth-brownie) (0.5.1)
Requirement already satisfied: eth-keys==0.3.4 in c:\python311\lib\site-packages (from eth-brownie) (0.3.4)
Requirement already satisfied: eth-rlp==0.2.1 in c:\python311\lib\site-packages (from eth-brownie) (0.2.1)
Requirement already satisfied: eth-typing==2.3.0 in c:\python311\lib\site-packages (from eth-brownie) (2.3.0)
Collecting eth-utils==1.10.0
  Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Collecting execnet==1.9.0
  Using cached execnet-1.9.0-py2.py3-none-any.whl (39 kB)
Collecting frozenlist==1.3.1
  Using cached frozenlist-1.3.1.tar.gz (66 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting hexbytes==0.2.3
  Using cached hexbytes-0.2.3-py3-none-any.whl (6.4 kB)
Collecting hypothesis==6.27.3
  Using cached hypothesis-6.27.3-py3-none-any.whl (384 kB)
Requirement already satisfied: idna==3.4 in c:\python311\lib\site-packages (from eth-brownie) (3.4)
Collecting inflection==0.5.0
  Using cached inflection-0.5.0-py2.py3-none-any.whl (5.8 kB)
Collecting iniconfig==1.1.1
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Requirement already satisfied: ipfshttpclient==0.8.0a2 in c:\python311\lib\site-packages (from eth-brownie) (0.8.0a2)
Collecting jsonschema==3.2.0
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting lazy-object-proxy==1.7.1
  Using cached lazy-object-proxy-1.7.1.tar.gz (41 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lru-dict==1.1.8 in c:\python311\lib\site-packages (from eth-brownie) (1.1.8)
Requirement already satisfied: multiaddr==0.0.9 in c:\python311\lib\site-packages (from eth-brownie) (0.0.9)
Collecting multidict==6.0.2
  Using cached multidict-6.0.2.tar.gz (50 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: mypy-extensions==0.4.3 in c:\python311\lib\site-packages (from eth-brownie) (0.4.3)
Collecting mythx-models==1.9.1
  Using cached mythx_models-1.9.1-py2.py3-none-any.whl (82 kB)
Requirement already satisfied: netaddr==0.8.0 in c:\python311\lib\site-packages (from eth-brownie) (0.8.0)
Collecting packaging==21.3
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Requirement already satisfied: parsimonious==0.8.1 in c:\python311\lib\site-packages (from eth-brownie) (0.8.1)
Collecting pathspec==0.10.1
  Using cached pathspec-0.10.1-py3-none-any.whl (27 kB)
Collecting platformdirs==2.5.2
  Using cached platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting pluggy==1.0.0
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting prompt-toolkit==3.0.31
  Using cached prompt_toolkit-3.0.31-py3-none-any.whl (382 kB)
Requirement already satisfied: protobuf==3.19.5 in c:\python311\lib\site-packages (from eth-brownie) (3.19.5)
Collecting psutil==5.9.2
  Using cached psutil-5.9.2.tar.gz (479 kB)
  Preparing metadata (setup.py) ... done
Collecting py==1.11.0
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting py-solc-ast==1.2.9
  Using cached py_solc_ast-1.2.9-py3-none-any.whl (10 kB)
Requirement already satisfied: py-solc-x==1.1.1 in c:\python311\lib\site-packages (from eth-brownie) (1.1.1)
Collecting pycryptodome==3.15.0
  Using cached pycryptodome-3.15.0-cp35-abi3-win_amd64.whl (1.9 MB)
Collecting pygments==2.13.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting pygments-lexer-solidity==0.7.0
  Using cached pygments_lexer_solidity-0.7.0-py3-none-any.whl
Collecting pyjwt==1.7.1
  Using cached PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting pyparsing==3.0.9
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting pyrsistent==0.18.1
  Using cached pyrsistent-0.18.1.tar.gz (100 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pytest==6.2.5
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting pytest-forked==1.4.0
  Using cached pytest_forked-1.4.0-py3-none-any.whl (4.9 kB)
Collecting pytest-xdist==1.34.0
  Using cached pytest_xdist-1.34.0-py2.py3-none-any.whl (36 kB)
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting python-dotenv==0.16.0
  Using cached python_dotenv-0.16.0-py2.py3-none-any.whl (18 kB)
Collecting pythx==1.6.1
  Using cached pythx-1.6.1-py2.py3-none-any.whl (39 kB)
Collecting pyyaml==5.4.1
  Using cached PyYAML-5.4.1-cp311-cp311-win_amd64.whl
Requirement already satisfied: requests==2.28.1 in c:\python311\lib\site-packages (from eth-brownie) (2.28.1)
Requirement already satisfied: rlp==2.0.1 in c:\python311\lib\site-packages (from eth-brownie) (2.0.1)
Requirement already satisfied: semantic-version==2.10.0 in c:\python311\lib\site-packages (from eth-brownie) (2.10.0)
Requirement already satisfied: six==1.16.0 in c:\python311\lib\site-packages (from eth-brownie) (1.16.0)
Collecting sortedcontainers==2.4.0
  Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting toml==0.10.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting tomli==2.0.1
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Requirement already satisfied: toolz==0.12.0 in c:\python311\lib\site-packages (from eth-brownie) (0.12.0)
Collecting tqdm==4.64.1
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting urllib3==1.26.12
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Requirement already satisfied: varint==1.0.2 in c:\python311\lib\site-packages (from eth-brownie) (1.0.2)
Collecting vvm==0.1.0
  Using cached vvm-0.1.0-py3-none-any.whl (11 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.19.1-py3-none-any.whl (232 kB)
Collecting aiohttp==3.8.1
  Using cached aiohttp-3.8.1.tar.gz (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting black==22.6.0
  Using cached black-22.6.0-py3-none-any.whl (156 kB)
Collecting certifi==2022.6.15
  Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting charset-normalizer==2.1.0
  Using cached charset_normalizer-2.1.0-py3-none-any.whl (39 kB)
Collecting hexbytes==0.2.2
  Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Collecting idna==3.3
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting pathspec==0.9.0
  Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting prompt-toolkit==3.0.30
  Using cached prompt_toolkit-3.0.30-py3-none-any.whl (381 kB)
Collecting protobuf==3.20.1
  Using cached protobuf-3.20.1-py2.py3-none-any.whl (162 kB)
Collecting psutil==5.9.1
  Using cached psutil-5.9.1.tar.gz (479 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pygments==2.12.0
  Using cached Pygments-2.12.0-py3-none-any.whl (1.1 MB)
Collecting semantic-version==2.8.5
  Using cached semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
Collecting tqdm==4.64.0
  Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting urllib3==1.26.11
  Using cached urllib3-1.26.11-py2.py3-none-any.whl (139 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.19.0-py3-none-any.whl (232 kB)
Collecting attrs==21.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting bitarray==1.2.2
  Using cached bitarray-1.2.2.tar.gz (48 kB)
  Preparing metadata (setup.py) ... done
Collecting black==22.3.0
  Using cached black-22.3.0-py3-none-any.whl (153 kB)
Collecting certifi==2022.5.18.1
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Collecting charset-normalizer==2.0.12
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting cytoolz==0.11.2
  Using cached cytoolz-0.11.2.tar.gz (481 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-abi==2.1.1
  Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Collecting eth-account==0.5.7
  Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Collecting eth-hash[pycryptodome]==0.3.2
  Using cached eth_hash-0.3.2-py3-none-any.whl (8.8 kB)
Collecting frozenlist==1.3.0
  Using cached frozenlist-1.3.0.tar.gz (65 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting lru-dict==1.1.7
  Using cached lru_dict-1.1.7-cp311-cp311-win_amd64.whl
Collecting prompt-toolkit==3.0.29
  Using cached prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
Collecting pycryptodome==3.14.1
  Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting requests==2.27.1
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting toolz==0.11.2
  Using cached toolz-0.11.2-py3-none-any.whl (55 kB)
Collecting urllib3==1.26.9
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.18.2-py3-none-any.whl (230 kB)
Collecting certifi==2021.10.8
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting psutil==5.9.0
  Using cached psutil-5.9.0.tar.gz (478 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-brownie
  Using cached eth_brownie-1.18.1-py3-none-any.whl (225 kB)
Collecting black==22.1.0
  Using cached black-22.1.0-py3-none-any.whl (160 kB)
Collecting charset-normalizer==2.0.11
  Using cached charset_normalizer-2.0.11-py3-none-any.whl (39 kB)
Collecting click==8.0.3
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting platformdirs==2.4.1
  Using cached platformdirs-2.4.1-py3-none-any.whl (14 kB)
Collecting prompt-toolkit==3.0.26
  Using cached prompt_toolkit-3.0.26-py3-none-any.whl (375 kB)
Collecting protobuf==3.19.4
  Using cached protobuf-3.19.4-py2.py3-none-any.whl (162 kB)
Collecting pygments==2.11.2
  Using cached Pygments-2.11.2-py3-none-any.whl (1.1 MB)
Collecting pyparsing==3.0.7
  Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting tomli==2.0.0
  Using cached tomli-2.0.0-py3-none-any.whl (12 kB)
Collecting tqdm==4.62.3
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting typing-extensions==4.0.1
  Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.8
  Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.18.0-py3-none-any.whl (225 kB)
  Using cached eth_brownie-1.17.2-py3-none-any.whl (221 kB)
Collecting async-timeout==4.0.1
  Using cached async_timeout-4.0.1-py3-none-any.whl (5.7 kB)
Collecting asynctest==0.13.0
  Using cached asynctest-0.13.0-py3-none-any.whl (26 kB)
Collecting attrs==21.2.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting black==21.11b1
  Using cached black-21.11b1-py3-none-any.whl (155 kB)
Collecting cached-property==1.5.2
  Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting charset-normalizer==2.0.9
  Using cached charset_normalizer-2.0.9-py3-none-any.whl (39 kB)
Collecting eth-account==0.5.6
  Using cached eth_account-0.5.6-py3-none-any.whl (101 kB)
Collecting eth-keys==0.3.3
  Using cached eth_keys-0.3.3-py3-none-any.whl (20 kB)
Collecting eth-typing==2.2.2
  Using cached eth_typing-2.2.2-py3-none-any.whl (6.2 kB)
Collecting frozenlist==1.2.0
  Using cached frozenlist-1.2.0.tar.gz (65 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting importlib-metadata==4.8.2
  Using cached importlib_metadata-4.8.2-py3-none-any.whl (17 kB)
Collecting lazy-object-proxy==1.6.0
  Using cached lazy_object_proxy-1.6.0-cp311-cp311-win_amd64.whl
Collecting multidict==5.2.0
  Using cached multidict-5.2.0.tar.gz (49 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting platformdirs==2.4.0
  Using cached platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting prompt-toolkit==3.0.23
  Using cached prompt_toolkit-3.0.23-py3-none-any.whl (374 kB)
Collecting protobuf==3.19.1
  Using cached protobuf-3.19.1-py2.py3-none-any.whl (162 kB)
Collecting psutil==5.8.0
  Using cached psutil-5.8.0-cp311-cp311-win_amd64.whl
Collecting pycryptodome==3.12.0
  Using cached pycryptodome-3.12.0-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting pygments==2.10.0
  Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
Collecting pyparsing==3.0.6
  Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting pyrsistent==0.18.0
  Using cached pyrsistent-0.18.0-cp311-cp311-win_amd64.whl
Collecting pytest-forked==1.3.0
  Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting regex==2021.11.10
  Using cached regex-2021.11.10.tar.gz (702 kB)
  Preparing metadata (setup.py) ... done
Collecting requests==2.26.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting tomli==1.2.2
  Using cached tomli-1.2.2-py3-none-any.whl (12 kB)
Collecting typed-ast==1.5.1
  Using cached typed_ast-1.5.1.tar.gz (252 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.10.0.2
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting urllib3==1.26.7
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.17.1-py3-none-any.whl (221 kB)
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-py3-none-any.whl
Collecting asttokens==2.0.4
  Using cached asttokens-2.0.4-py2.py3-none-any.whl (20 kB)
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting base58==2.1.0
  Using cached base58-2.1.0-py3-none-any.whl (5.6 kB)
Collecting black==21.9b0
  Using cached black-21.9b0-py3-none-any.whl (148 kB)
Collecting chardet==4.0.0
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting charset-normalizer==2.0.7
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting cytoolz==0.11.0
  Using cached cytoolz-0.11.0.tar.gz (477 kB)
  Preparing metadata (setup.py) ... done
Collecting hypothesis==6.24.0
  Using cached hypothesis-6.24.0-py3-none-any.whl (381 kB)
Collecting packaging==21.0
  Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting prompt-toolkit==3.0.21
  Using cached prompt_toolkit-3.0.21-py3-none-any.whl (374 kB)
Collecting protobuf==3.19.0
  Using cached protobuf-3.19.0-py2.py3-none-any.whl (162 kB)
Collecting py==1.10.0
  Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting pycryptodome==3.11.0
  Using cached pycryptodome-3.11.0-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting pyparsing==3.0.3
  Using cached pyparsing-3.0.3-py3-none-any.whl (96 kB)
Collecting regex==2021.10.23
  Using cached regex-2021.10.23.tar.gz (703 kB)
  Preparing metadata (setup.py) ... done
Collecting toolz==0.11.1
  Using cached toolz-0.11.1-py3-none-any.whl (55 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.17.0-py3-none-any.whl (221 kB)
Collecting dataclassy==0.11.0
  Using cached dataclassy-0.11.0-py3-none-any.whl (23 kB)
Collecting hypothesis==6.23.2
  Using cached hypothesis-6.23.2-py3-none-any.whl (381 kB)
Collecting idna==3.2
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting prompt-toolkit==3.0.20
  Using cached prompt_toolkit-3.0.20-py3-none-any.whl (370 kB)
Collecting protobuf==3.18.1
  Using cached protobuf-3.18.1-py2.py3-none-any.whl (174 kB)
Collecting pyparsing==2.4.7
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting regex==2021.10.8
  Using cached regex-2021.10.8.tar.gz (703 kB)
  Preparing metadata (setup.py) ... done
Collecting rlp==1.2.0
  Using cached rlp-1.2.0-py2.py3-none-any.whl (19 kB)
Collecting tomli==1.2.1
  Using cached tomli-1.2.1-py3-none-any.whl (11 kB)
Collecting eth-brownie
  Using cached eth_brownie-1.16.4-py3-none-any.whl (219 kB)
Collecting certifi==2021.5.30
  Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting charset-normalizer==2.0.6
  Using cached charset_normalizer-2.0.6-py3-none-any.whl (37 kB)
Collecting click==8.0.1
  Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting dataclassy==0.10.4
  Using cached dataclassy-0.10.4-py3-none-any.whl (23 kB)
Collecting eth-account==0.5.5
  Using cached eth_account-0.5.5-py3-none-any.whl (100 kB)
Collecting hypothesis==6.21.6
  Using cached hypothesis-6.21.6-py3-none-any.whl (381 kB)
Collecting multidict==5.1.0
  Using cached multidict-5.1.0-cp311-cp311-win_amd64.whl
Collecting platformdirs==2.3.0
  Using cached platformdirs-2.3.0-py3-none-any.whl (13 kB)
Collecting protobuf==3.18.0
  Using cached protobuf-3.18.0-py2.py3-none-any.whl (174 kB)
Collecting py-solc-x==1.1.0
  Using cached py_solc_x-1.1.0-py3-none-any.whl (15 kB)
Collecting pycryptodome==3.10.1
  Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting regex==2021.8.28
  Using cached regex-2021.8.28-cp311-cp311-win_amd64.whl
Collecting urllib3==1.26.6
  Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting vyper==0.2.16
  Using cached vyper-0.2.16-py3-none-any.whl (236 kB)
Collecting wcwidth==0.2.5
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting web3==5.23.1
  Using cached web3-5.23.1-py3-none-any.whl (486 kB)
Requirement already satisfied: websockets==9.1 in c:\python311\lib\site-packages (from eth-brownie) (9.1)
Collecting wrapt==1.12.1
  Using cached wrapt-1.12.1-cp311-cp311-win_amd64.whl
Collecting yarl==1.6.3
  Using cached yarl-1.6.3.tar.gz (176 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: colorama in c:\python311\lib\site-packages (from click==8.0.1->eth-brownie) (0.4.6)
Requirement already satisfied: setuptools in c:\python311\lib\site-packages (from jsonschema==3.2.0->eth-brownie) (65.5.0)
Collecting atomicwrites>=1.0
  Using cached atomicwrites-1.4.1-py2.py3-none-any.whl
Requirement already satisfied: pywin32>=223 in c:\python311\lib\site-packages (from web3==5.23.1->eth-brownie) (305)
WARNING: The candidate selected for download or install is a yanked version: 'protobuf' candidate (version 3.18.0 at https://files.pythonhosted.org/packages/74/4e/9f3cb458266ef5cdeaa1e72a90b9eda100e3d1803cbd7ec02f0846da83c3/protobuf-3.18.0-py2.py3-none-any.whl (from https://pypi.org/simple/protobuf/))
Reason for being yanked: This version claims to support Python 2 but does not
Building wheels for collected packages: yarl
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      C:\Users\shark\AppData\Local\Temp\pip-build-env-7jfcsmi9\overlay\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      **********************
      * Accellerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_py.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_url.py -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\__init__.py -> build\lib.win-amd64-cpython-311\yarl
      running egg_info
      writing yarl.egg-info\PKG-INFO
      writing dependency_links to yarl.egg-info\dependency_links.txt
      writing requirements to yarl.egg-info\requires.txt
      writing top-level names to yarl.egg-info\top_level.txt
      reading manifest file 'yarl.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl\*.html'
      warning: no previously-included files found matching 'yarl\*.so'
      warning: no previously-included files found matching 'yarl\*.pyd'
      no previously-included directories found matching 'docs\_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info\SOURCES.txt'
      copying yarl\__init__.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.c -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyi -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\_quoting_c.pyx -> build\lib.win-amd64-cpython-311\yarl
      copying yarl\py.typed -> build\lib.win-amd64-cpython-311\yarl
      building 'yarl._quoting_c' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\yarl
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python311\include -IC:\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcyarl/_quoting_c.c /Fobuild\temp.win-amd64-cpython-311\Release\yarl/_quoting_c.obj
      _quoting_c.c
      yarl/_quoting_c.c(196): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build yarl
ERROR: Could not build wheels for yarl, which is required to install pyproject.toml-based projects

I have already downloaded cytoolz, cython and yarl and attempted to pip3 install eth-brownie but still have this error. I have looked at many stackoverflow reponses to this error but haven't found anything that has resolved my error.

Any help will be greatly appreciated.


来源: stackexchange

问:
I want to compare 2 text files and then generate an output text file
I have 2 .txt files that I want to compare, and one of them is too large to be opened in most text editors. The first text file format is Category1,Category2,Category3,Category4,Category5 each line and the second file list is just  for each line. So one example of a line from text file 1 is Bob,Bob Smith,817@2ac,271,2888172 and an example line from the next text file is 817@2ac. What I want to do is check to see if any lines in the smaller text file match the text in the third category of the bigger text file. So for example, the smaller text file with only 1 category per line has 817@2ac in one of the lines, and somewhere in the big text file there's a line with 817@2ac as category 3. I would want to make a new text file that would include the full line from the big list where category 3 matches a line from the small text file.

Note: I don't want it to be case sensitive, and I also want it to only include exact matches, so if the small text file line matches category 3 then there's some characters after the match it won't be included in the output list. If I need to provide more information or clarify anything let me know.

I tried to use the compare feature in emeditor but it didn't generate what I wanted. I also tried using Ubuntu and trying to cross reference it that way but the  file I generated included all sorts of things, not just the data I wanted.

ContentLicense: CC BY-SA 4.0


问:
Bootstrap 4.6 - Add Custom Grid Breakpoints Error
Trying to add some custom grid breakpoints to my project. According to the bootstrap docs, all I need to do is override these SASS variables

```<code>$grid-breakpoints: (
  // Extra small screen / phone
  xs: 0px,
  // Small screen / phone
  sm: 576px,
  // Medium screen / tablet
  md: 768px,
  // Large screen / desktop
  lg: 992px,
  // Extra large screen / wide desktop
  xl: 1400px
);
//
$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px
);
</code>```

But I'm seeing this error when trying to compile the changes.

```<code>ERROR in ./src/main/webpack/site/main.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

      %responsive-container-#{$breakpoint} {
     ^
      You may not @extend an outer selector from within @media.
You may only @extend selectors within the same directive.
From "@extend %responsive-container-xl" on line 30 of node_modules/bootstrap/scss/_grid.scss
</code>```

Any idea what might cause this?

Tried instructions indicated by the bootstrap documentation.

Body:
Trying to add some custom grid breakpoints to my project. According to the bootstrap docs, all I need to do is override these SASS variables

$grid-breakpoints: (
  // Extra small screen / phone
  xs: 0px,
  // Small screen / phone
  sm: 576px,
  // Medium screen / tablet
  md: 768px,
  // Large screen / desktop
  lg: 992px,
  // Extra large screen / wide desktop
  xl: 1400px
);
//
$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px
);

But I'm seeing this error when trying to compile the changes.

ERROR in ./src/main/webpack/site/main.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

      %responsive-container-#{$breakpoint} {
     ^
      You may not @extend an outer selector from within @media.
You may only @extend selectors within the same directive.
From "@extend %responsive-container-xl" on line 30 of node_modules/bootstrap/scss/_grid.scss

Any idea what might cause this?

Tried instructions indicated by the bootstrap documentation.


问:
running secbugs maven plugin from command line/ maven plugin configuration parameters in command line
maybe this is a generic question with regards to how to transfer maven plugin paramters from the pom.xml to the commandline, but I have usually done this without problems using the method below. For the find-security-bugs plugin, however, it is not working.

The find-security-bugs plugin docu says that you can configure the plugin in your pom.xml as follows:

```<code><plugins>
    [...]
    <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.7.2.1</version>
        <configuration>
            <includeFilterFile>spotbugs-security-include.xml</includeFilterFile>
            <plugins>
                <plugin>
                    <groupId>com.h3xstream.findsecbugs</groupId>
                    <artifactId>findsecbugs-plugin</artifactId>
                    <version>1.12.0</version>
                </plugin>
            </plugins>
        </configuration>
    </plugin>
</plugins>
</code>```

I would like to do the same, but cannot do any changes to the pom.xml I'm testing, so would have to specify everything in the command line.

I'm running (from powershell, therefore the quotation marks):

```<code>mvn com.github.spotbugs:spotbugs-maven-plugin:4.7.2.1:check -"Dplugins.plugin.groupId=com.h3xstream.findsecbugs"   -"Dplugins.plugin.artifactId=findsecbugs-plugin"  -"Dplugins.plugin.version=1.12.0" -"DincludeFilterFile=secbugsfilter.xml"
</code>```

but the parameters are not used. Is there any way to run a plugin with a configuration like this from the command line without specifying anything in the pom?

Body:
maybe this is a generic question with regards to how to transfer maven plugin paramters from the pom.xml to the commandline, but I have usually done this without problems using the method below. For the find-security-bugs plugin, however, it is not working.

The find-security-bugs plugin docu says that you can configure the plugin in your pom.xml as follows:

<plugins>
    [...]
    <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.7.2.1</version>
        <configuration>
            <includeFilterFile>spotbugs-security-include.xml</includeFilterFile>
            <plugins>
                <plugin>
                    <groupId>com.h3xstream.findsecbugs</groupId>
                    <artifactId>findsecbugs-plugin</artifactId>
                    <version>1.12.0</version>
                </plugin>
            </plugins>
        </configuration>
    </plugin>
</plugins>

I would like to do the same, but cannot do any changes to the pom.xml I'm testing, so would have to specify everything in the command line.

I'm running (from powershell, therefore the quotation marks):

mvn com.github.spotbugs:spotbugs-maven-plugin:4.7.2.1:check -"Dplugins.plugin.groupId=com.h3xstream.findsecbugs"   -"Dplugins.plugin.artifactId=findsecbugs-plugin"  -"Dplugins.plugin.version=1.12.0" -"DincludeFilterFile=secbugsfilter.xml"

but the parameters are not used. Is there any way to run a plugin with a configuration like this from the command line without specifying anything in the pom?


问:
sidekiq and rspec doesn't work after rails admin upgrade to 3.1.1
rails 6 - ruby 2.7.5

I updated rails admin, my application still works, except for some tests and sidekiq jobs.
I got this error:

```<code>WARN: ActionView::Template::Error: couldn't find file 'rails_admin/filter-box' with type 'application/javascript'
Checked in these paths:
  /home/francois/app/assets/config
  /home/francois/app/assets/images
  /home/francois/app/assets/javascripts
  /home/francois/app/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/app/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/fonts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/turbo-rails-1.3.2/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/nested_form-0.3.2/vendor/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/actioncable-6.1.7/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/activestorage-6.1.7/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/actionview-6.1.7/lib/assets/compiled
  /home/francois/node_modules
</code>```

I tried to do in my app something that failed in test, and it works. So I think maybe rspec and sidekiq need some configuration, but I found nothing about it.

Body:
rails 6 - ruby 2.7.5

I updated rails admin, my application still works, except for some tests and sidekiq jobs.
I got this error:

WARN: ActionView::Template::Error: couldn't find file 'rails_admin/filter-box' with type 'application/javascript'
Checked in these paths:
  /home/francois/app/assets/config
  /home/francois/app/assets/images
  /home/francois/app/assets/javascripts
  /home/francois/app/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/app/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/fonts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/rails_admin-3.1.1/vendor/assets/stylesheets
  /home/francois/.rvm/gems/ruby-2.7.5/gems/turbo-rails-1.3.2/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/nested_form-0.3.2/vendor/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/actioncable-6.1.7/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/activestorage-6.1.7/app/assets/javascripts
  /home/francois/.rvm/gems/ruby-2.7.5/gems/actionview-6.1.7/lib/assets/compiled
  /home/francois/node_modules

I tried to do in my app something that failed in test, and it works. So I think maybe rspec and sidekiq need some configuration, but I found nothing about it.


问:
Remove Woocommerce shipping option for one particular city
Need some help on this...Please :)

I have this site that is using the Woocommerce's shipping option for "Starken por pagar", that works globally for all cities
And right after that is "Envío Gratis" that is send it for my actual shipping plugin, that calculate free shipping "Envío Gratis" when one particular city is selected.

My idea is that I need to remove "Starken por pagar" when the user select one particular city (one only - the same that is used by my shipping plugin) and left only the "Envío Gratis" for that city.
Because now I dont need the users need to pay for some service that is free. And as you may know, some people barely read the things in front of ther eyes :P

I tried with this (Im not an expert, sorry)

```<code>function filter_woocommerce_package_rates( $rates, $package ) {
    // Loop trough
    foreach ( $rates as $rate_id => $rate ) {
        // Checks if a value exists in an array, multiple can be added, separated by a comma
        if ( in_array( $rate->method_id, array( 'local_pickup', 'free_shipping' ) ) ) {
            unset( $rates['flat_rate:28'] );
        }
    }

    return $rates;
}
add_filter( 'woocommerce_package_rates', 'filter_woocommerce_package_rates', 10, 2 );
</code>```

Or

```<code>// Hide shipping in cart page.
add_filter( 'woocommerce_product_needs_shipping', 'disable_shipping_in_cart_page', 10, 2 );
function disable_shipping_in_cart_page( $needs_shipping, $product ){
    if ( is_cart() )
        $needs_shipping = false;

    return $needs_shipping;
}

// Conditionally remove Flat Rate which qualifies for free shipping
add_filter( 'woocommerce_package_rates', 'hide_flat_rate_when_free_is_available', 10, 3 );
function hide_flat_rate_when_free_is_available( $rates, $package ) {
    $free = array();
    $free_available = false;

    foreach ( $rates as $rate_key => $rate ) {
        if ( 'free_shipping' === $rate->method_id ){
            $free_available = true;
            break;
        }
    }

    foreach ( $rates as $rate_key => $rate ) {
        if ( $free_available && 'flat_rate' === $rate->method_id )
            unset($rates[$rate_key]);
    }

    return $rates;
}
</code>```

Thank you :)

Body:
Need some help on this...Please :)

I have this site that is using the Woocommerce's shipping option for "Starken por pagar", that works globally for all cities
And right after that is "Envío Gratis" that is send it for my actual shipping plugin, that calculate free shipping "Envío Gratis" when one particular city is selected.

My idea is that I need to remove "Starken por pagar" when the user select one particular city (one only - the same that is used by my shipping plugin) and left only the "Envío Gratis" for that city.
Because now I dont need the users need to pay for some service that is free. And as you may know, some people barely read the things in front of ther eyes :P

I tried with this (Im not an expert, sorry)

function filter_woocommerce_package_rates( $rates, $package ) {
    // Loop trough
    foreach ( $rates as $rate_id => $rate ) {
        // Checks if a value exists in an array, multiple can be added, separated by a comma
        if ( in_array( $rate->method_id, array( 'local_pickup', 'free_shipping' ) ) ) {
            unset( $rates['flat_rate:28'] );
        }
    }

    return $rates;
}
add_filter( 'woocommerce_package_rates', 'filter_woocommerce_package_rates', 10, 2 );

Or

// Hide shipping in cart page.
add_filter( 'woocommerce_product_needs_shipping', 'disable_shipping_in_cart_page', 10, 2 );
function disable_shipping_in_cart_page( $needs_shipping, $product ){
    if ( is_cart() )
        $needs_shipping = false;

    return $needs_shipping;
}

// Conditionally remove Flat Rate which qualifies for free shipping
add_filter( 'woocommerce_package_rates', 'hide_flat_rate_when_free_is_available', 10, 3 );
function hide_flat_rate_when_free_is_available( $rates, $package ) {
    $free = array();
    $free_available = false;

    foreach ( $rates as $rate_key => $rate ) {
        if ( 'free_shipping' === $rate->method_id ){
            $free_available = true;
            break;
        }
    }

    foreach ( $rates as $rate_key => $rate ) {
        if ( $free_available && 'flat_rate' === $rate->method_id )
            unset($rates[$rate_key]);
    }

    return $rates;
}

Thank you :)


问:
ngxNavbarDynamicExpand not always collapsing
I have 2 issues with my ngx bootstrap navbar that will no doubtably be fixed with the same solution. My navbar has two different toggles separated with an ng-container whether the user is logged in or not. I created my navbar using the example in the docs

Now the issue I am having is the not logged in view does not have enough items for it to collapse when the screen size is reduced, so instead of it being a dropdown it is just a narrowed version.

not logged in full screen navbar:

not logged in small screen navbar:

now this could be bearable if it wasn't for the logged in version having much more nav links that get added in at log in. But when they get added in while the window is small the navbar doesn't collapse it just remains narrow (and actually goes off screen)

small screen then log in

when logged in, the navbar works correctly as intended for full screen and after logging in then reducing the screen size

logged in full screen

logged in small screen - closes into just a hamburger menu icon

However if the user is already logged in on page load in a small screen (tested with a hardcoded variable) then the navbar is collapsed correctly to be the hamburger menu/dropdown list. (I don't want to refresh the page as it defeats the purpose of having an angular app).

And what is even more interesting is if the user logs out while in the small screen then the navbar stays in its collapsed state.

So what I want is the navbar to go into that state while logged out.

template:

```<code><nav ngxNavbarDynamicExpand class="navbar navbar-expand-lg">
    <button class="navbar-toggler" type="button" (click)="collapse.toggle()">
      <span><fa-icon [icon]="hamburger"></fa-icon></span>
    </button>
    <div class="container-fluid">
      <ngx-navbar-collapse #collapse="ngxNavbarCollapse">
      <a class="navbar-brand abs" href="https://example.com/">
        <img width=auto
             height="30px"
             src="example.png"
             alt=""
             loading="lazy"sizes="(max-width: 1595px) 100vw, 1595px">
      </a>
      <ul class="navbar-nav me-auto mb-2 mb-md-0">
        <li class="nav-item">
          <a class="nav-link" routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">Home</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" routerLink="/about" routerLinkActive="active">About</a>
        </li>
      </ul>
      <ng-container *ngIf="(accountService.loggedIn$ | async); else notLoggedIn">
        <div class="dropdown" dropdown>
            <button class="dropdown-toggle text-light transparent-button ml-2" dropdownToggle>Admin</button>
            <div class="dropdown-menu mt-3" *dropdownMenu>
              <a routerLink="/" class="dropdown-item">1</a>
            </div>
        </div>
        <div class="dropdown" dropdown>
            <button class="dropdown-toggle text-light transparent-button ml-2" dropdownToggle>Manage</button>
            <div class="dropdown-menu mt-3" *dropdownMenu>
              <a routerLink="/userdetails" class="dropdown-item">My details</a>
            </div>
        </div>
        <ul class="navbar-nav">
          <li class="nav-item">
              <a class="nav-link" routerLink="/install" routerLinkActive="active">Install</a>
          </li>
          <li class="nav-item">
            <button class="btn btn-primary"
                    routerLink="/"
                    (click)="logout()"
                    role="button">
                    <span class="d-none d-md-inline">Logout</span>
                    <fa-icon [icon]="faPowerOff" [classes]="['ml-md-2']"></fa-icon>
            </button>
          </li>
        </ul>
      </ng-container>
      <ng-template #notLoggedIn>
          <ul class="navbar-nav">
            <li class="nav-item">
              <button class="btn btn-primary"
                      routerLink="/login"
                      role="button">
                      <span class="d-none d-md-inline">Login/Register</span>
                      <fa-icon [icon]="faUser" [classes]="['ml-md-2']"></fa-icon>
              </button>
            </li>
          </ul>
      </ng-template>
    </ngx-navbar-collapse>
  </div>
</nav>
</code>```

typescript:

```<code>import { Component, OnInit } from '@angular/core';
import { faPowerOff, IconDefinition, faBars, faUser } from '@fortawesome/free-solid-svg-icons';
import { AccountService } from '../services/account.service';

@Component({
  selector: 'app-nav',
  templateUrl: './nav.component.html',
  styleUrls: ['./nav.component.css']
})
export class NavComponent implements OnInit {faPowerOff: IconDefinition = faPowerOff;
  hamburger: IconDefinition = faBars;
  faUser: IconDefinition = faUser;
  constructor(public accountService : AccountService) { }

  ngOnInit(): void {
  }

  logout(){
    this.accountService.logout();
  }
}
</code>```

Body:
I have 2 issues with my ngx bootstrap navbar that will no doubtably be fixed with the same solution. My navbar has two different toggles separated with an ng-container whether the user is logged in or not. I created my navbar using the example in the docs

Now the issue I am having is the not logged in view does not have enough items for it to collapse when the screen size is reduced, so instead of it being a dropdown it is just a narrowed version.

not logged in full screen navbar:

not logged in small screen navbar:

now this could be bearable if it wasn't for the logged in version having much more nav links that get added in at log in. But when they get added in while the window is small the navbar doesn't collapse it just remains narrow (and actually goes off screen)

small screen then log in

when logged in, the navbar works correctly as intended for full screen and after logging in then reducing the screen size

logged in full screen

logged in small screen - closes into just a hamburger menu icon

However if the user is already logged in on page load in a small screen (tested with a hardcoded variable) then the navbar is collapsed correctly to be the hamburger menu/dropdown list. (I don't want to refresh the page as it defeats the purpose of having an angular app).

And what is even more interesting is if the user logs out while in the small screen then the navbar stays in its collapsed state.

So what I want is the navbar to go into that state while logged out.

template:

    <button class="navbar-toggler" type="button" (click)="collapse.toggle()">
      <fa-icon [icon]="hamburger"></fa-icon>
    </button>

      <ngx-navbar-collapse #collapse="ngxNavbarCollapse">

          Home

          About

      <ng-container *ngIf="(accountService.loggedIn$ | async); else notLoggedIn">

            <button class="dropdown-toggle text-light transparent-button ml-2" dropdownToggle>Admin</button>

              1

            <button class="dropdown-toggle text-light transparent-button ml-2" dropdownToggle>Manage</button>

              My details

              Install

            <button class="btn btn-primary"
                    routerLink="/"
                    (click)="logout()"
                    role="button">
                    Logout
                    <fa-icon [icon]="faPowerOff" [classes]="['ml-md-2']"></fa-icon>
            </button>

      </ng-container>
      <ng-template #notLoggedIn>

              <button class="btn btn-primary"
                      routerLink="/login"
                      role="button">
                      Login/Register
                      <fa-icon [icon]="faUser" [classes]="['ml-md-2']"></fa-icon>
              </button>

      </ng-template>
    </ngx-navbar-collapse>

typescript:

import { Component, OnInit } from '@angular/core';
import { faPowerOff, IconDefinition, faBars, faUser } from '@fortawesome/free-solid-svg-icons';
import { AccountService } from '../services/account.service';

@Component({
  selector: 'app-nav',
  templateUrl: './nav.component.html',
  styleUrls: ['./nav.component.css']
})
export class NavComponent implements OnInit {faPowerOff: IconDefinition = faPowerOff;
  hamburger: IconDefinition = faBars;
  faUser: IconDefinition = faUser;
  constructor(public accountService : AccountService) { }

  ngOnInit(): void {
  }

  logout(){
    this.accountService.logout();
  }
}


问:
Backout plan for Mongo atlas cluster upgrade to 4.4 from 4.2
We are to upgrade to our mongo atlas cluster i;e from 4.2 to 4.4.

As a backup plan we have created a new 4.2 cluster.

Incase there some issues with 4.4 we will point it to newly created 4.2 cluster. But the backup from 4.4 is
not compiltable with 4.2. it shows below error while restoring backup.

Error: The requested restore could not be started: The source and destination mongoDB versions are incompatible.

Documentation says the target cluster must run the same or the next major release version of MongoDB as the snapshot MongoDB version.

So, we are at risk of loosing data. what should be the workaround for this situation?

How to make 4.4 mongo atlas cluster backup to work on 4.2


问:
Laravel run command on docker container start, only once, without bash scripts
How could I do for example run a command every time the docker/laravel container is started?

Command example:

Log::info('Service is runining');
```

This command is just an example, currently I have an entrypoint.sh that runs some commands when the docker container starts, but I want to pass this responsibility of running commands to Laravel.

How can I make the commands run only once?

Body:
How could I do for example run a command every time the docker/laravel container is started?

Command example:

Log::info('Service is runining');

This command is just an example, currently I have an entrypoint.sh that runs some commands when the docker container starts, but I want to pass this responsibility of running commands to Laravel.

How can I make the commands run only once?


问:
Sqoop MDSYS.SDO_GEOMETRY columns in GCP DataProc
I am trying to sqoop MDSYS.SDO_GEOMETRY column into GCS Bucket using dataproc but sqoop is ignoring MDSYS.SDO_GEOMETRY column from selection. I am not sure what is the issue. Also Do I need to convert it using map-column-java?

I tried to convert it to String using map column java but it says column not found means sqoop is ignoring that column from selection


问:
How to obfuscate Cordova app for ios build?
I want to obfuscate my cordova app for ios build. My android build is automatically obfuscated with R8 tool. I am looking for an open source solution. I have tried using this tool - SiriusObfuscator
But I am getting an error-

```<code>$ Obfuscator_2018-04-24_115109 % bin/sirius -projectrootpath /Users/.../MyApp.xcodeproj -obfuscatedproject /Users/.../Desktop
===========================

Welcome to Sirius - Swift Obfuscator

===========================

1) File Extractor:
⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐Extracting⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐
STDERR: /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file': [Xcodeproj] Unknown object version. (RuntimeError)
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/xcodeproj_extractor.rb:10:in `initialize'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:24:in `new'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:24:in `extract_data_from_all_sources'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:11:in `extract_data'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/command.rb:108:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/command.rb:76:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/bin/file-extractor:20:in `<main>'
STDOUT:

===========================

2) Symbol Extractor:
⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐Extracting⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐
STDERR: Error during JSON file read
STDOUT: Swift obfuscator symbol extractor tool
</code>```

My cordova version - 10.0.0

Swift code developed is of 3.x version.

I have also read this SO post where someone pointed how obfuscating only Objective C code will cause issues with Cordova app.

Please help.

Body:
I want to obfuscate my cordova app for ios build. My android build is automatically obfuscated with R8 tool. I am looking for an open source solution. I have tried using this tool - SiriusObfuscator
But I am getting an error-

$ Obfuscator_2018-04-24_115109 % bin/sirius -projectrootpath /Users/.../MyApp.xcodeproj -obfuscatedproject /Users/.../Desktop
===========================

Welcome to Sirius - Swift Obfuscator

===========================

1) File Extractor:
⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐Extracting⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐
STDERR: /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file': [Xcodeproj] Unknown object version. (RuntimeError)
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/xcodeproj_extractor.rb:10:in `initialize'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:24:in `new'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:24:in `extract_data_from_all_sources'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/data_extractor.rb:11:in `extract_data'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/command.rb:108:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/vendor/ruby/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/lib/file-extractor/command.rb:76:in `run'
    from /Users/.../Downloads/Obfuscator_2018-04-24_115109/bin/lib/file-extractor/bin/file-extractor:20:in `'
STDOUT:

===========================

2) Symbol Extractor:
⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐Extracting⠂⠁⠂⠄⡀⢀⠠⠐⠈⠁⠂⠄⡀⢀⠠⠐
STDERR: Error during JSON file read
STDOUT: Swift obfuscator symbol extractor tool

My cordova version - 10.0.0

Swift code developed is of 3.x version.

I have also read this SO post where someone pointed how obfuscating only Objective C code will cause issues with Cordova app.

Please help.


问:
Linear Congruential generator graph
I implemented a simple code for a linear congruential generator

```<code>clear all; clc

% Input
m = 59;         % module
a = 17;         % multiplier
c = 43;         % increase
X0 = 27;        % seed

n = 100;        % sample length

y = [X0 zeros(1,n-1)];

% recursive formula
% X(n+1) = (a*X(n) + c) mod m

 for i = 2:n

  y(i) = mod(a*y(i-1)+c,m);

end

x = 0:1:n-1;

%for i = 1:n

 %   plot(x,y);

%end
</code>```

What I would like to do is a plot where each time the period repeats it draws a vertical line upward as in this graph

I think I have to use the plot function inside a FOR loop and an IF-ELSE to see if the value of the subsequence X(n) is equal to the seed X(0) but I have no idea how to implement it

I think I have to use the plot function inside a FOR loop and an IF-ELSE to see if the value of the subsequence X(n) is equal to the seed X(0) but I have no idea how to implement it

Title: Linear Congruential generator graph

Body:
I implemented a simple code for a linear congruential generator

clear all; clc

% Input
m = 59;         % module
a = 17;         % multiplier
c = 43;         % increase
X0 = 27;        % seed

n = 100;        % sample length

y = [X0 zeros(1,n-1)];

% recursive formula
% X(n+1) = (a*X(n) + c) mod m

 for i = 2:n

  y(i) = mod(a*y(i-1)+c,m);

end

x = 0:1:n-1;

%for i = 1:n

 %   plot(x,y);

%end

What I would like to do is a plot where each time the period repeats it draws a vertical line upward as in this graph

I think I have to use the plot function inside a FOR loop and an IF-ELSE to see if the value of the subsequence X(n) is equal to the seed X(0) but I have no idea how to implement it

I think I have to use the plot function inside a FOR loop and an IF-ELSE to see if the value of the subsequence X(n) is equal to the seed X(0) but I have no idea how to implement it


问:
Get Album Art of a music using ffmpeg in Webp
I am struggling to output thumbnail of an mp3 file in webp format

Tried this but it did not worked for .webp

I am running this command in AWS lambda function to extract album Art and save in S3.

ffmpeg -i input.mp3 -an -vcodec copy cover.webp

Any help would be appreciated.

Reference: link


问:
Issue while trying to setup the spring-boot open source project from Github
I was trying to setup the spring boot open source project in order to contribute it. I was going through the steps in here. I am on the main branch. When I try to run

```<code>./gradlew build
</code>```

I am getting this error

```<code>* Where:
Settings file '<my local path>/spring-boot/settings.gradle' line: 26

* What went wrong:
Plugin [id: 'io.spring.ge.conventions', version: '0.0.12'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.spring.ge.conventions:io.spring.ge.conventions.gradle.plugin:0.0.12')
  Searched in the following repositories:
    MavenRepo
    Gradle Central Plugin Repository
    maven(https://repo.spring.io/release)
    maven2(https://repo.spring.io/snapshot)
</code>```

settings.gradle contains this at line 26

```<code>    id "io.spring.ge.conventions" version "0.0.12"
</code>```

From what I understand in the above log, gradle is trying to search for io.spring.ge.conventions but its not able to find it in those repositories. I haven't used gradle before so I am not sure what the issue is exactly and how to fix it.

These are my system details:

```<code>System: Mac(Intel)
java version "17.0.5" 2022-10-18 LTS
Editor: Intellij
</code>```

I don't have gradle installed separately. I am using the gradle wrapper provided by the project.

Additionally I just commented out that line in settings.gradle and ran the build. It succeeded.

Can anyone help me out on this?

Body:
I was trying to setup the spring boot open source project in order to contribute it. I was going through the steps in here. I am on the main branch. When I try to run

./gradlew build

I am getting this error

* Where:
Settings file '<my local path>/spring-boot/settings.gradle' line: 26

* What went wrong:
Plugin [id: 'io.spring.ge.conventions', version: '0.0.12'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'io.spring.ge.conventions:io.spring.ge.conventions.gradle.plugin:0.0.12')
  Searched in the following repositories:
    MavenRepo
    Gradle Central Plugin Repository
    maven(https://repo.spring.io/release)
    maven2(https://repo.spring.io/snapshot)

settings.gradle contains this at line 26

    id "io.spring.ge.conventions" version "0.0.12"

From what I understand in the above log, gradle is trying to search for io.spring.ge.conventions but its not able to find it in those repositories. I haven't used gradle before so I am not sure what the issue is exactly and how to fix it.

These are my system details:

System: Mac(Intel)
java version "17.0.5" 2022-10-18 LTS
Editor: Intellij

I don't have gradle installed separately. I am using the gradle wrapper provided by the project.

Additionally I just commented out that line in settings.gradle and ran the build. It succeeded.

Can anyone help me out on this?


问:
How to create relationships between entities
My question is as follows: I am making a simple telegram bot where users can save and learn words in different languages (dictionary).I can't decide what kind of relationship between entities in a spring. I have two entities Word and User.

```<code>@Entity
@Table(name = "words")
@Data
public class Word {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    private String english;
    private String russian;
    @ManyToMany(mappedBy = "words")
    private Set<User> users;
}
</code>```
```<code>@Entity
@Data
@Table(name = "users")
public class User {
    @Id
    private long id;
    private String firstName;
    @ManyToMany
    @JoinTable(
            name = "words_users",
            joinColumns = @JoinColumn(name = "user_id"),
            inverseJoinColumns = @JoinColumn(name = "word_id"))
    private Set<Word> words;
</code>```

The idea is to have a large dictionary in the database, and each user could add words to his dictionary, and the bot checks to see if he has the word in his dictionary, and if so, he gives a link to the word to the user, which is stored in the user's list, and if not, the word is added to the bot's dictionary and then to the user.

I used the "many to many" relationship, but I don't think that's the best option.I think that the intermediate table is completely out of place here, and the Word entity does not need to know which users are referring to which words. One to many(unidirectional) would be much better, but I can't find a suitable implementation. Does anyone have any ideas?

Body:
My question is as follows: I am making a simple telegram bot where users can save and learn words in different languages (dictionary).I can't decide what kind of relationship between entities in a spring. I have two entities Word and User.

@Entity
@Table(name = "words")
@Data
public class Word {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    private String english;
    private String russian;
    @ManyToMany(mappedBy = "words")
    private Set<User> users;
}

@Entity
@Data
@Table(name = "users")
public class User {
    @Id
    private long id;
    private String firstName;
    @ManyToMany
    @JoinTable(
            name = "words_users",
            joinColumns = @JoinColumn(name = "user_id"),
            inverseJoinColumns = @JoinColumn(name = "word_id"))
    private Set<Word> words;

The idea is to have a large dictionary in the database, and each user could add words to his dictionary, and the bot checks to see if he has the word in his dictionary, and if so, he gives a link to the word to the user, which is stored in the user's list, and if not, the word is added to the bot's dictionary and then to the user.

I used the "many to many" relationship, but I don't think that's the best option.I think that the intermediate table is completely out of place here, and the Word entity does not need to know which users are referring to which words. One to many(unidirectional) would be much better, but I can't find a suitable implementation. Does anyone have any ideas?


问:
How to implement server-side columns filtering with different filter operators in TanStack Table (React-Table V8)
I am trying to implement server-side column filtering in TanStack Table (React-Table V8). The problem is that I don't know how to convert the ColumnFiltersState object to the right format for the backend. My backend uses nestjs-paginate which uses the following operators: $eq, $not, $null, $in, $gt, $gte, $lt, $lte, $btw, $ilike for filtering based on the query. The ColumnFiltersState contains a value field, which is of type unknown, and the value it contains will depend on the filter component being used, I plan to use select, date inputs, range inputs for filtering. Also, some fields can be filtered as 'contains', 'equals' etc.

Additionally, another problem is that I need to support both client-side and server-side column filtering depending on the manualFiltering prop passed to my custom table component.

Here is a piece of code from my UsersList component which use my custom table:

...
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
    [],
  );

  const { data, isFetching, isLoading, isSuccess, isError } = useGetUsersQuery({
    search: globalFilter,
    page: pageIndex + 1,
    limit: pageSize,
    sortBy: sorting.map((s) => `${s.id}:${s.desc ? 'DESC' : 'ASC'}`).join(','),
    columnFilters: columnFilters.map((columnFilter) => { // Here is the problem
      ...
      return {
        column: columnFilter.id,
        filter: {
          operator: ...,
          value: ...,
        },
      };
    }),
  });
...
```
<p>So then I can send it to the server in the needed format:</p>
<pre class="lang-js prettyprint-override"><code>// user.api.ts
...
query: ({ search, page, limit, sortBy, columnFilters }) => {
        const params: any = {
          page,
          limit,
          search,
          sortBy,
        };

        // example query URL with filters:
        // http://localhost:3000/cats?filter.age=$gte:3

        if (columnFilters) {
          columnFilters.forEach(({ column, filter: { operator, value } }) => {
            params[`filter.${column}`] = `${operator}:${value}`;
          });
        }

        return {
          url: 'users/',
          params,
        };
      },
...
</code>```

Here are the nestjs-paginate types:

// Available filter operators:
export enum FilterOperator {
  EQ = '$eq',
  GT = '$gt',
  GTE = '$gte',
  IN = '$in',
  NULL = '$null',
  LT = '$lt',
  LTE = '$lte',
  BTW = '$btw',
  NOT = '$not',
  ILIKE = '$ilike',
}

// Return data type from the backend
export interface Paginated<T> {
  data: T[];
  meta: {
    itemsPerPage: number;
    totalItems: number;
    currentPage: number;
    totalPages: number;
    sortBy: SortBy<T>;
    searchBy: Column<T>[];
    search: string;
    filter?: {
      [column: string]: string | string[];
    };
  };
  links: {
    first?: string;
    previous?: string;
    current: string;
    next?: string;
    last?: string;
  };
}
```

A possible solution is to add a custom prop to ColumnMeta by which it will be possible to determine which filtering operator to use, but then I don’t know how to do it correctly or maybe I could determine it using the built-in solutions. I would appreciate any help and ideas .

Body:
I am trying to implement server-side column filtering in TanStack Table (React-Table V8). The problem is that I don't know how to convert the ColumnFiltersState object to the right format for the backend. My backend uses nestjs-paginate which uses the following operators: $eq, $not, $null, $in, $gt, $gte, $lt, $lte, $btw, $ilike for filtering based on the query. The ColumnFiltersState contains a value field, which is of type unknown, and the value it contains will depend on the filter component being used, I plan to use select, date inputs, range inputs for filtering. Also, some fields can be filtered as 'contains', 'equals' etc.

Additionally, another problem is that I need to support both client-side and server-side column filtering depending on the manualFiltering prop passed to my custom table component.

Here is a piece of code from my UsersList component which use my custom table:

...
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
    [],
  );

  const { data, isFetching, isLoading, isSuccess, isError } = useGetUsersQuery({
    search: globalFilter,
    page: pageIndex + 1,
    limit: pageSize,
    sortBy: sorting.map((s) => `${s.id}:${s.desc ? 'DESC' : 'ASC'}`).join(','),
    columnFilters: columnFilters.map((columnFilter) => { // Here is the problem
      ...
      return {
        column: columnFilter.id,
        filter: {
          operator: ...,
          value: ...,
        },
      };
    }),
  });
...

So then I can send it to the server in the needed format:

// user.api.ts
...
query: ({ search, page, limit, sortBy, columnFilters }) => {
        const params: any = {
          page,
          limit,
          search,
          sortBy,
        };

        // example query URL with filters:
        // http://localhost:3000/cats?filter.age=$gte:3

        if (columnFilters) {
          columnFilters.forEach(({ column, filter: { operator, value } }) => {
            params[`filter.${column}`] = `${operator}:${value}`;
          });
        }

        return {
          url: 'users/',
          params,
        };
      },
...

Here are the nestjs-paginate types:

// Available filter operators:
export enum FilterOperator {
  EQ = '$eq',
  GT = '$gt',
  GTE = '$gte',
  IN = '$in',
  NULL = '$null',
  LT = '$lt',
  LTE = '$lte',
  BTW = '$btw',
  NOT = '$not',
  ILIKE = '$ilike',
}

// Return data type from the backend
export interface Paginated<T> {
  data: T[];
  meta: {
    itemsPerPage: number;
    totalItems: number;
    currentPage: number;
    totalPages: number;
    sortBy: SortBy<T>;
    searchBy: Column<T>[];
    search: string;
    filter?: {
      [column: string]: string | string[];
    };
  };
  links: {
    first?: string;
    previous?: string;
    current: string;
    next?: string;
    last?: string;
  };
}

A possible solution is to add a custom prop to ColumnMeta by which it will be possible to determine which filtering operator to use, but then I don’t know how to do it correctly or maybe I could determine it using the built-in solutions. I would appreciate any help and ideas .