ps

How to list containers in Docker

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: There's a command to list images, docker images , but there doesn't seem to be a corresponding docker containers . Other than becoming root and looking into /var/lib/docker there doesn't seem a way to do that. Am I missing something? Is that something one isn't supposed to do? 回答1: To show only running containers use the given command: docker ps To show all containers use the given command: docker ps -a To show the latest created container (includes all states) use the given command: docker ps -l To show n last created containers (includes

Resource leak warning in eclipse

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In Eclipse I received a warning Resource leak: 'ps' is not closed at this location that I don't understand. In my Java code I declare the "ps" as a Prepared Statement and I use (and close) it many times. Then I've the following sequence: try { if(condition) { ps = c.prepareStatement("UPDATE 1 ..."); } else { ps = c.prepareStatement("UPDATE 2 ..."); } ps.executeUpdate(); } catch (SQLException e) { // exception handling } finally { if (null != ps) try { ps.close(); } catch (SQLException e) { // exception handling }; } The "Resource leak"

Group by id having max(date_field)

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: To build a report, I must select some information on the last transaction status of all my customers. Until now, this is what I got: SELECT c.firstname, c.lastname, d.product_name, o.payment, s.name, h.date_add FROM ps_orders o INNER JOIN ps_order_detail d ON d.id_order = o.id_order INNER JOIN ps_customer c ON c.id_customer = o.id_customer INNER JOIN ps_order_history h ON o.id_order = h.id_order INNER JOIN ps_order_state_lang s ON s.id_order_state = h.id_order_state WHERE s.id_lang =6 GROUP BY c.id_customer HAVING MAX(h.date_add) For each

How can I get process name of specific PID with ps command in alpine

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In ubuntu based docker/os $ ps PID USER TIME COMMAND 1 postgres 0:00 postgres 47 postgres 0:00 postgres: checkpointer process 48 postgres 0:00 postgres: writer process 49 postgres 0:00 postgres: wal writer process 50 postgres 0:00 postgres: autovacuum launcher process 51 postgres 0:00 postgres: stats collector process 52 postgres 0:00 postgres: bgworker: logical replication launcher Now If run ps -p 1 -o user= , it will get me PID 1 process USER postgres $ ps -p 1 -o user= postgres This is what I can do in ubuntu based image/os Now I am

Python subprocess.Popen erroring with OSError: [Errno 12] Cannot allocate memory after period of time

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Note : This question has been re-asked with a summary of all debugging attempts here . I have a Python script that is running as a background process executing every 60 seconds. Part of that is a call to subprocess.Popen to get the output of ps . ps = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE).communicate()[0] After running for a few days, the call is erroring with: File "/home/admin/sd-agent/checks.py", line 436, in getProcesses File "/usr/lib/python2.4/subprocess.py", line 533, in __init__ File "/usr/lib/python2.4/subprocess

PowerShell 入门1

匿名 (未验证) 提交于 2019-12-03 00:41:02
更多请看( www.omob.cc ) 本文参考自 Powershell快速入门(一) 安装和使用 谈到服务器系统Linux是无可争议的绝对霸主,虽然90s前后Windows Server和UNIX也曾经共同统治了小型机和大型机的服务器系统,不过后来由于各种原因逐渐份额被Linux蚕食,Windows退守桌面系统市场,UNIX蜗居少数高端大型机市场比如IBM的Power服务器。Linux在服务端的成功,除了其本身开源免费系统资源占用低稳定性好灵活可裁剪外,其中Linux的Shell为它带来的高效管理特性也立下了汗马功劳。一谈到Shell,我们就想到各种Linux发行版中内置的种类繁多但简单好用的Shell,比如bash,csh等。绝大多数程序员第一次了解shell的应该都是Linux下的bash。其实Windows/Windows Server下也可以使用功能强大的Shell来编写程序,这就是Powershell。从名字就可以看出来,Powershell的功能很强大,所以微软才敢叫Powershell,在Windows各个版本中,微软意图用PowerShell取代CMD,可以这样认为,PowerShell是CMD的超集,吸收了Linux Shell的优点,是Windows Server高效运行相关技术的重要一环。 需要说明一点,Powershell是构建在.NET平台上的

ps切图 5 修改、维护

匿名 (未验证) 提交于 2019-12-03 00:40:02
想要改变图标的位置? 新功能,加个图标? 画布太大,文件空白太多? 图标多余,要删除? 要继续放更多的图片? 更改画布大小 移动图片    ・ 若图标破为独立图层,则用移动工具拖动即可   ・ 若图标为非独立图层     ・ 用选区工具选中图标区域     ・ 用移动工具拖动图标 修改与维护 三 要减小画布到指定区域   ・ 选定选区     画布要稍微大于我们图像区域 修改PNG8的图片 默认是索引颜色 ,如果我们想要在这些图片里面更改一些颜色的话 ,索引颜色会丢失一些颜色 所以这里我们要换成 RGB颜色 图片合并时保留空隙:   对于具体要保留多大的空隙,并没没有一个明确的数值,遵循一个宗旨就是空隙足够后期维护就可以了   如果是小图标,留的空隙可适当小一些,一般20像素,如果大图标,就要留大一些,因为大图标在调整的时候,影响的   空间也会比较大。 图片分类合并有哪些方式? 图片分类方式: 1、按照同属于一个模块进行分类; 2、按照图片大小相近进行分类; 3、按照色彩相近进行分类; 4、按照有状态的图片进行分类(状态:指当同一图标,普通样式、hover样式、active样式等); 在实际开发过程中,通常几种分类方式根据情况综合使用。 比如:同一页面的图标,按照不同的功能及状态合并成多张图片;多个模块、多个页面通用图标合并成一张图片等。 图片合并注意事项: 1、图标合理布局

ps切图 4 保存

匿名 (未验证) 提交于 2019-12-03 00:40:02
保存    存储所需要内容     如果是独立的图层 ,我们采用移动工具 把我们需要的内容拖到新文件中     如果是已经合并在一起的图层,我们可以采取:   第二种:  ( Alt + Shift + Ctrl + S ) 保存为哪种类型呢? 保存类型一      当图片色彩丰富且无透明要求时 保存类型二 当图片色彩不太丰富时 无论有无透明度要求 操作步骤 :选择好图片--- 请保存为PNG8格式 这里可以保存设置 以后就可以直接用 当图片有半透明要求 请保存PNG24格式 操作步骤 :选择好图片--- 为保证图片质量 保留一份PSD,在PSD上进行修改 为什么要这样做呢? 一是因为PSD文件是可以保留原图层的,对于我们后期维护是相当方便的 另外PNG8会对图片进行压缩的,如果我们在PNG8文件中修改再进行保存,那就等于压缩了两次 ,会导致像素点的丢失 原文:https://www.cnblogs.com/hzaixt/p/9275836.html

ps切图 1 工具、面板、视图

匿名 (未验证) 提交于 2019-12-03 00:40:02
什么是切图 ? 从设计稿切除网页素材 为什么要切图? 给网页提供图片素材                 background - image: url(../images/sprite.png);                 background - position:0 0;              } 如何切图? 课程内容: ps 首选项设置 面板 在“窗口"菜单下开启: ・ 工具 ・ 选项 ・ 信息(F8) ` 图层 (F7) ` 历史纪录 窗口 > 工作区 > 新建工作区 > 保存工作区 工具 切图常用工具:   ・ 移动工具   ・ 矩形选框工具   ・ 魔棒工具   ・ 裁剪工具 + 切片工具   ・ 缩放工具   辅助视图 在“视图”菜单下开启:   ` 对齐   ・ 标尺 Ctrl + R   ` 显示 > 参考线 Ctrl + ;   (需要勾选显示额外内容)    原文:https://www.cnblogs.com/hzaixt/p/9274225.html

c++排序(CList类库)

匿名 (未验证) 提交于 2019-12-03 00:39:02
使用的是交换数据 方法一:表内排序 void SortByLink() { int n = m_list.GetCount(); //获取节点数 POSITION *ps = new POSITION[n+1]; //创建n+1个POSITOIN类型的数组 int i = 0; //表示第i个 POSITION p = m_list.GetHeaderPosition(); //获取头结点地址 while(p) { ps[i] = p; //将p地址赋值给ps[i]数组 m_list.GetNext(p); //获取下一个结点地址 i++; } Sort(ps,n); } void Sort(POSITION *ps,int n) { int i = 0; int j,k; while(i < n) { j = i+1; k = i; while(j < n) { if(m_list.GetAt(ps[j]).** < m_list.GetAt(k).** ) //比较大小 k = j; j++; } if(i != k) //将数据进行交换 { m_list.SetAt(p,struct DATA); //DATA是结构体 } i++; } } 文章来源: c++排序(CList类库)