为什么
class Foo<T> {
}
class Bar<T> {
List<Foo<?>> getFoos() {
return null;
}
}
class Baz {
void baz(Bar bar) {
for (Foo foo : bar.getFoos());
// ^
//error: incompatible types: Object cannot be converted to Foo
}
}
Run Code Online (Sandbox Code Playgroud)
给出编译器错误
class Foo<T> {
}
// changed Bar<T> to Bar
class Bar {
List<Foo<?>> getFoos() {
return null;
}
}
class Baz {
void baz(Bar bar) {
for (Foo foo : bar.getFoos());
}
}
Run Code Online (Sandbox Code Playgroud)
和
class Foo<T> {
}
class …Run Code Online (Sandbox Code Playgroud) 有没有用星号不能替代的用法?
Two consecutive asterisks ("**") in patterns matched against full
pathname may have special meaning:
A leading "**" followed by a slash means match in all directories.
For example, "**/foo" matches file or directory "foo" anywhere,
the same as pattern "foo". "**/foo/bar" matches file or directory
"bar" anywhere that is directly under directory "foo".
A trailing "/**" matches everything inside. For example, "abc/**"
matches all files inside directory "abc", relative to the location
of the .gitignore file, with infinite depth. …Run Code Online (Sandbox Code Playgroud) 创建简单的 javafx 11“hello world”应用程序。\n创建自定义 JRE 时出现错误。
\nuser@user:~/Desktop/javafx/hellofx$ ./run.sh \nError: Hash of java.xml (c043b4c28b897656e2a4d36c92ba2f5d52134bce79643236dd36295e14178be7) differs to expected hash (4e7db7fc941d9f316c4aafe02717b5809ee722be8433d283050365e7fd49331f) recorded in java.base\nRun Code Online (Sandbox Code Playgroud)\n错误代码:
\n$JAVA_HOME/bin/jlink --module-path $PATH_TO_FX_MODS:mods --add-modules hellofx --output hellofx #error\nRun Code Online (Sandbox Code Playgroud)\n操作系统:ubuntu 19.10
\n$java --version\nopenjdk 11.0.6 2020-01-14\nOpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1)\nOpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu119.10.1, mixed mode, sharing)\nRun Code Online (Sandbox Code Playgroud)\n$javac --version\njavac 11.0.6\nRun Code Online (Sandbox Code Playgroud)\nuser@user:~/Desktop/javafx/hellofx$ tree\n.\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 mods\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 hellofx\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hellofx\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 HelloFX.class\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 module-info.class\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 run.sh\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 src\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hellofx\n \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 HelloFX.java\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 module-info.java\n\n5 directories, …Run Code Online (Sandbox Code Playgroud) 我从gradle脚本中调用ant.signjar.如何捕获其输出?我既没有轻易地管理它以将输出从INFO提升到另一个级别,也没有拦截或包装输出到错误警告到WARN级别.现在,signjar回应证书即将到期,但这并没有在WARN级别上显示,这不是很好.
我正在使用svn2git(好的)将一些SVN存储库转换为Git存储库.
它有一个命令行参数--svn-branches,记录在其中
创建分支时使用SVN的内容,注意:SVN标签也是分支
哪些优点和缺点这个命令行参数.
是不是没有它更快,因为只创建了一个Git标签,而不是整个工作树被转储,并且使用它更安全,因为整个工作树被转储或者还有更多的东西?
您会建议使用或省略此参数吗?
我们的项目中有几个文件夹叫做dist.这些将被git忽略.另一方面手只是把dist/到.gitignore文件不使用时,鲍尔有副作用,因为内的DIST文件夹bower_components/都将被忽略为好.
有关如何正确定义规则的任何建议,忽略dist除了内部文件夹之外的文件夹bower_components?
我有一个远程origin/master和远程分支remote_branch.我也有本地master和当地的分支机构local_branch.当我试图把当地人拉master进去的时候local_branch,git pull master local_branch我得到了这个.
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
但是,当我这样做时,git branch我看到了这个:
* loca_branch
master
Run Code Online (Sandbox Code Playgroud)
为什么我不能从当地拉master?
我是Intellij的新手.我需要基于特定的git分支创建一个新项目.我从Version Control-> Git中选择了File-> new-> Project但是只有3个字段导致克隆master分支:
但是没有选择提交特定分支.
无论如何使用Intellij中的Git克隆特定分支?
将 .gradle 文件夹包含到我的 gitignore 中是否安全?如果是这样,为什么它不包含在flutter create myapp
命令生成的默认 gitignore 文件中?
/.gitignore:
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web …Run Code Online (Sandbox Code Playgroud) 我有一个库模块。它正在使用来自的库
allprojects {
repositories {
maven {
url = uri("https://jitpack.io/")
}
}
}
Run Code Online (Sandbox Code Playgroud)
仅当我在项目级别 build.gradle 中添加 jitpack 依赖项时,同步才会成功。现在,我不想强迫我的库用户在其项目级别 build.gradle 中添加 jitpack 依赖项。所以,我试图在库模块本身中添加存储库。
我在我的库中尝试了以下代码。
plugins {
id("com.android.library")
}
repositories {
google()
maven {
url = uri("https://jitpack.io/")
}
}
android {
// ...
}
dependencies {
// from jitpack
implementation("https://github.com/a914-gowtham/compose-ratingbar")
// ...
}
Run Code Online (Sandbox Code Playgroud)