使用gitk log
,我无法发现两者之间的差异.如何观察差异(使用git命令或某些工具)?
为什么使用之间的输出存在差异
find . -exec ls '{}' \+
Run Code Online (Sandbox Code Playgroud)
和
find . -exec ls '{}' \;
Run Code Online (Sandbox Code Playgroud)
我有:
$ find . -exec ls \{\} \+
./file1 ./file2
.:
file1 file2 testdir1
./testdir1:
testdir2
./testdir1/testdir2:
$ find . -exec ls \{\} \;
file1 file2 testdir1
testdir2
./file2
./file1
Run Code Online (Sandbox Code Playgroud) 这不会产生任何输出.怎么会?
$ echo 'this 1 2 3' | grep '\d\+'
Run Code Online (Sandbox Code Playgroud)
但这些做到:
$ echo 'this 1 2 3' | grep '\s\+'
this 1 2 3
$ echo 'this 1 2 3' | grep '\w\+'
this 1 2 3
Run Code Online (Sandbox Code Playgroud) 我有
var="a b c"
for i in $var
do
p=`echo -e $p'\n'$i`
done
echo $p
Run Code Online (Sandbox Code Playgroud)
我想要打印最后一个回声
a
b
c
Run Code Online (Sandbox Code Playgroud)
请注意,我希望变量p包含换行符.我怎么做?
我正在尝试为我的包编写setup.py.我的包需要指定对另一个git仓库的依赖.
这是我到目前为止:
from setuptools import setup, find_packages
setup(
name='abc',
packages=find_packages(),
url='https://github.abc.com/abc/myabc',
description='This is a description for abc',
long_description=open('README.md').read(),
install_requires=[
"requests==2.7.0",
"SomePrivateLib>=0.1.0",
],
dependency_links = [
"git+git://github.abc.com/abc/SomePrivateLib.git#egg=SomePrivateLib",
],
include_package_data=True,
)
Run Code Online (Sandbox Code Playgroud)
当我跑:
pip install -e https://github.abc.com/abc/myabc.git#egg=analyse
Run Code Online (Sandbox Code Playgroud)
我明白了
找不到满足要求的版本SomePrivateLib> = 0.1.0(来自analyze)(来自版本:)未找到SomePrivateLib的匹配分布> = 0.1.0(来自analyze)
我究竟做错了什么 ?
有没有办法在bash中重复打印相同的字符,就像你可以使用这个结构在python中这样做:
print('%' * 3)
Run Code Online (Sandbox Code Playgroud)
给
%%%
Run Code Online (Sandbox Code Playgroud) 资源:
public class TestVarArgs {
public void varArgsMethod(Object ... arr) {
System.out.println(arr.getClass().getName());
for(Object o : arr) {
System.out.println(o);
}
}
public static void main(String[] args) {
TestVarArgs tva = new TestVarArgs();
tva.varArgsMethod(args);
}
}
Run Code Online (Sandbox Code Playgroud)
编译:
javac TestVarArgs.java
Run Code Online (Sandbox Code Playgroud)
错误:
TestVarArgs.java:15: warning: non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
tva.varArgsMethod(args);
^
1 warning
Run Code Online (Sandbox Code Playgroud)
我正在使用javac 1.6.0_20
,代码o/p表示无论如何都进行了非var arg调用.
任何人都可以告诉我Unicode可打印字符的范围是什么?[例如Ascii可打印字符范围是\ u0020 - \u007f]