问题列表 - 第28925页

如何将多个iPhone应用程序合并到一个应用程序中?

目前,我有2个完整的iPhone应用程序。这两个应用程序必须包含在一个应用程序中。我不能在应用程序商店上拥有多个应用程序,并且为了避免使用这些应用程序的人们之间产生混淆,我必须将它们包含在一个应用程序中,该应用程序使用户能够启动包装程序中的任何应用程序。

我该怎么做。我想到的一些想法是:构建框架或构建库。但是我什至不确定我是否朝着正确的方向前进。

iphone

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

是否存在用于此符号转换/转换的现有算法?

系统具有将需要写像表达的符号(A+B)*C#MUL(#ADD(A,B),C).是否已有算法进行此类符号转换,以便用户可以更传统的方式输入?换句话说,一个从中缀转换的算法 - >我的符号.第一个问题是我不知道我的符号的确切名称......它类似于反向抛光但不完全相同.每个运算符都被编码为一个带参数的函数.

algorithm notation

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

vb6中的CommonAppData

基本上与这个问题相同,但对于VB6.

客户的应用程序"AppName"将其配置文件存储在CommonAppData中.

  • 在Windows XP下,即C:\ Documents and Settings\All Users\Application Data\AppName
  • 在Windows Vista下,即C:\ ProgramData\AppName

如何使用VB6获得正确的foldername

附加说明,我更喜欢使用API​​调用而不是添加对shell32.dll的引用

windows vb6 shell special-folders

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

在自定义编辑类型字段中添加多个输入元素

有没有办法创建具有多个输入元素的自定义字段?我正在查阅文档并创建单个输入元素非常简单,但我不确定如何添加多个.

有没有人过这个桥?如果是这样,你是怎么做到的?

这是一些示例代码:

...
{name: 'Dimensions', index: 'Dimensions', hidden: true, editable: true, 
edittype: 'custom', editoptions: {custom_element: dimensionsElement, 
custom_value: dimensionsValue}, editrules: {edithidden: true}},
...


function dimensionsElement(value, options) {
    var el = document.createElement("input");
    el.type = "text";
    el.value = value;
    return el;
}

function dimensionsValue(elem) {
    return $(elem).val();
}
Run Code Online (Sandbox Code Playgroud)

editing jqgrid

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

推送到数组引用

可以push在Perl中使用数组引用吗?谷歌搜索建议我首先尊重数组,但这并没有真正起作用.它推送到deferenced数组,而不是引用的数组.

例如,

my @a = ();

my $a_ref = [@a];

push(@$a_ref,"hello");

print $a[0];
Run Code Online (Sandbox Code Playgroud)

@a 将不会更新,此代码将失败,因为该数组仍为空

(我还在学习Perl参考文献,所以这可能是一个非常简单的问题.如果有的话,很抱歉)

arrays perl reference

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

django:从postgres数据库导入数据时无法调整错误

从转储数据安装夹具我遇到了奇怪的错误.我正在使用psycopg2和django1.1.1

silver:probsbox oleg$ python manage.py loaddata /Users/oleg/probs.json 
Installing json fixture '/Users/oleg/probs' from '/Users/oleg/probs'.
Problem installing fixture '/Users/oleg/probs.json': Traceback (most recent call last):
  File "/opt/local/lib/python2.5/site-packages/django/core/management/commands/loaddata.py", line 153, in handle
    obj.save()
  File "/opt/local/lib/python2.5/site-packages/django/core/serializers/base.py", line 163, in save
    models.Model.save_base(self.object, raw=True)
  File "/opt/local/lib/python2.5/site-packages/django/db/models/base.py", line 495, in save_base
    result = manager._insert(values, return_id=update_pk)
  File "/opt/local/lib/python2.5/site-packages/django/db/models/manager.py", line 177, in _insert
    return insert_query(self.model, values, **kwargs)
  File "/opt/local/lib/python2.5/site-packages/django/db/models/query.py", line 1087, in insert_query
    return query.execute_sql(return_id)
  File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/subqueries.py", line 320, in execute_sql
    cursor = super(InsertQuery, self).execute_sql(None)
  File "/opt/local/lib/python2.5/site-packages/django/db/models/sql/query.py", line 2369, in …
Run Code Online (Sandbox Code Playgroud)

django postgresql psycopg2

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

自连接中引用的SQL Server CTE速度很慢

我编写了一个表值UDF,它以CTE开头,从大表中返回行的子集.CTE中有几个连接.一对内部和一个左边连接到其他表,这些表不包含很多行.CTE有一个where子句,它返回日期范围内的行,以便只返回所需的行.

然后,我在4个自左连接中引用此CTE,以便使用不同的标准构建小计.

查询非常复杂,但这是一个简化的伪版本

WITH DataCTE as
(
     SELECT [columns] FROM table
                      INNER JOIN table2
                      ON [...]

                      INNER JOIN table3
                      ON [...]

                      LEFT JOIN table3
                      ON [...]
)
SELECT [aggregates_columns of each subset] FROM DataCTE Main
LEFT JOIN DataCTE BananasSubset
               ON [...] 
             AND Product = 'Bananas'
             AND Quality = 100
LEFT JOIN DataCTE DamagedBananasSubset
               ON [...]
             AND Product = 'Bananas'
             AND Quality < 20
LEFT JOIN DataCTE MangosSubset
               ON [...]
GROUP BY [
Run Code Online (Sandbox Code Playgroud)

我觉得SQL Server会感到困惑并为每次自我加入调用CTE,这似乎通过查看执行计划得到了证实,尽管我承认自己并不是那些阅读它们的专家.

我会假设SQL Server足够聪明,只能从CTE执行一次数据检索,而不是多次执行.

我尝试了相同的方法,但不是使用CTE来获取数据的子集,我使用了与CTE中相同的选择查询,而是将其输出到临时表.

引用CTE版本的版本需要40秒.引用临时表的版本需要1到2秒.

为什么SQL Server不够智能,无法将CTE结果保留在内存中? …

sql-server performance temp-tables common-table-expression

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

使用可达性的大内存泄漏

使用设备上的仪器,它在我的应用程序中使用Apple的Reachability 2.0代码检测到3.50 KB的内存泄漏.泄漏的对象是GeneralBlock-3584.泄漏工具指向以下代码:

- (BOOL) startNotifer
{
    BOOL retVal = NO;
    SCNetworkReachabilityContext    context = {0, self, NULL, NULL, NULL};
    if(SCNetworkReachabilitySetCallback(reachabilityRef, ReachabilityCallback, &context))
    {
        // THIS IS LINE OF CODE WHERE THE LEAK OCCURS:
        if(SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode))
        {
            retVal = YES;
        }
    }
    return retVal;
}
Run Code Online (Sandbox Code Playgroud)

我几乎直接使用Apple示例代码中的Reachability示例,所以我无法弄清楚为什么会发生这种情况或我如何修复它.

memory iphone xcode memory-leaks reachability

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

以编程方式找到颜色的补充?

有没有办法找到RGB值的颜色补码?或者它只能找到某些颜色?怎么会有人在Java中这样做呢?

java colors

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

在didSelectRowAtIndexPath访问自定义标签属性

我在cellForRowAtIndexPath的每个单元格都有一个UILabel.

UILabel *cellLabel = [[UILabel alloc] initWithFrame:frame];
cellLabel.text = myString;
Run Code Online (Sandbox Code Playgroud)

我想使用indexpath在didSelectRowAtIndexPath访问该字符串"myString".

NSString *anotherString = cell.textLabel.text;
Run Code Online (Sandbox Code Playgroud)

返回null.

现在,如果在cellForRowAtIndexPath,我做了类似cell.textLabel.text = theString;的事情,didSelectRowAtIndexPath返回适当的单元格.

我的问题是,如何在didSelectRowAtIndexPath中访问我应用于单元格的UILabel中的文本?

此外,在didSelectRowAtIndexPath中记录单元格将返回 cell: <UITableViewCell: 0x5dcb9d0; frame = (0 44; 320 44); autoresize = W; layer = <CALayer: 0x5dbe670>>

编辑:

    NSString *myString = [[results objectAtIndex:indexPath.row] valueForKey:@"name"];
//cell.textLabel.text = myString;

CGFloat width = [UIScreen mainScreen].bounds.size.width - 50;
CGFloat height = 20;
CGRect frame = CGRectMake(10.0f, 10.0f, width, height);

UILabel *cellLabel = [[UILabel alloc] initWithFrame:frame];
cellLabel.text = myString;
cellLabel.textColor = [UIColor blackColor]; …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c

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