使用两个(或更多屏幕)时,一个常见问题是启动的应用程序出现在“错误”屏幕上。从命令行启动文本编辑器时,我尤其觉得这很烦人,因为我必须用右手离开主行才能将窗口拖动到“正确”屏幕,然后才能继续输入。
是否可以定义将当前应用程序移动到另一个/下一个屏幕的键盘快捷键?
编辑:我使用的是 Windows XP,但很高兴知道该功能已存在于 Windows 7 中。
#q::
WinGetPos, winx, winy,,, A
WinGet, mm, MinMax, A
WinRestore, A
If (winx > 1270)
{
newx := winx-1270
OutputDebug, Moving left from %winx% to %newx%
}
else
{
newx := winx+1270
OutputDebug, Moving right from %winx% to %newx%
}
WinMove, A,, newx, winy
if mm=1
WinMaximize, A
Return
Run Code Online (Sandbox Code Playgroud)
我确实必须使用 OutputDebug 语句和dbgview来发现1270向左或向右移动的正确阈值。将最大化的窗口向左移动时,确切的阈值尤其重要。
我有一个 VirtualBox 实例(在 Mac OS X 10.5 下运行)和在 VirtualBox 中运行的 Windows 7。其他一切都很好,但我不明白如何使用共享文件夹。我在 VirtualBox 的 VM 配置中添加了一个共享文件夹,但我无法理解如何访问 Windows 7 中的共享文件夹。
其他说明似乎在谈论网络,并且我的 VirtualBox 应该以某种方式出现在网络中并在那里公开共享文件夹。但是我在 Windows 资源管理器的网络中没有看到任何类似于 VirtualBox 的东西。我在寻找什么?
我需要提取 InstallShield Cabinet 文件 (.cab) 的内容。
我应该使用什么工具来完成这项工作?
我的硬盘上有一堆文件夹,其中有尾随空格(我不知道它们是如何到达那里的)。我需要重命名和/或删除它们,但 Windows 不允许我这样做。有没有办法解决这个问题?
我试图通过命令行删除它,但这没有用。
我运行的是 Windows XP,它是一个NTFS驱动器。
在 Windows 中,您可以通过将 NtfsDisableLastAccessUpdate 设置为 1来禁用上次访问的时间戳,例如通过从命令行执行此操作(必须重新启动计算机才能生效):
fsutil behavior set disablelastaccess 1
Run Code Online (Sandbox Code Playgroud)
我想这样做,有较少的磁盘活动c:\$logfile。
这可能会导致任何负面影响或问题吗?
我有一台HP Pavilion Elite台式电脑,型号为 HPE-490t。我喜欢它,因为它成本不高,从 SSD 启动,配备 16 GB 内存,并有六个 CPU 内核用于编辑视频和相机 RAW 图像。然而,它有一个我无法解释的行为怪癖。最近美国东北部的电力中断使机器进入无法重新启动的状态。它会通电一两秒钟,然后关闭,然后再次通电,永远无法在显示器上显示任何内容。
我拔掉它大约 10 秒钟,然后重新插入。相同的行为(无法启动)。
我拔掉它,走了一个小时,然后重新插上它,它工作得很好!
我认为在这台机器上安装第二个硬盘驱动器后发生了类似的事情。
为什么计算机的行为会因拔掉电源的时间长短而有所不同?影响机器启动能力的能量存储在哪里?电源中的电容器?主板上的电池(有一个用于时钟,但拔掉一个小时不会耗尽,我不认为)?
我使用以下命令自动登录到远程服务器,然后运行 a 中列出的命令commands.txt,如下所示:
C:\path\to\putty.exe -load "[Sessionname]" -l [user] -pw [password] -m C:\path\to\commands.txt
Run Code Online (Sandbox Code Playgroud)
commands.txt 包含以下内容:
ps -elf|grep 'sometext'
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试这样做时,会出现一个 PuTTY 的新窗口,但它会在登录后立即关闭并退出。结果,我看不到命令的输出。
我不明白这里发生了什么。我的方法错了还是我需要采取更多步骤使 PuTTY 窗口在退出之前暂停一段时间?
我正在尝试使用sbt构建一个Scala项目,所以我运行了一个命令:
sbt clean test > log.log
Run Code Online (Sandbox Code Playgroud)
这意味着 sbt 工具写入 Windows 控制台的任何消息都应写入“log.log”文件。但有时我会将堆栈跟踪写入控制台而不是文件:
C:\path>sbt clean test > log.log
java.lang.ExceptionInInitializerError
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassCastException: Class org.infinispan.configuration.parsing.Parser60 does not implement org.infinispan.configuration.parsing.ConfigurationParser
Run Code Online (Sandbox Code Playgroud)
为什么“>”命令不将所有消息重定向到文件?
如果您的连接经过 NAT,是否可以在不发出出站 Web 请求的情况下查看您的外部 IP 地址?
任何操作系统(Windows、Linux 等)都可以。
我使用密钥(不是密码)通过 ssh 进入服务器,但我的 IP 地址经常被服务器禁止。
在查看服务器 auth.log 后,我发现有人(或某些软件)每 10-20 分钟就尝试使用错误的密码进行 ssh。
Jun 15 21:23:26 www sshd[31046]: Failed password for git from 218.81.128.80 port 37012 ssh2
Jun 15 21:23:26 www sshd[31046]: error: maximum authentication attempts exceeded for git from 218.81.128.80 port 37012 ssh2 [preauth]
Jun 15 21:23:26 www sshd[31046]: Disconnecting authenticating user git 218.81.128.80 port 37012: Too many authentication failures [preauth]
Jun 15 21:33:26 www sshd[31931]: Failed password for git from 218.81.128.80 port 37146 ssh2
Jun 15 21:33:26 www sshd[31931]: Failed …Run Code Online (Sandbox Code Playgroud) command-line ×2
ssh ×2
windows ×2
windows-xp ×2
boot ×1
cab ×1
console ×1
extract ×1
filesystems ×1
git ×1
ip-address ×1
login ×1
nat ×1
networking ×1
ntfs ×1
power-supply ×1
putty ×1
pycharm ×1
redirection ×1
scala ×1
timestamp ×1
unix ×1
virtualbox ×1
windows-7 ×1