Python——PyQt GUI编程(python programming)
import sys from math import * from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class Form(QDialog): def __init__(self, parent=None): super().__init__(parent) self.browser = QTextBrowser() self.lineedit = QLineEdit("Type an expression.") self.lineedit.selectAll() layout = QVBoxLayout() layout.addWidget(self.browser) layout.addWidget(self.lineedit) self.setLayout(layout) self.lineedit.setFocus() self.lineedit.returnPressed.connect(self.updateUi) self.setWindowTitle("Calculate") def updateUi(self): try: text = str(self.lineedit.text()) self.browser.append("%s = <b>%s</b>" % (text, eval(text))) except: self.browser.append("<font color=red>%s is invalid!</font>" % text) app = QApplication(sys.argv) form = Form() form.show() app.exec_()
代理模式——动态代理
基于Eclipse的Hadoop应用开发环境配置
利用java反射读取xml配置文件
java nio小结
RPC应用的java实现
Struts2+Hibernate Update问题小结
彻底解决hadoop0.20.203.0eclipseplugin插件安装
Hadoop完全分布式配置
(转)javamail发送带附件邮件