开水房
ASP.NET
随笔- 161  文章- 1  评论- 2 
博客园  首页  新随笔  联系  管理  订阅 订阅
07 2010 档案
UML:继承、实现、依赖、关联、聚合、组合

摘要: 今天看到一篇好文,觉得还不错,褪去的记忆被唤醒:http://www.alisdn.com/wordpress/?p=1135继承指的是一个类(称为子类、子接口)继承另外的一个类(称为父类、父接口)的功能,并可以增加它自己的新功能的能力,继承是类与类或者接口与接口之间 最常见的关系;在Java中此类关系通过关键字extends明确标识,在设计时一般没有争议性;实现指的是一个class类实现inte...阅读全文
posted @ 2010-07-29 09:57 白开水皮皮 阅读(66) | 评论 (0) 编辑
java.text.MessageFormat

摘要: With MessageFormat, we can output String with parameters:MessageFormat:private static final String FAILURE = "#ERROR: FAILED TO LOCALIZE {0}";String value = MessageFormat.format(FAILURE, new Object[] ...阅读全文
posted @ 2010-07-29 09:37 白开水皮皮 阅读(25) | 评论 (0) 编辑
javascript 语言精粹 学习笔记

摘要: chapter 3: 对象null and undefinenull 是对象使用;undefined是属性使用var obj = {"first":"Kevin","last":"Ge"}判断是否是null     if(obj["middle"] == null)判断是否是undefine  if(typeof obj["middle"] == "undefine")        或   if...阅读全文
posted @ 2010-07-19 10:37 白开水皮皮 阅读(5) | 评论 (0) 编辑
js parseURL

摘要: <script>function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.hostname, port: a.port, query: a.search, p...阅读全文
posted @ 2010-07-14 10:46 白开水皮皮 阅读(81) | 评论 (0) 编辑
javascript 判断变量是否存在

摘要: Thetypeofoperator returns the following results for these variables:阅读全文
posted @ 2010-07-08 15:28 白开水皮皮 阅读(39) | 评论 (0) 编辑
javascript with

posted @ 2010-07-06 15:31 白开水皮皮 阅读(7) | 评论 (0) 编辑
javascript RegExp

摘要: var str="Is this all there is?";var patt1=/is/g;1. match  str.match(patt1);2. test  patt1.test(str);3. exec  patt1.exec(str);阅读全文
posted @ 2010-07-06 14:39 白开水皮皮 阅读(0) | 评论 (0) 编辑
javascript Array Object Methods

摘要: Array Object MethodsMethodDescriptionconcat()Joins two or more arrays, and returns a copy of the joined arraysjoin()Joins all elements of an array into a stringpop()Removes the last element of an arra...阅读全文
posted @ 2010-07-06 14:21 白开水皮皮 阅读(11) | 评论 (0) 编辑
javascript break up a code line within a text string with a backslash.

摘要: document.write("Hello \World!");var a = "aasdf\ddd\ddd";阅读全文
posted @ 2010-07-06 14:00 白开水皮皮 阅读(3) | 评论 (0) 编辑
javascript try catch throw

摘要: <script type="text/javascript">var x=prompt("Enter a number between 0 and 10:","");try { if(x>10) { throw "Err1"; } else if(x<0) { throw "Err2"; } else if(isNaN(x)) { throw "Err3"; } }catc...阅读全文
posted @ 2010-07-06 13:57 白开水皮皮 阅读(39) | 评论 (0) 编辑
javascript for...in statement

摘要: <html><body><script type="text/javascript">var x;var mycars = new Array();mycars[0] = "Saab";mycars[1] = "Volvo";mycars[2] = "BMW";for (x in mycars) { document.write(mycars[x] + "<...阅读全文
posted @ 2010-07-06 13:36 白开水皮皮 阅读(4) | 评论 (0) 编辑
javascript box

摘要: 1. alert("message")2. var r = confirm("are you sure to continue?");  if(r == true)  {...}3. var name = prompt("Please enter your name","Harry Potter");  //prompt("sometext","defaultvalue");  if(name !...阅读全文
posted @ 2010-07-06 13:29 白开水皮皮 阅读(7) | 评论 (0) 编辑
javascript output str to browser

摘要: In my experience, there are two way to change the browser content.1. document.getElementById(ojbid).innerHTML = "" to change the object content2.document.write("<h1>" + name + "</h1>") to ...阅读全文
posted @ 2010-07-06 11:44 白开水皮皮 阅读(14) | 评论 (0) 编辑
javascript prototype

摘要: In javascript, there is prototype for all function(Class). prototype could be a property or function. All the instance of the function(Class) inherit the property.There is one thing we need to pay att...阅读全文
posted @ 2010-07-06 11:39 白开水皮皮 阅读(8) | 评论 (0) 编辑

Copyright ©2012 白开水皮皮