问题列表 - 第14170页

如何找出哪个丢失的DLL使我的.NET应用程序在启动时崩溃?

当对第三方程序集的依赖性添加到典型的.NET应用程序时,很容易忘记将它们添加到安装程序中.这个问题只有在安装应用程序之后才会显露出来,并且在启动时以崩溃的形式显示,并且几乎没有可用的有用信息.

找出需要添加到安装程序的程序集的最佳工具和技术是什么?

.net crash dll installer

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

获取静态DateTime值的最佳方法

有没有更好的方法在C#中获取静态DateTime值而不是以下?

public static DateTime StartOfRecordedHistory = DateTime.Parse("2004-01-01");
Run Code Online (Sandbox Code Playgroud)

谢谢!

c# static-members

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

Python Regex"对象没有属性"

我一直在整理我们需要用新内容更新的页面列表(我们正在切换媒体格式).在这个过程中,我正在编写正确拥有新内容的页面.

这是我正在做的一般概念:

  1. 迭代文件结构并获取文件列表
  2. 对于读取缓冲区的每个文件,使用正则表达式搜索匹配特定标记
  3. 如果匹配,则测试2个正则表达式匹配
  4. 将生成的匹配(一个或另一个)写入数据库

一切正常,直到第3个正则表达式模式匹配,我得到以下内容:

'NoneType' object has no attribute 'group'

# only interested in embeded content
pattern = "(<embed .*?</embed>)"

# matches content pointing to our old root
pattern2 = 'data="(http://.*?/media/.*?")'

# matches content pointing to our new root
pattern3 = 'data="(http://.*?/content/.*?")'

matches = re.findall(pattern, filebuffer)
for match in matches:
    if len(match) > 0:

    urla = re.search(pattern2, match)
    if urla.group(1) is not None:
        print filename, urla.group(1)

    urlb = re.search(pattern3, match)
    if urlb.group(1) is not None:
        print filename, …
Run Code Online (Sandbox Code Playgroud)

python regex

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

如何在Scala中设置多个类型边界?

我希望能够声明这样的东西:

trait Narrowable[A] extends Iterable[A] {

    def narrow[B <: A & B <: AnyRef] : Iterable[B]

}
Run Code Online (Sandbox Code Playgroud)

它的类型B应该是既有的亚型A AnyRef.这可能吗?

generics scala

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

WPF FlowDocument 表 - 自动调整选项?

我想要一个表格,根据内容在逻辑上调整列的大小。这在 WPF 中可能吗?

替代文字 http://img43.imageshack.us/img43/2640/flowdocument.jpg

这是我正在使用的代码:

<Window x:Class="FlowDocument.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <Style TargetType="{x:Type TableCell}">
            <Setter Property="BorderBrush" Value="Gray" />
            <Setter Property="BorderThickness" Value="3" />


        </Style>
        <Style TargetType="{x:Type Paragraph}">
            <Setter Property="Padding" Value="2, 2, 2, 2" />
        </Style>
    </Window.Resources>
    <Grid>
        <FlowDocumentScrollViewer>
            <FlowDocument>
                <Table>
                    <Table.Columns>
                        <TableColumn Background="LightBlue" />
                        <TableColumn Background="Coral" />
                    </Table.Columns>
                    <TableRowGroup>
                        <TableRow>
                            <TableCell>
                                <Paragraph>This is a long piece of text</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>This isn't</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow>
                            <TableCell>
                                <Paragraph>This is a another long piece of text. The column should be …
Run Code Online (Sandbox Code Playgroud)

wpf flowdocument

6
推荐指数
2
解决办法
5371
查看次数

Graphviz从上到下,从左到右

嗨,我想要一个带点语言的uml序列图,现在我有以下问题我希望布局如下,a,b,c和d在顶部的直线但是直线到达底部.我怎样才能做到这一点?

a   b   c   d
|   |   |   | 
|   |   |   |
Run Code Online (Sandbox Code Playgroud)

也许我可以实现a,b,c和d及其所属的边缘是集群,我为集群设置了不同的rankdir?

编辑刚刚通过在a,b,c和d之间添加不可见的边缘而不是任何其他解决方案找到了解决方案?

diagram uml graphviz

6
推荐指数
3
解决办法
7217
查看次数

如何加快Java VM(JVM)的启动时间?

我正在运行启动多个JVM进程的测试.与在JVM中运行的实际测试时间相比,JVM的摘要启动时间非常重要.我如何加快速度?

我已经使用了"-client"选项,这确实有所帮助,但没有我想要的那么多.有没有其他方法,比如预加载一堆JVM并以某种方式重用它们?

java performance

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

.NET 2中是否有List <T>在列表更改时引发事件?

ObservableCollection<T>过去曾经使用过,但这似乎属于WPF,因此属于.NET 3.

如果没有合适的接口呢?INotifyPropertyChanged似乎不是非常适合集合,而INotifyCollectionChanged只是在.NET 3及更高版本中才支持.

.net collections observablecollection

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

变量参数类?

以下代码

    public static void main(String[] args) {
        fun(new Integer(1));
    }
    static void fun(Object ... a) {
        System.out.println(a.getClass());
    }
Run Code Online (Sandbox Code Playgroud)

给出输出: -

class [Ljava.lang.Object;
Run Code Online (Sandbox Code Playgroud)

这是什么课?

java arrays class variadic-functions

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

更改UINavigationBar"提示"的textColor?

这样做的任何(支持)方式?当使用"比X更暗"的tintColor时,它通常会在某些时刻切换为白色,但我们似乎只是处于我们的方案的边缘.

iphone cocoa-touch colors uinavigationbar

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