2014年3月24日 星期一

LAB13 Regular expression in action II

自動檢查輸入的字串是否為網址
第一種:1~255.0~255.0~255.1~255
第二種:www的輸入方式


<html>
 <head>
 </head>
 <body id="body">
  <form action="javascript:void(0);" id="exampleForm">
   <input type="text" id="examplePass" />
   <input type="submit" />
  </form>
 </body>
 <script>

document.getElementById("exampleForm").onsubmit =function() {
 var passwordRegex = /^(((([1][\d][\d])|([2][0-4][0-9])|([2][5][0-5])|([1-9][0-9])|([1-9]))\.(([1][\d][\d])|([2][0-4][0-9])|([2][5][0-5])|([1-9][0-9])|([0-9]))\.(([1][\d][\d])|([2][0-4][0-9])|([2][5][0-5])|([1-9][0-9])|([0-9]))\.(([1][\d][\d])|([2][0-4][0-9])|([2][5][0-5])|([1-9][0-9])|[1-9]))|(www\.[\w]+\.((edu)|(com)|(gov)|(org)|(idv)|(cc))(\.\w+)?))$/;



 if(!passwordRegex.test(document.getElementById("examplePass").value)) {
  console.log("Regex didn't match");
  var notify = document.getElementById("notify");
  if(notify===null)  {
   notify =document.createElement("p");
   notify.textContent = "Error. Please try a new one"
   notify.id = "notify";
 
   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

2014年3月17日 星期一

Lab 12 Regular expression in action


Lab 11 Regular Expression 2

<html>
 <head>
 </head>
 <body id="body">
  <form action="javascript:void(0);" id="exampleForm">
   <input type="text" id="examplePass" />
   <input type="submit" />
  </form>
 </body>
 <script>

document.getElementById("exampleForm").onsubmit =function() {
 var passwordRegex = /^\d+(\.\d+)?,\d+(\.\d+)?$/;



 if(!passwordRegex.test(document.getElementById("examplePass").value))  {
  console.log("Regex didn't match");
  var notify = document.getElementById("notify");
  if(notify===null)  {
   notify =document.createElement("p");
   notify.textContent = "輸入錯誤"
   notify.id = "notify";

   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

Lab 10 Regular expression I

<html>
 <head>
 </head>
 <body id="body">
  <form action="javascript:void(0);" id="exampleForm">
   <input type="text" id="examplePass" />
   <input type="submit" />
  </form>
 </body>
 <script>

document.getElementById("exampleForm").onsubmit =function() {
 var passwordRegex =/^[-\+]?\d*(\.\d+)?$/;



 if(!passwordRegex.test(document.getElementById("examplePass").value))  {
  console.log("Regex didn't match");
  var notify = document.getElementById("notify");
  if(notify===null)  {
   notify =document.createElement("p");
   notify.textContent = "輸入錯誤"
   notify.id = "notify";

   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

Homework 3/10/2014: Lab 8 Using browsers for programming II

<html>
 <head>
 </head>
 <body id="body">
  <form action="javascript:void(0);" id="exampleForm">
   <input type="password" id="examplePass" />
   <input type="submit" />
  </form>
 </body>
 <script>

document.getElementById("exampleForm").onsubmit =function() {
 var passwordRegex = /(?=.*[\W])(?=.*[\d]).{6,}$/;



 if(!passwordRegex.test(document.getElementById("examplePass").value))  {
  console.log("Regex didn't match");
  var notify = document.getElementById("notify");
  if(notify===null)  {
   notify =document.createElement("p");
   notify.textContent = "Passwords need to be much than 6 characters long and consist of uppercase characters, lowercase characters, and digits only."
   notify.id = "notify";
 
   var body = document.getElementById("body");
   body.appendChild(notify);
  }
 }
};

 </script>
</html>

2014年3月10日 星期一

Lab9


Lab7



<html>
<head>
</head>
<body id="body">
<form action="javascript:void(0);" id="exampleForm">
<input type="password" id="examplePass" />
<input type="submit" />
</form>
</body>
<script>

document.getElementById("exampleForm").onsubmit =function() {
var passwordRegex = /^[A-Za-z\d]{6,}$/;

if(!passwordRegex.test(document.getElementById("examplePass").value))  {
console.log("Regex didn't match");
var notify = document.getElementById("notify");
if(notify===null)  {
notify =document.createElement("p");
notify.textContent = "Passwords need to be much than 6 characters long and consist of uppercase characters, lowercase characters, and digits only."
notify.id = "notify";

var body = document.getElementById("body");
body.appendChild(notify);
}
}
};

</script>
</html>




Homework 3/3/2014

Amy Cuddy: Your body language shapes who you are
Ted影片關後評論:
      人與人相處之間、互動,除了經由語言的傳達可以表達我們當下的感受及態度之外,其實肢體語言(也就是非語言的傳達)也會表示我們當下的態度,更明確的說應該是肢體語言不僅會讓別人感受到我們的態度是積極或是消極之外,最重要的是他同時會影響你自己的心理狀態。當我們面對挑戰時,一開始就採取肯定自我能力的積極態度,這時我們的睪固酮(支配性荷爾蒙)會上升、腎上腺皮質醇(壓力荷爾蒙)會下降,讓我們可以完全的呈現真實的自我,而甚麼叫做真實的自我呢?就是完全表現我們所想的,當然我指的是正面的。
      這則影片其實很明顯的可以應用到生活中許多地方,我當下第一個反應就是學生的上課態度,我們在大學裡求學,想要求得更多知識的同學在上課時就會表現積極的態度,他們上課時除了會坐在最前面的位置外同時會專心聽課、適當做筆記,因為這樣可以在有問題或意見時可以直接和老師討論,同時也可以避免前面的同學聊天而干擾其上課的品質。進大學時,大家懂得東西其實都差不多,但是有積極的學習態度,會使人在學習上有明顯的效果。而這也正是這則影片說的,肢體語言會傳達給別人你目前的態度外,更重要的是肢體語言會不斷的影響你自己的態度,越是積極的態度會使自己更有自信更勇於面對挑戰進而提升自我能力,提升自我能力後會使自己更有信心,這將是一個良性循環。期望大家能一同積極進取,一同提升自我能力。

2014年3月3日 星期一

LAB4

●各學校網頁數
中正:1430000
台大:  817000
中原:1290000
元智:  277000

●各學校連結度(能見度)
中正:    5363
台大:  19539
中原:    2513
元智:    2562

●各學校檔案數
中正:  23500
台大:429000
中原:  16400
元智:  14100

●各學校Google Scholar 論文索引
中正:     9530
台大:266000
中原:   11400
元智:     2210

●各學校WR
中正:293636
台大:277419.5
中原:263426.5
元智:  59127.5

LAB6

www.cycu.edu.tw延遲時間最久的三個元件
1.www.cycu.edu.tw
2.generate_204
3.cse.js?cx=006671915706355032179:lepk4kd-ype


www.youtube.com延遲時間最久的三個元件
1.csi?v=3&s=oz&action=notificationswidget&it=wtsrt_.272,tbsd_.165,tbnd_.0,redirectTime.0,dnsTime.0,tcpTime.0,requestStart.3,req
2.www.youtube.com
3.frame?origin=https%3A%2F%2Fwww.youtube.com&source=yt&hl=zh-TW&jsh=m%3B%2F_%2Fscs%2Fabc-static%2F_%2Fjs%2F


www.udacity.com延遲時間最久的三個元件
1.udacity.min.js?4353f3facd4c92187fd07d419bddaca6
2.libs.min.js?4353f3facd4c92187fd07d419bddaca6
3.partner-nvidia.png