s为字符串 s.isalnum() 所有字符都是数字或者字母 s.isalpha() 所有字符都是字母 s.isdigit() 所有字符都是数字 s.islower() 所有字符都是小写 s.isupper() 所有字符都是大写 s.istitle() 所有单词都是首字母大写,像标题 s.isspa ...
分类:
编程语言 时间:
2016-05-14 18:54:43
阅读次数:
137
最近学习了设计模式中的观察者模式,在这里记录下学习成果。 观察者模式,个人理解:就是一个一对多模型,一个主体做了事情,其余多个主体都可以观察到。只不过这个主体可以决定谁去观察他,以及做什么事情可以给别人观察。 引用大师的话就是 观察者模式是对象的行为模式,又叫发布-订阅(Publish/Subscr ...
分类:
编程语言 时间:
2016-05-14 18:52:05
阅读次数:
162
1.Date获取当前时间 1.1将时间毫秒转为日期格式。 1.2获取时间示例 待续。。。 ...
分类:
编程语言 时间:
2016-05-14 18:53:17
阅读次数:
163
#include<stdio.h>int main(){ int n,a,b,c,i; while(i--) { scanf("%d",&n); if(n==0) break; a=n/100; b=(n/10)%10; c=n%10; if(a*a*a+b*b*b+c*c*c==n) printf ...
分类:
编程语言 时间:
2016-05-14 18:50:24
阅读次数:
198
345. Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s = "hello", r ...
分类:
编程语言 时间:
2016-05-14 18:50:20
阅读次数:
149
217. Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears a ...
分类:
编程语言 时间:
2016-05-14 18:50:20
阅读次数:
198
226. Invert Binary Tree Invert a binary tree. to ...
分类:
编程语言 时间:
2016-05-14 18:49:59
阅读次数:
152
Ray Marching体积渲染+perlin noise 动态效果: 博主近期渲染: 2016的渲染 2015后半段的渲染 by wolf96 ...
分类:
编程语言 时间:
2016-05-14 18:48:06
阅读次数:
153
100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structura ...
分类:
编程语言 时间:
2016-05-14 18:50:12
阅读次数:
157
一 ID3算法的大致思想 基本的ID3算法是通过自顶向下构造决策树来进行学习的。我们首先思考的是树的构造从哪里开始,这就涉及到选择属性进行树的构造了,那么怎样选择属性呢?为了解决这个问题,我们使用统计测试来确定每一个实例属性单独分类训练样例的能力,把分类能力最好的属性作为树根节点的测试。然后为根节点 ...
分类:
编程语言 时间:
2016-05-14 18:48:12
阅读次数:
262
python文件和目录操作 python连接mysql数据库 Python字符编码详解 unicode相关介绍 ...
分类:
编程语言 时间:
2016-05-14 18:48:38
阅读次数:
134
283. Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. ...
分类:
编程语言 时间:
2016-05-14 18:45:37
阅读次数:
155
171. Excel Sheet Column Number Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding ...
分类:
编程语言 时间:
2016-05-14 18:47:09
阅读次数:
247
目录 python_基础总结1 python由来 字符编码 注释 pyc文件 python变量 导入模块 获取用户输入 流程控制if while python_基础总结1 python由来 字符编码 注释 pyc文件 python变量 导入模块 获取用户输入 流程控制if while ...
分类:
编程语言 时间:
2016-05-14 18:44:02
阅读次数:
126
344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". 题目大意: 字 ...
分类:
编程语言 时间:
2016-05-14 18:44:19
阅读次数:
179
本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流 ...
分类:
编程语言 时间:
2016-05-14 18:44:25
阅读次数:
154
《Thinking in Java》上对这章的讲解不少,可见重要性,学习和总结一些主要的记录下来。 一、创建自定义异常 throw与throws的区别与详情 编译器创建了默认构造器,它将自动调用基类的默认构造器。 对异常来说,最重要的部分就是类名,其它也没用,可以增加一个带参的构造方法。 比如Nul ...
分类:
编程语言 时间:
2016-05-14 18:44:20
阅读次数:
257