network-printers 相关问题


如何使用 virt-install 在 aarch64 虚拟机上配置显示

我正在运行这个命令: virt-install --virt-type kvm --name oracle --ram 4096 --location=/ssd/OracleLinux-R9-U3-aarch64-dvd.iso --磁盘路径=/ssd/OracleLinux-R9-U3-aarch64 -cloud.qcow2 --network=de...


Hyperledger Fabric 测试网络:$ sudo ./network.sh up(不起作用)

我是超级账本结构的新手,在设置测试网络时遇到错误。 我从 docker-compose github 存储库下载了 Fabric-samples。 然后将目录更改为 test-network。 不...


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 祝你好运!


将 props 传递给 nextjs 中的页面组件

我正在使用 nextjs 的 withlayout 函数为某些页面添加侧边栏。 导出类型 PageWithLayout = NextPage & { withLayout?:(页面:ReactElement)=> 我正在使用 nextjs 的 withlayout 函数为某些页面添加侧边栏。 export type PageWithLayout<P = {}, IP = P> = NextPage<P, IP> & { withLayout?: (page: ReactElement) => ReactNode; }; 这是我的使用方法: export const Interactions: PageWithLayout = () => { const [ getInteractions, { data: interactionData, fetchMore, variables, loading: isInteractionsLoading, error: isInteractionsError, }, ] = useGetInteractionsLazyQuery({ notifyOnNetworkStatusChange: true, fetchPolicy: "network-only", ssr: false, }); return ( <> <Box height={"100vh"}> </Box> </> ); }; Interactions.withLayout = (page: ReactElement) => { // how do I pass isInteractionsLoading as a prop to this component return <Layout>{page}</Layout>; }; export default Interactions; 我想要实现的是将 isInteractionsLoaded 和 isInteractionsError 作为属性传递给我的布局组件,以便我可以渲染这些状态。有没有一种方法可以实现此目的,而无需将布局组件移动到页面组件内? 创建一个包装组件的 React Context 提供程序可能是您使用的解决方案,如果您不想使用任何其他包或不想使用 redux 等更强大的工具,则可以使用。 但是在这里使用有点尴尬,具体取决于包含交互的组件树是什么样子。否则可以根据您的需要使用 _app 入口点。 示例上下文和用法 import React from 'react'; export const InteractionContext = React.createContext({ isInteractionsLoading: false, isInteractionsError: null, }); // parent component or _app if necessary const ProviderComponent = () => { return ( <InteractionContext.Provider value={{ isInteractionsLoading, isInteractionsError }}> <Interactions /> </InteractionContext.Provider> ); }; const Layout = ({ children }) => { const { isInteractionsLoading, isInteractionsError } = useContext(InteractionContext); // Now you can use isInteractionsLoading and isInteractionsError here // ... return <div>{children}</div>; };


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