在 Visual Studio(以及其他一些 Microsoft 编辑器)中,您可以使用简单的Ctrl+ K、Ctrl+自动设置文档格式D。
这会自动插入换行符和制表符。
Notepad++ 中是否有类似的功能?
cup all -y用于在启动时更新所有Chocolatey包。目前VirtualBox的最新版本存在问题,我想避免这个包在启动时更新而其他包需要更新。
尝试解决问题
我检查了命令的帮助功能:
C:\>cup all -h
Chocolatey v0.9.9.8
Upgrade Command
Upgrades a package or a list of packages. Some may prefer to use `cup`
as a shortcut for `choco upgrade`.
Usage
choco upgrade <pkg|all> [<pkg2> <pkgN>] [<options/switches>]
cup <pkg|all> [<pkg2> <pkgN>] [<options/switches>]
NOTE: `all` is a special package keyword that will allow you to upgrade
all currently installed packages.
Examples
choco upgrade chocolatey
choco upgrade notepadplusplus googlechrome atom 7zip
choco upgrade notepadplusplus googlechrome atom 7zip …Run Code Online (Sandbox Code Playgroud) 使用此代码段时(内联 shell 配置程序):
config.vm.provision "shell" do |s|
s.inline = <<-SHELL
<shell code>
SHELL
end
Run Code Online (Sandbox Code Playgroud)
结果是:
==> default: mesg:
==> default: ttyname failed
==> default: :
==> default: Inappropriate ioctl for device
Run Code Online (Sandbox Code Playgroud)
看起来其他人也发现了这个问题。有人知道如何解决吗?
由于以下原因,在 VirtualBox 中启动实例失败:
RTR3InitEx failed with rc=-1912 (rc=-1912)
where: supR3HardenedMainInitRuntime
what: 4
VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.
Run Code Online (Sandbox Code Playgroud)
启动实例在5.0.2.102096失败时有效5.0.4.102546
解决问题的尝试
根据这个问答和这个问答,问题可以通过重新安装来解决5.0.4.102546
当前结果
重装后问题依旧
题
如何解决这个问题?
Vagrant Up 期间身份验证失败,而 vagrant ssh 和 ssh vagrant@localhost -p2222 有效
我想在启动时使用 Vagrant 执行一个 shell 脚本。Vagrant 无法进行身份验证,而 VM 已使用vagrant up以下方式启动:
c:\temp\helloworld>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'helloworld'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: helloworld_default_1398419922203_60603
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => …Run Code Online (Sandbox Code Playgroud) 介绍
根据此文档,可以通过执行以下命令来检查 Windows 上哪些服务已停止:
Get-Service | Where-Object {$_.status -eq "stopped"}
在 PowerShell 中。
题
需要在 PowerShell 中发出哪个命令才能检查某个服务(例如 tomcat8)是否存在?
介绍
目的:LISTENING state on localhost使用PowerShell函数检查端口是否在
以下命令:
New-Object Net.Sockets.TcpClient.Connect("127.0.0.1",10389)
结果是:
PS C:\Windows\system32> New-Object Net.Sockets.TcpClient.Connect("127.0.0.1",10389)
At line:1 char:33
+ New-Object Net.Sockets.TcpClient.Connect("127.0.0.1",10389)
+ ~
Unexpected token ')' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
PS C:\Windows\system32>
Run Code Online (Sandbox Code Playgroud)
题
哪个 PowerShell 函数可用于检查本地主机上的某个端口是否处于 LISTENING 状态?
问题
两个 NIC 已使用以太网电缆连接。以太网适配器配置如下:
网卡
IP: 8.0.0.1
Subnet mask: 248.0.0.0
Run Code Online (Sandbox Code Playgroud)
网卡II
IP: 8.0.0.2
Subnet mask: 248.0.0.0
Run Code Online (Sandbox Code Playgroud)
如果要配置 0.0.0.0、128.0.0.0、192.0.0.0、224.0.0.0 或 240.0.0.0 的子网掩码,则会出现以下消息:
The combination of IP address and subnet mask is invalid. All of the bits in the network address portion of the IP address are set to 0. Please enter a valid combination of IP address and subnet mask.
根据这个 IP 计算器,CIDR 为 0 是无效的,而 X>=1 是允许的。
题
为什么不允许 CIDR < 5?这是否意味着最低可能的 CIDR 是 5,因此是 248.0.0.0?
有人告诉我,如果Caps Lock在我打开台式计算机时工作正常,则安装了操作系统。否则,就没有操作系统。真的吗?
windows ×3
notepad++ ×2
powershell ×2
vagrant ×2
virtualbox ×2
capslock ×1
chocolatey ×1
comments ×1
ip ×1
lan ×1
localhost ×1
networking ×1
port ×1
services ×1
ssh ×1