随笔分类 -  Python

Applets written by Python, or something else about Python
摘要:假设需要解码的URL字符串为%21%26,则解码如下: 1.Python3 echo -n "%21%26" | python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));" 阅读全文
posted @ 2021-10-06 10:39 enjoy_jun 阅读(230) 评论(0) 推荐(0)
摘要:注意:Python 版本 2.6+ 想要将 { "foo": "lorem", "bar": "ipsum" } 格式化为. { "foo": "lorem", "bar": "ipsum" } 1.用Python格式化JSON字符串 命令如下: echo '{"foo": "lorem", "ba 阅读全文
posted @ 2021-10-05 18:50 enjoy_jun 阅读(1255) 评论(0) 推荐(0)
摘要:C #include <stdio.h> int main(void) { FILE *fptr = fopen("ip.txt", "w"); for(int k=1; k<255; k++){ for(int j=1; j<255; j++){ for(int i=1; i<255; i++){ 阅读全文
posted @ 2021-09-16 12:35 enjoy_jun 阅读(111) 评论(0) 推荐(0)
摘要:C #include <stdio.h> int main(void) { FILE *fptr = fopen("code.txt", "w"); for(int i=0; i<=999999; i++) { fprintf(fptr, "%06d\n", i); } fclose(fptr); 阅读全文
posted @ 2021-08-26 13:55 enjoy_jun 阅读(208) 评论(0) 推荐(0)