JAVA 类总结 最近看了遍java内部类相关的一些内容,做一些总结。与个人博客 zhiheng.me 同步发布,标题: JAVA 类总结。 顶级类与嵌套类 定义在某个类(或接口,下同)内部的类,称为嵌套类(nested class),相应的,其所在的类称之为该类的外围类(enclosing cla ...
分类:
编程语言 时间:
2017-03-25 16:29:11
阅读次数:
211
Statements A break statements terminate the nearest wile, do while, for or switch statement. A break affect only the nearest enclosing loop or switch. ...
分类:
编程语言 时间:
2017-02-25 22:56:04
阅读次数:
271
一、this1.1、JavaScript中函数与方法的区分1.2、指向全局对象1.3、作为方法调用1.4、在构造函数中的this1.5、指定this指向的对象1.6、作为事件时的this1.7、小结二、原型(prototype)1.1、为什么需要prototype1.2、typeof与instanc... ...
分类:
编程语言 时间:
2017-01-05 09:59:38
阅读次数:
255
单例模式 单例模式是一种比较常见的模式,看起来很简单,但是要做到高效安全的使用,其中还是有很多要点的。参考了Head First及众多网友的文章,稍微总结一下,以备查看。 单例模式的定义:确保一个类只有一个实例,并且提供一个全局访问点。 1. 最简单的单例(饿汉模式),程序一加载就对 instanc ...
分类:
其他好文 时间:
2016-12-30 02:27:28
阅读次数:
184
一、基本语法 python的 基本语法为: 二、作用域LEGB python的作用域一共有4种,分别为: L(local)局部作用域 E(enclosing)闭包函数外的函数中 G(global)全局作用域 B(built-in)內建作用域 以 L-->E-->G-->B 规则查找,即:在局部找不到 ...
分类:
编程语言 时间:
2016-12-24 14:03:49
阅读次数:
206
1.创建项目。 2.导入开发包。 3.配置web.xml. 配置内容就是配置struct2的内容如下: <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc ...
分类:
Web程序 时间:
2016-12-09 08:05:48
阅读次数:
264
出现:No enclosing instance of type Test_Static is accessible. Must qualify the allocation with an enclosing instance of type Test_Static (e.g. x.new A() ...
分类:
其他好文 时间:
2016-11-20 13:08:49
阅读次数:
184
单例模式 1 使用__new__方法 class Singleton(object): def __new__(cls, *args, **kw): if not hasattr(cls, '_instance'): orig = super(Singleton, cls) cls._instanc ...
分类:
其他好文 时间:
2016-11-02 01:26:22
阅读次数:
208
package test;import java.util.Scanner;import java.util.Random;public class caiquan { public static void main(String[] args){ Game g=new Game(); g.begi ...
分类:
数据库 时间:
2016-10-30 00:24:08
阅读次数:
471
An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one bla ...
分类:
其他好文 时间:
2016-10-15 13:38:57
阅读次数:
124