shell
three trees
三木无林,却以成森
展开
-
thrift使用记录——netcore客户端 ——python服务端
Thriftthrift是一个RPC(Remote Procedure Call)框架。其使用是通过编写IDL(Interface Definition Language)来同一规约服务端和客户端。这个IDL为.thrift文件。实操记录本文全程在windows下操作首先下载thrift,这边下载的是0.13.0版本。下载地址:http://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.exe(版本很重要,各个语言的thrift包都需要保原创 2021-04-09 17:05:34 · 309 阅读 · 0 评论 -
TypeError: Test() takes exactly 1 argument (2 given) python报错小记
这边有如下代码:class AlbumS3Handler: def Test(str): print str return Trueif __name__ == "__main__": handler = ALbumS3Handler() handler.Test("hello")报错:TypeError: Test() takes exactly 1 argument (2 given)这个是因为python类中函数定义时需要加入参数self。因为原创 2021-04-09 16:29:45 · 1093 阅读 · 0 评论 -
Centos7 LAMP搭建
apache安装httpdyum -y install httpd启动httpdsystemctl start httpd这时候在浏览器输入云服务器ip,或者本地ip即可访问到原创 2019-11-19 19:46:51 · 188 阅读 · 0 评论 -
shell 参数处理
#!/bin/bashecho $0 #输出当前脚本相对位置echo $1 #第一个传递到脚本的参数,从1开始,后面依次echo $# #输出传递到脚本的参数个数echo $* #以一个字符串的形式给所有传递到脚本的参数输出echo $@ #多个参数分别输出echo $$ #当前进程的PIDecho $! #后台运行的最后一个进程的ID号echo $? #最后命令的...原创 2020-03-29 19:22:53 · 112 阅读 · 0 评论