参考:[1]stackoverflow: what is the difference between old style and new style classes in Python? [2] The Inside Story on New-style Classes
分类:
编程语言 时间:
2015-09-02 23:16:21
阅读次数:
276
Your code will work fine: the weak reference will not cause a retain cycle as you explicitly instruct ARC not to increase the retainCount of your weak...
分类:
其他好文 时间:
2015-08-30 17:11:47
阅读次数:
185
类(class):class关键词:let TestClass = class {};const instance = new TestClass();{class Inside {}}typeof Inside // undefined: block scoped方法与constructor:cl...
分类:
其他好文 时间:
2015-08-30 12:50:50
阅读次数:
202
copy constructor也分为trivial和nontrivial两种
如果class展现出bitwise copy semantics(按位拷贝语义),则不会构造出
copy constructor。
反之,会构造出一个copy constructor。
不要bitwise copy semantics
内含一个拥有nontrivial copy constructor的成员变量
b...
分类:
其他好文 时间:
2015-08-30 10:00:01
阅读次数:
123
4种情况下编译器会构造出nontrivial(有用)的构造函数
带有default construction的member class object
我们有两个class:
class Foo { public: Foo(), Foo(int) … };
class Bar { public: Foo foo; char *str;};
则编译器会在Bar中合成一个默认的构...
分类:
其他好文 时间:
2015-08-29 17:06:13
阅读次数:
117
签名机制最近看了objc.io上第17期中的文章 《Inside Code Signing》 对应的中文翻译版 《代码签名探析》 ,受益颇深,对iOS代码签名机制有了进一步的认识。想了解详细内容建议大家还是去看原文好了。下面是对此文章的理解再结合自己之前对该部分的认识写出的学习笔记。本文的前提是已经...
分类:
移动开发 时间:
2015-08-27 07:09:05
阅读次数:
192
最近在阅读 《Inside the JVM》 这本书,结合一些日常工作学习中的感想,随便写一些东西,蜻蜓点水,不必有章法。 关于“单例同步”: 一直有人在问单例对象的并发调用是否需要同步,基本属于“月经帖”了,答案是现成的满天下都是,但真正能让人心里踏实下来的解释寥寥无几。实际上,只要学习了一...
分类:
其他好文 时间:
2015-08-26 17:28:49
阅读次数:
135
Bad owner or permissions on .ssh/config? The file has bad permissions.? If you get this error try: chmod?600?* inside the .ssh folder. according to the manual of openssh? ~/.ssh/config ? ?T...
分类:
其他好文 时间:
2015-08-25 19:48:26
阅读次数:
167
1.把C++当成一门新的语言学习(和C没啥关系!真的。);
2.看《Thinking In C++》,不要看《C++变成死相》;
3.看《The C++ Programming Language》和《Inside The C++ Object Model》,
不要因为他们很难而我们自己是初学者所以就不看;
4.不要被VC、BCB、BC、MC、TC等词汇所迷惑
——...
分类:
编程语言 时间:
2015-08-21 00:14:44
阅读次数:
202
/***具体说明见 http://www.cnblogs.com/coffee/archive/2011/12/05/inside-java-singleton.html*/package com.work.pattern;public class Singleton2 { private ...
分类:
编程语言 时间:
2015-08-19 22:43:04
阅读次数:
127