摘要: #STEP1 **Slave**是通过MySQL登录到**Master**上读取二进制日志的,因此需要在**Master**上给**Slave**配置权限。 mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'db2' IDENTIFI... 阅读全文
posted @ 2015-04-02 20:49 saintyk 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Canvas 绘制矩形var drawing = document.getElementById('drawing'); if( drawing.getContext ){ var context = drawing.getContext('2d'); // 绘制矩形 conte... 阅读全文
posted @ 2015-03-16 15:22 saintyk 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 人人都懂的编程课(Python)Week03 Exercise Rewrite your pay program using try and except so that your program handles non-numeric input gracefully. Enter Hours: ... 阅读全文
posted @ 2015-02-23 15:16 saintyk 阅读(7912) 评论(0) 推荐(0) 编辑
摘要: 闭包闭包是指有权访问另一个函数函数作用域中的变量(内部变量)的函数.function createComparsionFunction( propertyName ){ return function( object1 , object2 ){ var value1 = object1[ prop... 阅读全文
posted @ 2015-02-08 12:15 saintyk 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 工厂模式工厂模式虽然解决了创建多个相似对象的问题,但没有解决对象识别问题.function createPerson( name , age , job){ var o = new Object(); o.name = name; o.age = age; o.job = j... 阅读全文
posted @ 2015-02-04 13:11 saintyk 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 学习编程:写出高质量的代码Completed Palindrome: Approaching the Problem判断所给的一个字符串是否是回文def is_palindrome(s): """ (str) -> bool Return True if and only if s is... 阅读全文
posted @ 2015-01-25 15:33 saintyk 阅读(574) 评论(0) 推荐(0) 编辑
摘要: #MVC 阅读全文
posted @ 2015-01-19 22:29 saintyk 阅读(102) 评论(0) 推荐(0) 编辑