我有这个依赖项列表:
absl-py==0.7.0
bleach==1.5.0
click==6.7
cycler==0.10.0
decorator==4.2.1
futures==3.1.1
h5py==2.7.1
html5lib==0.9999999
imageio==2.2.0
Keras==2.1.5
Markdown==2.6.11
matplotlib==3.1.1
networkx==2.1
numpy==1.16.0
Pillow==5.0.0
pip-autoremove==0.9.0
protobuf==3.7
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2017.3
PyWavelets==0.5.2
PyYAML==3.12
scikit-image==0.13.1
scipy==1.1.0
six==1.12.0
tensorflow-gpu
tensorflow-tensorboard==1.5.1
tqdm==4.19.5
Werkzeug==0.15
Run Code Online (Sandbox Code Playgroud)
我有这些错误:
错误:tensorflow 1.15.0 要求tensorboard<1.16.0,>=1.15.0,但您将拥有不兼容的tensorboard 2.0.0。
错误:tensorflow 1.15.0 要求tensorflow-estimator==1.15.1,但您将拥有不兼容的tensorflow-estimator 2.0.1。
错误:datascience 0.10.6 要求 folium==0.2.1,但您将拥有不兼容的 folium 0.8.3。
错误:albumentations 0.1.12 要求 imgaug<0.2.7,>=0.2.5,但您将拥有不兼容的 imgaug 0.2.9。
解决办法是什么?我应该使用外部工具来解决这个依赖问题吗?
有人可以解释一下这个依赖项在依赖项管理下的作用以及添加它后为什么我们不需要提及依赖项的版本吗?
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud) dependencies dependency-management pom.xml maven spring-boot
如何解决“找不到依赖项 org.springframework.boot:spring-boot-starter-validation:2.5.1” 的问题?
我的 pom.xml 文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>JavaDeveloperTask</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${project.parent.version}</version>
</plugin>
</plugins>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
我已经添加了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
Run Code Online (Sandbox Code Playgroud)
但它仍然给我错误。造成这种情况的原因是什么?
如果我使用任何内置函数或全局变量而不显式导入它,我希望我的打字稿编译器或 eslinter 会引发错误。这可以做到吗?如果可以,怎么做?
例如
//missing: import { console, process, Array } from "?"
export function print(): number[] {
console.log("Hello") //this console usage should raise an error
process.stdout.write("World!") //this process usage too
return new Array<number>() //ideally this Array constructor too
}
Run Code Online (Sandbox Code Playgroud) 首先,我想将我的所有文件推送到heroku以用于托管目的,在这里我无法在heroku上安装multer和multer-gridfs-storage的依赖项,所以这就是为什么我无法在heroku上托管我的网站
remote: -----> Installing dependencies
remote: Installing node modules
remote: npm ERR! code ERESOLVE
remote: npm ERR! ERESOLVE could not resolve
remote: npm ERR!
remote: npm ERR! While resolving: multer-gridfs-storage@5.0.2
remote: npm ERR! Found: multer@1.4.5-lts.1
remote: npm ERR! node_modules/multer
remote: npm ERR! multer@"^1.4.5-lts.1" from the root project
remote: npm ERR!
remote: npm ERR! Could not resolve dependency:
remote: npm ERR! peer multer@"^1.4.2" from multer-gridfs-storage@5.0.2
remote: npm ERR! node_modules/multer-gridfs-storage
remote: npm ERR! multer-gridfs-storage@"^5.0.2" from the root project
remote: npm ERR!
remote: …
Run Code Online (Sandbox Code Playgroud) 我正在开发一个依赖于许多第 3 方板条箱的项目。\n正如经常发生的那样,第 3 方板条箱依赖于其他板条箱。
\n我经常发现自己处于这样的情况:两个或多个板条箱需要同一个板条箱的不同版本。因此,cargo 无法选择版本。\n通常,有问题的 crate 是我没有明确添加的 crate。
\n同时,唯一的解决方案是检查第三方并更新那里的版本,但这通常需要更新整个第三方链。这需要时间而且不好玩。当我尝试将更改发布到上游时,需要很长时间才能合并它们。
\nRust 有没有更好的方法来处理这种情况?
\nPS 我有 C++ 背景,其中依赖管理更糟糕。所以,我对现代生态系统没有太多经验,可能会错过一些东西。
\n为了提供更多上下文,我添加了部分(完整版本很长)cargo tree
输出。
这是我添加新依赖项之前的树:
\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 near-chain-configs v0.0.0 (https://github.com/f-squirrel/nearcore.git?rev=76424c004de84f6b5823751f132f62a0da9aa656#0a8e7ac7)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 anyhow v1.0.75 (*)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 chrono v0.4.26 (*)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 derive_more v0.99.17 (proc-macro) (*)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 near-config-utils v0.0.0 (https://github.com/f-squirrel/nearcore.git?rev=76424c004de84f6b5823751f132f62a0da9aa656#0a8e7ac7)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 anyhow v1.0.75 (*)\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 json_comments v0.2.1\n \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 thiserror v1.0.47 (*)\n \xe2\x94\x82 …
Run Code Online (Sandbox Code Playgroud) 有一个带有clone()函数的Object类可以抛出CloneNotSupportedException*并且声明为此类.CloneNotSupportedException派生自Exception,它派生自Object.
继承需要完整的类型,我们有两个,所以显然我们不能打破那里的循环依赖.成员指针和指针参数是不完整类型的内容,但这对于throw声明来说似乎是不够的,即使我们抛出指针也是如此.
类定义与实现分开,使用前向声明,指向各处.这还不够.
有没有办法打破这种依赖,或者这在C++中是不可能的?
#import
我的标题和实现在哪里?
我应该做什么规则?
有没有办法在单个头文件中导入所有内容?
我在父母POM中宣布
<dependencyManagement>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
<scope>compile</scope>
</dependency>
</dependencyManagement>
Run Code Online (Sandbox Code Playgroud)
此外,孩子使用pom
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
一切正常吗?但是当我使用type = pom的这种依赖时
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>${jboss-javaee-7.0.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencyManagement>
Run Code Online (Sandbox Code Playgroud)
我有错误
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project by.services:by.utils:1.0.2 (D:\Work\V2_Change_Maven_Structure\by.utils\pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for org.jboss.spec:jboss-javaee-7.0:jar is missing. @ line 18, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run …
Run Code Online (Sandbox Code Playgroud) 使用composer安装laravel时出现以下错误。请帮我安装 laravel 自动安装缺少的依赖项。
symfony/var-dumper 建议安装 ext-intl(在时区转储中显示区域名称) symfony/var-dumper 建议安装 ext-symfony_debug () symfony/routing 建议安装学说/注释(用于使用注释加载器) symfony/routing建议安装 symfony/config(用于使用一体式路由器或任何加载程序) symfony/routing 建议安装 symfony/dependency-injection(用于从服务加载路由) symfony/routing 建议安装 symfony/expression-language(用于使用表达式匹配)symfony/routing 建议安装 symfony/yaml(用于使用 YAML 加载程序) paragonie/random_compat 建议安装 ext-libsodium(提供可用于生成随机字节的现代加密 API。) symfony/event-dispatcher 建议安装 symfony/dependency-injection () symfony/http-kernel 建议安装 symfony/browser-kit () symfony/http-kernel 建议安装 symfony/config () symfony/http-kernel 建议安装 symfony/ dependency-injection() symfony/console 建议安装 symfony/lock() symfony/polyfill-intl-idn 建议安装 ext-intl(为了最佳性能) egulias/email-validator 建议安装 ext-intl(需要使用 PHP 国际化库) SpoofChecking 验证)swiftmailer/swiftmailer 建议安装 ext-intl(需要支持国际化的电子邮件地址) swiftmailer/swiftmailer 建议安装 true/punycode(需要支持国际化的电子邮件地址,如果未安装 ext-intl) ramsey/uuid 建议安装 ircmaxell/random-lib(提供 RandomLib 以与 RandomLibAdapter 一起使用) ramsey/uuid 建议安装 ext-libsodium(提供 PECL libsodium 扩展以与钠随机生成器一起使用) ramsey/uuid建议安装 ext-uuid(提供与 PeclUuidTimeGenerator 和 …
我有一个简单的PHP MVC框架,它以这种方式工作:
StaticFramework (1)
|
V
DIC (2)
|
V
HTTPRequest
|
V
App <-> Router
|
V
Controller <-> Model
|
V
View
|
V
HTTPResponse
Run Code Online (Sandbox Code Playgroud)
(1) StaticFramework
是一个静态的"前端控制器",它给出了App
它的默认依赖性(2) DIC
(依赖注入容器),它的工作方式与Pimple类似.可以访问容器以更改这些默认依赖项.例如,Router
类被注入App
了DIC
.
我有一个问题,因为它是一个MVC应用程序,我有3个重要的层:
注入View
很容易,因为它只是一个有一个render
呈现PHP或HTML文件的方法的类,所以我只需要View
在我的注入一个实例Controller
.
但注入Model
的Controller
似乎更难.每个Model
都是一个单独的类,所以我不能像我那样注入它View
.每个人Model
也可能需要其他依赖,例如a Database
或XML
类.
此外,我无法预测Controller
将需要哪些型号,因为它可能需要其中的几种,例如,ArticleController
需要ArticleModel
和UsersModel
. …
php model-view-controller dependencies dependency-injection inversion-of-control
dependencies ×12
maven ×3
android ×1
build-time ×1
built-in ×1
c++ ×1
class ×1
composer-php ×1
eslint ×1
header ×1
header-files ×1
heroku ×1
inheritance ×1
java ×1
laravel ×1
multer ×1
node.js ×1
objective-c ×1
php ×1
pom.xml ×1
python ×1
rust ×1
rust-cargo ×1
rust-crates ×1
spring ×1
spring-boot ×1
tensorflow ×1
typescript ×1
xcode ×1