Uncaught SyntaxError:Unexpetedtoken ]
解決方法:沒有被處理的語法錯誤冷冗,不應(yīng)該用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寫博客后點(diǎn)擊相關(guān)文章提示沒有找到404(hexo部署到github 404)
解決方法:分支在master上等等我也試過了挽牢,有個細(xì)節(jié)我沒看到,就是在建立與你用戶名對應(yīng)的倉庫的時候贾铝,倉庫名必須為【.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報(bào)錯error: failed to push some refs to 'git@github.com:
原因: GitHub遠(yuǎn)程倉庫中的README.md文件不在本地倉庫中。
解決方案:
$ git pull --rebase origin master
$ git push -u origin master
GitHub版本回退
git reset --hard 3628164
版本回退
git reflog
查看命令歷史吞杭,以便確定要回到未來的哪個版本
修改Git remote add時使用的遠(yuǎn)程倉庫
方法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.
解決方法:添加二級域名盏浇,否則不能跳轉(zhuǎn)
方法1:source下建一個CNAME文件,上面寫上綁定的一級域名
方法2:進(jìn)入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> 下面
因?yàn)閏hrome下需要文檔載入完成后才能獲得canvas對象
如何取消DIV之間的間距
解決方法:?
CSS中父元素高度沒有隨子元素高度的改變而改變,應(yīng)該如何解決译蒂?
解決方法:如果子元素沒有設(shè)置浮動(float),父元素實(shí)際上會根據(jù)內(nèi)容谊却,自動寬高進(jìn)行適應(yīng)的柔昼。當(dāng)子元素增加了浮動后,可以在父元素添加overflow:hidden炎辨,父元素會隨子元素的內(nèi)容自動適應(yīng)的捕透。或者在子元素的最后一個清楚浮動碴萧。
為什么寫好的html網(wǎng)頁在瀏覽器打開還是一堆源代碼乙嘀?
如果你是在本地打開的,確認(rèn)下你保存的后綴是不是html或htm
如果你放在了服務(wù)器上破喻,確認(rèn)服務(wù)器輸出的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上沒有創(chuàng)建SSH Key
解決方法:創(chuàng)建SSH Key
軟件提示:Cannot find declaration to go to
原因:導(dǎo)入項(xiàng)目的時候使用的是Open而不是Import Project。
解決方法:關(guān)閉當(dāng)前項(xiàng)目曹质,如圖點(diǎn)擊Import PrOject婴噩,導(dǎo)入項(xiàng)目即可