基本上我的问题是我不能让git明白这~/main-project/submodule
是一个子模块.
我对git子模块有很好的经验:
在我的dotfiles存储库中我创建了.gitmodules文件,~/dotfiles-repo
并添加了路径和URL.从那时起,如果我对子模块中的文件进行更改并运行git status
,我会得到类似的结果:.vim/bundle/auto-complete (new commits) # in red
我创建了.gitmodules
文件~/main-project
但是:
~/main-project/submodule
,甚至推的变化,我没有得到这样一个类似的反应<submodule> (new commits) # in red
中运行时git status
在~/main-project
.我只是得到了在这些目录中所做的更改当我点击github
这些目录的文件夹链接时,它并没有指示我自己的存储库,但我留在同一个存储库中.
~/main-project/submodule
到索引中吗?我读过这个问题导致我得到了这个答案,但我不确定是否需要git-subtree
.我不想做那些可能难以改变的事情.
编辑:这个建议的重复解决方案也不起作用,我收到了一个错误
Updates were rejected because the remote contains work that you do not have locally
.似乎@GabLeRoux几乎告诉我要推 …
客户端:Mac 10.8,服务器:Ubuntu 10.04 LTS 64bit
我使用' ssh-keygen -t rsa '生成公钥/私钥.
首先,我输入:ssh -i /Users/phenix/.ssh/poponet_rsa root@popo.net,我可以使用私钥"poponet_rsa"登录服务器
接下来,我创建一个配置文件:/Users/phenix/.ssh/config,内容如下:
Host popo
Hostname popo.net
User root
PreferredAuthentications publickey
IdentityFile /Users/phenix/.ssh/poponet_rsa
Run Code Online (Sandbox Code Playgroud)
我输入ssh root@popo.net,终端问我密码.
接下来,我将poponet_rsa文件名更改为id_rsa,并输入ssh root@popo.net,好的,我登录.
我的问题:ssh不能在文件〜/ .ssh/config中使用IdentityFile配置,为什么?
$ ssh -vvv root@popo.net
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/phenix/.ssh/config
debug1: /Users/phenix/.ssh/config line 1: Applying options for popo.net
debug1: /Users/phenix/.ssh/config line 2: Applying options for popo.net
debug1: Reading configuration data /etc/ssh_config …
Run Code Online (Sandbox Code Playgroud) 我正在使用带有Altera Quartus 15.0网络版的Ubuntu Linux 14.04 LTS,由于许可错误,我很难模拟我的设计.我正在为Altera 的Cyclone IV EP4CE115设计一款用于VEEK-MT液晶触摸屏的LCD_driver .
老实说,我对模拟软件如ModelSim-Altera没有多少经验,但我知道如何使用.vwf文件并用它们进行模拟,我也知道如何使用signaltap逻辑分析仪.创建了usinversity程序.vwf文件后,我编译项目,按下运行功能模拟,我得到一个包含以下内容的窗口:
确定ModelSim可执行文件的位置......
使用:/home/bdoronnb/Downloads/Quartus/15.0/ModelSim/modelsim_ase/bin
要指定ModelSim可执行目录,请选择:工具 - >选项 - > EDA工具选项注意:如果ModelSim-Altera和ModelSim可执行文件都可用,将使用ModelSim-Altera.
****生成ModelSim Testbench****
quartus_eda --gen_testbench --check_outputs = on --tool = modelsim_oem --format = verilog --write_settings_files = off test5 -c test5 --vector_source ="/ path/to/Altera/projects/test/5/test5.vwf" --testbench_file = "/路径/到/ Altera公司/项目/测试/ 5 /模拟/ QSIM/test5.vwf.vt"
ld.so检测到不一致:dl-close.c:762:_dl_close:断言`map-> l_init_called'失败!信息:*******************************************************************信息:运行Quartus II 64位EDA网表编写器信息:版本15.0.0 Build 145 04/22/2015 SJ Web版信息:版权所有( C)1991-2015 Altera公司.版权所有.信息:您使用Altera公司的设计工具,逻辑功能信息:和其他软件和工具,以及它的AMPP合作伙伴逻辑信息:功能,以及来自任何上述信息的任何输出文件:(包括设备编程或模拟文件),以及任何信息:相关文档或信息明确主题信息:Altera计划许可信息的条款和条件:订购协议,
信息:Altera MegaCore功能许可协议或其他
信息:适用的许可协议,包括但不限于,
信息:您的使用仅用于编程逻辑
信息:由Altera制造并由Altera销售的设备或其
信息:授权经销商.请参阅适用的
信息:有关进一步细节的协议.信息:处理开始:2015年8月9日星期日22:18:46信息:命令:quartus_eda --gen_testbench --check_outputs …
我是 Gradle 和 Java 开发的新手,我很难使用需要旧版本 Gradle 的 Gradle 项目。
基本上,问题是gradle
我运行的每个命令最终都会出现相同的错误:
FAILURE: Build failed with an exception.
* Where:
Build file '/var/code/doron/reverb/libpulse-android/build.gradle' line: 10
* What went wrong:
A problem occurred evaluating project ':libpulse-android'.
> Failed to apply plugin [id 'android-library']
> Gradle version 1.10 is required. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in /var/code/doron/reverb/gradle/wrapper/gradle-wrapper.properties to gradle-1.10-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or …
Run Code Online (Sandbox Code Playgroud) 我对 Python 有点陌生,尤其是在多个文件中编写模块和函数,而不仅仅是原始脚本。
\n\n我正在编写一个命令行应用程序,我想要一个函数(我称之为argpconf
)来解析命令行参数并相应地设置日志级别。最重要的是,我希望在此函数中设置一次日志级别,并在创建记录器时以最小的开销在所有模块中设置相同的日志级别。此外,我希望能够在使用通用格式化程序时识别消息来自的模块:
logging.Formatter("%(levelname)s : %(name)s : %(message)s")\n
Run Code Online (Sandbox Code Playgroud)\n\n部分基于cookiecutter 模板,我创建了以下文件:
\n\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 api\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 some_functionality.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 cli.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 core\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 argpconf.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 logger.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 __version__.py\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 __main__.py\n
Run Code Online (Sandbox Code Playgroud)\n\ncore/logger.py
有以下内容:
from logging import Formatter, Logger as _Logger, NullHandler, StreamHandler\n\nclass Logger(_Logger):\n def __init__(self, name=None):\n super(Logger, self).__init__(name or __name__.split(".")[0])\n self.addHandler(NullHandler()) # default to no output\n def start(self, level="WARN", stream=None,\n fmt="%(levelname)s : %(name)s : %(message)s"):\n handler = StreamHandler(stream)\n handler.setFormatter(Formatter(fmt))\n self.addHandler(handler)\n self.setLevel(level.upper())\n def …
Run Code Online (Sandbox Code Playgroud) 我有一个struct
由自定义定义组成的,time.Time
因为它具有自定义MarshalJSON()
界面,遵循此答案的建议:
type MyTime time.Time
func (s myTime) MarshalJSON() ([]byte, error) {
t := time.Time(s)
return []byte(t.Format(`"20060102T150405Z"`)), nil
}
Run Code Online (Sandbox Code Playgroud)
我定义了一个MyStruct
类型ThisDate
和ThatDate
类型的字段*MyTime
:
type MyStruct struct {
ThisDate *MyTime `json:"thisdate,omitempty"`
ThatDate *MyTime `json:"thatdate,omitempty"`
}
Run Code Online (Sandbox Code Playgroud)
据我了解,我需要使用*MyTime
而不是MyTime
这样,当我按照此答案的建议使用这种类型的变量omitempty
时,标签才会起作用。MarshalJSON
我使用的库有一个函数,它返回struct
带有一些类型字段的a *time.Time
:
someVar := Lib.GetVar()
Run Code Online (Sandbox Code Playgroud)
我尝试定义一个MyStruct
这样的类型变量:
myVar := &MyStruct{
ThisDate: someVar.ThisDate
ThatDate: someVar.ThatDate
}
Run Code Online (Sandbox Code Playgroud)
当然,它给了我一个编译错误:
cannot use someVar.ThisDate (variable …
Run Code Online (Sandbox Code Playgroud)