博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 6 7 8 9 10

2018年3月30日

摘要: git配置文件 : .git/config 配置存储远程连接用户信息 [credential] helper = store 配置www用户下默认git pull账号和密码,这样每一个新加的项目都不用输入账号 vim ~/.gitconfig; chmod 600 ~/.gitconfig vim 阅读全文

posted @ 2018-03-30 15:06 alex_hrg 阅读(130) 评论(0) 推荐(0) 编辑

2018年3月28日

摘要: 查看 cat -v 1.sh 替换 sed -i 's/\r//g' 1.sh 阅读全文

posted @ 2018-03-28 16:34 alex_hrg 阅读(1050) 评论(0) 推荐(1) 编辑

摘要: 代码中只有一次的函数,创建即删除的函数叫匿名函数,格式一般为 lambda 参数:简单不含冒号的函数体,lambda n:print(n) 如何调用呢? 一,(lambda n:print(n)) (3) 二,c = lambda n:print(n);c(5) 匿名函数只能实现简单函数体,和在特定 阅读全文

posted @ 2018-03-28 15:19 alex_hrg 阅读(150) 评论(0) 推荐(0) 编辑

摘要: python中 字符串当列表引用时,跟元组一样,不可以修改其内容,想修改其内容可以把其变成bytearray,再修改是可以的 a = bytes("abcde",encoding="utf8") 变成字节不能修改 b = bytearray("abcde",encoding="utf8") b[1] 阅读全文

posted @ 2018-03-28 14:24 alex_hrg 阅读(110) 评论(0) 推荐(0) 编辑

摘要: 整形 非0即真 字符串 非空即真 列表,元组,字典,集合为空时 为假 函数 返回值为空(即函数中只写了return后面没参数),为0(即return 0),为空的列表,字典,集合。那么条件判断函数也是假 条件比较 类型一样,完全匹配为真 阅读全文

posted @ 2018-03-28 10:57 alex_hrg 阅读(703) 评论(0) 推荐(0) 编辑

2018年3月26日

摘要: mysql从5.6版本开始,如果是命令行直接出现了数据库连接密码就会有以下警告: mysql: [Warning] Using a password on the command line interface can be insecure. 如用mysql -uroot -proot -e 'sh 阅读全文

posted @ 2018-03-26 15:51 alex_hrg 阅读(1128) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10