我想在ubuntu 12.04机器上安装python-software-properties软件包.我一直在:
The following packages have unmet dependencies:
python-software-properties : Depends: python (< 2.7) but 2.7.3-0ubuntu2 is to be installed
Depends: python-pycurl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
Aptitude显示它尝试安装的版本是0.75.10.3.当然,我已经运行了apt-get update.我需要这个来为我的回购列表添加一个ppa.
我试图解决类似于以下的更通用的问题.在下面,我得到vow_array,它表示某些文本中存在元音子集,比如发送到我的程序.我需要打印每个元音的存在为0或1.
ch_a = 0
ch_e = 0
ch_i = 0
ch_o = 0
ch_u = 0
# vow_array is generated at runtime; here is an example
vow_array = ['a', 'o', 'u']
if 'a' in vow_array:
ch_a = ch_a + 1
if 'e' in vow_array:
ch_e = ch_e + 1
if 'i' in vow_array:
ch_i = ch_i + 1
if 'o' in vow_array:
ch_o = ch_o + 1
if 'u' in vow_array:
ch_u = ch_u + 1
print ch_a, ch_e, ch_i, …Run Code Online (Sandbox Code Playgroud) 我在当地克隆了一个git repo.我做了很多提交到master分支而没有被推入远程.与此同时,其他人已经添加到远程主人.现在我想保留我对远程仓库的提交,但是在一个从我最初克隆的提交开始的分支中.主要原因是保留我的提交历史,但不与master合并.提前感谢任何有用的想法.