From 79ca49d3e023ef684ed441e1cf3220df2e25c370 Mon Sep 17 00:00:00 2001
From: jammyqq <45357135+jammyqq@users.noreply.github.com>
Date: Mon, 24 Dec 2018 15:37:36 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E8=A8=88=E7=AE=97=E6=A9=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
嗨嗨我交作業了~
---
calculator.css | 17 +++++++++++++++
calculator.html | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
calculator.js | 48 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 120 insertions(+)
create mode 100644 calculator.css
create mode 100644 calculator.js
diff --git a/calculator.css b/calculator.css
new file mode 100644
index 0000000..5273c1a
--- /dev/null
+++ b/calculator.css
@@ -0,0 +1,17 @@
+body{
+ background-color: darkkhaki
+}
+
+#all{
+ margin: auto;
+ width: 30%;
+
+}
+#cback{
+ width: 150px;
+ margin: 0 auto;
+ background-color: #ffffff;
+ border-radius: 10px;
+ padding: 20px;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/calculator.html b/calculator.html
index e69de29..9c58359 100644
--- a/calculator.html
+++ b/calculator.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+ 我的計算機
+
+
+
+
mycalculator
+
with jquery
+
+
+
+
+
\ No newline at end of file
diff --git a/calculator.js b/calculator.js
new file mode 100644
index 0000000..c9913b0
--- /dev/null
+++ b/calculator.js
@@ -0,0 +1,48 @@
+
+ function getNum(num){
+ $("#showResBox").val(function(i,val){
+ return val + num
+ })
+ }
+ function clearRes(){
+ document.getElementById("showResBox").value = "";
+ }
+
+ function cal(calSymbol){
+ var boxRes=$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+
+ if($("#showResBox").val()==""){
+ $("#showResBox").val("");
+ }else if(lastSym=="+"||lastSym=="-"||lastSym=="*"||lastSym=="/"||lastSym=="."){
+ $("#showResBox").val("");}
+ else{$("#showResBox").val(function(i,val){
+ return val + calSymbol
+ });
+ }
+ }
+
+ function minus(minuss){
+ var boxRes =$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+ if(lastSym=="+"||lastSym=="-"||lastSym=="*"||lastSym=="/"||lastSym=="."){
+ $("#showResBox").val("");
+ }else{$("#showResBox").val(function(i,val){
+ return val + minuss
+ });
+ }
+ }
+
+ function equal(){
+ var boxRes =$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+ document.getElementById("showResBox").value = eval(document.getElementById("showResBox").value);
+
+ }
+
+ function del(){
+ $("#showResBox").val(function(i,val){
+ return val.substr(0,val.length-1)
+ });
+ }
+
From a46ad711c69803e5af40f87709947b6a86d28756 Mon Sep 17 00:00:00 2001
From: jammyqq <45357135+jammyqq@users.noreply.github.com>
Date: Mon, 24 Dec 2018 16:33:00 +0800
Subject: [PATCH 2/7] Set theme jekyll-theme-cayman
---
_config.yml | 1 +
1 file changed, 1 insertion(+)
create mode 100644 _config.yml
diff --git a/_config.yml b/_config.yml
new file mode 100644
index 0000000..c419263
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1 @@
+theme: jekyll-theme-cayman
\ No newline at end of file
From f70bf5c8c80c3f142f76b8f3f787e40e65697b7a Mon Sep 17 00:00:00 2001
From: jammy
Date: Mon, 24 Dec 2018 16:46:10 +0800
Subject: [PATCH 3/7] =?UTF-8?q?css=E6=96=B0=E5=A2=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
css/calculator.css | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/css/calculator.css b/css/calculator.css
index e69de29..8ecec5b 100644
--- a/css/calculator.css
+++ b/css/calculator.css
@@ -0,0 +1,17 @@
+body{
+ background-color: darkkhaki
+}
+
+#all{
+ margin: auto;
+ width: 30%;
+
+}
+#cback{
+ width: 150px;
+ margin: 0 auto;
+ background-color: #ffffff;
+ border-radius: 10px;
+ padding: 20px;
+ text-align: center;
+}
From 849196b95b6f92cbca40a596c68880495ad99010 Mon Sep 17 00:00:00 2001
From: jammy
Date: Mon, 24 Dec 2018 16:47:13 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E6=96=B0=E5=A2=9Ejs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
js/calculator.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/js/calculator.js b/js/calculator.js
index e69de29..c9913b0 100644
--- a/js/calculator.js
+++ b/js/calculator.js
@@ -0,0 +1,48 @@
+
+ function getNum(num){
+ $("#showResBox").val(function(i,val){
+ return val + num
+ })
+ }
+ function clearRes(){
+ document.getElementById("showResBox").value = "";
+ }
+
+ function cal(calSymbol){
+ var boxRes=$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+
+ if($("#showResBox").val()==""){
+ $("#showResBox").val("");
+ }else if(lastSym=="+"||lastSym=="-"||lastSym=="*"||lastSym=="/"||lastSym=="."){
+ $("#showResBox").val("");}
+ else{$("#showResBox").val(function(i,val){
+ return val + calSymbol
+ });
+ }
+ }
+
+ function minus(minuss){
+ var boxRes =$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+ if(lastSym=="+"||lastSym=="-"||lastSym=="*"||lastSym=="/"||lastSym=="."){
+ $("#showResBox").val("");
+ }else{$("#showResBox").val(function(i,val){
+ return val + minuss
+ });
+ }
+ }
+
+ function equal(){
+ var boxRes =$("#showResBox").val();
+ var lastSym=boxRes.substr(boxRes.length-1);
+ document.getElementById("showResBox").value = eval(document.getElementById("showResBox").value);
+
+ }
+
+ function del(){
+ $("#showResBox").val(function(i,val){
+ return val.substr(0,val.length-1)
+ });
+ }
+
From 0b56a2be70967655d4dc5f404edc46efe6dda874 Mon Sep 17 00:00:00 2001
From: jammyqq <45357135+jammyqq@users.noreply.github.com>
Date: Mon, 24 Dec 2018 16:48:41 +0800
Subject: [PATCH 5/7] Delete _config.yml
---
_config.yml | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 _config.yml
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index c419263..0000000
--- a/_config.yml
+++ /dev/null
@@ -1 +0,0 @@
-theme: jekyll-theme-cayman
\ No newline at end of file
From 4e6cb5e93818fa59763e9e7329d4749317b8de1e Mon Sep 17 00:00:00 2001
From: jammy
Date: Mon, 24 Dec 2018 17:00:09 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E6=94=B9=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.DS_Store | Bin 0 -> 6148 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 .DS_Store
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..e4c6cc8e6160da8cf3a606c3392e181ddad77c25
GIT binary patch
literal 6148
zcmeHK&2G~`5S~p!aZ*ZiK$N2|NF1W7sZ>FQkW5GqJs=^B-~cGKx!ZE65$FtpT${M7z+E
zRCLWPAd`K3ppZ^!mo8{jiZ&I70mHymV?eCkP3lpfIK{NMexu`v_x*_bh!ESuW9Wn5
zQs5D7kVgrA14=0=#D4!@tUpc8b-zFS^C(Qxy}h5TQmx(CxM^7ptFhI1?+*FYO}%uI
zbiDCfQF`H}Ltp!^IFJ7Mp8q-=Onc2c&v=}AVLTYiZF
z;Sx@cj*sp*j(B{EdXaM*^m-J*PGCI{#%YXgvM&hCQ^$4?zew};irgW38Bt-9*w;e#
z){5-2(zw40nbl?guHr3^x}H<2DJV>4g-YbfwQ;$yHtO_}j_4_M={ay06BXpAnZycN
z%s_GNqF-lgbL}IW0SyC&fve7d*dJ`DKu2SyP;MPC@(KW~p;`)j@v$IsY>ke_Od(nz
zOr-)o`Yarck95)0YpXM`rql!sO`a-id5_$&?HOhJkCv0IPM~ZU>K~&(_kziL=&*o
Date: Mon, 24 Dec 2018 17:20:23 +0800
Subject: [PATCH 7/7] Delete .DS_Store
---
.DS_Store | Bin 6148 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 .DS_Store
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index e4c6cc8e6160da8cf3a606c3392e181ddad77c25..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 6148
zcmeHK&2G~`5S~p!aZ*ZiK$N2|NF1W7sZ>FQkW5GqJs=^B-~cGKx!ZE65$FtpT${M7z+E
zRCLWPAd`K3ppZ^!mo8{jiZ&I70mHymV?eCkP3lpfIK{NMexu`v_x*_bh!ESuW9Wn5
zQs5D7kVgrA14=0=#D4!@tUpc8b-zFS^C(Qxy}h5TQmx(CxM^7ptFhI1?+*FYO}%uI
zbiDCfQF`H}Ltp!^IFJ7Mp8q-=Onc2c&v=}AVLTYiZF
z;Sx@cj*sp*j(B{EdXaM*^m-J*PGCI{#%YXgvM&hCQ^$4?zew};irgW38Bt-9*w;e#
z){5-2(zw40nbl?guHr3^x}H<2DJV>4g-YbfwQ;$yHtO_}j_4_M={ay06BXpAnZycN
z%s_GNqF-lgbL}IW0SyC&fve7d*dJ`DKu2SyP;MPC@(KW~p;`)j@v$IsY>ke_Od(nz
zOr-)o`Yarck95)0YpXM`rql!sO`a-id5_$&?HOhJkCv0IPM~ZU>K~&(_kziL=&*o