typesafe-config 相关问题


无法将 Spark 数据帧写入 Mongo

使用 mongo-connector 版本 10.0.1 以下是我的配置 .config("spark.mongodb.write.connection.uri","mongodb://127.0.0.1:27017/") .config("spark.mongodb.write.database&


git 配置更改电子邮件和用户名,但通过以前的用户提交和推送完成

我使用命令 git config --global user.name name 更改了 git config user.name 和 user.email。当我在终端或命令提示符中运行 git config --global --list 时,我会获取我的凭据。 ...


错误:找不到模块“@npmcli/config”

每当我尝试运行任何“npm”命令时,我都会收到以下错误,无法找到 npmcli 的配置。 错误:找不到模块“@npmcli/config” 需要堆栈: ...


Gatsby - EACCESS:“.config/gatsby”的权限被拒绝

我尝试在 VPS 服务器上安装 Gatsby,其中 ROOT 用户的“.config”文件夹不可写,不幸的是,就像它是托管 VPS 服务器一样,我无权访问 SUDO。 安装


自定义骑行存在(discord.js v14)

const 猫鼬 = require("猫鼬") 需要(“dotenv”).config() const {Client,ActivityType} = require("discord.js") 模块. 导出 = { 名称:'准备好', /** ...


从config中导入参数,如果不存在则先创建config

我有一些全局常量,它们保存在 .py 文件中,并且代码库中的许多不同位置都需要它们: 从重要参数导入 ROOT_DIR、ANOTHER_DIR 这个进口是需要的...


“Eureka-Server”在运行“Spring Cloud Config Server”时看不到其属性

在“Eureka-Server”中,“application.properties”文件包含以下属性: spring.config.import=configserver:http://localhost:8888 spring.application.name=eserver ...


无法克隆 GitHub 存储库

D: setau-management λ git config --global --unset http.proxy d: 设置管理 λ git clone https://github.com/aramali0/restaurant-management-system.git 克隆 进入“餐厅管理系统...


pydantic 可选表单在表单丢失时返回 422

我如何获得可选表格, @app.post("/config", include_in_schema=False) 异步 def postconfig(请求:请求, gitlabtoken:str = 表单(...), gitlaburl:str = 表单(...),


静态编译 openssl 二进制文件

从源 tarball 构建时由 config 和 make 命令生成的 openssl 二进制文件动态链接到这些库: linux-vdso.so.1 => (0x00007fffa75fe000) 我...


是否可以在 Google Cloud Shell 中使用 Jupyter Notebook?

我尝试过的: 启动 Google Cloud shell 须藤 pip 安装 jupyter jupyter 笔记本 --generate-config 将以下内容添加到 ~/.jupyter/jupyter_notebook_config.py c.NotebookApp.ip = 'localhost' c.


有没有办法从插件或主题更改 WP_DEBUG 常量

有没有办法在不修改Wordpress中的config-ini.php文件的情况下从插件或主题打开或关闭WP_DEBUG?


未遵循 Uvicorn 重新加载选项

我有三个目录:app、config和private 我在安装了 WatchFiles 的情况下以编程方式运行 uvicorn: uvicorn.run( “应用程序主:快”, 主机=主机,


找不到“wxWidgets”提供的包配置文件

为了在 Ubuntu 23.10 中开始使用 wxWidgets,我使用 wx-config 编译并构建了最小示例:https://github.com/wxWidgets/wxWidgets/blob/master/samples/minimal/: rapy@raohy:~/MyPrj$ g++ `wx-...


AWS Amplify #current-cloud-backend 重复文件

在我的AWS amplify项目中,包含已签出环境资源的当前云状态的#current-cloud-backend文件夹继续添加重复文件,例如backend-config 2....


运行 Prettier 时出现问题:退出代码 2 和意外标记“:”

每次我尝试提交或运行yarn format(使用此脚本:“format”:“prettier --config \”packages/**/*。{ts,tsx} \“”)或运行make fmt,我收到以下错误


角度属性绑定到新对象实例

在 Angular (15) 中,如果我们有一个组件属性 (@Input),它是一个对象 - 例如 [config]="{ size: 10, label: 'hello' }" - 就是被实例化的对象在 HTML 中重新创建...


如何将我的 pino 日志从 Nestjs 应用程序发送到 azure 中的应用程序洞察

这是我的 pino 配置 从'dotenv'导入{config}; 从 'nestjs-pino' 导入 { Params } ; 配置(); const pinoConfig: 参数 = { 皮诺http: { 级别:process.env.NODE_ENV !== '产品...


Azure Devops Powershell 脚本

我是 Azure DevOps 的新手。我们有一个管道,管道中的任务之一是将一些配置文件复制到另一台服务器,它看起来像 复制项目 -path D:\Config\*.* -Destination '\server\


从 adb shell 获取正在运行的 LineageOS 内核配置

我已经从源代码构建了 LineageOS 18.1 并在 ARM 设备上刷新了它。在构建主机上,我可以看到 lineage/out/target/product/jfltexx/obj/KERNEL_OBJ/.config 包含 KERNEL_IKCONFIG=y


Nextflow 管道中的文件路径管理

我有一个 .config 文件,其中包含各种工具的目录路径。我想隔离单个文件路径,例如:/mount1/nextflow_dir/,对于其他工具,我想添加一些内容


我开始收到此错误:错误:架构验证失败,出现以下错误:数据路径“”必须具有必需的属性“browserTarget”

如何解决? 这是我的 angular.json 文件: { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", “版本”:1, "newProjectRoot": "项目...


使用 Html Purifier 从提交的 html 页面内容中提取样式块

如何使用html净化器提取这样的块样式。 我尝试使用下面的代码从 html 内容中提取样式。 但我不能; $config = \HTMLPurifier_Config::createDefault(); $


如何通过 GHCup+cabal 管理 XMonad(以及 xmobar 和其他相关内容)?

事实证明执行起来就足够了 cabal install --package-env=$HOME/.config/xmonad --lib 基础 xmonad xmonad-contrib 但我不明白的是: 为什么这有效? 为什么要更新...


如何配置 tslint 或 prettier 来删除 if/while/for 和 () 之间的空格?

我正在设置 React 项目并使用 tslint、prettier 和 tslint-config-prettier 格式化我的代码。还可以使用 vscode 自动格式化。 如何删除 if/while/for 和括号之间的空格,如 'if()...


如何配置 tslint 或 prettier 来删除 if/while/for 和 () 之间的空格?

我正在设置 React 项目并使用 tslint、prettier 和 tslint-config-prettier 格式化我的代码。还可以使用 vscode 自动格式化。 如何删除 if/while/for 和括号之间的空格,如 'if()...


Apache proxy_fcgi - 错误和 PHP 致命错误

我收到此错误(我附加日志)并且我的域返回 HTTP 500 错误,除非我在 wp-config 文件中启用 WP-debug,否则我没有更改任何内容,即使我禁用它问题仍然存在,...


在 Shopware.6.1 中获取自定义插件配置详细信息

如何在6.1中获取自定义插件配置详细信息如果6.5我们可以使用config()函数,但在6.1中不支持如何在商店前台获取twig文件或js文件


Vite 应用程序在 DEV 中可以运行,但在 BUILD 和 PREVIEW 后不能运行 BigInt 不是一个函数

大家好,我已经被这个问题困扰了一段时间,我通过 vite config 和 tsconfig 更改尝试了许多建议的解决方案。但我在构建 m 时仍然遇到 BigInt 的问题...


有条件地启用 Maven 扩展?

我们想尝试 Maven 构建缓存扩展,您可以通过将以下内容放入 .mvn/extensions.xml 来启用它: org.apache.maven.extensions 我们想尝试 Maven 构建缓存扩展,您可以通过将以下内容放入 .mvn/extensions.xml 来启用它: <extension> <groupId>org.apache.maven.extensions</groupId> <artifactId>maven-build-cache-extension</artifactId> <version>1.1.0</version> </extension> 但是,在我们确信这不会带来问题之前,我们希望默认情况下禁用它,然后仅当您在命令行上设置标志时才启用它。 但是 extensions.xml 的文档 没有指定任何有条件地启用/禁用特定扩展的方法。 如何有条件地启用或禁用 Maven 扩展? 我发现一个blog提到了如何禁用maven缓存。请阅读它。它包含您正在寻找的所有信息。 您可以通过 xml 和命令行参数来完成。 命令行: mvn clean install -Dmaven.build.cache.enabled=false XML: <cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd"> <configuration> <enabled>false</enabled> </configuration> </cache>


在具有 Open Liberty Dev 模式的 Maven 项目中使用本地库

我有一个 Maven 项目,它构建了一个部署到 Open Liberty 的战争。我正在使用 Liberty maven 插件: io.openliberty.tools 我有一个 Maven 项目,它构建了一个部署到 Open Liberty 的战争。我正在使用 Liberty maven 插件: <plugin> <groupId>io.openliberty.tools</groupId> <artifactId>liberty-maven-plugin</artifactId> <version>3.9</version> <!-- Specify configuration, executions for liberty-maven-plugin --> </plugin> 我正在利用开发模式并且它运行良好。但是,我想在 Dev 模式下使用本地 jar 文件库。 我期望我能够将 jar 文件放置在项目中的特定位置,并且 Liberty 开发模式会自动拾取它们 - 类似于自动拾取 server.xml 的方式src/main/liberty/config。我的 server.xml 设置为在此处查找库:${shared.config.dir}/lib/global,因此我尝试将罐子放入 src/main/liberty/shared/config/lib/global 中,但这不起作用。 我看到的另一种选择是使用 Libity 插件的 copyDependencies 配置。 有一些推荐的方法可以实现我想做的事情吗?理想情况下,我想要最简单的解决方案,既适用于 liberty dev 模式,也适用于 vanilla maven 构建 (mvn package)。 这里的类似问题利用了 copyDependencies 配置,但具体来说,我正在寻找本地 jar 的最佳解决方案(是的,我可以使用系统范围的 Maven 坐标或在本地安装 jar) 如何在 Maven 构建期间将外部依赖项复制到 Open Liberty 谢谢 好问题,稍微概括一下问题,您可能可以使用三种方法: 1.使用资源插件 <build> <resources> <!-- Explicitly configure the default too --> <resource> <directory>${project.basedir}/src/main/resources</directory> </resource> <!-- Custom library --> <resource> <directory>${project.basedir}/mylib</directory> <targetPath>${project.build.directory}/liberty/wlp/usr/shared/lib/global</targetPath> <!-- Default, but just emphasizing the point --> <filtering>false</filtering> </resource> </resources> 由于开发模式在其“生命周期”中调用 resources:resources 目标,因此可以在没有任何插件配置的情况下进行配置(使用“/project/build/resources”(在 XPath 术语中)元素),并使用您的 <targetPath>可以复制到任何位置。 2.添加到config目录(src/main/liberty/config) 除了src/main/liberty/config/server.xml处的主服务器XML配置文件之外,您还可以将其他文件和目录放在那里,所有文件和目录都将通过开发模式复制过来。 所以你可以创建,例如src/main/liberty/config/mylib/my.jar,它会被复制到target/liberty/wlp/usr/servers/defaultServer/mylib/my.jar。然后,您可以从 server.xml 将此位置引用为相对于服务器配置目录的 "mylib/my.jar"。 (这不太适合要求复制到“.../shared/lib/global”的原始用例,但可能适合其他查看此问题的人)。 3.添加系统范围的依赖项 这在原来的问题中已经提到过。我不太喜欢这个解决方案。为了完整起见,我会提及它,但请您自行查找详细信息。 这可能会很有趣。


PHP 函数 ssh2_connect 不起作用

以下是我的脚本: 以下是我的脚本: <?php $connection = ssh2_connect('XX.XX.XX.XX', 22); ssh2_auth_password($connection, 'root', '******'); $stream = ssh2_exec($connection, 'useradd -d /home/users/test -m testftp'); $stream = ssh2_exec($connection, 'passwd testftp'); $stream = ssh2_exec($connection, 'password'); $stream = ssh2_exec($connection, 'password'); ?> 它显示以下错误: Fatal error: Call to undefined function ssh2_connect() in /home/chaosnz/public_html/fotosnap.net/test.php on line 2 我该如何处理这个问题? 谢谢 老实说,我建议使用 phpseclib,这是一个纯 PHP SSH2 实现。示例: <?php include('Net/SSH2.php'); $ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); } echo $ssh->exec('pwd'); echo $ssh->exec('ls -la'); ?> 它更加便携、更易于使用并且功能也更加丰富。 我已经安装了 SSH2 PECL 扩展,它工作正常,感谢大家的帮助... 我已经在 ubuntu 16.4 PHP 7.0.27-0+deb9u 和 nginx 上解决了这个问题 sudo apt install php-ssh2 您需要安装ssh2 lib sudo apt-get install libssh2-php && sudo /etc/init.d/apache2 restart 这应该足以让你上路 如果您在 OSX 上运行 bomebrew,我使用以下命令来安装它: brew install php56-ssh2 这对我有用。我从这里拉它。应该还有使用 mac 端口的 Ubuntu 和 OSX。 我正在运行 CentOS 5.6 作为我的开发环境,以下内容对我有用。 su - pecl install ssh2 echo "extension=ssh2.so" > /etc/php.d/ssh2.ini /etc/init.d/httpd restart 为了扩展 @neubert 答案,如果您使用 Laravel 5 或类似版本,您可以使用更简单的 phpseclib,如下所示: 奔跑composer require phpseclib/phpseclib ~2.0 在您的控制器中添加 use phpseclib\Net\SSH2; 然后在控制器方法中使用它,例如: $host = config('ssh.host'); $username = config('ssh.username'); $password = config('ssh.password'); $command = 'php version'; $ssh = new SSH2($host); if (!$ssh->login($username, $password)) { $output ='Login Failed'; } else{ $output = $ssh->exec($command); } 今天pecl install ssh2需要旧版本的php(<=6.0). Here https://pecl.php.net/package/ssh2您可以看到支持php7和php8的最新beta版本的ssh2。所以您应该安装其中之一: pecl install ssh2-1.3.1 * 不要忘记在 php.ini 文件中启用此 ssh2.so 扩展。 我知道有答案,但我只是在这里简化答案。 我有同样的问题,我在 ubuntu 20 中使用以下解决方案修复了它: sudo apt-get install libssh2-1 php7.1-ssh2 -y 您可以根据需要更改 php 版本,例如:php7.4-ssh2 参考:https://blog.programster.org/ubuntu-16-04-install-php-ssh2-extension 适用于 WHM 面板 菜单 > 服务器配置 > 终端: yum install libssh2-devel -y 菜单 > 软件 > 模块安装程序 PHP PECL 管理点击 ssh2 立即安装点击 菜单 > 重新启动服务 > HTTP 服务器 (Apache) 您确定要重新启动此服务吗? 是的 ssh2_connect() 工作了! 我觉得这个已有 11 年历史的讨论值得更新。我从 PHPSecLib 库切换到 PHP 7 和 8 的内置 SSH2 库,因为它似乎连接速度更快并且更标准。现在它还可以使用密钥密码,因此无需再使用第 3 方库。


具有 TimestampableEntity 特征的实体在 PUT 操作中失败

我正在全新安装 API Platform (v3.2.7),并且使用 Gedmo\Timestampable\Traits\TimestampableEntity 这是我的实体(问候语示例) 我正在全新安装 API Platform (v3.2.7),并且正在使用 Gedmo\Timestampable\Traits\TimestampableEntity 这是我的实体(问候语示例) <?php namespace App\Entity; use ApiPlatform\Metadata\ApiResource; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Gedmo\Timestampable\Traits\TimestampableEntity; #[ApiResource] #[ORM\Entity] class Greeting { use TimestampableEntity; #[ORM\Id] #[ORM\Column(type: "integer")] #[ORM\GeneratedValue] private ?int $id = null; #[ORM\Column] #[Assert\NotBlank] public string $name = ""; public function getId(): ?int { return $this->id; } } 和我的 config/services.yaml gedmo.listener.timestampable: class: Gedmo\Timestampable\TimestampableListener tags: - { name: doctrine.event_listener, event: 'prePersist' } - { name: doctrine.event_listener, event: 'onFlush' } - { name: doctrine.event_listener, event: 'loadClassMetadata' } 它在 POST 操作上工作正常,但在执行 PUT 时失败。我收到此错误 执行查询时发生异常:SQLSTATE[23000]: 完整性约束违规:1048 列“created_at”不能 空 我使用的版本是:symfony 6.4.1,doctrine 2.12,gedmo 3.14 我最终做的是使用 PATCH 而不是 PUT。所以我可以编辑部分实体,并且特征仍然更新 updated_at 字段


嵌套 useFetch 导致 Nuxt 3 中的 Hydration 节点不匹配

在 Nuxt 3 页面内,我通过从 pinia 存储调用操作来获取帖子数据: {{ 发布数据 }} {{ 帖子内容... 在 Nuxt 3 页面内,我通过从 pinia 商店调用操作来获取帖子数据: <template> <div v-if="postData && postContent"> {{ postData }} {{ postContent }} </div> </template> <script setup> const config = useRuntimeConfig() const route = useRoute() const slug = route.params.slug const url = config.public.wpApiUrl const contentStore = useContentStore() await contentStore.fetchPostData({ url, slug }) const postData = contentStore.postData const postContent = contentStore.postContent </script> 那是我的商店: import { defineStore } from 'pinia' export const useContentStore = defineStore('content',{ state: () => ({ postData: null, postContent: null }), actions: { async fetchPostData({ url, slug }) { try { const { data: postData, error } = await useFetch(`${url}/wp/v2/posts`, { query: { slug: slug }, transform(data) { return data.map((post) => ({ id: post.id, title: post.title.rendered, content: post.content.rendered, excerpt: post.excerpt.rendered, date: post.date, slug: post.slug, })); } }) this.postData = postData.value; if (postData && postData.value && postData.value.length && postData.value[0].id) { const {data: postContent} = await useFetch(`${url}/rl/v1/get?id=${postData.value[0].id}`, { method: 'POST', }); this.postContent = postContent.value; } } catch (error) { console.error('Error fetching post data:', error) } } } }); 浏览器中的输出正常,但我在浏览器控制台中收到以下错误: entry.js:54 [Vue warn]: Hydration node mismatch: - rendered on server: <!----> - expected on client: div at <[slug] onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > at <Anonymous key="/news/hello-world()" vnode= {__v_isVNode: true, __v_skip: true, type: {…}, props: {…}, key: null, …} route= {fullPath: '/news/hello-world', hash: '', query: {…}, name: 'news-slug', path: '/news/hello-world', …} ... > at <RouterView name=undefined route=undefined > at <NuxtPage> at <Default ref=Ref< undefined > > at <LayoutLoader key="default" layoutProps= {ref: RefImpl} name="default" > at <NuxtLayoutProvider layoutProps= {ref: RefImpl} key="default" name="default" ... > at <NuxtLayout> at <App key=3 > at <NuxtRoot> 如何解决这个问题? 我尝试在 onMounted 中获取帖子数据,但在这种情况下 postData 和 postContent 保持为空 onMounted(async () => { await contentStore.fetchPostData({ url, slug }) }) 您可以使用 ClientOnly 组件来消除该警告。请参阅文档了解更多信息。 该组件仅在客户端渲染其插槽。


Laravel POST 方法返回状态:405 不允许在 POST 方法上使用方法

请查找以下信息: NoteController.php 请查找以下信息: NoteController.php <?php namespace App\Http\Controllers; use App\Http\Requests\NoteRequest; use App\Models\Note; use Illuminate\Http\JsonResponse; class NoteController extends Controller { public function index():JsonResponse { $notes = Note::all(); return response()->json($notes, 200); } public function store(NoteRequest $request):JsonResponse { $note = Note::create( $request->all() ); return response()->json([ 'success' => true, 'data' => $note ], 201); } public function show($id):JsonResponse { $note = Note::find($id); return response()->json($note, 200); } public function update(NoteRequest $request, $id):JsonResponse { $note = Note::find($id); $note->update($request->all()); return response()->json([ 'success' => true, 'data' => $note, ], 200); } public function destroy($id):JsonResponse { Note::find($id)->delete(); return response()->json([ 'success' => true ], 200); } } NoteRequest.php <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class NoteRequest extends FormRequest { public function authorize() { return true; } public function rules() { return [ 'title', 'required|max:255|min:3', 'content', 'nullable|max:255|min:10', ]; } } Note.php(模型) <?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Note extends Model { use HasFactory; protected $guarded = []; } api.php <?php use App\Http\Controllers\NoteController; use Illuminate\Support\Facades\Route; Route::prefix('v1')->group(function () { Route::resource('/note', NoteController::class); }); php artisan 路线:列表 GET|HEAD / ...................................................................................................................... POST _ignition/execute-solution ............... ignition.executeSolution › Spatie\LaravelIgnition › ExecuteSolutionController GET|HEAD _ignition/health-check ........................... ignition.healthCheck › Spatie\LaravelIgnition › HealthCheckController POST _ignition/update-config ........................ ignition.updateConfig › Spatie\LaravelIgnition › UpdateConfigController GET|HEAD api/v1/note .......................................................................... note.index › NoteController@index POST api/v1/note .......................................................................... note.store › NoteController@store GET|HEAD api/v1/note/create ................................................................. note.create › NoteController@create GET|HEAD api/v1/note/{note} ..................................................................... note.show › NoteController@show PUT|PATCH api/v1/note/{note} ................................................................. note.update › NoteController@update DELETE api/v1/note/{note} ............................................................... note.destroy › NoteController@destroy GET|HEAD api/v1/note/{note}/edit ................................................................ note.edit › NoteController@edit GET|HEAD sanctum/csrf-cookie .................................. sanctum.csrf-cookie › Laravel\Sanctum › CsrfCookieController@show 迅雷请求(同邮递员) JSON 请求 { "title": "Hello World", "content": "Lorem ipsum." } 尝试发出 JSON POST 请求并获取状态:405 方法不允许并且我正在使用 php artisan 服务,如果需要,我可以提供 GIT 项目。请告诉我。 您的验证规则看起来不正确。在您的 NoteRequest 类中,规则应该是一个关联数组,其中键是字段名称,值是验证规则。但是,在您的代码中,规则被定义为以逗号分隔的字符串列表。这可能会导致验证失败并返回 405 Method Not allowed 错误。 public function rules() { return [ 'title' => 'required|max:255|min:3', 'content' => 'nullable|max:255|min:10', ]; }


如何使用 Tailwind CSS 实用程序类使部分粘性

在我的 Next.js Web 应用程序中,我有一个页面,如下所示: 我想让该部分(用 标签包裹)以蓝色粘性突出显示,这样当我滚动时,它会保持在原来的位置,并且只有 m... 在我的 Next.js Web 应用程序中,我有一个页面,如下所示: 我想使该部分(包含在 <aside> 标签中)以蓝色粘性突出显示,这样当我滚动时,它会保持在原来的位置,并且只有主要部分(包含图表的部分)会滚动。 这是 layout.tsx 文件: import { dashboardConfig } from "@/config/dashboard"; import { MainNav } from "@/components/nav/main-nav"; import { DashboardNav } from "@/components/nav/dashboard-nav"; interface DashboardLayoutProps { children?: React.ReactNode; } export default async function DashboardLayout({ children, }: DashboardLayoutProps) { return ( <div className="flex min-h-dvh flex-col relative"> <header className="container z-40 bg-background"> <MainNav /> </header> <div className="container grid flex-1 gap-12 md:grid-cols-[200px_1fr] mt-32 mb-12 relative"> <aside className="hidden w-[200px] flex-col md:flex sticky top-0"> <DashboardNav items={dashboardConfig.sidebarNav} /> </aside> <main className="flex w-full flex-1 flex-col overflow-hidden"> {children} </main> </div> </div> ); } 请注意,我已将类 sticky 和 top-0 应用于我想要粘贴位置的部分。但它不起作用。 我做错了什么? 考虑通过 align-self: start 将 self-start 应用到粘性元素。默认情况下,它将具有 align-self: stretch,这将使其成为其父网格元素的完整高度,因此不会观察到粘性效果。通过应用 align-self: start,它的高度将仅与其内容一样高,如果存在垂直自由空间,则可以观察到粘性效果。 const dashboardConfig = { sidebarNav: '' }; const MainNav = () => 'MainNav'; const DashboardNav = () => 'DashboardNav'; function DashboardLayout({ children, }) { return ( <div className="flex min-h-dvh flex-col relative"> <header className="container z-40 bg-background"> <MainNav /> </header> <div className="container grid flex-1 gap-12 md:grid-cols-[200px_1fr] mt-32 mb-12 relative"> <aside className="hidden w-[200px] flex-col md:flex sticky top-0 self-start"> <DashboardNav items={dashboardConfig.sidebarNav} /> </aside> <main className="flex w-full flex-1 flex-col overflow-hidden"> {children} </main> </div> </div> ); } function App() { return ( <DashboardLayout> <div class="h-[200vh]"></div> </DashboardLayout> ); } ReactDOM.createRoot(document.getElementById('app')).render(<App/>); <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js" integrity="sha512-8Q6Y9XnTbOE+JNvjBQwJ2H8S+UV4uA6hiRykhdtIyDYZ2TprdNmWOUaKdGzOhyr4dCyk287OejbPvwl7lrfqrQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js" integrity="sha512-MOCpqoRoisCTwJ8vQQiciZv0qcpROCidek3GTFS6KTk2+y7munJIlKCVkFCYY+p3ErYFXCjmFjnfTTRSC1OHWQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdn.tailwindcss.com/3.4.1"></script> <div id="app"></div>


conda错误ssl证书:HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443

无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all 解决环境:失败 CondaHTTPError:URL 的 HTTP 000 连接失败 无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/win-64/repodata.json.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) 我已经搜索了所有互联网,重新安装了 anaconda 并做了建议中的任何操作,但这个问题仍然存在。 Windows 10 C:\Users\MyPc>anaconda --version anaconda 命令行客户端(版本 1.7.2) C:\Users\MyPc>conda --version 康达 4.5.12 就我而言,当我尝试运行此命令时,我收到了此类错误消息 conda install tensorflow 这是错误消息 CondaSSLError:OpenSSL 似乎在此计算机上不可用。下载并安装软件包需要 OpenSSL。 异常:HTTPSConnectionPool(主机='repo.anaconda.com',端口=443):超过最大重试次数,网址:/pkgs/main/win-64/current_repodata.json(由SSLError(“无法连接到HTTPS URL”)引起因为 SSL 模块不可用。")) 这就是解决方案 步骤01 进入你的anaconda3的安装路径 步骤02 现在转到此文件路径 anaconda3\Library\bin 步骤03 现在选择这个 DLL 文件并复制它 libcrypto-1_1-x64.dll libssl-1_1-x64.dll 步骤04 之后转到此文件路径并将其粘贴到该文件夹内部 anaconda3\DLLs 这个命令对我有用: conda config --set ssl_verify false 我也遇到了同样的问题,解决这个问题的方法是安装早期的 32 位版本的 Conda。由于某种原因,较新的 64 位版本似乎容易出现此错误。您可以在这里找到 Conda 的早期版本: https://repo.continuum.io/archive/ 您应该搜索仅具有 x86 而不是 x86_64 的 Anaconda3 版本。 我也遇到了同样的问题,简单的解决方案是: 从开始菜单打开anaconda navigator,然后运行CMD.exe提示符,然后从那里安装,就是这样。 在 C:\Users\xyz 目录中创建一个名为 .condarc 的文件,其中包含以下内容 频道: 默认值 ssl_verify:假 然后尝试创建虚拟环境: conda create -n envname python=x.x anaconda 祝你好运!


© www.soinside.com 2019 - 2024. All rights reserved.