小编Sla*_*are的帖子

如何在命令提示符中对任务列表进行排序?

我只是想知道如何使MEMUSAGE列按递减或递增顺序.我在网上搜索但仍未找到答案,我得到的最接近的一点是:

tasklist | sort
Run Code Online (Sandbox Code Playgroud)

但是当我尝试使用/ m进行排序时......:

tasklist | sort /m
Invalid switch.
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.

sorting cmd tasklist

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

captureOutput未被调用

我一直在研究这个问题太久了.

我正在尝试获取MacOS网络摄像头数据并在网络摄像头输出的帧上运行CIDetect.

我知道我需要:

  • 连接AVCaptureDevice(如输入中)到AVCaptureSession

  • 连接AVCaptureVideoDataOutput(作为输出)到AVCaptureSession

  • 呼叫 .setSampleBufferDelegate(AVCaptureVideoDataOutputSampleBufferDelegate, DelegateQueue)

出于某种原因,打完电话后.setSampleBufferDelegate(...)(当然调用后.startRunning()AVCaptureSession实例),我AVCaptureVideoDataOutputSampleBufferDelegatecaptureOutput不会被调用.

我发现有这么多人在网上遇到麻烦,但我找不到任何解决方案.

在我看来,它与它有关DispatchQueue.

MyDelegate.swift:

class MyDelegate : NSObject {


    var context: CIContext?;
    var detector : CIDetector?;

    override init() {
        context = CIContext();
        detector = CIDetector(ofType: CIDetectorTypeFace, context: context);
        print("set up!");

    }

}
extension MyDelegate : AVCaptureVideoDataOutputSampleBufferDelegate {
    func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer!, from connection: AVCaptureConnection) {
        print("success?");
        var pixelBuffer : CVPixelBuffer …
Run Code Online (Sandbox Code Playgroud)

avfoundation macos-sierra

7
推荐指数
2
解决办法
4261
查看次数

什么原因导致SXSTrace错误"StartTrace失败...未知错误"?

我在这里是因为一个sibe-by-side配置错误.当我尝试启动游戏时,会弹出并排配置错误.我尝试了很多不起作用的东西,但后来我找到了这个网站:

http://blogs.msdn.com/b/cesardelatorre/archive/2011/03/27/the-application-has-failed-to-start-because-its-side-by-side-configuration-is-incorrect- error-related-to-mmc-exe-programs-and-weird-cause-amp-simple-solution.aspx.

按照他们的指示,我尝试了命令(在命令提示符下!): sxstrace.exe trace -logfile:C:\ MySxSTrace.log 起初它返回它无法识别这种命令.所以我这样做了:

右键单击计算机 - >高级 - >环境变量 - >系统变量 - >我编辑路径添加C:\ Windows\System32\

要么

http://helpdeskgeek.com/how-to/fix-not-recognized-as-an-internal-or-external-command/

所以它解决了它无法将其识别为内部或ext命令的问题.

但是,我再次尝试了该命令:sxstrace.exe trace -logfile:C:\ MySxSTrace.log 并返回THIS:StartTrace失败.错误消息是:未知错误. 我搜查了一下,发现有人说你不能在根文件夹上放一些东西,完全是胡说八道.因为我没有找到任何东西,我在这个网站上问,因为我认为程序员应该理解那种东西.哦是的,我听说并排配置错误与c ++有关.

是的:

1 - 应用程序无法启动,因为其并排配置不正确.有关详细信息,请参阅应用程序事件日志.

2- StartTrace失败.错误消息是:未知错误.

c++ cmd side-by-side

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

C++内存测试返回奇怪的输出

Slackware在这里.我只是搞乱内存和指针...我想学习更多关于那些,所以我在c ++中创建了一个数组,并查找其中第一项的内存地址......:

string foo[3] = {"a", "b", "c"};
cout << *(&foo[0]-4) << endl;
Run Code Online (Sandbox Code Playgroud)

它输出:http://pastebin.com/K0HAL5nJ 整个代码:

#include <iostream>

using namespace std;

int main()
{
    string foo[3] = {"a", "b", "c"};
    cout << &foo[0] << " minus " << &foo[1] << " equals " << int(&foo[0])-int(&foo[1]) << endl;
    cout << *(&foo[0]-4) << endl;
    cout << "Hello world!" << endl;
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

我是c ++的完全初学者,并且不明白为什么会发生这种情况...我知道这种代码不应该......但是,仍然可以请任何人解释那里发生的事情吗?

c++ memory

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

Python无法导入,ImportError:没有模块命名

我是python的新手,我试图将一些值从一个文件导入到另一个文件.我希望我的"程序"从main_file.py转到其他文件,比如calculator.py,然后再回到main_file.py

为此,我决定创建一个变量,previous_runned,其值为's'.当计算器被激活时,通过命令,它会选择这个变量(然后将它返回给main_file.py,它将检查变量的值,然后跳过它自己脚本的某些行,如果变量previous_runned的值为's')...:

    import os
    file_path = "calc.py"
    os.system(file_path)
Run Code Online (Sandbox Code Playgroud)

...然后calc.py将从main_file.py ...中选择变量:

import previously_runned from main_file
Run Code Online (Sandbox Code Playgroud)

....哪个回报:

  File "C:\Users\Kevin\Prog\Calc.py", line 72, in <module>
  import main_file
  ImportError: No module named main_file
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助!

python import cmd

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