05 2019 档案

2019-05-24 python slots概念
摘要:关于__slots__有一个常见的误解,就是将__slots__理解为一种封装工具,可以阻止用户为实例添加新的属性,尽管这的确是使用__slots__所带来的副作用,但这绝不是使用__slots__的原本意图,相反,人们一直以来都是__slots__当做一种优化工具。 __slots__核心作用是: 阅读全文

posted @ 2019-05-24 20:12 IT-Kira 阅读(201) 评论(0) 推荐(0)

2019-05-23 问题记录:sublime text3 python运行报错 [WinError 2] 系统找不到指定的文件。
摘要:[WinError 2] 系统找不到指定的文件。 [cmd: ['C:/Users/Desktop/wyProject/master/master/Server/venv/Scripts/python.exe', '-u', 'C:\\Users\\Desktop\\wyProject\\subli 阅读全文

posted @ 2019-05-23 17:43 IT-Kira 阅读(6152) 评论(0) 推荐(0)

2019-05-17 shell记录
摘要:$10 不能获取第十个参数,获取第十个参数需要${10}。当n>=10时,需要使用${n}来获取参数。 阅读全文

posted @ 2019-05-17 17:02 IT-Kira 阅读(128) 评论(0) 推荐(0)

2019-05-16 shell数学符号
摘要:-eq //等于 -ne //不等于 -gt //大于 (greater ) -lt //小于 (less) -ge //大于等于 -le //小于等于 命令的逻辑关系: 在linux 中 命令执行状态:0 为真,其他为假 逻辑与: &&第一个条件为假时,第二条件不用再判断,最终结果已经有;第一个条 阅读全文

posted @ 2019-05-16 21:32 IT-Kira 阅读(162) 评论(0) 推荐(0)

2019-05-11 问题记录:python进制转换
摘要:1. print int(12345,base=2) TypeError: int() can't convert non-string with explicit base int()函数用来将一个字符串或数字类型转换成整数,如果只有一个参数值,这个值可以是字符串或数字;但是传入两个参数,第一个参 阅读全文

posted @ 2019-05-11 21:10 IT-Kira 阅读(1106) 评论(0) 推荐(0)

2019-05-11unindent does not match any outer indentation level在pycharm平台的解决方法
摘要:unindent does not match any outer indentation level的错误,发生错误的原因一般有三点:1、代码前后缩进量不一致 可以看到def前面有红色小波浪线,说明在这里出现了缩进错误,显然def前面的注释缩进量和def不一致(一个为2一个为4),改成一致就好了 阅读全文

posted @ 2019-05-11 17:25 IT-Kira 阅读(9115) 评论(0) 推荐(1)

2019-05-09 pycharm自动增加文件头配置
摘要:pycharm 找到该路径并添加以下信息 File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python# -*- coding: utf-8 -*-# @Time : ${DATE} ${TI 阅读全文

posted @ 2019-05-09 17:38 IT-Kira 阅读(107) 评论(0) 推荐(0)

2019-05-07
摘要:LeetCode https://github.com/MisterBooo/LeetCodeAnimation 动画讲解 https://github.com/azl397985856/leetcode 解题思路 https://www.zhihu.com/question/24964987/an 阅读全文

posted @ 2019-05-07 19:19 IT-Kira 阅读(110) 评论(0) 推荐(0)

导航