import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton
from PyQt5.QtCore import QCoreApplication
class Example(QWidget):
def __init__(self):
super().__init__()
s...
分类:
其他好文 时间:
2015-04-28 22:56:15
阅读次数:
186
Submysub=super;//父类对象赋值给子类对象,不能反过来。downcasting。Super&mysuper=sub;//父类对象引用子类对象,即向上类型强制转换upcasting如果要进行向下类型强制转换,应该利用dynamic_cast,它使用该类型对象的内置知识来防止无意义的类型转换。Sub*mysub=dynamic_..
分类:
编程语言 时间:
2015-04-28 19:03:36
阅读次数:
185
package com.eyugame.modle;
/**
* 外观模式
* @author JYC506
*
*/
public class Computer {
private Cpu cpu;
private Disk disk;
public Computer() {
super();
this.cpu = new Cpu();
this.disk = new ...
分类:
其他好文 时间:
2015-04-28 14:17:00
阅读次数:
115
package com.eyugame.modle;
/**
* 代理模式
* @author JYC506
*
*/
public class Proxy implements IFood{
private IFood apple;
public Proxy() {
super();
apple=new Apple();
}
@Override
public v...
分类:
其他好文 时间:
2015-04-28 11:40:43
阅读次数:
83
- (void)viewDidLoad{ [super viewDidLoad]; [self initButton];}- (void)initButton{ UIButton *button = [[UIButton alloc]init]; button.backgroundColor...
分类:
移动开发 时间:
2015-04-28 11:01:19
阅读次数:
324
Problem G
Probability|Given
Input: Standard Input
Output: Standard Output
N friends go to the local super market together. The probability of their buying something from the market is respectiv...
分类:
其他好文 时间:
2015-04-28 09:49:46
阅读次数:
145
多态的好处多态的局限性或者[super init]调用父类init 完成 继承自父类 属性的初始化
分类:
其他好文 时间:
2015-04-27 23:10:44
阅读次数:
96
衰减动画- (void)viewDidLoad { [super viewDidLoad]; [self initCircleBtn];}- (void)initCircleBtn{ // 实例化手势,并最终将手势添加到圆形按钮上 UIPanGestureRecognizer *pan = [...
分类:
移动开发 时间:
2015-04-27 18:21:01
阅读次数:
125
package com.eyugame.modle;
/**
* 命令模式
* @author JYC506
*
*/
public class MyCommand implements ICommand{
private Receiver receiver;
public MyCommand(Receiver receiver) {
super();
this.rec...
分类:
其他好文 时间:
2015-04-27 11:17:44
阅读次数:
105