Array
(
)
Lenovo eCommerce
创建帐号 论坛 博客 搜索

论坛 (全部)

  • 2
    2015-06-26 17:38:31 - 0条回复 - 0次浏览
    网站搭建 - 1) You could add a separate event to an individual element, but the better way is to add an event li ... 查看
  • 2
    2015-06-27 16:09:49 - 0条回复 - 0次浏览
    创业应知 - 父亲喃喃地说:“生命已到了尽头,现在才感觉生活如此的美好,假如可以再活一次,那是多么快乐的一件事情啊!”儿子问:“父亲,假如可以再多活一次,你会怎么样呢?”父亲眼里闪现着光芒:“假如可以再活一次,我会 ... 查看
  • 2
    2015-06-29 11:53:27 - 0条回复 - 0次浏览
    英语 - 1) When you work with an application, you open it, do some changes, then you close it, this is much ... 查看
  • 2
    2015-06-29 13:22:07 - 0条回复 - 0次浏览
    其它编程 - 1)将字符串的字符保存在一个hash table中,key是字符,value是这个字符出现的次数: var key = str[i]; if (typeof obj[key] == “undefin ... 查看
  • 2
    2015-07-11 11:57:30 - 0条回复 - 0次浏览
    网站搭建 - 1)TDD是Test Driven Development 的缩写,也就是测试驱动开发。TDD是一种开发技术,而非测试技术,所以它对于代码构建的意义远大于代码测试。其特点应该是由需求得出测试,由测试代 ... 查看
  • 显示更多 ...

个人主页 (全部)

创建帐号 | 忘记密码
app\ctrl\indexCtrl Object
(
    [assign] => Array
        (
            [result] => Array
                (
                    [0] => Array
                        (
                            [id] => 25
                            [0] => 25
                            [cate] => 6
                            [1] => 6
                            [title] => How JavaScript Event Delegation works?
                            [2] => How JavaScript Event Delegation works?
                            [content] => 1) You could add a separate event to an individual element, but the better way is to add an event listener to the parent node, because you do not want to add listener to many elements if these elements are frequently added or removed.
2)element.onclick = function(e){}; or document.getElementById("parent").addEventListener("click", function(e){}; e = e || window.event; var el = e.srcElement || e.target; var classes = el.className.split(" "); or switch(el.className){}
3)As shown above, when the element is clicked, the event bubbles up to the parent element, by checking the target property to gain a reference to the actual clicked node, then we walk up the DOM tree and find the node and do something.
                            [3] => 1) You could add a separate event to an individual element, but the better way is to add an event listener to the parent node, because you do not want to add listener to many elements if these elements are frequently added or removed.
2)element.onclick = function(e){}; or document.getElementById("parent").addEventListener("click", function(e){}; e = e || window.event; var el = e.srcElement || e.target; var classes = el.className.split(" "); or switch(el.className){}
3)As shown above, when the element is clicked, the event bubbles up to the parent element, by checking the target property to gain a reference to the actual clicked node, then we walk up the DOM tree and find the node and do something.
                            [posted_by] => 谭海林
                            [4] => 谭海林
                            [date_posted] => 2015-06-26 17:38:31
                            [5] => 2015-06-26 17:38:31
                            [likes] => 2
                            [6] => 2
                            [comments] => 0
                            [7] => 0
                            [views] => 0
                            [8] => 0
                            [name] => 网站搭建
                            [9] => 网站搭建
                        )

                    [1] => Array
                        (
                            [id] => 38
                            [0] => 38
                            [cate] => 2
                            [1] => 2
                            [title] => 生命只有一次
                            [2] => 生命只有一次
                            [content] => 父亲喃喃地说:“生命已到了尽头,现在才感觉生活如此的美好,假如可以再活一次,那是多么快乐的一件事情啊!”儿子问:“父亲,假如可以再多活一次,你会怎么样呢?”父亲眼里闪现着光芒:“假如可以再活一次,我会尽量地避免错误,我会放松自己,柔软灵活一些。我甚至可以比过去愚笨一点,我不愿意再像现在对每件事都紧张兮兮的。以前我活得太累了,专于心计,又爱斤斤计较,生活得一点都不轻松。我还会多出门旅游,多爬几座高山,多游几条河,多看些日出日落,多唱一些动听的歌,我会多吃些冰激凌,少吃些甜点。我会多做些实际的事情,而非只凭空想象。其实,我的很多日子都是在空想中虚度。这你也知道,我是一个小心谨慎的人,每时每刻都保持着理智。假如可以再活一次,我会多享受一些,我会放松自己,享受生命的每一刻,而不是时常想着未来如何,而且会放松心情去工作,做事。”“假如可以再活一次,我决不会因为一点鸡毛蒜皮的小事与邻里争吵,也不会因为别人的过失而耿耿于怀,现在想想那都是多么愚蠢的事情啊!”
                            [3] => 父亲喃喃地说:“生命已到了尽头,现在才感觉生活如此的美好,假如可以再活一次,那是多么快乐的一件事情啊!”儿子问:“父亲,假如可以再多活一次,你会怎么样呢?”父亲眼里闪现着光芒:“假如可以再活一次,我会尽量地避免错误,我会放松自己,柔软灵活一些。我甚至可以比过去愚笨一点,我不愿意再像现在对每件事都紧张兮兮的。以前我活得太累了,专于心计,又爱斤斤计较,生活得一点都不轻松。我还会多出门旅游,多爬几座高山,多游几条河,多看些日出日落,多唱一些动听的歌,我会多吃些冰激凌,少吃些甜点。我会多做些实际的事情,而非只凭空想象。其实,我的很多日子都是在空想中虚度。这你也知道,我是一个小心谨慎的人,每时每刻都保持着理智。假如可以再活一次,我会多享受一些,我会放松自己,享受生命的每一刻,而不是时常想着未来如何,而且会放松心情去工作,做事。”“假如可以再活一次,我决不会因为一点鸡毛蒜皮的小事与邻里争吵,也不会因为别人的过失而耿耿于怀,现在想想那都是多么愚蠢的事情啊!”
                            [posted_by] => 谭海林
                            [4] => 谭海林
                            [date_posted] => 2015-06-27 16:09:49
                            [5] => 2015-06-27 16:09:49
                            [likes] => 2
                            [6] => 2
                            [comments] => 0
                            [7] => 0
                            [views] => 0
                            [8] => 0
                            [name] => 创业应知
                            [9] => 创业应知
                        )

                    [2] => Array
                        (
                            [id] => 48
                            [0] => 48
                            [cate] => 7
                            [1] => 7
                            [title] => Session and Cookie
                            [2] => Session and Cookie
                            [content] => 1) When you work with an application, you open it, do some changes, then you close it, this is much like a session. The compute knows who you are, it knows when you start this application and when you end. but the web server does not know who you are or what you do. Session variables solve this problem by storing user information at the server side, by default, session variables last until the user closes the browser. // session_start() function, then set session variables.
2) a cookie is often used to identify a user. A coolie is a small file that server embeds on the users computer.setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");  The "/" means that the cookie is available in entire website (otherwise, select the directory you prefer).The setcookie() function must appear BEFORE the <html> tag.
                            [3] => 1) When you work with an application, you open it, do some changes, then you close it, this is much like a session. The compute knows who you are, it knows when you start this application and when you end. but the web server does not know who you are or what you do. Session variables solve this problem by storing user information at the server side, by default, session variables last until the user closes the browser. // session_start() function, then set session variables.
2) a cookie is often used to identify a user. A coolie is a small file that server embeds on the users computer.setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");  The "/" means that the cookie is available in entire website (otherwise, select the directory you prefer).The setcookie() function must appear BEFORE the <html> tag.
                            [posted_by] => 谭海林
                            [4] => 谭海林
                            [date_posted] => 2015-06-29 11:53:27
                            [5] => 2015-06-29 11:53:27
                            [likes] => 2
                            [6] => 2
                            [comments] => 0
                            [7] => 0
                            [views] => 0
                            [8] => 0
                            [name] => 英语
                            [9] => 英语
                        )

                    [3] => Array
                        (
                            [id] => 50
                            [0] => 50
                            [cate] => 8
                            [1] => 8
                            [title] => 判断一个字符串中出现次数最多的字符,统计这个次数
                            [2] => 判断一个字符串中出现次数最多的字符,统计这个次数
                            [content] => 1)将字符串的字符保存在一个hash table中,key是字符,value是这个字符出现的次数:
var key = str[i]; if (typeof obj[key] == “undefined”) {obj[key] = 1; }
2)遍历这个hash table,获取value最大的key和value:
for (key in obj) {
    if (max < obj[key]){
        max = obj[key];
        max_key = key;
    }
}
                            [3] => 1)将字符串的字符保存在一个hash table中,key是字符,value是这个字符出现的次数:
var key = str[i]; if (typeof obj[key] == “undefined”) {obj[key] = 1; }
2)遍历这个hash table,获取value最大的key和value:
for (key in obj) {
    if (max < obj[key]){
        max = obj[key];
        max_key = key;
    }
}
                            [posted_by] => 谭海林
                            [4] => 谭海林
                            [date_posted] => 2015-06-29 13:22:07
                            [5] => 2015-06-29 13:22:07
                            [likes] => 2
                            [6] => 2
                            [comments] => 0
                            [7] => 0
                            [views] => 0
                            [8] => 0
                            [name] => 其它编程
                            [9] => 其它编程
                        )

                    [4] => Array
                        (
                            [id] => 61
                            [0] => 61
                            [cate] => 6
                            [1] => 6
                            [title] => 测试驱动开发和行为驱动开发
                            [2] => 测试驱动开发和行为驱动开发
                            [content] => 1)TDD是Test Driven Development 的缩写,也就是测试驱动开发。TDD是一种开发技术,而非测试技术,所以它对于代码构建的意义远大于代码测试。其特点应该是由需求得出测试,由测试代码得出生产代码。
2)所谓的BDD行为驱动开发,即Behaviour Driven Development,是一种新的敏捷开发方法。它更趋向于需求,需要共同利益者的参与,强调用户故事(User Story)和行为。另外最主观的区别就是用词,‘example’取代了‘test’,‘describe’取代了‘class’,‘behaviour’取代了‘method’等等。这正是其特征之一,自然语言的加入,使得非程序人员也能参与到测试用例的编写中来,也大大降低了客户、用户、项目管理者与开发者之间来回翻译的成本。简单来说,BDD更加注重业务需求而不是技术。
                            [3] => 1)TDD是Test Driven Development 的缩写,也就是测试驱动开发。TDD是一种开发技术,而非测试技术,所以它对于代码构建的意义远大于代码测试。其特点应该是由需求得出测试,由测试代码得出生产代码。
2)所谓的BDD行为驱动开发,即Behaviour Driven Development,是一种新的敏捷开发方法。它更趋向于需求,需要共同利益者的参与,强调用户故事(User Story)和行为。另外最主观的区别就是用词,‘example’取代了‘test’,‘describe’取代了‘class’,‘behaviour’取代了‘method’等等。这正是其特征之一,自然语言的加入,使得非程序人员也能参与到测试用例的编写中来,也大大降低了客户、用户、项目管理者与开发者之间来回翻译的成本。简单来说,BDD更加注重业务需求而不是技术。
                            [posted_by] => 谭海林
                            [4] => 谭海林
                            [date_posted] => 2015-07-11 11:57:30
                            [5] => 2015-07-11 11:57:30
                            [likes] => 2
                            [6] => 2
                            [comments] => 0
                            [7] => 0
                            [views] => 0
                            [8] => 0
                            [name] => 网站搭建
                            [9] => 网站搭建
                        )

                )

            [data] => Hello World
        )

)