摘要: IO在计算机中指Input/Output,也就是输入和输出。1、文件读写,1,读文件【使用Python内置函数,open,传入文件名标示符】>>> f = open('/Users/michael/test.txt', 'r')标示符‘r’代表 读。如果文件打开成功,调用read()方法可以一次读取... 阅读全文
posted @ 2015-08-24 17:37 oiliu 阅读(678) 评论(0) 推荐(0) 编辑
摘要: MVVM:模型-视图-视图模型(Model-View-ViewModel)注意:它是双向绑定的源:http://www.ruanyifeng.com/blog/2015/02/mvcmvp_mvvm.html 阅读全文
posted @ 2015-08-24 10:57 oiliu 阅读(239) 评论(0) 推荐(0) 编辑
摘要: ES6标准新增了一种新的函数:Arraw Function(箭头函数)。x => x * x这个函数相当于function (x){ return x * x;}题外话:user strit javascript严格模式var fn = x=>x*x;alert(fn(4));返回值为:4*4... 阅读全文
posted @ 2015-08-23 22:00 oiliu 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 深刻理解python中的元类 阅读全文
posted @ 2015-08-23 21:48 oiliu 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1、多成继承class SmallDog(Animal,Dog) passMixIn就是一种常见的设计。2、定制类类似__slots__这种形如 __xxx__ 的变量或者函数名,在python中有特殊的用途的。class中有特殊用途的函数,可以定制类。3、使用枚举类每个常量都是class的一... 阅读全文
posted @ 2015-08-23 21:47 oiliu 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Kube javascript tools 阅读全文
posted @ 2015-08-22 22:16 oiliu 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 来源参考:http://www.uisdc.com/graphic-designer-self-improvement 分层法的三层:“背景层”,“图形层”,“信息层” 1,背景层,一般为纯色,场景, 2,图形层,主角, 3,信息层,文字信息, 阅读全文
posted @ 2015-08-22 09:06 oiliu 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 原理:是临近的数字两两进行比较,按照从小到大或者从大到小的顺序进行交换,function bubbleClick() { var str = "50,1,4,6,9,76,43,22,2,44,7,66"; bubble(str);}function bubble(str) { v... 阅读全文
posted @ 2015-08-20 20:34 oiliu 阅读(522) 评论(1) 推荐(1) 编辑
摘要: 1、使用 __slots__ 给实例绑定方法,>>> def set_age(self, age): # 定义一个函数作为实例方法... self.age = age...>>>from types import MethodType>>>s.set_age=MethodType(set_a... 阅读全文
posted @ 2015-08-20 14:02 oiliu 阅读(168) 评论(2) 推荐(1) 编辑
摘要: 源:http://knockoutjs.com/documentation/event-binding.html推荐 函数说明:aTuijian-->函数名称,$data -->固定参数,ZWID -->自定义传参, 阅读全文
posted @ 2015-08-19 11:27 oiliu 阅读(1118) 评论(0) 推荐(0) 编辑
摘要: 获取对象信息1、使用isinstance()判断class类型2、dir() 返回一个对象的所有属性和方法3、如果试图获取不存在的对象会抛出异常【AttributeError】4、正确利用对象内置函数的例子:def readImage(fp): if hasattr(fp,"read"): ... 阅读全文
posted @ 2015-08-19 11:14 oiliu 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 源:http://www.cnblogs.com/spmxlBlog/archive/2010/06/28/1766832.html定义:强类型语言(静态类型语言)是指需要进行变量/对象类型声明的语言,一般情况下需要编译执行。 例如C/C++/Java/C#弱类型语言(动态类型语言)是指不需要进行变... 阅读全文
posted @ 2015-08-19 11:10 oiliu 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1、在Python中两个下划线__ 就是带便私有属性 private 注意已两个下划线开头并且结尾的 如 __init__ 是特殊变量,不是私有变量2、多态,Python的“file-like object“就是一种鸭子类型。 阅读全文
posted @ 2015-08-18 20:19 oiliu 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 1、注:必须牢记类是抽象的模板,而实例是根据类创建出来的一个个具体的“对象”2、定义类通过class 关键字;class 后面跟着类名,类名通常都是大写开头,接着是(object),表示类是从哪里继承俩的,所有类都继承自object。class Student(object): pass3、通... 阅读全文
posted @ 2015-08-17 20:48 oiliu 阅读(145) 评论(0) 推荐(0) 编辑
摘要: jQuery实现图片上下飘动效果function moveRocket() { $(".smallShip") //2000毫秒内top = top + 60; .animate({ 'top': '+=60' }, 2000) ... 阅读全文
posted @ 2015-08-17 14:40 oiliu 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Jquery 实现页面滚动到顶端 $(document).ready(function () { // 滚动窗口来判断按钮显示或隐藏 $(window).scroll(function () { //根据滚动条距顶部位置,显示还是隐藏top按钮 if ... 阅读全文
posted @ 2015-08-17 10:33 oiliu 阅读(1018) 评论(0) 推荐(0) 编辑
摘要: 一个.py文件就称之为一个模块(Model)按目录来组织模块的方法,称为包(Package)每一个包目录下面都会有一个__init__.py的文件内置函数 1、使用模块导入模块import sysfrom PIL import Image2、安装第三方模块我只能说是命令行安装. 阅读全文
posted @ 2015-08-13 18:17 oiliu 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1 注意:如果不设置path,默认为当前路径,新建cookie 2 3 $.cookie('name', 'value'); 4 5 新建带限制时间cookie 6 $.cookie('name', 'value', { expires: 7 }); 7 新建限制时间和路径cookie, 8 ... 阅读全文
posted @ 2015-08-13 14:58 oiliu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: [1,2] 阅读全文
posted @ 2015-08-12 17:21 oiliu 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 函数式编程高阶函数 就是把函数作为参数的函数,这种抽象的编程方式就是函数式编程。-----跳过,不是很理解,汗---- 阅读全文
posted @ 2015-08-12 17:03 oiliu 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1、json 一共就这么几种数据类型 ①,number 和JavaScript的number完全一样 ②,boolean 就是JavaScript的true和false ③,string 就是JavaScript的string ④,null 就是JavaScript的null ⑤,array 就是... 阅读全文
posted @ 2015-08-11 11:34 oiliu 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 参考地址:http://www.w3cplus.com/css3/new-css3-linear-gradient.htmlbackground-image: linear-gradient(to bottom, //渐变方向#d9edf7 //开始颜色0px, ... 阅读全文
posted @ 2015-08-08 10:04 oiliu 阅读(155) 评论(1) 推荐(0) 编辑
摘要: 官网:layerUI中文手册:layerAPI 阅读全文
posted @ 2015-08-08 09:25 oiliu 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 一、函数的参数1、位置参数2、默认参数n就是默认参数def power(x,n=2): s=1 while n > 0: n = n - 1 s = s * x return s默认参数有个坑,就是 默认参数要设置为 不可变对象,【str和None】3、... 阅读全文
posted @ 2015-08-07 15:43 oiliu 阅读(381) 评论(0) 推荐(1) 编辑
摘要: background: #22b4ff //背景色 url("http://images.cnblogs.com/cnblogs_com/oiliu/529256/o_titleIMG.jpg") //背景图 no-repeat //不拉... 阅读全文
posted @ 2015-08-07 12:51 oiliu 阅读(169) 评论(4) 推荐(0) 编辑
摘要: 源:Knockout.js 日期格式化源:momentjs 阅读全文
posted @ 2015-08-07 11:32 oiliu 阅读(914) 评论(0) 推荐(0) 编辑
摘要: 1、数据类型转换 int(),float(),str(),bool('1')2、定义函数使用 def关键字,依次写出 函数名、括号、括号中的参数、冒号,然后在缩进体中写函数内容例子求绝对值的函数def my_abs(x): if x>=0: return x else: ... 阅读全文
posted @ 2015-08-06 19:27 oiliu 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 源:http://www.liaoxuefeng.com1、注意这里用了一个“创建一个匿名函数并立刻执行”的语法:(function (x) { return x * x;})(3); // 9理论上讲,创建一个匿名函数并立刻执行可以这么写:function (x) { return x * ... 阅读全文
posted @ 2015-08-05 19:42 oiliu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: # 条件判断elif: else if 的作用注意: : 【冒号】BMI =w/(h*h)if BMI10: n-1 print(n)二、n = 20while n > 10: n = n-1 print('1',n)一和二的不同,,,#dict和setdict 字典 dic... 阅读全文
posted @ 2015-08-05 18:23 oiliu 阅读(241) 评论(0) 推荐(0) 编辑
摘要: list 类型,这不就是js里的数组吗,,最后一个元素索引是 -1list是一个可变的有序的表,#追加.append('admin')#插入.insert(1,'admin')#删除末尾元素.pop()#删除指定位置元素.pop(1)####多维数组 list内包含list p=['a','b','... 阅读全文
posted @ 2015-08-05 16:39 oiliu 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 分页查询:return this.GetDynamicListWithPaging(ParamQuery.Instance() .From("P_Resume") .AndWhere("AuditState", query["A... 阅读全文
posted @ 2015-07-31 16:06 oiliu 阅读(385) 评论(0) 推荐(0) 编辑
摘要: python笔记,写在前面:python区分大小写1、科学计数法,把10用e代替,1.23x10·9就是 1.23e9 或者 0.00012就是1.2e-42、转义字符 \ 或者 r''【相当于C#里的@】r代表 raw string里边的\不转义 要表示 \ 就要写成 \\ 换行符 可以用 '''... 阅读全文
posted @ 2015-07-31 10:21 oiliu 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 方法一:public int SaveJob(JObject data) { var formWrapper = RequestWrapper.Instance().LoadSettingXmlString(@" {0} ", "C_Jobs"); ... 阅读全文
posted @ 2015-07-29 16:26 oiliu 阅读(250) 评论(0) 推荐(0) 编辑
摘要: /**-- ============================================= Author: xftCteateDate: 2013-10-11Description:查看表的完整字段信息Remark:ModifyHistory:修改 添加了字段长度和标识等信息**/--... 阅读全文
posted @ 2015-07-24 09:58 oiliu 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 函数:jQuery.inArray(value,array,[fromIndex])解释: value:用于在数组中查找是否存在 array:待处理数组。 fromIndex:用来搜索数组队列,默认值为0。注意:区分参数类型例子:var m_31 = [1,3,5,7,8,10,12];var m_... 阅读全文
posted @ 2015-07-22 11:47 oiliu 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 源:http://www.cnblogs.com/cbcye/archive/2009/03/10/1407672.html 阅读全文
posted @ 2015-07-21 15:44 oiliu 阅读(167) 评论(0) 推荐(0) 编辑
摘要: //个人理解:前台一个form加input[type='file'],在加一个submit的按钮 主要设置form的action,method,enctype='multipart/form-data' * file要指定 name要不后台Request不到额, 后台:Request.files[]... 阅读全文
posted @ 2015-07-20 15:09 oiliu 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 【如题】个人理解就是 你向传数据【josn格式】了,但是后台接受确不是json格式的 数据,贴段代码var strJson = '{ "usercode": "123", "password": "123"}'; $.ajax({ type: "POST", ... 阅读全文
posted @ 2015-07-16 14:45 oiliu 阅读(1368) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.asp.net/mvc/overview/performance/bundling-and-minification打开App_Start\BundleConfig.cs文件并检查的RegisterBundles方法,用于创建、 注册和配置包。下面的代码演示Regis... 阅读全文
posted @ 2015-07-13 11:52 oiliu 阅读(250) 评论(2) 推荐(1) 编辑
摘要: 发布web到iis不能运行Google ----- ╲http://stackoverflow.com/questions/12057540/installing-asp-net-mvc-4-on-a-server----1、打包发布【记得Release - Any CPU】问题解决了,不知道原理。... 阅读全文
posted @ 2015-07-10 11:31 oiliu 阅读(171) 评论(0) 推荐(0) 编辑