码迷,mamicode.com
首页 >  
搜索关键字:print spooler    ( 43561个结果
遍历Java数组的另一种写法
int a = new int [] {1,2,3} for (int x :a) { System.out.println(x); } ...
分类:编程语言   时间:2020-12-31 12:26:37    阅读次数:0
多线程与多进程pid的比较
code from threading import Thread from multiprocessing import Process import os def work(name): print('{}的pid是'.format(name), os.getpid()) if __name__ ...
分类:编程语言   时间:2020-12-31 12:09:31    阅读次数:0
多进程
code import os from multiprocessing import Process def f(x): print('子进程id :',os.getpid(),'父进程id :',os.getppid()) return x*x if __name__ == '__main__': ...
分类:系统相关   时间:2020-12-31 12:06:57    阅读次数:0
变量与基本数据类型
嵌套取值操作 1. 请取出第一个学生的第一个爱好 students_info = [['egon', 18, ['play', ]], ['alex', 18, ['play', 'sleep']]] print(students_info[0][2][0]) 2. 针对字典,请取出取公司名 inf ...
分类:其他好文   时间:2020-12-31 12:02:21    阅读次数:0
python3 多进程
code import multiprocessing def foo(i): print ('called function in process: %s' %i) return if __name__ == '__main__': Process_jobs = [] for i in range ...
分类:编程语言   时间:2020-12-31 11:59:32    阅读次数:0
BeautifulSoup4 print() 输出中文乱码解决方法
urllib.request 返回的数据需要解码,如 网站返回的是GBK编码数据. 需要调用decode("gbk") 此时输出不会乱码. with urllib.request.urlopen(url, context=context) as response: html = response.r ...
分类:其他好文   时间:2020-12-31 11:55:54    阅读次数:0
使用python将字符串首字母大写,其余字母保持不变
1. 目标功能: 将字符串首字母转成大写,而字符串其余字母保持不变 2. 如果使用字符串的capitalize()方法, 可以将字符串的首字母转为大写, 同时会将字符串其余字母都转为小写 示例代码: text_str = "badBoy" print(text_str.capitalize()) 执 ...
分类:编程语言   时间:2020-12-30 11:36:29    阅读次数:0
Redis端口存活检测
计划任务crontab-e*/1****sudosh/root/redis/redis_cluster/7003-cron.sh脚本#!/bin/shredis=`netstat-an|grep":7003"|awk‘$1=="tcp"&&$NF=="LISTEN"{print$0}‘|wc-l`if[$redis-eq0];then#端口被占用执行如下sudo/root/redi
分类:其他好文   时间:2020-12-30 11:20:41    阅读次数:0
冒泡排序
list=[1,4,3,6,0,33] for j in range(0,len(list)-1): for i in range(0,len(list)-1): if list[i] > list[i+1]: list[i],list[i+1]=list[i+1],list[i] print('l ...
分类:编程语言   时间:2020-12-30 10:55:29    阅读次数:0
二维数组小练习 打印 杨辉三角
` public class YanghuiTest { public static void main(String[] args) { int[][] yh = new int[10][]; for(int i=0;i<yh.length;i++){ yh[i] = new int[i+1]; ...
分类:编程语言   时间:2020-12-29 11:52:33    阅读次数:0
43561条   上一页 1 ... 71 72 73 74 75 ... 4357 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!