From 9a4053ec4db81fb66f9f2205c12df2370f935241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=B8=9E=E5=AE=8F?= Date: Sat, 11 Oct 2014 16:14:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=B1get=E7=9A=84=E5=8F=83=E6=95=B8?= =?UTF-8?q?=E8=BD=89=E5=81=9A=E6=95=B8=E5=AD=97=20=E4=B8=9E=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" index 0e50f04..5b42fe8 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" @@ -14,7 +14,7 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc var searchObject = $location.search(); $scope.mainInfo = $http.get("./答案.txt").success(function(data) { //1.讀入十句 - $scope.input10 = data.slice(searchObject.start,searchObject.start + 10); + $scope.input10 = data.slice(searchObject.start,+searchObject.start + 10); //2.初始化每一句要斷詞的句子 (anguarJS無法顯示{{中文變數}}) angular.forEach($scope.input10,function(每一句, 索引值){ From 2fa0089ffd3728161b427b018c4f56ceb6588039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=B8=9E=E5=AE=8F?= Date: Sat, 11 Oct 2014 16:18:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=80=9D=E8=99=9F=E9=A1=AF=E7=A4=BA?= =?UTF-8?q?=E5=87=BA=E4=BE=86=20=E4=B8=9E=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.html" | 2 +- .../script.js" | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" index 30829fa..c3f1ce1 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" @@ -29,7 +29,7 @@ - {{$index}}{{word.shape}} + {{$index + start}}{{word.shape}} diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" index 5b42fe8..c98b423 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" @@ -10,12 +10,13 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc //$scope.str3="\u9023\u5b57\u97f3"; /* 秀出json資料的方法 */ //JSON.stringify(jsondata) - + $scope.start = 0; + var searchObject = $location.search(); $scope.mainInfo = $http.get("./答案.txt").success(function(data) { //1.讀入十句 $scope.input10 = data.slice(searchObject.start,+searchObject.start + 10); - + $scope.start = +searchObject.start; //2.初始化每一句要斷詞的句子 (anguarJS無法顯示{{中文變數}}) angular.forEach($scope.input10,function(每一句, 索引值){ From 0cea11af38db82c3fdd6aaecbb8c2b7f28c6f0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=B8=9E=E5=AE=8F?= Date: Sat, 11 Oct 2014 16:35:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8A=A0=E5=BE=8C=E4=B8=80=E7=B5=84?= =?UTF-8?q?=E7=9A=84=E9=80=A3=E7=B5=90=20=E4=B8=9E=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.html" | 1 + .../script.js" | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" index c3f1ce1..cab80db 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" @@ -34,6 +34,7 @@ + 後一組 diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" index c98b423..dbddeb7 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" @@ -15,8 +15,9 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc var searchObject = $location.search(); $scope.mainInfo = $http.get("./答案.txt").success(function(data) { //1.讀入十句 - $scope.input10 = data.slice(searchObject.start,+searchObject.start + 10); - $scope.start = +searchObject.start; + $scope.start = +searchObject.start; + $scope.end = +searchObject.start+10; + $scope.input10 = data.slice($scope.start,+$scope.end); //2.初始化每一句要斷詞的句子 (anguarJS無法顯示{{中文變數}}) angular.forEach($scope.input10,function(每一句, 索引值){ From a1aaab6c0fb4e66b0d8d16484bbd89c8e5c589fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=B8=9E=E5=AE=8F?= Date: Sat, 11 Oct 2014 17:12:38 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=A3=9C=E6=9C=83=E7=95=B6=E6=89=A3?= =?UTF-8?q?=E7=9A=84=E8=B3=87=E6=96=99=E5=8D=80=20=E4=B8=9E=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.html" | 3 ++- .../script.js" | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" index cab80db..1f4c5c7 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/index.html" @@ -33,7 +33,8 @@ - + + 後一組 diff --git "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" index dbddeb7..de17864 100644 --- "a/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" +++ "b/04_\346\211\213\345\267\245\346\226\267\350\251\236/script.js" @@ -11,6 +11,7 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc /* 秀出json資料的方法 */ //JSON.stringify(jsondata) $scope.start = 0; + $scope.showtextarea = false; var searchObject = $location.search(); $scope.mainInfo = $http.get("./答案.txt").success(function(data) { @@ -65,7 +66,7 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc var 輸出所有句 = []; var 總長度 = $scope.input10.length; for(var i=0; i<總長度; i++) { - var 每一句 = ""; + var 每一句 = ""+($scope.start+i)+", "; var 字數 = $scope.input10[i][0][0].words.length; for(var j=0; j<字數; j++){ var 字 = $scope.input10[i][0][0].words[j]; @@ -73,7 +74,8 @@ app1.controller("showController",["$scope","$location","$http","$q",function($sc } 輸出所有句.push(每一句.slice(0,-1)); } - alert(輸出所有句); + $scope.sui2=輸出所有句.join('\n')+'\n'; + $scope.showtextarea=true; };