08 2014 档案

摘要:常量(UPPERCASE|UPPER_CASE):不会发生改变的全局变量(注意Python本身并不支持C++中的const常量,这里仅仅是约定),由大写字母、[下划线]组成。通常用来保存默认配置的值。模块、类、方法的私有变量|函数|方法(_lower_case):经常改变的模块级变量(模块内私有),... 阅读全文
posted @ 2014-08-25 18:04 阿驹 阅读(986) 评论(0) 推荐(0)
摘要:有一批共n个集装箱要装上艘载重量为c的轮船,其中集装箱i的重量为wi。找出一种最优装载方案,将轮船尽可能装满,即在装载体积不受限制的情况下,将尽可能重的集装箱装上轮船。#include #define MAX 12882using namespace std;struct node{ int ... 阅读全文
posted @ 2014-08-14 22:28 阿驹 阅读(471) 评论(0) 推荐(0)
摘要:递归回溯 由于回溯法是对解空间的深度优先搜索,因此在一般情况下可用递归函数来实现回溯法如下:t表示递归深度,即当前扩展节点在解空间树的深度。n用来控制递归深度。当t>n时表示算法搜索到叶节点。void backtrack( int t ){ if ( t>n ) output(x); else fo... 阅读全文
posted @ 2014-08-14 22:26 阿驹 阅读(373) 评论(0) 推荐(0)
摘要:注意哦,是三元表达式,不是三元运算符。A = X if Y else Z如果Y为True, A=X,否则A=Z 阅读全文
posted @ 2014-08-14 16:12 阿驹 阅读(343) 评论(0) 推荐(0)
摘要:wx.KeyEventHomeTreesIndexHelpwxPython2.8.9.2 Packagewx :: ClassKeyEvent [frames|noframes]Type KeyEventobject --+ | Object -... 阅读全文
posted @ 2014-08-11 00:05 阿驹 阅读(1820) 评论(0) 推荐(0)
摘要:Character code and keyboards under windowsCharacter setBasically, windows uses the ANSI character set and not the 8-bits ASCII char set. The ANSI cha... 阅读全文
posted @ 2014-08-11 00:03 阿驹 阅读(297) 评论(0) 推荐(0)
摘要:In this post, I’ll detail how to catch specific key presses and why this can be useful. This is another in my series of “requested” tutorials. There r... 阅读全文
posted @ 2014-08-11 00:02 阿驹 阅读(992) 评论(0) 推荐(0)
摘要:wxStyledTextCtrl - Events Copyright and License informationHome__ A B C D E F G H I L M P R S T U V W wxStyledTextCtrl - EventsEvent MaskingGetModEve... 阅读全文
posted @ 2014-08-10 23:29 阿驹 阅读(820) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-08-04 17:44 阿驹 阅读(138) 评论(0) 推荐(0)
摘要:个人认为学习GUI程序开发,最重要的两个基础点就是:事件处理和界面布局。事件处理能够让你在界面上的控件被鼠标、按键等触发的时候做出合适的响应,比如点击“保存”按钮之后弹出标准的文件保存对话框。另外一件重要的就是界面的布局,之所以要有GUI程序,就是为了有良好的用户体验,如果一个软件界面布局乱七八糟的... 阅读全文
posted @ 2014-08-03 01:16 阿驹 阅读(5116) 评论(0) 推荐(0)
摘要:1 # -*- coding:utf-8 -*- 2 #! /usr/bin/env python 3 ''' 4 Created on 2014年8月1日 5 6 @author: dWX232085 7 ''' 8 import wx 9 import os10 11 import imag... 阅读全文
posted @ 2014-08-01 16:15 阿驹 阅读(322) 评论(0) 推荐(0)