- 博客(8)
- 收藏
- 关注

原创 Qt新安装之后出现Error while building/deploying (kit: Desktop Qt 5.7.0 GCC 64bit) When executing step "Make”
Ubuntu14.04初次安装Qt之后可能出现Error while building/deploying project *** (kit: Desktop Qt 5.7.0 GCC 64bit) When executing step "Make"错误。解决方法:首先,sudo apt-get install build-essential然后尝试"run"
2016-08-17 16:54:56
51465
14

原创 python中set(可变集合)、frozenset(不可变集合)的基本操作
python中set(可变集合)、frozenset(不可变集合)的基本操作#!/usr/bin/env python#coding=utf-8def main(): #可变集合 print ">>>>>>>>>>>>>>>>Set" sets1 = set("this is a print's set1") sets2 = set("this is a wsy's se
2015-08-28 12:39:19
20775

原创 python中str(字符串)、list(列表)、tuple(元组)、dict(字典)相互转化关系及字典键-值遍历
python中str(字符串)、list(列表)、tuple(元组)、dict(字典)相互转化关系及字典键-值遍历#!/usr/bin/env python#coding=utf-8def main(): strs = "this is a cjh's str" lst = ['this', 'is', 'a', "cjh's", 'list'] tpl = ('this'
2015-08-27 22:42:17
4180

原创 python中单继承和多继承中子类默认继承父类的哪个构造函数__init__
单继承情况(1)子类默认无__init__时,则会直接继承父类__init__#!/usr/bin/env python#coding=utf-8 class BaseClass: """docstring for BaseClass""" def __init__(self): self.name = 'cjh' print 'BaseClass: Construct
2015-08-11 20:59:08
4297

转载 扑克牌顺子
[来自牛客网剑指Offer]题目描述:LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张^_^)...他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子,如果抽到的话,他决定去买体育彩票,嘿嘿!!“红心A,黑桃3,小王,大王,方片5”,“Oh My God!”不是顺子.....LL不高兴了,他想了想,决定大\小 王可以看成任何数字,并
2015-07-28 11:55:56
664

转载 求1+2+3+...+n
[来自牛客网剑指Offer]题目描述:求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。#include using namespace std;int Sum_Solution(int n){ int iSum = n; n && (iSum += Sum_Solution(
2015-07-28 11:38:02
443

转载 24点
[来自华为OJ]问题描述:给出4个1-10的数字,通过加减乘除,得到数字为24就算胜利。输入:4个1-10的数字。[数字允许重复,测试用例保证无异常数字]输出:True or False示例:输入7 2 1 10输出True#include #include using namespace std;int CalcNum(int i
2015-07-28 11:16:59
725
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人