shutdown

Windows使用进阶

不羁岁月 提交于 2019-12-06 02:17:49
Command快捷键 打开软件面板:command 切换桌面:command+tab 打开搜索:command+Q/S 打开工作区:command+W 打开资源管理器:command+E 打开运行(cmd):command+R 任务栏切换应用:command+T 打开设置:command+U/I 打开通知:command+A 返回桌面:command+D/W 查看桌面(松开回去):command+< 视频录制:command+G 录音听写:command+H emoji:command+; 或 > 分屏:command+' 分屏:command + ←,→ 锁屏:command+L 打开系统管理:command+X 全屏:command + ↑ 缩小:command + ↓ 选择托盘:command+B 终端 杀死进程:taskkill /pid 进程号 /F 查看端口占用 :netstat -aon | findstr "19000" 定时关机 shutdown -s -t 3600 (1小时后关机) shutdown -a 取消关机 shutdown -s 关机 shutdown -r 关机并重启 shutdown -s -t 100 设置100秒后关机 其他 host的位置:C:\Windows\System32\drivers\etc 如何连接远程桌面:command+R

线程池包含哪些状态?

邮差的信 提交于 2019-12-06 01:55:11
线程池状态: 线程池的5种状态:RUNNING、SHUTDOWN、STOP、TIDYING、TERMINATED。 见 ThreadPoolExecutor 源码 // runState is stored in the high-order bits private static final int RUNNING = -1 <<COUNT_BITS; private static final int SHUTDOWN = 0 <<COUNT_BITS; private static final int STOP = 1 <<COUNT_BITS; private static final int TIDYING = 2 <<COUNT_BITS; private static final int TERMINATED = 3 <<COUNT_BITS; 1. RUNNING:线程池一旦被创建,就处于 RUNNING 状态,任务数为 0,能够接收新任务,对已排队的任务进行处理。 2. SHUTDOWN:不接收新任务,但能处理已排队的任务。调用线程池的 shutdown() 方法,线程池由 RUNNING 转变为 SHUTDOWN 状态。 3. STOP:不接收新任务,不处理已排队的任务,并且会中断正在处理的任务。调用线程池的 shutdownNow() 方法,线程池由

如何停止一个线程池?

旧时模样 提交于 2019-12-06 01:54:51
Java 并发工具包中 java.util.concurrent.ExecutorService 接口定义了线程池任务提交、获取线程池状态、线程池停止的方法等。 JDK 1.8 中,线程池的停止一般使用 shutdown()、shutdownNow()、shutdown() + awaitTermination(long timeout, TimeUnit unit) 方法。 1、shutdown() 方法源码中解释 * Initiates an orderly shutdown in which previously submitted * tasks are executed, but no new tasks will be accepted. * Invocation has no additional effect if already shut down. 有序关闭,已提交任务继续执行 不接受新任务 2、shutdownNow() 方法源码中解释 * Attempts to stop all actively executing tasks, halts the * processing of waiting tasks, and returns a list of the tasks * that were awaiting execution.

Using Ubuntu 11.04, I can't shut down rails server using CTRL-C

无人久伴 提交于 2019-12-06 00:36:43
For some reason, when I type "rails s", sometimes I can't shut the server down using CTRL-C. It's using Web brick, the default. Sometimes it works for hours. Other times it doesn't work at all and I must constantly kill the process if I want to shut down the server. Is this a known problem? How can I fix it? If you need to know more info, please just ask and I'll tell you what I can. Because I don't know what is causing it, I am at a loss as to what info to provide you with. EDIT: I am adding a git repository: gem 'rails-dev-boost', :git => 'git://github.com/thedarkone/rails-dev-boost.git',

List<Runnable> returned from shutdownNow() can not be converted to submitted Runnable

被刻印的时光 ゝ 提交于 2019-12-05 21:25:01
Below is the source code of the class. I wanted to verify how does shutdownNow() works for not submitted task. Problem I am getting in below code is shutdownNow() return List<FutureTask> and not List<Runnable> which I have submitted List<Runnable> containing submitted instance of PrimeProducer . In Below program I wanted to get the tasks which where not executed and their state so that I can reschedule them later. name() represents just state that I want to store. So I am not able to convert to submitted Task. class PrimeProducer implements Runnable { private final SynchronousQueue<BigInteger>

基于IPV6的数据包分析

做~自己de王妃 提交于 2019-12-05 20:12:11
与风同行 基于IPV6的数据包分析 一 实验拓扑 二 路由配置 R1(config)#interface fastEthernet 0/1 R1(config-if)#ipv6 add R1(config-if)#ipv6 address 2001:db8:050:1::1/64 R1(config-if)#no shutdown *Mar 1 00:17:55.491: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up *Mar 1 00:17:56.491: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up R1(config)#interface f R1(config)#interface fastEthernet 0/0 R1(config-if)#ipv6 address 2001:db8:057:1::1/64 R1(config-if)#NO SHUTdown *Mar 1 00:19:15.807: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up *Mar 1 00:19:16.807:

JAVA线程11

こ雲淡風輕ζ 提交于 2019-12-05 17:44:29
一、概述 1. new Thread的弊端 (1)每次new Thread新建对象性能差。 (2)线程缺乏统一管理,可能无限制新建线程,相互之间竞争,及可能占用过多系统资源导致死机或oom(内存溢出)。 (3)缺乏更多功能,如定时执行、定期执行、线程中断。 2. 线程池 线程池是指管理同一组同构工作线程的资源池,线程池是与工作队列(Work Queue)密切相关的,其中在工作队列中保存了所有等待执行的任务。工作线程(Worker Thread)的任务很简单:从工作队列中获取一个任务,执行任务,然后返回线程池并等待下一个任务。 3. 线程池的组成 一个线程池包括以下四个基本组成部分: (1)线程池管理器(ThreadPool):用于创建并管理线程池,包括 创建线程池,销毁线程池,添加新任务; (2)工作线程(PoolWorker):线程池中线程,在没有任务时处于等待状态,可以循环的执行任务; (3)任务接口(Task):每个任务必须实现的接口,以供工作线程调度任务的执行,它主要规定了任务的入口,任务执行完后的收尾工作,任务的执行状态等; (4)任务队列(taskQueue):用于存放没有处理的任务。提供一种缓冲机制。 4. 什么时候适合使用线程池 在多线程应用中,如果大量的资源都耗费在创建和销毁线程上,那么可以使用线程池。 5. 合理利用线程池带来的好处 (1)降低资源消耗

Is there any API function for shutting down Windows while installing any pending updates?

↘锁芯ラ 提交于 2019-12-05 16:21:56
问题 I know the ExitWindowsEx() API function which simply shuts down Windows. But as far as I know, you cannot make Windows install any pending updates with it. Is there any API support for installing any pending updates (in that standard blue screen which says " n of m updates have installed - Please don't turn off or unplug your PC, Windows will shut down itself ") then shutting down Windows (equivalent to clicking the "Install updates and shutdown" menu option of the Windows user interface)?

配置 DHCP

别来无恙 提交于 2019-12-05 15:19:31
配置 DHCP 步骤1 <Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R1 [R1]interface GigabitEthernet 0/0/1 [R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24 [R1-GigabitEthernet0/0/1]quit <Huawei>system-view Enter system view, return user view with Ctrl+Z. [Huawei]sysname R3 [R3]interface GigabitEthernet 0/0/1 [R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24 [R3-GigabitEthernet0/0/1]shutdown [R3-GigabitEthernet0/0/1]quit [R3]interface GigabitEthernet 0/0/2 [R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24 <Quidway>system-view Enter system view, return user view with

Prevent Windows 7 Shutdown

百般思念 提交于 2019-12-05 15:10:27
I know that shutdown -a will abort a Windows shutdown, but I need to know if there is anything any where I can check for to see if a shutdown is in progress. Ideally, I'd like a small program like this: import os while True: shuttingDown = <shutdown variable to check> if shuttingDown: os.system("shutdown.exe -a") For preventing a Windows shutdown when it is happening, you can react to the WM_QUERYENDSESSION message (don't know if you can do that easily with Python's win32 API but it's simple in C). This might not prevent applications from closing because Windows sends WM_ENDSESSION to those