//塞入1~12的字樣 function drawNumbers(ctx, radius) { var ang; var num; ctx.font = radius*0.15 + "px arial"; ctx.textBaseline="middle"; ctx.textAlign="center"; for(num = 1; num < 13; num++){ ang = num * Math.PI / 6; ctx.rotate(ang); ctx.fillStyle = '#3333';//小時的顏色 ctx.translate(0, -radius*0.85); ctx.rotate(-ang); ctx.fillText(num.toString(), 0, 0); ctx.rotate(ang); ctx.translate(0, radius*0.85); ctx.rotate(-ang); } }
function drawTime(ctx, radius){ var now = new Date(); var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); //hour hour=hour%12; hour=(hour*Math.PI/6)+ (minute*Math.PI/(6*60))+ (second*Math.PI/(360*60)); drawHand(ctx, hour, radius*0.5, radius*0.07); //minute minute=(minute*Math.PI/30)+(second*Math.PI/(30*60)); drawHand(ctx, minute, radius*0.8, radius*0.07); // second second=(second*Math.PI/30); drawHand(ctx, second, radius*0.9, radius*0.02); }
git 出現 fatal: not a git repository (or any of the parent directories)問題
錯誤訊息為:fatal: not a git repository (or any of the parent directories): .git 中譯:找不到 .git 這樣的目錄。
使用 git init 指令
1
git init
remote: Support for password authentication was removed on August 13, 2021.
1 2 3
remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. fatal: Authentication failed for 'https://github.com/gpg-team/lottery-front.git/'
Last login: Wed Jul 12 20:00:18 on console larahuang@larahuangde-MacBook-Pro db % json-server -v 0.17.3 larahuang@larahuangde-MacBook-Pro db % json-server db.json