用python监控程序启动。像这样尝试:
import subprocess
import time
while True:
time.sleep(1)
if subprocess.Popen("zathura", shell=True):
print("Zathura app was started.Let's do something...")
else:
print("Nothing interesting.")
用python监控程序启动。像这样尝试:
import subprocess
import time
while True:
time.sleep(1)
if subprocess.Popen("zathura", shell=True):
print("Zathura app was started.Let's do something...")
else:
print("Nothing interesting.")
问题是打印是垃圾邮件,但剪贴板的值必须显示一次。更准确地说,剪贴板的值会在其值更改时立即显示。
我知道同一条消息被发送垃圾邮件并不奇怪,因为这是一条无限循环的消息,但我显然感到疲倦或退化,更糟糕的是我无法制定行动的逻辑,因此我寻求帮助。:(
编码:
clipboarded = {}
default = clipboard.paste()
while True:
if clipboard.paste() == 'texttext':
# print("Yes, there is DEFAULT value.")
pass
else:
print('No! There is new word:' + clipboard.paste())
if clipboard.paste() not in clipboarded.keys() and clipboard.paste() != default:
clipboarded[clipboard.paste()] = len(clipboard.paste())
print(clipboarded)
告诉我一个库,您可以使用它来监控页面访问,这样当我从一个站点移动到另一个站点时,站点地址就会写入文件。
您需要从 Firefox 浏览器中获取访问站点的 URL。操作系统 - 基于 Debian 的 linux。
/* Элемент меняет цвет при наведении на него */
button.yt-icon-button:hover {
vertical-align: middle;
color: #ff0087;
}
/* Элемент меняет цвет во время нажатия на доли секунд. */
button.yt-icon-button:active {
vertical-align: middle;
color: #01a715;
/* Элемент меняет цвет после нажатия, но стоит потом куда-то кликнуть и изменённый цвет заменяется на цвет по умолчанию. */
button.yt-icon-button:focus {
vertical-align: middle;
color: #01a715;
}
如何使元素的颜色在单击时更改,而不是在单击另一个位置时更改为默认值。
我试图从 Vadizar 添加代码。
结果是这样的:
但是当我添加底部时,我不需要背景更改。我不使用背景。
button {
color: #ff9000 !important;
transition: color 9999999s
}
button:active {
color: green;
transition: color 0s
}
我的“竖起大拇指”没有变绿。为什么 ?
并进一步:
为什么 Vadizar 的代码高亮是这样的:
单词背景以绿色突出显示
而我的(可能是错误的)版本是这样的:
单词颜色未以绿色突出显示
为什么过渡后没有添加到末尾;
?
为什么最初没有在虚拟机中安装来宾添加?
是否有关于正确使用虚拟机的课程,它们比较非常不方便,但工作安全方便,但对主机很危险?
我对分析病毒及其工作原理很感兴趣,但我不想搞砸主要主机。
这是关于虚拟盒子的。
在vmware中,默认可以展开全屏。
media.autoplay.enabled 在 Firefox about:config 模式中做了什么?你在说什么自动播放?
一些以 开始功能int
,另一些以void
. 比这个选项...:
int increaser(int* x) //используем указатель
{
(*x)++;
//return (*x);
};
……与此不同?:
void increaser(int* x) //используем указатель
{
(*x)++;
//return (*x);
};
我听说(从专家的课程中)他们void
在编写驱动程序时使用。
return(*x);
在增加函数中规定是否有意义,因为没有return(*x);
程序它仍然会给出所需的结果(七)?
int increaser(int* x) //используем указатель
{
(*x)++;
//return (*x);
};
int main() // точка входа
{
int x = 6;
increaser(&x); // изменится ли х ?
printf("%d\n", x);
return 0;
}
一个 rar 存档有几个部分:
Archive.part1.rar Archive.part2.rar Archive.part3.rar Archive.part4.rar
如何解压缩它们?
我认为 -v 是 --version 开关的简写。事实证明,对于--version,有-V。但是命令已经输入了,我有一个问题。
输入后出现:
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
# /usr/lib/python3.6/encodings/__pycache__/__init__.cpython-36.pyc matches /usr/lib/python3.6/encodings/__init__.py
# code object from '/usr/lib/python3.6/encodings/__pycache__/__init__.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/codecs.cpython-36.pyc matches /usr/lib/python3.6/codecs.py
# code object from '/usr/lib/python3.6/__pycache__/codecs.cpython-36.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df42f470>
# /usr/lib/python3.6/encodings/__pycache__/aliases.cpython-36.pyc matches /usr/lib/python3.6/encodings/aliases.py
# code object from '/usr/lib/python3.6/encodings/__pycache__/aliases.cpython-36.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df43de10>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df4a2f98>
# /usr/lib/python3.6/encodings/__pycache__/utf_8.cpython-36.pyc matches /usr/lib/python3.6/encodings/utf_8.py
# code object from '/usr/lib/python3.6/encodings/__pycache__/utf_8.cpython-36.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df44ac18>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.6/encodings/__pycache__/latin_1.cpython-36.pyc matches /usr/lib/python3.6/encodings/latin_1.py
# code object from '/usr/lib/python3.6/encodings/__pycache__/latin_1.cpython-36.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df452748>
# /usr/lib/python3.6/__pycache__/io.cpython-36.pyc matches /usr/lib/python3.6/io.py
# code object from '/usr/lib/python3.6/__pycache__/io.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/abc.cpython-36.pyc matches /usr/lib/python3.6/abc.py
# code object from '/usr/lib/python3.6/__pycache__/abc.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/_weakrefset.cpython-36.pyc matches /usr/lib/python3.6/_weakrefset.py
# code object from '/usr/lib/python3.6/__pycache__/_weakrefset.cpython-36.pyc'
import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df4566d8>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df452d30>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df452978>
# /usr/lib/python3.6/__pycache__/site.cpython-36.pyc matches /usr/lib/python3.6/site.py
# code object from '/usr/lib/python3.6/__pycache__/site.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/os.cpython-36.pyc matches /usr/lib/python3.6/os.py
# code object from '/usr/lib/python3.6/__pycache__/os.cpython-36.pyc'
import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.6/__pycache__/stat.cpython-36.pyc matches /usr/lib/python3.6/stat.py
# code object from '/usr/lib/python3.6/__pycache__/stat.cpython-36.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3f9a58>
# /usr/lib/python3.6/__pycache__/posixpath.cpython-36.pyc matches /usr/lib/python3.6/posixpath.py
# code object from '/usr/lib/python3.6/__pycache__/posixpath.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/genericpath.cpython-36.pyc matches /usr/lib/python3.6/genericpath.py
# code object from '/usr/lib/python3.6/__pycache__/genericpath.cpython-36.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df404470>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df400160>
# /usr/lib/python3.6/__pycache__/_collections_abc.cpython-36.pyc matches /usr/lib/python3.6/_collections_abc.py
# code object from '/usr/lib/python3.6/__pycache__/_collections_abc.cpython-36.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df404ac8>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3ed390>
# /usr/lib/python3.6/__pycache__/_sitebuiltins.cpython-36.pyc matches /usr/lib/python3.6/_sitebuiltins.py
# code object from '/usr/lib/python3.6/__pycache__/_sitebuiltins.cpython-36.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3ed780>
# /usr/lib/python3.6/__pycache__/sysconfig.cpython-36.pyc matches /usr/lib/python3.6/sysconfig.py
# code object from '/usr/lib/python3.6/__pycache__/sysconfig.cpython-36.pyc'
import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3b6f28>
# /usr/lib/python3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc matches /usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py
# code object from '/usr/lib/python3.6/__pycache__/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc'
import '_sysconfigdata_m_linux_x86_64-linux-gnu' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3d07f0>
# /usr/lib/python3.6/__pycache__/_bootlocale.cpython-36.pyc matches /usr/lib/python3.6/_bootlocale.py
# code object from '/usr/lib/python3.6/__pycache__/_bootlocale.cpython-36.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3de7f0>
# /usr/lib/python3.6/__pycache__/types.cpython-36.pyc matches /usr/lib/python3.6/types.py
# code object from '/usr/lib/python3.6/__pycache__/types.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/functools.cpython-36.pyc matches /usr/lib/python3.6/functools.py
# code object from '/usr/lib/python3.6/__pycache__/functools.cpython-36.pyc'
import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.6/collections/__pycache__/__init__.cpython-36.pyc matches /usr/lib/python3.6/collections/__init__.py
# code object from '/usr/lib/python3.6/collections/__pycache__/__init__.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/operator.cpython-36.pyc matches /usr/lib/python3.6/operator.py
# code object from '/usr/lib/python3.6/__pycache__/operator.cpython-36.pyc'
import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df39b5f8>
# /usr/lib/python3.6/__pycache__/keyword.cpython-36.pyc matches /usr/lib/python3.6/keyword.py
# code object from '/usr/lib/python3.6/__pycache__/keyword.cpython-36.pyc'
import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3a1860>
# /usr/lib/python3.6/__pycache__/heapq.cpython-36.pyc matches /usr/lib/python3.6/heapq.py
# code object from '/usr/lib/python3.6/__pycache__/heapq.cpython-36.pyc'
import '_heapq' # <class '_frozen_importlib.BuiltinImporter'>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3a40b8>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.6/__pycache__/reprlib.cpython-36.pyc matches /usr/lib/python3.6/reprlib.py
# code object from '/usr/lib/python3.6/__pycache__/reprlib.cpython-36.pyc'
import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df39ed68>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df374cc0>
# /usr/lib/python3.6/__pycache__/weakref.cpython-36.pyc matches /usr/lib/python3.6/weakref.py
# code object from '/usr/lib/python3.6/__pycache__/weakref.cpython-36.pyc'
import 'weakref' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df37c0f0>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3e94a8>
# /usr/lib/python3.6/collections/__pycache__/abc.cpython-36.pyc matches /usr/lib/python3.6/collections/abc.py
# code object from '/usr/lib/python3.6/collections/__pycache__/abc.cpython-36.pyc'
import 'collections.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3740b8>
import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3e47f0>
# /usr/lib/python3.6/importlib/__pycache__/__init__.cpython-36.pyc matches /usr/lib/python3.6/importlib/__init__.py
# code object from '/usr/lib/python3.6/importlib/__pycache__/__init__.cpython-36.pyc'
# /usr/lib/python3.6/__pycache__/warnings.cpython-36.pyc matches /usr/lib/python3.6/warnings.py
# code object from '/usr/lib/python3.6/__pycache__/warnings.cpython-36.pyc'
import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df36e550>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3e4a20>
# /usr/lib/python3.6/importlib/__pycache__/util.cpython-36.pyc matches /usr/lib/python3.6/importlib/util.py
# code object from '/usr/lib/python3.6/importlib/__pycache__/util.cpython-36.pyc'
# /usr/lib/python3.6/importlib/__pycache__/abc.cpython-36.pyc matches /usr/lib/python3.6/importlib/abc.py
# code object from '/usr/lib/python3.6/importlib/__pycache__/abc.cpython-36.pyc'
# /usr/lib/python3.6/importlib/__pycache__/machinery.cpython-36.pyc matches /usr/lib/python3.6/importlib/machinery.py
# code object from '/usr/lib/python3.6/importlib/__pycache__/machinery.cpython-36.pyc'
import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df3549e8>
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df354320>
# /usr/lib/python3.6/__pycache__/contextlib.cpython-36.pyc matches /usr/lib/python3.6/contextlib.py
# code object from '/usr/lib/python3.6/__pycache__/contextlib.cpython-36.pyc'
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df362438>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df346c88>
# destroy mpl_toolkits
# possible namespace for /usr/lib/python3/dist-packages/ruamel
# /usr/lib/python3.6/__pycache__/sitecustomize.cpython-36.pyc matches /usr/lib/python3.6/sitecustomize.py
# code object from '/usr/lib/python3.6/__pycache__/sitecustomize.cpython-36.pyc'
import 'sitecustomize' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df2f5e48>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df469048>
Python 3.6.4+ (default, Feb 12 2018, 08:25:03)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
# extension module 'readline' loaded from '/usr/lib/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so'
# extension module 'readline' executed from '/usr/lib/python3.6/lib-dynload/readline.cpython-36m-x86_64-linux-gnu.so'
import 'readline' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fa4df303a20>
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
# /usr/lib/python3.6/__pycache__/rlcompleter.cpython-36.pyc matches /usr/lib/python3.6/rlcompleter.py
# code object from '/usr/lib/python3.6/__pycache__/rlcompleter.cpython-36.pyc'
import 'rlcompleter' # <_frozen_importlib_external.SourceFileLoader object at 0x7fa4df303b38>
在我输入exit()
之后,我得到了这个:
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing builtins
# cleanup[2] removing sys
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing _imp
# cleanup[2] removing _warnings
# cleanup[2] removing _thread
# cleanup[2] removing _weakref
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing _io
# cleanup[2] removing marshal
# cleanup[2] removing posix
# cleanup[2] removing zipimport
# cleanup[2] removing encodings
# destroy encodings
# cleanup[2] removing codecs
# cleanup[2] removing _codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing _signal
# cleanup[2] removing __main__
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing io
# destroy io
# cleanup[2] removing abc
# cleanup[2] removing _weakrefset
# destroy _weakrefset
# cleanup[2] removing site
# destroy site
# cleanup[2] removing os
# cleanup[2] removing errno
# cleanup[2] removing stat
# cleanup[2] removing _stat
# cleanup[2] removing posixpath
# cleanup[2] removing genericpath
# cleanup[2] removing os.path
# cleanup[2] removing _collections_abc
# cleanup[2] removing _sitebuiltins
# cleanup[2] removing sysconfig
# destroy sysconfig
# cleanup[2] removing _sysconfigdata_m_linux_x86_64-linux-gnu
# destroy _sysconfigdata_m_linux_x86_64-linux-gnu
# cleanup[2] removing _bootlocale
# destroy _bootlocale
# cleanup[2] removing _locale
# cleanup[2] removing types
# cleanup[2] removing functools
# cleanup[2] removing _functools
# cleanup[2] removing collections
# cleanup[2] removing operator
# destroy operator
# cleanup[2] removing _operator
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing heapq
# cleanup[2] removing _heapq
# cleanup[2] removing itertools
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing weakref
# destroy weakref
# cleanup[2] removing collections.abc
# cleanup[2] removing importlib
# destroy importlib
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing warnings
# cleanup[2] removing importlib.util
# cleanup[2] removing importlib.abc
# cleanup[2] removing importlib.machinery
# cleanup[2] removing contextlib
# destroy contextlib
# cleanup[2] removing mpl_toolkits
# destroy mpl_toolkits
# cleanup[2] removing ruamel
# destroy ruamel
# cleanup[2] removing sitecustomize
# destroy sitecustomize
# cleanup[2] removing readline
# cleanup[2] removing atexit
# cleanup[2] removing rlcompleter
# destroy rlcompleter
# destroy zipimport
# destroy _signal
# destroy _sitebuiltins
# destroy errno
# destroy posixpath
# destroy _stat
# destroy genericpath
# destroy stat
# destroy os
# destroy _locale
# destroy _functools
# destroy heapq
# destroy collections.abc
# destroy atexit
# destroy __main__
# destroy readline
# destroy _operator
# destroy _heapq
# destroy _collections
# destroy collections
# destroy itertools
# destroy importlib.util
# destroy importlib.abc
# destroy functools
# destroy types
# destroy warnings
# destroy importlib.machinery
# destroy abc
# destroy _collections_abc
# cleanup[3] wiping _frozen_importlib
# destroy _frozen_importlib_external
# cleanup[3] wiping _imp
# cleanup[3] wiping _warnings
# cleanup[3] wiping _thread
# cleanup[3] wiping _weakref
# cleanup[3] wiping _io
# cleanup[3] wiping marshal
# cleanup[3] wiping posix
# cleanup[3] wiping codecs
# cleanup[3] wiping _codecs
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping importlib._bootstrap
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
在man python3
其中写道,密钥-v
执行以下操作:
每次初始化模块时打印一条消息,指示加载它的位置(文件名或内置模块)。还提供有关在退出时清理模块的信息。
“擦拭”和“破坏”这两个词让我感到困惑。这个输出是否意味着某些东西被破坏了,因为如果你尝试导入一个被破坏的模块,它会正常导入。谁来说明情况?
什么是 C 中 Python 的 ord('x') 的等价物?
ord('x') 给出 120。
如何在 64 位 Linux 上为 32 位 Windows 系统从 C 制作 .exe?
上命令:
gcc -m32 app.c -o app.exe
出现错误:
在 app.c:1:0 包含的文件中:
/usr/include/stdio.h:27:10:致命错误:bits/libc-header-start.h:没有这样的文件或目录
#include
^~~~~~~ ~~~~~~~~~~~~~~~~~~~ 编译终止。
命令不起作用man gcc
:
No manual entry for gcc
See 'man 7 undocumented' for help when manual pages are not available.
如果您在启用调试的情况下使用 Flask 运行代码,则会出现以下消息:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with inotify reloader
* Debugger is active!
* Debugger PIN: xxx-xxx-xxx
其中xxx-xxx-xxx是引脚。这个别针是干什么用的?
如何查看 .xpi 文件的结构?
如何查看 .xpi 文件的内部?
如何从 .xpi 文件中获取 Firefox 扩展源?