问题列表 - 第32892页

自签名证书的LDAP连接问题

我正在使用的代码:

# Create LDAPObject instance
conn = ldap.initialize(url)
conn.protocol_version=ldap.VERSION3

conn.simple_bind_s(binddn,bindpw)
# This raises:
# ldap.SERVER_DOWN: 
    {'info': 'error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed', 'desc': "Can't contact LDAP server"}
Run Code Online (Sandbox Code Playgroud)

当我使用ldap://而不是ldaps://时,它可以正常工作.

任何人都可以帮我弄清楚这是为什么吗?

谢谢.:)

python ldap

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

方法中的对象和原语

请注意为什么用作方法参数的原语会在对象按原样使用时复制其值?

java

0
推荐指数
1
解决办法
154
查看次数

java正则表达式问题

我想正则表达式可以匹配 <FONT FACE=\"Verdana\" SIZE=\"12\"> My Name is xyz </FONT>

<LI><FONT FACE=\"Verdana\" SIZE=\"12\"> My Name is xyz </FONT></LI> 它不应该是贪婪的

java regex matcher

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

替换CD delphi 2005企业在哪里可以找到?

我的公司丢失了用于delphi的CD,现在我们正在尝试搜索我们确实拥有我们的CD密钥的副本而不是实际的CD有没有人有副本或知道我可以在哪里购买?

delphi delphi-2005

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

std :: vector是否可以=另一个std :: vector?

说我有以下内容:

std::vector<int> myints;
Run Code Online (Sandbox Code Playgroud)

然后我有一个返回int向量的函数:

std::vector<int> GiveNumbers()
{
  std::vector<int> numbers;
for(int i = 0; i < 50; ++i)
{
  numbers.push_back(i);
}

return numbers;
}
Run Code Online (Sandbox Code Playgroud)

我可以这样做:

myints = GiveNumbers();
Run Code Online (Sandbox Code Playgroud)

会安全地做到这一点,以便myint的数字为0到49而没有别的吗?这样做会清楚以前在myint中可能出现的情况吗?如果不是最正确的方法吗?

谢谢

c++ stl vector

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

如何计算字体大小?

我有一个复杂的js函数,其中我实际上需要了解像素字体大小占用多少空间.

我注意到某些字体的大小因字体而异.

如何计算字体的大小?如果它设置为12px,在CSS中,是什么12px意思?那那么12px宽吗?高?还是对角线像素测量?

css fonts typography pixels font-size

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

捕获摄像头和音频输入时出错

使用iOS4中的一些漂亮的新API,我试图从iPhone的摄像头和麦克风捕获输入并将其保存到文件中.下面是我正在使用的代码.

AVCaptureSession* captureSession = [[AVCaptureSession alloc] init];
AVCaptureDevice *audioCaptureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
AVCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioCaptureDevice error:&error];
AVCaptureDeviceInput* videoInput = [[AVCaptureDeviceInput alloc] initWithDevice:captDevice error:&error];
AVCaptureMovieFileOutput * videoOutput = [[AVCaptureMovieFileOutput alloc] init];

if (videoInput && videoOutput && audioInput) 
{
    [captureSession addInput:audioInput];
    [captureSession addInput:videoInput];
    [captureSession addOutput:videoOutput];
    if([captDevice lockForConfiguration:&error])
    {
        if ([captDevice hasTorch]) 
            captDevice.torchMode = AVCaptureTorchModeOn;

        [captDevice unlockForConfiguration];
    }
    else 
    {
        NSLog(@"Could not lock device for config error: %@", error);
    }

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0]; …
Run Code Online (Sandbox Code Playgroud)

iphone video video-capture video-streaming ios4

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

C# - 迭代并调用类成员

我正在尝试迭代静态类的成员并调用所有字段成员.我在尝试调用该成员的行上遇到MissingFieldException.

像这样的东西:

"找不到字段'NamespaceStuff.MyClass + MyStaticClass.A'."

public class MyClass {
    public MyClass() {
        Type type = typeof(MyStaticClass);
        MemberInfo[] members = type.GetMembers();

        foreach(MemberInfo member in members) {
            if (member.MemberType.ToString() == "Field")
            {
                // Error on this line
                int integer = type.InvokeMember(member.Name,
                                            BindingFlags.DeclaredOnly |
                                            BindingFlags.Public | 
                                            BindingFlags.Instance |
                                            BindingFlags.GetField,
                                            null, null, null);
            }
        }
    }
}

public static class MyStaticClass
{
    public static readonly int A = 1;
    public static readonly int B = 2;
    public static readonly int C = 3;
} …
Run Code Online (Sandbox Code Playgroud)

c# reflection loops class

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

有什么办法让div在ipad中滚动?

我尝试了很多不同的东西,我一直在寻找,但我一无所获!

帮助任何人?

javascript jquery ipad

35
推荐指数
4
解决办法
5万
查看次数

如何在不折叠的情况下将ListView放入ScrollView?

我一直在寻找这个问题的解决方案,我能找到的唯一答案似乎是" 不要将ListView放入ScrollView ".我还没有看到任何真正的解释为什么.我似乎找到的唯一原因是Google认为你不应该这样做.好吧,我做了,所以我做到了.

所以问题是,如何将ListView放入ScrollView而不将其折叠到最小高度?

android android-listview android-scrollview

347
推荐指数
10
解决办法
24万
查看次数