小编cru*_*age的帖子

如何跳转到Sublime Text 3中的上一个和最后一个光标?

我谷歌很多,找到BufferScroll.但它不适合我.我找不到任何快捷方式或如何在文档中使用它.更新:

每当我尝试使用Jump Forward(Shift + Alt + Minus)时,我的编辑总是说"已经处于最新位置",而实际上并不是最新位置.Jump Back(Alt + Minus)效果很好.

html editor sublimetext sublimetext3

105
推荐指数
1
解决办法
5万
查看次数

Supervisorctl错误:unix:///var/run/supervisord.sock拒绝连接?

这是我的配置flie.I运行supervisord -c /etc/supervisor/supervisord.conf它很好.当我尝试运行时supervisorctl -c /etc/supervisor/supervisord.conf,错误发生了:

错误:,serverurl /var/run/supervisord.sock的未知协议:file:/usr/local/lib/python2.7/dist-packages/supervisor-3.0b2-py2.7.egg/supervisor/xmlrpc.py line :440

我可以http://127.0.0.1:9001完美地启动或停止我的程序,但我想在命令行中控制程序.任何人都可以帮助我吗?

[unix_http_server]
file = /var/run/supervisor.sock
chmod = 0777
chown= root:cruelcage

[inet_http_server]
port=9001
username = cruelcage
password = 123

[supervisorctl]
serverurl = /var/run/supervisord.sock

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisord]
logfile=/home/cruelcage/log/supervisord/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB       ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10          ; (num of main logfile rotation backups;default 10)
loglevel=info               ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true              ; …
Run Code Online (Sandbox Code Playgroud)

unix supervisord

14
推荐指数
3
解决办法
3万
查看次数

如何在Android Studio中显示工具提示说明?

Eclipse(ADT linux)中的关键:

'Name': 'Show Tooltip Description'
'Description': 'Displays information for the current caret location in a focused hover'
'Binding' : 'F2'
Run Code Online (Sandbox Code Playgroud)

Android Studio中的任何类似密钥?

ide android android-studio androidstudio-settings

8
推荐指数
3
解决办法
1万
查看次数

如何在打开新标签时保持NERDTree打开?

当我输入":tabe"打开一个新标签时,NERDTree会隐藏?如何在新标签中保持打开状态?

vim nerdtree

5
推荐指数
1
解决办法
9062
查看次数

为什么从 ethers.js 获取的区块时间戳不等于 etherscan.io 中显示的时间戳?

import {providers} from "ethers";

const provider = new providers.InfuraProvider("homestead")

async function main() {
    provider.on("block", (blockNum)=> {
        console.log(blockNum+ ": " +new Date(Date.now()))
    })
}

main()
Run Code Online (Sandbox Code Playgroud)

从上面的代码输出:

13261128: Mon Sep 20 2021 14:57:42 GMT+0800 
13261129: Mon Sep 20 2021 14:58:14 GMT+0800 
13261130: Mon Sep 20 2021 14:58:42 GMT+0800 
13261131: Mon Sep 20 2021 14:58:58 GMT+0800 
Run Code Online (Sandbox Code Playgroud)

来自 etherscan.io:

Sep-20-2021 06:57:12 AM +UTC (https://etherscan.io/block/13261028)
Sep-20-2021 06:57:23 AM +UTC (https://etherscan.io/block/13261129)
Sep-20-2021 06:58:07 AM +UTC (https://etherscan.io/block/13261130)
Sep-20-2021 06:58:38 AM +UTC (https://etherscan.io/block/13261131)
Run Code Online (Sandbox Code Playgroud)

我的问题

  1. 我的电脑的时钟是准确的时间,为什么这两种方式有差异?

  2. 我可以从 ethers.js API …

ethereum etherscan ethers.js

4
推荐指数
1
解决办法
2万
查看次数

".main"在python源代码中的含义是什么?

在python的源代码中:usr/local/lib/python3.3/unittest/__ init__.py

from .result import TestResult
from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
                   skipUnless, expectedFailure)
from .suite import BaseTestSuite, TestSuite
from .loader import (TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,
                     findTestCases)
from .main import TestProgram, main
from .runner import TextTestRunner, TextTestResult
from .signals import installHandler, registerResult, removeResult, removeHandler
Run Code Online (Sandbox Code Playgroud)

我无法理解.result.main.为什么名称中有一个点前缀?

python

3
推荐指数
1
解决办法
439
查看次数