我的一个朋友把这个代码发给了我,说它没有按预期工作:
#include<stdio.h>
void main()
{
int a [10] ={23, 100, 20, 30, 25, 45, 40, 55, 43, 42};
int sizeOfInput = sizeof(a)/sizeof(int);
int b, outer, inner, c;
printf("Size is : %d \n", sizeOfInput);
printf("Values before bubble sort are : \n");
for ( b = 0; b < sizeOfInput; b++)
printf("%d\n", a[b]);
printf("End of values before bubble sort... \n");
for ( outer = sizeOfInput; outer > 0; outer-- )
{
for ( inner = 0 ; inner < outer ; inner++) …
Run Code Online (Sandbox Code Playgroud) 从运行命令的输出的片段mvn archetype:generate > a.txt
:
332: remote -> org.apache.maven.archetypes:maven-archetype-mojo (An archetype which contains a sample a sample Maven plugin.)
333: remote -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
Run Code Online (Sandbox Code Playgroud)
运行以下命令生成了几乎相同的pom文件和Java源类:
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app-plugin -DarchetypeArtifactId=maven-archetype-plugin -DinteractiveMode=false
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app-mojo -DarchetypeArtifactId=maven-archetype-mojo -DinteractiveMode=false
Run Code Online (Sandbox Code Playgroud)
那么maven-archetype-mojo
和之间的区别是什么maven-archetype-plugin
?这些中的任何一个都会生成一个示例插件项目吗?为什么我们两个都有?
我想最好用一个例子来解释一下,所以这里是:
My useful line.
Some useless line.
Some other useless line.
Another useful line - oh I want this!
This is useful, I want this too!
Run Code Online (Sandbox Code Playgroud)
在这个例子中,我正在搜索字符串"有用".所以,我想将第1,4和5行复制到剪贴板.我怎么能用vim做到这一点?
什么是" lint
"的标志-Xlint=unchecked
的javac
立场?既然它处理泛型类型,人们会期待类似的东西-Xgenerics=unchecked
!