一. 组合 : 1. 什么是组合 ? 一个对象的属性是来自于另外一个类的对象, 称之为组合. (跟继承其实很相似.都是共用一个类里面的属性) 2. 为何用组合 ? 组合也是用来解决类与类代码冗余的问题. 3. 如何用组合 ? BMI指数(bmi是计算而来的,但很明显它听起来像是一个属性而非方法,如果 ...
分类:
编程语言 时间:
2018-10-24 20:20:19
阅读次数:
109
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Example 2: ...
分类:
其他好文 时间:
2018-10-24 20:00:48
阅读次数:
157
property装饰器 property装饰器的作用,其实就是将将函数属性伪装成为属性的的装饰器 但是这这只是伪装成属性的,修改并不像属性一样能被修改 解决方案一: 方案二 ...
分类:
其他好文 时间:
2018-10-24 16:51:08
阅读次数:
206
Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl ...
分类:
其他好文 时间:
2018-10-24 16:06:20
阅读次数:
175
检查页面的network执行中发现页面被刷新了url改变了导致请求在请求过程中被终止了。 检查代码发现在 submit方法中最后写了个 location.reload();方法 来重载页面 虽然是卸载了ajax请求方法之后但是由于ajax启用的异步模式 所以方法在执行的时候不会等待ajax请求方法执 ...
分类:
Web程序 时间:
2018-10-24 15:26:56
阅读次数:
600
1、总体 资源:https://www.processon.com/view/link/5ad1c2d0e4b0b74a6dd64f3c 一、head标签: 二、body标签: 属性: 表单控件: 三、标签特性: ...
分类:
Web程序 时间:
2018-10-21 00:55:22
阅读次数:
160
knowledge-repo 是airbnb 开源的知识管理工具,只集成git 数据库等类型的存储 安装 pip install --upgrade "knowledge-repo[all]" 基本项目 创建git 项目 knowledge_repo --repo init demoapp 创建简单 ...
分类:
其他好文 时间:
2018-10-20 23:44:09
阅读次数:
261
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return the ...
分类:
其他好文 时间:
2018-10-19 00:09:56
阅读次数:
213
平时用$_post[''],$_get['']获取表单中参数时会出现Notice: Undefined index: ; 我们经常接收表单POST过来的数据时报Undefined index错误,如下: $act=$_POST['action']; 用以上代码总是提示 Notice: Undefin ...
分类:
Web程序 时间:
2018-10-18 19:46:48
阅读次数:
208