问题列表 - 第46473页

用于openssl的iPhone AppStore加密导出 - 如何?

可能重复:
在iPhone应用程序中使用SSL - 导出合规性

我在德国,我在我的iPhone App上使用OpenSSL进行加密.

如何在应用商店中获取应用的最佳方式?我应该获得TSU通知,SNAP-R还是其他什么?

iphone encryption app-store

7
推荐指数
1
解决办法
2882
查看次数

对Async WCF的每次其他调用都很慢

我正在使用Rick Strahl撰写本文的代码示例:http://www.west-wind.com/weblog/posts/324917.aspx来对WCF服务进行异步调用,这非常有用.

我的问题是这样的: 第一次调用WCF服务需要20ms左右,而下一次需要大约1秒20ms(完全相同并接收完全相同的数据).如果我重复这个过程,结果总是一样的.每隔一个电话比第一个电话要长一秒钟.

我已经尝试在我的服务上设置InstanceContextMode:

  [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerSession)]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public abstract class AjaxPostBack : IAjaxPostBack
Run Code Online (Sandbox Code Playgroud)

我还在服务中调用的方法中设置了计时器,结果每次都是相同的(当然有些ms差异,但没什么重要的)

"JSON_Took":"00:00:00.0012939","Set_took":"00:00:00.0000274"
Run Code Online (Sandbox Code Playgroud)

(这些值--JSON_Took和Set_took - 是代码隐藏方法中的计时器.所以不是来自客户端 - 服务器 - 客户端的总时间.这只是为了说明实际代码耗费时间不是问题)

有任何想法吗?

如果您需要更多信息,请与我们联系.

---- 有趣的更新 ----

我下载了IE9 RC和Firefox(我一直在Chrome中测试)我的结果来自不同的浏览器:

Firefox:所有呼叫在大约1秒20ms到1s 30ms内保持一致

Chrome:其他所有通话都以Firefox的速度发出,其余的则以1秒的速度快速启动

IE9:几乎没有任何时间所有呼叫都是一致的(~20ms)

Opera:与IE9差不多(约30ms)

这是一个webkit问题吗?(我使用$ .ajax来调用WCF)

c# wcf jquery asynchronous

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

WPF中的设计时数据问题

嗨,我尝试在wpf中使用我的第一个设计时数据.我使用以下教程:

http://karlshifflett.wordpress.com/2009/10/21/visual-studio-2010-beta2-sample-data-project-templates/

http://karlshifflett.wordpress.com/2009/10/28/ddesigninstance-ddesigndata-in-visual-studio-2010-beta2/

我创建了简单的数据类,这里是:

public class Avatar:INotifyPropertyChanged
    {
        private string _name;
        private string _surname;

        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                NotifyPropertyChanged("Name");
            }
        }

        public string Surname
        {
            get { return _surname; }
            set
            {
                _surname = value;
                NotifyPropertyChanged("Surname");
            }
        }


        public new event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }

    }
Run Code Online (Sandbox Code Playgroud)

然后我创建了示例数据:

<TestForDesignTimeData:Avatar xmlns:TestForDesignTimeData="clr-namespace:TestForDesignTimeData" Name="John" Surname="Smith"/>
Run Code Online (Sandbox Code Playgroud)

并尝试在wpf窗口中使用设计时数据:

<Window x:Class="TestForDesignTimeData.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" …
Run Code Online (Sandbox Code Playgroud)

wpf visual-studio-2010 design-time-data

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

将sqlite导入coredata

我之前已经将sqlite预先填充的dbs导入我的coredata项目,但现在我已经在3.2.5中创建了一个项目.xcode,在AppDelegate中为nstring更改了nsurl,所以我继续使用它,但是现在我的sqlite没有导入到项目中,

如果我离开我的PersistentStoreCoordinator来创建新的db空白它工作正常,

 NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"ChildCare_v02.sqlite"];
Run Code Online (Sandbox Code Playgroud)

但是当我更改代码以导入预先填充的数据库(称为相同只是为了澄清)时,它会给我一个警告和崩溃,

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
if (persistentStoreCoordinator_ != nil) {
return persistentStoreCoordinator_;
}
NSString *storePath = [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"ChildCare_v02.sqlite"]; //WARNING !! here
NSURL *storeUrl = [NSURL fileURLWithPath:storePath]; 
//NSURL *storeURL = [[self applicationDocumentsDirectory]    URLByAppendingPathComponent:@"ChildCare_v02.sqlite"]; //actual SDK style for blank db

// Put down default db if it doesn't already exist
    NSFileManager *fileManager = [NSFileManager defaultManager];
   if (![fileManager fileExistsAtPath:storePath]) {
    NSString *defaultStorePath = [[NSBundle mainBundle]  pathForResource:@"ChildCare_v02" ofType:@"sqlite"];
    if (defaultStorePath) {
        [fileManager copyItemAtPath:defaultStorePath toPath:storePath …
Run Code Online (Sandbox Code Playgroud)

sqlite iphone import core-data

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

这个指针来自内部函数

我有JavaScript组件,具有以下架构:

var MyComponent = function(params)
{
    setup(params);


    this.doSomething()
    {
        // doing something
    };

    function setup(params)
    {
        // Setup

        // Interaction logic
        var _this = this; // "this" points to DOMWindow, not to created object
        $(".some-element").click(function(){
            _this.doSomething(); // it craches here, because of above
        });
    }
};
Run Code Online (Sandbox Code Playgroud)

当由交互逻辑控制的事情发生时,有时我必须将执行转发到组件的"公共"方法.

在这种情况下,我有"这个"指针的问题.

示例代码演示了它:

var Item = function()
{
    this.say = function()
    {
        alert("hello");
    };
    this.sayInternal = function()
    {
        _sayInternal();
    };
    function _sayInternal()
    {
        this.say();
    };
};
Run Code Online (Sandbox Code Playgroud)

要测试它,

  • 创建一个对象:

var o = new Item();

  • 这很好用: …

javascript scope

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

如何以编程方式使用CoreData行填充NSArrayController?

经过几个小时/几天的搜索和潜入示例项目,我得出结论,我只需要问.如果我将assetsView(IKImageBrowserView)直接绑定到IB实例,那么NSArrayController一切正常.

- (void) awakeFromNib
{
    library = [[NSArrayController alloc] init];
    [library setManagedObjectContext:[[NSApp delegate] managedObjectContext]];
    [library setEntityName:@"Asset"];       

    NSLog(@"%@", [library arrangedObjects]);
    NSLog(@"%@", [library content]);

    [assetsView setDataSource:library];
    [assetsView reloadData];
}
Run Code Online (Sandbox Code Playgroud)

两者NSLogs都是空的.我知道我错过了什么......我只是不知道是什么.目标是最终允许使用谓词以编程方式过滤此视图的"库"的多个实例.现在我只是想让它显示"Asset"实体的所有行.

另外:如果我NSArrayController在IB中创建然后尝试记录[library arrangedObjects]或手动设置assetsView的数据源,我会得到相同的空结果.就像我之前说的那样,如果我绑定library.arrangedObjects到IB中的assetsView.content(IKImageBrowserView) - 具有相同的托管对象上下文和IB设置的相同实体名称 - 一切都按预期工作.

- (void) awakeFromNib
{
//  library = [[NSArrayController alloc] init];
//  [library setManagedObjectContext:[[NSApp delegate] managedObjectContext]];
//  [library setEntityName:@"Asset"];       

    NSLog(@"%@", [library arrangedObjects]);
    NSLog(@"%@", [library content]);

    [assetsView setDataSource:library];
    [assetsView reloadData];
}
Run Code Online (Sandbox Code Playgroud)

macos cocoa core-data objective-c nsarraycontroller

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

在回发之前运行Javascript函数

在我的ASPX页面上,有一个带有以下代码的按钮:

OnClick="save_Click"
Run Code Online (Sandbox Code Playgroud)

是否有可能在回发之前执行Javascript,如果结果是true,那么回发并转到方法save_click

.net c# asp.net

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

如何只删除一次指针?

enum Reaction{single,chain};

class X
{
X* parent_;
X* left_;
X* right_;
Reaction* reaction_;//this pointer points from every obj to the same place, cannot be static
};
Run Code Online (Sandbox Code Playgroud)

问题是:如何设计析构函数以便只删除一次reaction_?

c++

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

杀死应用程序打开的所有线程

我有一些非常大的应用程序混合使用c#和j#.

有时当我关闭它时,有一些线程没有关闭,它们挂在任务管理器中,不可能从那里杀死它们.

我找到所有这些线程并将它们添加到结束事件中确实存在问题.

是否有某种方式猛烈杀死在关闭事件中由应用程序打开的所有线程?...

谢谢.

是否有一些工具可以告诉我在关闭应用程序时打开了哪些线程?

.net c# j#

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

如何使用静态库中的可加载包?

我已经创建了一个静态库" MyLib.a "及其可加载的包" MyLibBundle.bundle ",其中包含所有需要的资源,例如我的xcdatamodelxibs.

现在,我想在另一个项目中使用该库.

所以,我在新的包含了" MyLib.xcodeproject ",链接了库并指定了标题搜索路径.

但是,毕竟应用程序找不到我的核心数据文件(SIGABRT).

有人有解决方案吗?

iphone bundle core-data static-libraries ios4

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