超好看鸭
想要使用:rxjs 对流里面的元素进行操作(找出偶数,并且乘以2),为何不生效呢?
可以看看 AI 的参考答案,把 "of" 改为 "from"
超好看鸭
怎么实现如图轮播效果,uniapp?
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20250113/52e8cc7138b03821ff4ec759ee36c37a.png)如图,在uni中怎么实现这种轮播,不是纯图片,里面的数字需要动态获取
目前在寻找插件,
超好看鸭
linux ls的改变颜色如何实现?
ls 会检测输出的目标是终端还是重定向的文件。如果是文件,那么不输出相应的颜色控制字符。
ls 有一个参数,--color 来控制这一行为。如果使用 --color=always ,则总是会输入颜色控制字符。如果是 --color=never
,则不会使用颜色。 --color=auto 会进行上述的自动检测。
"ls" (https://link.segmentfault.com/?enc=eH0gXrQrX0wUlwTvl2qMMw%3D%3D.U1VX0sAXmsyi4U3OI9w1bHMkwDxCCcaDOippxNA19NsXLEpjeq2pLfscX%2FqifSSybRWROk%2F0tU9NMjSmpydZUw%3D%3D)
超好看鸭
如何在Vue 中使用图表库,如VChart?
如何在Vue 中实现 ("https://www.visactor.io/vchart/demo/bar-chart/basic-column" (https://link.segmentfault.com/?enc=wFO5tOYOIl%2F4q5KPbrPzFA%3D%3D.6ioMPxiajqa4BQCa1c6FvpSuPwpOyl3euAkqU0WaVKSUwBwR6t954fGwCace8kcgCCo2MNAT0ePqGeLQatE71g%3D%3D))这样的柱状图,
"图片" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20250109/fe83aa6f9f1b55d991eb3c5261d0d0cd.png)
有什么需要注意的点吗?
超好看鸭
python 怎么查看一个正在安装中的包是被谁依赖了?
"requirements-crawl.txt"
# mysqlclient
Scrapy
python-dateutil
pika
cloudscraper
httpx
docker-compose
loguru
ddddocr
PySocks
streamlink
pymongo
aiohttp
playwright
redis
tls-client
captchatools
httpx
# cython [12/17] RUN pip install -r requirements-crawl.txt:
0.937 Collecting mysqlclient (from -r requirements-crawl.txt (line 1))
1.028 Downloading mysqlclient-2.2.0.tar.gz (89 kB)
1.058 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 3.2 MB/s eta 0:00:00
1.081 Installing build dependencies: started
3.897 Installing build dependencies: finished with status 'done'
3.898 Getting requirements to build wheel: started
4.224 Getting requirements to build wheel: finished with status 'done'
4.228 Installing backend dependencies: started
6.136 Installing backend dependencies: finished with status 'done'
6.138 Preparing metadata (pyproject.toml): started
6.455 Preparing metadata (pyproject.toml): finished with status 'done'
6.459 Requirement already satisfied: Scrapy in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 2)) (2.10.1)
6.499 Collecting python-dateutil (from -r requirements-crawl.txt (line 3))
6.515 Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
6.536 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 13.1 MB/s eta 0:00:00
6.580 Collecting pika (from -r requirements-crawl.txt (line 4))
6.595 Downloading pika-1.3.2-py3-none-any.whl (155 kB)
6.604 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.4/155.4 kB 24.0 MB/s eta 0:00:00
6.665 Collecting cloudscraper (from -r requirements-crawl.txt (line 5))
6.680 Downloading cloudscraper-1.2.71-py2.py3-none-any.whl (99 kB)
6.688 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.7/99.7 kB 16.5 MB/s eta 0:00:00
6.694 Requirement already satisfied: httpx in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 6)) (0.24.1)
6.777 Collecting docker-compose (from -r requirements-crawl.txt (line 7))
6.793 Downloading docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
6.802 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.8/114.8 kB 19.5 MB/s eta 0:00:00
6.808 Requirement already satisfied: loguru in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 8)) (0.7.1)
6.839 Collecting ddddocr (from -r requirements-crawl.txt (line 9))
6.855 Downloading ddddocr-1.0.6-py3-none-any.whl (6.9 MB)
6.948 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 76.3 MB/s eta 0:00:00
7.004 Collecting PySocks (from -r requirements-crawl.txt (line 10))
7.018 Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)
7.098 Collecting streamlink (from -r requirements-crawl.txt (line 11))
7.098 Obtaining dependency information for streamlink from https://files.pythonhosted.org/packages/c4/78/a9d1996b76cc8dd359b46978aaddb11ff3ad956d288e39c633998fe2cf55/streamlink-6.1.0-py3-none-any.whl.metadata
7.113 Downloading streamlink-6.1.0-py3-none-any.whl.metadata (6.4 kB)
7.763 Collecting pymongo (from -r requirements-crawl.txt (line 12))
7.764 Obtaining dependency information for pymongo from https://files.pythonhosted.org/packages/77/c8/aa46a179d476a06630cf9a5463c5edc06b938fa8894b99194ebbdc775d76/pymongo-4.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
7.779 Downloading pymongo-4.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (22 kB)
8.307 Collecting aiohttp (from -r requirements-crawl.txt (line 13))
8.308 Obtaining dependency information for aiohttp from https://files.pythonhosted.org/packages/4c/b8/5c5efbb1d3cb1da3612b8e309e8e31b602ee9c5cca8e41961db385fc9d00/aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
8.322 Downloading aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB)
8.423 Collecting playwright (from -r requirements-crawl.txt (line 14))
8.424 Obtaining dependency information for playwright from https://files.pythonhosted.org/packages/a6/43/a7ff635b8be554345fa712b15e1ff60c073bb78474c797bd93c4a99aec5e/playwright-1.37.0-py3-none-manylinux1_x86_64.whl.metadata
8.439 Downloading playwright-1.37.0-py3-none-manylinux1_x86_64.whl.metadata (3.5 kB)
8.446 Requirement already satisfied: redis in /usr/local/lib/python3.11/site-packages (from -r requirements-crawl.txt (line 15)) (5.0.0)
8.479 Collecting tls-client (from -r requirements-crawl.txt (line 16))
8.496 Downloading tls_client-0.2.1-py3-none-any.whl (35.2 MB)
8.912 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.2/35.2 MB 39.7 MB/s eta 0:00:00
9.063 Collecting captchatools (from -r requirements-crawl.txt (line 17))
9.064 Obtaining dependency information for captchatools from https://files.pythonhosted.org/packages/49/0a/3798c46491c022ebb137259cce2f62c42e0ff5f09bb096b945f90546cccd/captchatools-1.4.1-py3-none-any.whl.metadata
9.078 Downloading captchatools-1.4.1-py3-none-any.whl.metadata (10 kB)
9.677 Collecting cython=18.9.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (22.10.0)
9.722 Requirement already satisfied: cryptography>=36.0.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (36.0.2)
9.724 Requirement already satisfied: cssselect>=0.9.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.2.0)
9.726 Requirement already satisfied: itemloaders>=1.0.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.1.0)
9.728 Requirement already satisfied: parsel>=1.5.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.8.1)
9.730 Requirement already satisfied: pyOpenSSL>=21.0.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.2.0)
9.732 Requirement already satisfied: queuelib>=1.4.2 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (1.6.2)
9.734 Requirement already satisfied: service-identity>=18.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.1.0)
9.736 Requirement already satisfied: w3lib>=1.17.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (2.1.2)
9.739 Requirement already satisfied: zope.interface>=5.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (6.0)
9.741 Requirement already satisfied: protego>=0.1.15 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (0.3.0)
9.744 Requirement already satisfied: itemadapter>=0.1.0 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (0.8.0)
9.745 Requirement already satisfied: setuptools in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (65.5.1)
9.747 Requirement already satisfied: packaging in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (23.1)
9.748 Requirement already satisfied: tldextract in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (3.5.0)
9.750 Requirement already satisfied: lxml>=4.4.1 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (4.9.3)
9.753 Requirement already satisfied: PyDispatcher>=2.0.5 in /usr/local/lib/python3.11/site-packages (from Scrapy->-r requirements-crawl.txt (line 2)) (2.0.7)
9.757 Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/site-packages (from python-dateutil->-r requirements-crawl.txt (line 3)) (1.16.0)
9.834 Collecting pyparsing>=2.4.7 (from cloudscraper->-r requirements-crawl.txt (line 5))
9.835 Obtaining dependency information for pyparsing>=2.4.7 from https://files.pythonhosted.org/packages/39/92/8486ede85fcc088f1b3dba4ce92dd29d126fd96b0008ea213167940a2475/pyparsing-3.1.1-py3-none-any.whl.metadata
9.849 Downloading pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
9.856 Requirement already satisfied: requests>=2.9.2 in /usr/local/lib/python3.11/site-packages (from cloudscraper->-r requirements-crawl.txt (line 5)) (2.31.0)
9.890 Collecting requests-toolbelt>=0.9.1 (from cloudscraper->-r requirements-crawl.txt (line 5))
9.904 Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
9.911 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 10.4 MB/s eta 0:00:00
9.928 Requirement already satisfied: certifi in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (2023.7.22)
9.931 Requirement already satisfied: httpcore=0.15.0 in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (0.17.3)
9.932 Requirement already satisfied: idna in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (3.4)
9.934 Requirement already satisfied: sniffio in /usr/local/lib/python3.11/site-packages (from httpx->-r requirements-crawl.txt (line 6)) (1.3.0)
10.05 Collecting PyYAML=3.10 (from docker-compose->-r requirements-crawl.txt (line 7))
10.07 Downloading PyYAML-5.4.1.tar.gz (175 kB)
10.08 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 27.1 MB/s eta 0:00:00
10.25 Installing build dependencies: started
14.79 Installing build dependencies: finished with status 'done'
14.80 Getting requirements to build wheel: started
15.07 Getting requirements to build wheel: finished with status 'error'
15.08 error: subprocess-exited-with-error
15.08
15.08 × Getting requirements to build wheel did not run successfully.
15.08 │ exit code: 1
15.08 ╰─> [68 lines of output]
15.08 /tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
15.08 !!
15.08
15.08 ********************************************************************************
15.08 The license_file parameter is deprecated, use license_files instead.
15.08
15.08 By 2023-Oct-30, you need to update your project and remove deprecated calls
15.08 or your builds will no longer be supported.
15.08
15.08 See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
15.08 ********************************************************************************
15.08
15.08 !!
15.08 parsed = self.parsers.get(option_name, lambda x: x)(value)
15.08 running egg_info
15.08 writing lib3/PyYAML.egg-info/PKG-INFO
15.08 writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
15.08 writing top-level names to lib3/PyYAML.egg-info/top_level.txt
15.08 Traceback (most recent call last):
15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
15.08 main()
15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
15.08 json_out['return_val'] = hook(**hook_input['kwargs'])
15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15.08 File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
15.08 return hook(config_settings)
15.08 ^^^^^^^^^^^^^^^^^^^^^
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
15.08 return self._get_build_requires(config_settings, requirements=['wheel'])
15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
15.08 self.run_setup()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
15.08 exec(code, locals())
15.08 File "", line 271, in
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
15.08 return distutils.core.setup(**attrs)
15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
15.08 return run_commands(dist)
15.08 ^^^^^^^^^^^^^^^^^^
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
15.08 dist.run_commands()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
15.08 self.run_command(cmd)
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1001, in run_command
15.08 super().run_command(command)
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
15.08 cmd_obj.run()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 318, in run
15.08 self.find_sources()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
15.08 mm.run()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 548, in run
15.08 self.add_defaults()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 586, in add_defaults
15.08 sdist.add_defaults(self)
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
15.08 super().add_defaults()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
15.08 self._add_defaults_ext()
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
15.08 self.filelist.extend(build_ext.get_source_files())
15.08 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15.08 File "", line 201, in get_source_files
15.08 File "/tmp/pip-build-env-qhwxlwba/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
15.08 raise AttributeError(attr)
15.08 AttributeError: cython_sources
15.08 [end of output]
15.08
15.08 note: This error originates from a subprocess, and is likely not a problem with pip.
15.09 error: subprocess-exited-with-error
15.09
15.09 × Getting requirements to build wheel did not run successfully.
15.09 │ exit code: 1
15.09 ╰─> See above for output.
15.09
15.09 note: This error originates from a subprocess, and is likely not a problem with pip.
大概意思是,pyyaml <6 的,不支持 python3.11
«"https://pypi.org/project/PyYAML/#history" (https://link.segmentfault.com/?enc=HUHvmzstOPh4NRNFfqr%2B7w%3D%3D.a4RRw6GGy4mSJSFrbNdQxI%2FcidhUSjWafygA3WM%2BnD0vFjVYLFQVQqGFjMvD0TU7)»
我想知道,是哪个包要求 pyyaml 版本低于 6.0?
超好看鸭
面积图x轴如何隔几个点显示刻度?
类似("https://www.visactor.io/vchart/demo/area-chart/null-value-area" (https://link.segmentfault.com/?enc=UklQf9kGMfEDT8MRIBdcVg%3D%3D.X1j3wz%2BLYrSSKdjyp97v6%2BtVgQItZ%2FhhxV15sGWA00PvjpUCuhXrbmL5J3xNpDMbODcXydlEK7je6aZEdEewGQ%3D%3D))这样的面积图里面数据比较多,比如几百条。当某些轴上的标签内容过长时,很容易出现重叠或者视觉过于密集的情况,需要按一定的间隔去展示X轴上的刻度。
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20250101/76ef3df09bbd7ed21dc583018b9f64cb.png)
这类图表有配置使得坐标轴每隔几个点显示刻度,类似echarts的interval那种的么?
超好看鸭
如何实现一对多的表格结构?
原实现方式:
{{ objValue }}
如图,数据结构是一对一的,但是很多键是重复的,希望能够只有一个键,值都排到对应键后,表格就不是一列表头,对应一列数据了,而是一列表头对应多列数据
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241226/fbc6981d85ee3b9f88ec75b666fd823e.png)
超好看鸭
zustand的store的方法,为何第二次点击报错:Unhandled Runtime Error TypeError: addTab is not a function?
我不会zustand;我只看 js
return set((state) => {
const newTabs = state.tabs.push(tab) // push 的返回值是 state.tabs.length
return newTabs // number
})
这样改吧
return set((state) => state.tabs.concat(tab))
超好看鸭
报错: isFunction is not a function 这是什么情况?
https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241225/fd422a141388d20972babe0d53404e50.pnghttps://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241225/315b2f8c8fa2a1bd87681e4257581a60.png有没有大佬遇到过这种情况的?求解答,提前感谢
超好看鸭
ruoyi前后端分离框架是怎么做到不写实现类,bean依赖注入的?
最近在学习java,ruoyi框架模仿com.ruoyi.framework.config.MybatisConfig,我的方法会报错显示无法自动装配。找不到
'DataSource' 类型的 Bean。但他的我也没看到有写实体类这是怎么做到的?
图一是ruoyi的
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241223/1c646e70f67ae75710caae702a990db3.png)
图二是我的
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241223/583bfade3c7515aa11533f802c53ee06.png)
超好看鸭
import 方式导入,有没有办法可以让他不加载样式文件?
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241222/1b07095cd751211cc55fa0b58a1571a9.png)
超好看鸭
vue2怎么双向绑定一个对象?
这个对象里的属性个数和key都是未知的
超好看鸭
depcheck 在node 12.18.2版本下报错?
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241212/9c091daf996d0996a8f21516cde1896b.png)
运行depcheck指令后,报如下错误。按理说满足官方要求的node10版本以上的。
请解惑!
超好看鸭
uniapp写小程序,使用tabBar引入icon不显示图标,百度方法都试了不成功怎么办?
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241210/e6d94ab1c62bd60f86f26916a4c2eaa2.png)
"iconfont"属性不支持小程序
超好看鸭
vue3 + TS ts类型问题?
"截屏2023-10-25 16.59.45.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241204/6e479fe13d27f60a70026815c25a3103.png)
是不是你IDE的问题?
超好看鸭
mathematica求解析解?
首先,我们需要将给定的微分方程和边界条件转换为 Mathematica 代码。这里是一个可能的实现:
(* 定义变量 *)
ρ[x_] := x /. x -> 0;
ω[x_] := x /. x -> h;
dω[x_] := d[x] /. x -> 0;
dρ[x_] := d[x] /. x -> 0;
(* 微分方程 *)
eqn = (D[ρ[x], dρ[x]] + D[ω[x], dω[x]]) (D[ω[x], dρ[x]] + D[ρ[x], dω[x]]) == 0;
(* 边界条件 *)
bc = {ω[ρ[0]] == h, dω[ρ[0]] == 0, ω[ρ[δ]] == 0, dω[ρ[δ]] == 0};
(* 求解微分方程 *)
sol = NSolve[{eqn, bc}, {ω[x], ρ[x]}, {x, -Infinity, δ, Infinity}];
这将给出解析解:
{ω -> h + C1*I, ρ -> h^2 + C2*I}
其中 C1 和 C2 是常数。
超好看鸭
RxJava的Observable订阅时如何作到在onComplete被调用时取消订阅?
例:
table.subscribe(tableIns -> {
// System.out.println("-------Information-------");
System.out.println(tableIns);
}, throwable -> {
throw new SchemaExportException(throwable);
}, new Action() {
@Override
public void run() throws Exception {
System.out.println("Complete");
// 在这里取消订阅
});
注意:是非Android 运行环境, 使用的是RxJava2.x
超好看鸭
vue动态路由问题?
这里有一些前置条件。比如说
1. 不能有 "*",不然会被拦截
2. 不能重复,不然会被第一个拦截。
你这个代码看上去就是一直在绑定重复的。如果你直接为了实现一个动态 tabs 没必要给 routes 一直 addRoutes 吧。。。
超好看鸭
vue3 模板语法?
// a-select 无法对 value 的变化进行反应
...
const { value } = defineProps(['value']);
const api = { value , ... }
// a-select 可以对 value 的变化进行反应
...
const { value } = defineProps(['value']);
const api = { ... }
这是什么原因导致的呢?
我想维持 "const api = { value , ... }" 这样的写法要如何做呢?
"ant-design-vue": "^4.0.2",
"vue": "^3.2.45",
超好看鸭
el-table使用show-overflow-tooltip不生效?
不适用插槽,直接就让 "el-table-column" 自己处理:
"图片.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/images/20241119/e69729c8533b2874dfe878a5945b3eaa.png)
***
看你的描述应该是自己想要做一些自定义的渲染,又想要有文字超出截断的效果。那就要自己在你的插入的插槽中自己实现文字超出截断,而不是使用 "el-table-column" 提供的 "show-overflow-tooltip" 属性
超好看鸭
navigator.mediaDevices.getUserMedia在chrome获取视频流分辨率低(640*480),但是在Safari就是1280*720,是浏览器的问题吗?
获取摄像头stream的分辨率谷歌浏览器分辨率一直是640 480很模糊,切OBS则是1280
720,在Safari摄像头stream则是正常的1280*720,电脑摄像头分辨率很高并不是摄像头的问题,请大佬们给点思路吧
navigator.mediaDevices.getUserMedia({
video: {
width: { ideal: 1280 },
height: { ideal: 720 }
}
})
.then(function(stream) {
const videoTrack = stream.getVideoTracks()[0];
const settings = videoTrack.getSettings();
console.log('Actual video resolution: ' + settings.width + 'x' + settings.height);
})
.catch(function(error) {
console.log("getUserMedia error: ", error);
});
超好看鸭
nginx报跨域怎么办?get还跨域?
你需要nginx配置一下跨域
location / {
# 允许跨域的请求,可以自定义变量$http_origin,*表示所有
add_header 'Access-Control-Allow-Origin' *;
# 允许携带cookie请求
add_header 'Access-Control-Allow-Credentials' 'true';
# 允许跨域请求的方法:GET,POST,OPTIONS,PUT
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT';
# 允许请求时携带的头部信息,*表示所有
add_header 'Access-Control-Allow-Headers' *;
# 允许发送按段获取资源的请求
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
# 一定要有!!!否则Post请求无法进行跨域!
# 在发送Post跨域请求前,会以Options方式发送预检请求,服务器接受时才会正式请求
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
# 对于Options方式的请求返回204,表示接受跨域请求
return 204;
}
}
超好看鸭
JavaScript 强制刷新window.location.reload(true)在火狐浏览器有效,谷歌浏览器无效?
js window.location.reload(true)强制刷新只在火狐浏览器中生效,谷歌浏览不生效
有什么办法可以兼容谷歌、火狐浏览器能在js中调用强制刷新,就像调用ctrl+f5那样
主要是想刷新页面缓存
超好看鸭
springboot 配置多源数据库出错?
springboot 配置多源数据库问题。
测试了一下springboot配置多源数据库,mysql和postgresql,yml配置如下:
spring:
datasource:
dynamic:
primary: mysql
strict: false
datasource:
mysql:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
url: jdbc:mysql://*.*.*.*:3306/student?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT
postgresql:
url: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: weixj5217
driverClassName: org.postgresql.Driver
运行程序,出现如下错误:
……
9:30:59:048] [INFO] -org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.prepareWebApplicationContext(ServletWebServerApplicationContext.java:292)
- Root WebApplicationContext: initialization completed in 1080 ms
[19:30:59:138] [INFO] -com.zaxxer.hikari.HikariDataSource.(HikariDataSource.java:80) - mysql -Starting...
[19:31:21:237] [ERROR] -com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:594)
- mysql - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link
failure
The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.
at
com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
~[mysql-connector-java-8.0.29.jar:8.0.29]
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
~[mysql-connector-java-8.0.29.jar:8.0.29]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
~[mysql-connector-java-8.0.29.jar:8.0.29]
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:448) ~[mysql-connector-java-8.0.29.jar:8.0.29]
……
从错误中看,好像mysql启动错误。
说明一下:
单独连接mysql数据库(不是多源数据库),程序正常,不会出现上面的错误。
多次修改yml配置,还是不行。
超好看鸭
amh使用时如何防止恶意绑定主机ip ?
1. amh定制安装里面的mysql-generic5.7与mysql5.7有何区别吗? 性能上?还是缺少了什么?
2. 你们谁知道如何使用amh的时候,禁止别人恶意绑定自己的主机ip上呢?之前在lnmp里面只需要添加一个server即可:server {
listen 80 default_server;
server_name _;
return 500;
}
3. 配置ssl的时候,如果用企鹅家的,应该是要手动修改nginx的配置文件吧
没有
超好看鸭
Windows 系统中有到达文件顶部或底部的快捷键吗?
* 文件顶部:按下Ctrl + Home键组合
* 文件底部:按下Ctrl + End键组合
"image.png" (https://wmlx-new-image.oss-cn-shanghai.aliyuncs.com/images/20241101/1c525b6c2f0b8fe226c483e751a2a654.png)
超好看鸭
Tailwind CSS: 实现鼠标移到标签时子标签改变属性的方法?
你可以看看Tailwind "group" & "group-hover"
超好看鸭
用flask框架和yolov5开发html网页,打开摄像头检测框失败,该如何解决?
这里是前端的相关内容
输入数据:
输出结果:
function start() {
navigator.mediaDevices.getUserMedia({ video: true })
.then(function (stream) {
var video = document.querySelector('video');
video.srcObject = stream;
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
setInterval(function () {
var videoWidth = video.videoWidth;
var videoHeight = video.videoHeight;
canvas.width = videoWidth;
canvas.height = videoHeight;
ctx.drawImage(video, 0, 0, videoWidth, videoHeight);
var imageData = canvas.toDataURL('image/png',1); // 压缩图片
// 发送数据到后端
$.ajax({
type: 'POST',
url: '/image_data',
data: {
id :$("#uid").val(),
image_data: imageData
},
success: function (response) {
console.log(response);
}
});
}, 1000 / 30); // 每秒30帧
})
$("#res").attr("src", "/img_feed?id="+$("#uid").val())
.catch(function (error) {
console.error(error);
});
}
# 视频推流
def gen(path):
cap = cv2.VideoCapture(path)
while cap.isOpened():
try:
# 记录开始时间
start_time = time.time()
# 获取画面
success, frame = cap.read()
if success:
im, label, c = d.detect(frame)
ret, jpeg = cv2.imencode('.png', im)
if ret:
frame = jpeg.tobytes()
# 计算处理时间
elapsed_time = time.time() - start_time
print(f"Frame processing time: {elapsed_time:.3f} seconds")
yield (b'--frame\r\n'
b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')
else:
break
else:
break
except Exception as e:
print(e)
continue
cap.release()
cv2.VideoCapture(path)
# 视频流结果
@app.route('/video_feed')
def video_feed():
f = request.args.get("f")
print(f'upload/{f}')
return Response(gen(f'upload/{f}'),
mimetype='multipart/x-mixed-replace; boundary=frame')
这里是后端的内容
# 前台推流
@app.route('/image_data', methods=["POST"])
def image_data():
image_data = request.form.get('image_data')
id = request.form.get('id')
image_data = io.BytesIO(base64.b64decode(image_data.split(',')[1]))
img = Image.open(image_data)
# 对图片进行处理,例如压缩、滤波等
output = io.BytesIO()
img.save(output, format='PNG', quality=85)
output.seek(0)
# 将处理后的图片保存到服务器
img.save(f'upload/temp{id}.png')
with open(f'upload/temp{id}.png', 'wb') as f:
f.write(output.read())
return "ok"
因为不知道怎么写,所以没有尝试,我希望在打开摄像头的时候可以显示检测框,以便我能正确识别到图像的置信度
超好看鸭
怎么判断数组是否是指定的结构?
属性不多用"hasOwnProperty"方法暴力测试
const arr = [
{
name: '',
image: '',
options: [
{
name: '',
rightFlag: '',
score: '',
image: '',
}
],
}
];
// 判断数组是否符合指定的数据结构
function query(arr) {
return arr.every(item =>
item.hasOwnProperty('name') &&
item.hasOwnProperty('image') &&
item.hasOwnProperty('options') &&
Array.isArray(item.options) &&
item.options.every(option =>
option.hasOwnProperty('name') &&
option.hasOwnProperty('rightFlag') &&
option.hasOwnProperty('score') &&
option.hasOwnProperty('image')
)
);
}
console.log(query(arr)); // 输出结果
超好看鸭
如何优化linux?
如何清理linux不需要的软件包
超好看鸭
echarts中双x轴第二个label不显示如何解决?
"性能分析图" (https://link.segmentfault.com/?enc=lXmZM%2FTIAvBdUzjH2QORRw%3D%3D.HvRcOr043Qj14yDv4UWtS8XqbuCf9X12ozD3KhPM8HkJLyzdm1zB8uUUwZH6mXnWzubStjCwBmMeKUN68xQr0DsdBqs2S%2BL2XUreQmCOzTQ%3D)中如果设置双x轴,第二个label无论如何也显示不出来,只能看到轴线,请问应该如何更改以显示出图标上方x轴的label
xAxis: [{
name:'1',
min: startTime,
scale: true,
axisLine: {
show: true,
lineStyle: {
color: colors[2]
}
},
axisLabel: {
backgroundColor:'red',
formatter: '{value} ml'
}
},{
name:'2',
axisLine: {
show: true,
lineStyle: {
color: colors[2]
}
},
min: startTime,
scale: true,
axisLabel: {
backgroundColor:'red',
inside:true,
show:true,
hideOverlap:true,
// formatter: '111ml'
}
},],
超好看鸭
怎么把这个实时录音原生js代码变成vue代码(vue2.0那种)?
1. 提取 JS 代码到 "src/assets/record.js",去除dom操作,改为 export "beginRecord" 和
"stopRecord" 函数
// var begin = document.getElementById('intercomBegin')
// var end = document.getElementById('intercomEnd')
var ws = null // 实现WebSocket
var record = null // 多媒体对象,用来处理音频
var timeInte
function init(rec) {
record = rec
}
// 录音对象
var Recorder = function(stream) {
var sampleBits = 16
var sampleRate = 16000
var context = new AudioContext()
var audioInput = context.createMediaStreamSource(stream)
var recorder = context.createScriptProcessor(4096, 1, 1)
var audioData = {
size: 0,
buffer: [],
inputSampleRate: 48000, // 输入采样率
inputSampleBits: 16, // 输入采样数位
outputSampleRate: sampleRate, // 输出采样数位
oututSampleBits: sampleBits, // 输出采样率
clear: function() {
this.buffer = []
this.size = 0
},
input: function(data) {
this.buffer.push(new Float32Array(data))
this.size += data.length
},
compress: function() { // 合并压缩
// 合并
var data = new Float32Array(this.size)
var offset = 0
for (var i = 0; i {
var outbuffer = e.target.result
console.log('文件读取后的结果', outbuffer)
var arr = new Int8Array(outbuffer)
console.log('转化的二进制数据', arr)
if (arr.length > 0) {
var tmparr = new Int8Array(1024)
var j = 0
for (var i = 0; i = 1024) {
tmparr = new Int8Array(1024)
} else {
tmparr = new Int8Array(arr.byteLength - i - 1)
}
j = 0
}
if ((i + 1 == arr.byteLength) && ((i + 1) % 1024) != 0) {
ws.send(tmparr)
}
}
}
}
reader.readAsArrayBuffer(audioData.encodePCM())
audioData.clear()
}
this.start = function() {
audioInput.connect(recorder)
recorder.connect(context.destination)
}
this.stop = function() {
recorder.disconnect()
window.clearInterval(timeInte)
audioData.clear()
}
this.getBlob = function() {
return audioData.encodePCM()
}
this.clear = function() {
audioData.clear()
}
recorder.onaudioprocess = function(e) {
console.log('测试一下', e)
var inputBuffer = e.inputBuffer.getChannelData(0)
audioData.input(inputBuffer)
console.log('显示', inputBuffer)
sendData()
}
}
/*
* WebSocket
*/
function useWebSocket() {
ws = new WebSocket('wss://api.tl.supremind.cloud')
ws.binaryType = 'arraybuffer' // 传输的是 ArrayBuffer 类型的数据
ws.onopen = function(event) {
console.log('连接成功')
const obj = { 'action': 'audio_lock', 'data': [{ 'projectJid': 'fe843627233020c110101c8f7e85ba53', 'guid': '12c00001363b21cf', 'playVolume': 20 }], 'requestId': 'cf3253b2-e491-4ce0-bf66-4a5bc36d46a1' }
ws.send(JSON.stringify(obj))
timeInte = setInterval(function() {
record.start()
}, 300)
}
ws.onmessage = function(msg) {
console.info(msg)
}
ws.onerror = function(err) { }
}
/*
* 开始对讲
*/
export function beginRecord() {
// begin.onclick = function() {
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia ||
navigator.msGetUserMedia
if (!navigator.getUserMedia) {
alert('浏览器不支持音频输入')
} else {
navigator.getUserMedia({
audio: true
},
function(mediaStream) {
console.log('ddddd', mediaStream)
init(new Recorder(mediaStream))
console.log('开始对讲')
useWebSocket()
},
function(error) {
switch (error.message || error.name) {
case 'PERMISSION_DENIED':
case 'PermissionDeniedError':
console.info('用户拒绝提供信息。')
break
case 'NOT_SUPPORTED_ERROR':
case 'NotSupportedError':
console.info('浏览器不支持硬件设备。')
break
case 'MANDATORY_UNSATISFIED_ERROR':
case 'MandatoryUnsatisfiedError':
console.info('无法发现指定的硬件设备。')
break
default:
console.info('无法打开麦克风。异常信息:' + (error.code || error.name))
break
}
}
)
}
}
/*
* 关闭对讲
*/
// end.onclick = function() {
export function stopRecord() {
if (ws) {
record.stop()
var tmparr = new Int8Array(1024)
const obj = { 'action': 'audio_unlock', 'data': [{ 'projectJid': 'fe843627233020c110101c8f7e85ba53', 'guid': '12c00001363b21cf', 'playVolume': 80 }], 'requestId': 'cf3253b2-e491-4ce0-bf66-4a5bc36d46a1' }
ws.send(JSON.stringify(obj))
console.log('关闭对讲')
}
}
2. 在vue代码中这样写
开始对讲
关闭对讲
// 引入封裝的函數
import { beginRecord, stopRecord } from 'src/assets/record.js'
export default {
methods: {
// 定义方法,方便在dom綁定@click
beginRecord() {
beginRecord()
},
stopRecord() {
stopRecord()
}
}
}
3. 代码中的问题
如下图,这个变量的意义不明
"image.png" (https://wmlx-new-image.oss-cn-shanghai.aliyuncs.com/images/20241025/d2aef2a1f5212649597dccf6296077d0.png)
希望这个解答可以帮到你!
超好看鸭
如何快速在可变区间内求元素总和?
«以下内容来自 AI»
线段树在头部插入和删除元素时,确实需要进行一定的更新操作。但不需要重新建树。
具体来说:
* 插入一个元素时,只需要更新受影响的 \(O(logN)\) 个节点的值即可。这些节点对应原线段树中包含新插入元素的区间。
* 删除一个元素时,同样只需要更新 \(O(logN)\) 个节点的值。更新的节点对应的是原来的区间减去被删除元素后新的区间。
也就是说,线段树在插入和删除一个元素时,不需要从头重新构造整个树结构。只需进行局部的节点值更新,时间复杂度为 \(O(logN)\)。
这和平衡树相比,线段树由于固定二叉树结构,所以插入和删除的更新更易实现。
所以总体来说,线段树虽然在头部插入/删除元素也需要更新操作,但这些更新都是局部的,不会引起整棵树的重建。它仍能很好地支持动态变化的区间大小。
超好看鸭
怎样解决Tkinter中Frame嵌套导致外部Frame大小失灵问题?
使用的是Python,tk,我如果在一个Frame中嵌套一个Frame,外面的Frame大小设置就失灵了。
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241016/5b9a59239670ba3dcaade646a552d57d.png)
import customtkinter
if __name__ == "__main__":
app = customtkinter.CTk()
app.geometry("300x300")
frame = customtkinter.CTkFrame(app, width=280, height=280, fg_color="red")
frame_1 = customtkinter.CTkFrame(
frame, width=20, height=20, fg_color="green", corner_radius=5
)
frame_1.pack()
frame_2 = customtkinter.CTkFrame(
frame, width=20, height=20, fg_color="blue", corner_radius=5
)
frame_2.pack()
frame.pack()
app.mainloop()
本来是想做一组小Frame在里面,然后更随窗口大小变化的。
m*n行,最后一行可能不填满这个样子。
超好看鸭
h5页面嵌套在app里 怎么做用手指滑动列表时,数据在跟着上下滑动,求一个能用手滑动的例子?
h5页面嵌套在app里 怎么做用手指滑动列表时,数据跟着上下滑动?
页面用vue写的,不用第三方的框架或者插件
求一个能用手滑动的例子
初始化的时候 transform: translate(0px, 0px) translateZ(0px);
每向上或者向下滑动时,数据跟着滑动
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241016/4a0a1139608d83a19874e24c1fa3df64.png)
超好看鸭
Json序列化和Jdk序列化在存储上的对比?
JSON
基于字符,于是非字符的东西占用空间更多,比如数字,比如二进制,比如 bool
因为是字符所以可读,可编辑
另外是一种语言无关的格式,啥程序都能读
JDK 序列化
相比于其他二进制序列化,存了类型等等一些额外的东西,所以也没高效多少,但是因为是二进制的,所以存二进制数据相对更省空间
但是这玩意只有 Java程序可以读,而且只能程序读,直接看数据基本看不明白是啥,更不用说修改
超好看鸭
Vue3 + Element Plus 开发网页,使用 el-table 表格组件完成横、列都是动态数据的渲染,并且动态数据中含有二级分类?
大佬们,请问在 Vue3 + Element Plus 网页开发中,使用 el-table 表格组件能否实现如下图所示的复杂表格。
横、列都是动态,而且都含有2级(固定2级),且有单元格合并(如图),希望前端界大牛帮忙看一下!谢谢了!感谢!
"太复杂了。。" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241011/c95bc6f0c5f11bfec5eb25fc1f913f66.png)
数据结构毫无思路。
超好看鸭
如何扩展 Element Plus 的尺寸配置?
老项目el-ui升级到el-plus。很多地方用到了size mini 现在el-plus没有mini这个尺寸配置了。有没有方法能扩展el-plus的尺寸配置呢?
试过mini换成small样式,然后再修改small.但是老项目也针对small和mini做了区分样式改动。要确保之前的页面效果就要逐一改动页面了。大家还有什么好方法吗?
超好看鸭
MobaXterm 中文显示乱码?
软件兼容性问题,windows server和软件不兼容
目前直接把windows server作为代理跳板直接到目标服务器,也就是通过本地(windows pc)直接到linux而不是中转到window
server解决
超好看鸭
常用的加密算法?
1.MD5单向加密算法,用于“电子签名”,“数字指纹”,“水印技术”
2.RSA双向加密法,用于“数据加密”,“数字签名”
3.国密算法
(1)SM1:对称加密算法
(2)SM2:公钥算法
(3)SM3:密码杂凑算法
(4)SM54:对称加密算法
超好看鸭
Nextjs连接OPENAI 的API,请求出现错误?是否为网络问题?
可以用nginx反代openai的地址,然后nextjs访问nginx的地址,亲测有效。
超好看鸭
使用useState创建一个state,初始值为一个对象,在更新的过程中,初始值会被多次创建吗?
会被创建,不会被赋值
"https://react.docschina.org/reference/react/useState#avoiding..." (https://link.segmentfault.com/?enc=3DOQlW7iG5RqTJ3qjCCfqw%3D%3D.AE%2BcDE9vt0w41TEhamfIDSddLBss9MtfD9uTQfPHjT6y7z3OPS0%2BYykkdWmSCBaF%2BAowEKN9wZuFlnGFVPj4Xszz2drH4MVE9Dp7JS%2FVC5ZyipAXb6%2FWVZnzE%2B4ZZAHJ)
超好看鸭
micropython怎么导入当前文件夹下的包?
https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241002/cff558aa3fe4709a2661d1ec3bf89698.png
超好看鸭
如何在el-select中选择框内容超出时实现换行?
请问下el选择框选中的内容超出时怎么给他换行 盒子宽度不变
{{ item.pointName }}
{{ item.buildName }}{{ item.floorName }} {{ item.deptName }}
这是原结构 试了网上几个方法都没有效果 老板要求把这一段所有的内容在一个选中框内显示出来 (表单内容皆不为真实数据)
https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241001/d22ddeaddbb7008703078def2d52654f.pnghttps://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20241001/721e39743ccaccce9df19642732d84f6.png
超好看鸭
opacity 为什么会影响层级 ?
设计如此:"https://developer.mozilla.org/zh-CN/docs/Web/CSS/opacity" (https://link.segmentfault.com/?enc=nlywWMb0lPwAoXAyubkmAQ%3D%3D.bxjOSHKoElJao7ocwPxVVlVVjMaMhZnSPRgMr1tdW6L7QyYclYtHY%2BpS1MvzToddIfVOlWiLgTnhP07MejyCcw%3D%3D)
如果你想控制层级可以用定位来控制
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240930/6ab649d5de7f78bd553b66a58d793523.png)
超好看鸭
java spring如何实现代码干净的写法?
所谓"干净"的写法得满足团队定制化规则进行编码.
按照您给出的Demo. 我给出个人看法:
可以利用面向切面的编程方式进行开发.编写相关切面.
例如: 可以面向特定包进行切面 (com.demo.controller) 进行切面
1. 捕获到尾缀包含 "Controller"的类进行处理,具体处理逻辑将按照您定制的编码规则进行调整.
2. 类名去掉"Controller"然后进行lowercase.让后将其注入到springmvc中. (主要用于注入)
3. 将方法名称按照"With"进行分割. 分割末位为对应的mvc get/post/put/delete等. 分割的首位为请求路径. 然后再依次注入为springmvc的具体请求. 具体的注入方式参考mvc的注入规则.
个人不推荐如此操作.除非团队有很强的协同能力. 对于不规范的命名规则和编码方式容易带来灾难性的后果.
超好看鸭
Nginx 1.26 HTTP/3 问题:转向时域名丢失的解决方案?
你是不是开启了 "proxy_pass Host $http_host;"类似于这样的反向代理参数?
这个参数的确在http3带不过来,只能改为 "proxy_pass Host $host;",这个问题在nginx的issue有记录,参见:
"https://trac.nginx.org/nginx/ticket/2551" (https://link.segmentfault.com/?enc=6zex0iFUUhhMjulUTzFBxQ%3D%3D.JAugd%2BIDJDAvUWyGIcUGjc5RbMdjSwlbJHmw2mdNN1XKFiaoW2VnhcSO%2F4d1uuo%2F)
超好看鸭
nextjs适合前后端分离的架构吗?
nextjs适合前后端分离的架构吗?
刚学nextjs 有个疑问
nextjs适合前后端分离的架构吗,我看官网和一些教程都提倡直接在服务端组件里操作数据库。如果已经有了写好的api服务,可以直接在服务端组件里去用axios请求api服务吗
超好看鸭
vue-router 如何router.back返回上一个页面,但是不触发页面的onActivated?
首先根据你的描述,你应该是想要解决在路由更改时根据不同的情况来决定是否请求数据.
然后说下你遇到的问题,使用了keep-alive,但是不想触发对应的onActivted方法,这是不行的.因为对应的钩子函数是在组件整个生命周期当中的一环,既然已经是了缓存组件,那么一定会触发对应的缓存组件的钩子.
我提供了几种思路:
1. 使用keep-alive,但是对应的数据请求放在mounted中,然后在当前路径中添加参数,通过watch对应的路由参数的值来判断是否进行请求逻辑.
2. 使用消息订阅和发布,在router.push(xx).then(()=>触发订阅)中设置keep-alive的includes或者excludes让当前页面被排除在缓存之外,然后更新页面的key值,将对应的页面再添加进缓存.相当于刷新了当前的组件.(如果存在其他请求接口的逻辑,可能会导致页面重复请求两次,建议封装本地的请求做缓存处理,同接口同参数的接口短时间重复请求使用第一次的结果)
3. 当然你也可以再push的then方法中通过消息发布来触发对应页面的请求.
超好看鸭
nuxt.js 使用vue-awesome-swiper提示getComputedStyle' on 'Window': parameter 1 is not of type 'Element'?
"image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240928/46a4a7b9d62960ef92d735c73ea5f126.png)
nuxt.js 使用vue-awesome-swiper提示Failed to execute getComputedStyle' on 'Window':
parameter 1 is not of type 'Element'.
代码如下:
网上有人说class需要使用swiper-wrapper,但是还不行,"@slideChange="onSlideChange""也没出发