摘要: 1 def number(num): 2 a=0 3 b=1 4 i=2 5 s=1 6 if num==2: 7 return 1 8 else: 9 while 1: 10 if i=2: 21 res = number(int(num)) 22 ... 阅读全文
posted @ 2018-07-10 17:00 风在人舟 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 用pip工具安装pyaudio模块时,总是报如下错误: fatal error: portaudio.h: No such file or director 尝试了多种方法,之后重新看了一下官网的文件,上面是这样说的: 对于Debian / Ubuntu 使用包管理器安装PyAudio: 如果没有最 阅读全文
posted @ 2018-07-09 18:14 风在人舟 阅读(850) 评论(0) 推荐(0) 编辑
摘要: 在项目目录下执行此命令 python manage.py inspectdb > demo/models.py(前提是已经正确连接数据库) 阅读全文
posted @ 2018-06-28 17:19 风在人舟 阅读(1182) 评论(0) 推荐(0) 编辑
摘要: 1. 安装前先更新软件包列表: 执行此命令 sudo apt update 2. 在Ubuntu 16.04上安装MySQL: 执行此命令 sudo apt-get install mysql-server mysql-client 3. 在安装过程中需要你输入MySQL 管理员用户(root)密码 阅读全文
posted @ 2018-06-21 13:06 风在人舟 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 绑定Github账号 1、打开pycharm选择:File->Settings->Version Control->Github 会出现github,在界面的右上部分将Auth Type: 改为Password,然后输入你github的用户名和密码,可以点击”test”测试一下,如果出现:Conne 阅读全文
posted @ 2018-03-06 14:54 风在人舟 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 结果为: 结果为: (只有第一个能正常输出,另外两个报属性错误) True True AttributeError Traceback (most recent call last) <ipython-input-19-9e3f7cdf9524> in <module>() 2 print(s.is 阅读全文
posted @ 2018-02-27 14:53 风在人舟 阅读(6884) 评论(0) 推荐(1) 编辑
摘要: 函数的作用 1.提升代码的重复利用率,避免重复开发相同代码 2.提高程序开发效率 3.便于程序维护 函数的定义 1.基本格式: def 函数名(): 函数功能代码... 函数功能代码... ... 调用函数: 函数名() 函数定义之后不会自动执行,必须在调用函数后函数才会执行 2.带有参数的格式: 阅读全文
posted @ 2018-02-25 22:34 风在人舟 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 递归 什么是递归? 汉诺塔 什么是汉诺塔? 汉诺塔算法介绍 汉诺塔 什么是汉诺塔? 汉诺塔算法介绍 其实算法非常简单,当盘子的个数为n时,移动的次数应等于2^n – 1(有兴趣的可以自己证明试试看)。后来一位美国学者发现一种出人意料的简单方法,只要轮流进行两步操作就可以了。首先把三根柱子按顺序排成品 阅读全文
posted @ 2018-02-25 20:59 风在人舟 阅读(13120) 评论(0) 推荐(2) 编辑
摘要: 1.到github官网注册一个账户 https://github.com/join?source=header-home 2.自定义一个用户名 邮箱地址 密码 3.登录github 4.登录成功 4.1新建一个仓库 New repository 4.2项目名 默认勾选 initialize this 阅读全文
posted @ 2018-02-08 19:40 风在人舟 阅读(4533) 评论(0) 推荐(0) 编辑
摘要: 下载 VirtualBox官网:https://www.virtualbox.org/,进入官网后如下界面显示,点击Download 跳转之Download界面后选择Windows hosts 开始下载 安装 双击下载好的VirtualBox-5.2.6-120293-Win.exe文件,如下界面, 阅读全文
posted @ 2018-02-04 19:49 风在人舟 阅读(15255) 评论(2) 推荐(1) 编辑