问题列表 - 第31089页

Apple平台是唯一的地方Objective-C是一个不错的选择吗?

如果您不是为Apple平台开发,是否有理由选择Objective-C?我知道GNUstep(我觉得这在视觉上并不令人满意),但还有什么呢?

如果你想开发多个平台,包括OS X或iOS,还有Linux或Windows,什么时候Objective-C可能是个不错的选择?

linux windows cross-platform objective-c

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

任何好的递归教程?蟒蛇?

想知道是否有人能指出我一个好的递归教程.当我在第一学期的数据结构课程中学到它时,我有点生疏了.想要了解我的递归...任何帮助?

c++ python recursion

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

开发私人iPhone网络共享应用程序

最近,在AppStore上发布了一个应用程序,它秘密允许从你的iPhone进行wifi绑定.它很快就被苹果拉了下来.出于好奇,是否有任何iPhone SDK库可以帮助开发人员编写一个同样的应用程序?我假设您可以将应用程序部署到iPhone进行测试,而无需发布到AppStore是正确的吗?

UPDATE

我在编写问题时发现了这个链接,所以只要你有开发人员证书就可以将应用程序部署到自己的iPhone上.所以我唯一的问题是关于任何可以帮助这个网络共享/代理解决方案的库或代码示例.

iphone objective-c

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

Lucene IndexWriter添加文档很慢

我写了一个小循环,它将10,000个文档添加到IndexWriter中,并且它始终需要这样做.

有没有其他方法可以索引大量文档?

我问,因为当它上线时,它必须加载15,000条记录.

另一个问题是,当重新启动Web应用程序时,如何防止必须再次加载所有记录?

编辑

这是我使用的代码;

for (int t = 0; t < 10000; t++){
    doc = new Document();
    text = "Value" + t.toString();
    doc.Add(new Field("Value", text, Field.Store.YES, Field.Index.TOKENIZED));
    iwriter.AddDocument(doc);
};
Run Code Online (Sandbox Code Playgroud)

编辑2

        Analyzer analyzer = new StandardAnalyzer();
        Directory directory = new RAMDirectory();

        IndexWriter iwriter = new IndexWriter(directory, analyzer, true);

        iwriter.SetMaxFieldLength(25000);
Run Code Online (Sandbox Code Playgroud)

然后是添加文档的代码;

        iwriter.Close();
Run Code Online (Sandbox Code Playgroud)

c# lucene lucene.net

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

从非ui线程启动和活动是否安全?

假设我的活动ui-thread在某个时刻产生了一个单独的线程.新线程是否可以安全地启动Intent以启动新活动?

谢谢

android

20
推荐指数
2
解决办法
5401
查看次数

iphone-具有推送通知服务的应用程序是否真的需要在应用程序商店中?

如果我想使用推送通知服务测试应用,是否必须在应用商店中批准?

iphone

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

Ms-Access:任何需要具有可变长度文本字段的小尺寸

在Ms-Access MDB中,它是否会节省磁盘空间以限制可变长度文本字段的大小?

例如.如果我有一个可变长度的Text字段大小,20并且该字段的所有实际值都在10字符下,那么我是否在浪费空间?

将字段的大小设置为10或者没有任何区别会更好吗?

ms-access database-design field

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

My C++ code runs perfectly on MS C++ compiler but gives me NaN on g++ compiler. Why?

I'm simulating a biological model involving several (27) stiff ordinary differential equations using C++. My program runs perfectly under MS C++ 2010 expression compiler but fails under the g++ compiler (NetBeans 6.8, Ubuntu 10.04 LTS). The problem is that some of the variables become NaN. The following are the values of the variable Vm after each step of the program under the g++ compiler:

-59.4 -59.3993 -59.6081 100.081 34.6378 -50392.8 nan nan nan nan nan nan nan nan nan …

c++ compiler-construction g++

5
推荐指数
3
解决办法
860
查看次数

如何让 NHibernate 加入?

我已经使用 Fluent NHibernate 连接了一个商店和员工类,其中 Stores 可以有很多员工,如下所示:

public class Store
{
    public virtual IList<Employee> Employees { get; set; }
    //other store properties
}

public class Employee
{
    public virtual Store Store { get; set; }   
    public virtual bool? SomeStatus1 { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

我需要获取所有员工未将 SomeStatus1 设置为 true 的商店。

我在这里的成功尝试失败了:

Session.CreateCriteria(typeof(Store))
    .Add(Restrictions.Not(Restrictions.Eq("Employees.SomeStatus1", true))
    .List<Store>();
Run Code Online (Sandbox Code Playgroud)

知道我该怎么做吗?

我的尝试失败的原因是因为列表 Employees 没有 SomeStatus1 的属性......这是相当明显的。

我不知道的是如何让 NHibernate 只获得在我正在寻找的州有员工的商店......

我想我想问 NHibernate 是做一个加入......但我不知道如何要求它这样做......

c# nhibernate fluent-nhibernate createcriteria

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

Malloc和scanf

我在一些脚本语言方面相当称职,但我终于强迫自己学习原始C.我只是在玩一些基本的东西(I/O现在).如何分配堆内存,将字符串存储在已分配的内存中,然后将其吐出来?这就是我现在所拥有的,我怎样才能让它正常工作?

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  char *toParseStr = (char*)malloc(10);
  scanf("Enter a string",&toParseStr);
  printf("%s",toParseStr);
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

目前我得到的奇怪的输出就像'8'\'.

c heap malloc

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