Uncaught SyntaxError:Unexpetedtoken ]
解决方法:没有被处理的语法错误,不应该用I
var n = null; n.toString();
错误:Uncaught TypeError: Cannot read property 'toString' of null
原因:n为null,不能读null的toString属性
var n = undefined; n.toString();
错误:Uncaught TypeError: Cannot read property 'toString' of undefined
原因:n为undefined,不能读undefined的toString属性
how do I add the 'tree' command to git-bash on Windows?
解决方法:You could also use "cmd //c tree" to use Windows' tree
Explanation:
Launch cmd with '/c' argument and run tree, then terminate /C Carries out the command specified by string and then terminates(extra slash for escaping)
Answered in greater detail here: https://stackoverflow.com/q/515309/1261166
How to use “tree command” on linux
解决方法:
$ sudo apt-get install tree -y
$ tree
hexo写博客后点击相关文章提示没有找到404(hexo部署到github 404)
解决方法:分支在master上等等我也试过了,有个细节我没看到,就是在建立与你用户名对应的仓库的时候,仓库名必须为【.your_user_name.github.io】,固定写法.这个请你注意下
Git Add . 无法添加文件夹下的文件
问题描述:今天提交版本时遇到了git目录无法添加文件夹下的文件。比如要提交A文件夹,而程序代码在A/B文件夹下。使用git add . 只能加入一个空的B文件夹。
原因:B文件夹是从别的git库拉下来的
解决方法:只要把B下的隐藏文件.git删掉就可以了。
安装GIT及其他命令
解决方法:
sudo apt-get update
sudo apt-get install git
ifconfig –a
sudo apt-get install npm -y
sudo apt-get install yum –y
git push报错error: failed to push some refs to 'git@github.com:
原因: GitHub远程仓库中的README.md文件不在本地仓库中。
解决方案:
$ git pull --rebase origin master
$ git push -u origin master
GitHub版本回退
git reset --hard 3628164
版本回退
git reflog
查看命令历史,以便确定要回到未来的哪个版本
修改Git remote add时使用的远程仓库
方法1. 修改命令git remte origin set-url URL
方法2.先删后加
git remote rm origin
git remote add origin git@github.com:Liutos/foobar.git
方法3. 直接修改config文件
404 There isn't a GitHub Pages site here.
解决方法:添加二级域名,否则不能跳转
方法1:source下建一个CNAME文件,上面写上绑定的一级域名
方法2:进入github你的仓库——》setting——》找到custom domain——》在文本框中填写的域名,比如我的是:andybroker.com
方法3:找到_config.yml——》URL——》填入你coding-pages的url即可
404 File not found
解决方法:上传的文件名必须为index.html
localhost拒绝了我们的连接请求
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Cannot read property 'getContext' of null
解决方法:将绘制方法,即绘制图片的<scrip>方法,放在body<canvas></cancas> 下面
因为chrome下需要文档载入完成后才能获得canvas对象
如何取消DIV之间的间距
解决方法:?
CSS中父元素高度没有随子元素高度的改变而改变,应该如何解决?
解决方法:如果子元素没有设置浮动(float),父元素实际上会根据内容,自动宽高进行适应的。当子元素增加了浮动后,可以在父元素添加overflow:hidden,父元素会随子元素的内容自动适应的。或者在子元素的最后一个清楚浮动。
为什么写好的html网页在浏览器打开还是一堆源代码?
如果你是在本地打开的,确认下你保存的后缀是不是html或htm
如果你放在了服务器上,确认服务器输出的Content-Type头是正确的text/html而不是text/plain
npm ERR! Error: EACCES: permission denied, access
问题描述:
Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
解决方法:在命令前加上 sudo
例:sudo npm install --save-dev grunt
fatal: Could not read from remote repository.
问题描述:在使用Git clone 或其他命令的时候,有时候会遇到这类问题
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因:在git上没有创建SSH Key
解决方法:创建SSH Key
软件提示:Cannot find declaration to go to
原因:导入项目的时候使用的是Open而不是Import Project。
解决方法:关闭当前项目,如图点击Import PrOject,导入项目即可