我最近在github上建立了一个新帐户.我在线跟踪Michael Hartl的Rails教程(http://www.railstutorial.org/book#fig:github_first_page)并按照他的指示设置我的git,它也与github上的设置说明一致.无论如何,github上的"后续步骤"部分是:
mkdir sample_app
cd sample_app
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:rosdabos55/sample_app.git
git push origin master
Run Code Online (Sandbox Code Playgroud)
我一路走到最后一条指令(git push origin master)没有任何问题.但是,当我将最后一行输入到终端时,我收到此错误消息:"致命:未指定路径.请参阅'man git-pull'以获取有效的url语法." 我可能做错了什么?
以下是.git/config的内容(由Jefromi从man git-pull下面粘贴到评论的输出中重建):
[user]
name = Ross
email = [REDACTED]
[core]
editor = gvim -f
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:
fetch = +refs/heads/*:refs/remotes/origin/*
Run Code Online (Sandbox Code Playgroud) 我有一个非常复杂的图像地图,我想缩小一半.要做到这一点,需要将所有coord值除以2.由于有数千个coord值,我认为我可以使用jQuery遍历DOM来查找coord值,并将它们除以2.在JavaScript和jQuery方面,我非常业余,而且我编写了以下代码,这些代码无法完成我的任务:
$(function(){
$('area').each(function(){
coord_vals= $('area'[coords]).split(',');
new_vals= coord_vals/2;
$('area'[coords]).val(new_vals + ',');
});
});
Run Code Online (Sandbox Code Playgroud)
这是我试图遍历的前几行HTML:
<div id="map">
<img class="map" src="images/us_map.jpg" width="960" height="593" usemap="#usa">
<map name="usa">
<area href="#" title="SC" shape="poly" coords="735,418, 734,419, 731,418, 731,416, 729,413, 727,411, 725,410, 723,405, 720,399, 716,398, 714,396, 713,393, 711,391, 709,390, 707,387, 704,385, 699,383, 699,382, 697,379, 696,378, 693,373, 690,373, 686,371, 684,369, 684,368, 685,366, 687,365, 687,363, 693,360, 701,356, 708,355, 724,355, 727,356, 728,360, 732,359, 745,358, 747,358, 760,366, 769,374, 764,379, 762,385, 761,391, 759,392, 758,394, 756,395, 754,398, 751,401, 749,404, 748,405, 744,408, 741,409, 742,412, 737,417, …Run Code Online (Sandbox Code Playgroud)