问题列表 - 第13652页

NHibernate:在查询中将Guid转换为字符串

将NHibernate与Linq或Criterion一起使用,是否可以在GUID列上执行LIKE查询?

在T-SQL中,这很简单:*select*from mytable,其中id为'0ae%'*

但是NHibernate不会将Guid转换为字符串.

nhibernate

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

加入无序线段

我的算法生成一个(通常)数千个线段(所有2D)的列表,我需要将它们连接成大折线.这些生成的折线可能是封闭的或打开的,但它们永远不会自相交.线段不是定向的,即可能需要在线段可以连接到其邻居之前翻转线段.

找到这些折线的极快方法是什么?我必须实时做到这一点,所以任何花费超过-say- 10ms的东西都不是解决方案.

我在C#中这样做,但我正在寻找想法,而不是来源.

algorithm geometry

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

读取Sqlite数据库的Tcl Starkit

我正在尝试构建一个读取Sqlite数据库的Tcl应用程序.当我为应用程序构建一个starkit并将.scl数据库文件放在.vfs文件夹中的.tcl文件旁边并尝试运行应用程序(.exe)时,我收到错误,"执行时无法找到包sqlite3包需要sqlite3".

我相信我的应用程序无法找到数据库文件.在构建starkit之前,.tcl应用程序能够读取Sqlite数据库,但在创建starkit之后,.tcl文件会出错.

有谁知道如何启用Tcl应用程序starkit来读取Sqlite数据库文件?

谢谢,

DFM

sqlite tcl starkit

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

是否可以设置UITableViewCell accessoryView的alpha属性?

我使用的是UIImageView作为accessoryView一个UITableViewCell我要创建的程序.我用尽了一切我能想到的来设置accessoryViewalpha属性,但它不工作.我能够毫无问题地设置hiddenopaque属性,但是却alpha在讨厌我.

我尝试创建一个包含单个UITableViewController和以下tableView:cellForRowAtIndexPath:方法的新项目:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }

    cell.textLabel.text = @"Cell";

    UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.png"]];
    cell.accessoryView = iv;
    [iv release];

    // cell.accessoryView.hidden = YES; // works
    cell.accessoryView.alpha = 0.5f;    // fails

    return cell; …
Run Code Online (Sandbox Code Playgroud)

iphone

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

有没有办法将css文件附加到jEditorPane?

足够简单的问题:我有一个包含HTML的字符串,正在传递给JEditorPane以供用户使用.

我可以附加CSS文件(或包含CSS规则的字符串)以允许更具体的文本样式吗?

html css swing jeditorpane

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

Extjs unpress按钮

我有一个像这样的ExtJS按钮:

new Ext.SplitButton({
    text: 'Index',
    iconCls: 'index',
    scale: 'large',
    iconAlign: 'left',
    cls: 'header-item',
    handler: leftPanelNav, // handle a click on the button itself
    menu: new Ext.menu.Menu({
        items: [
            // these items will render as dropdown
            // menu items when the arrow is clicked:
            {text: 'Item 1'},
            {text: 'Item 2'}
        ]
    })
})
Run Code Online (Sandbox Code Playgroud)

他的状态将被压缩,我想知道如果我想从脚本中取消它,我怎么能解压它.

谢谢.

extjs button

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

在UITableView上显示重新排序控件时启用"滑动到删除"

我希望允许重新排序UITableViewCells并通过滑动删除删除,但不能通过红色删除圈.

- (void)loadView
{
    [super loadView];
    [table setEditing:YES animated:NO];
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Perform delete here
    }
}

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
    // Perform move here
}

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return UITableViewCellEditingStyleDelete;
}

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
    return YES;
}
Run Code Online (Sandbox Code Playgroud)

另外,我已经尝试禁用编辑模式并且-[UITableViewCell setShowsReorderControl:YES]没有运气就打电话.

图片http://booleanmagic.com/uploads/ReorderNotDelete.png

iphone uitableview uikit gesture

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

如果一切都实现了接口,这会是垃圾收集吗?

我仍然是一个新手,我知道我的想法是不正确的; 我只是不知道在哪里 ......

几乎所有Delphi中的东西都来自TObject.如果所有内容都来自实现某些简单接口的TInterfaceObject(例如,"INamable",使用返回类名称字符串的单个方法),该怎么办?由于TObject已经有一个返回名称字符串的属性,因此您不需要向其他类添加任何内容.

换句话说,TInterfacedObject将从TObject(或层次结构中的高处)继承,并且当前从TObject继承的所有内容现在将从此新类继承.这是不是意味着现在一切都被引用了?

如果你能发现我缺乏知识的地方,我很乐意学习.谢谢,一如既往 - Al C.

delphi interface

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

PHP:使用下划线替换对象变量中的虚线

我有一个来自外部源的PHP对象(使用PEAR的XML_Serializer).一些变量在名称中有破折号,如:

<?php
  $company->{'address-one'};
Run Code Online (Sandbox Code Playgroud)

我只是想知道通过这个对象的最佳方法是什么,并用下划线替换破折号重命名对象属性,这样我就不必处理愚蠢的卷曲和引号.

php object

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

IIS:.htaccess php_flag/php_value替代?

对于IIS(5.0或更高版本),是否有替代apache的.htaccess指令php_flag和php_value来设置PHP_INI_PERDIR配置值?

谢谢.

php iis .htaccess configuration

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