问题列表 - 第20726页

在mysql中匹配的regexp中的十六进制字符

我发现了很奇怪的mysql行为.下面的选择返回0:

SELECT CONVERT('a' USING BINARY) REGEXP '[\x61]'
Run Code Online (Sandbox Code Playgroud)

但是在语义上相同的select下面返回1:

SELECT CONVERT('a' USING BINARY) REGEXP '[\x61-\x61]'
Run Code Online (Sandbox Code Playgroud)

你知道这里发生了什么吗?我在mysql 5.0.0.3031和4.1.22中测试过

我需要十六进制字符来创建一个在utf8中编码二进制字符串时匹配的正则表达式.可以在w3c站点上找到这种正则表达式的perl版本.它看起来如下:

$field =~
      m/\A(
         [\x09\x0A\x0D\x20-\x7E]            # ASCII
       | [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
       |  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
       | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
       |  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
       |  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
       | [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
       |  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
      )*\z/x;
Run Code Online (Sandbox Code Playgroud)

regex mysql

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

如何按日期对PHP进行排序

这是我的数组:

Array ( 
    [0] => Array ( [0] => content here [1] => 2010-02-04 01:25:34 )
    [1] => Array ( [0] => content here [1] => 2010-02-04 04:51:37 ) 
    [2] => Array ( [0] => content here [1] => 2010-02-04 04:52:31 ) 
    [3] => Array ( [0] => content here [1] => 2010-02-04 05:50:48 ) 
    [4] => Array ( [0] => content here [1] => 2010-02-04 03:25:34 ) 
    [5] => Array ( [0] => content here [1] => 2010-02-04 05:39:33 …
Run Code Online (Sandbox Code Playgroud)

php arrays

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

实体模型问题:无法为一个特定表创建模型

在创建实体模型时,我收到以下错误.

Added the connection string to Web.Config.
Successfully registered the assembly 'System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in Web.Config.
ERROR: Unable to generate model because of the following exception: 'Value does not fall within the expected range.'.
Loading metadata from database took 00:00:02.1203632.
Generating model took 00:00:00.8390920.
Writing out the EDMX file took 00:00:00.
Run Code Online (Sandbox Code Playgroud)

所有表都被创建但BC_States表没有被创建.我无法理解为什么.

entity-framework entity-model

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

Maven使用gmaven-plugin编译混合Java + Groovy 1.7项目

根据前两个答案:maven dependencies groovy.我正在尝试使用来自org.codehaus.gmaven的GMaven-plugin,使用Maven编译混合Java 6 + Groovy项目.直到昨天我们使用的是旧1.6.0版本的Groovy(在我们最终完成它之后从未改变它),但由于1.7.0现在稳定,我认为我们会改用它.

如果只是那么简单......我现在遇到的问题似乎有两个方面:

  • Groovy 1.6以某种方式仍然被选为默认值.(如下面的stacktrace中所示)
  • groovy:generateStubs因构建错误而停止:意外节点:节点[7:1,64,注释]

有谁知道如何解决上述两个问题,或者可以提供一个工作pom来编译与Maven Java 6代码混合的Groovy 1.7代码?

使用gmaven/groovy.maven/groovy.maven.gmaven编译旧版本的Groovy时,有很多令人困惑/矛盾/过时的文档,现在真的没有帮助.

作为参考,这是我的pom.xml和Maven -e输出的一部分:

<dependencies>
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>1.7.0</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <version>1.2</version>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.gmaven.runtime</groupId>
                    <artifactId>gmaven-runtime-1.7</artifactId>
                    <version>1.2</version>
                </dependency>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                    <version>1.7.0</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <goals>
                        <goal>generateStubs</goal>
                        <goal>compile</goal>
                        <goal>generateTestStubs</goal>
                        <goal>testCompile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪:

[INFO] ------------------------------------------------------------------------
[INFO] Building Client
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: …
Run Code Online (Sandbox Code Playgroud)

java groovy compilation maven gmaven-plugin

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

在python正则表达式中匹配多行

我想<tr>从html页面中提取标签之间的数据.我使用了以下代码.但我没有得到任何结果.<tr>标签之间的html 是多行的

category =re.findall('<tr>(.*?)</tr>',data);
Run Code Online (Sandbox Code Playgroud)

请建议修复此问题.

python

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

什么是并发冲突?

关于SQL数据库的并发冲突是什么?

concurrency

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

使用ImportingConstructorAttribute

我正在尝试使用MEF和MVVM构建WPF应用程序.我正在导出我的ViewModel,但我希望我的ViewModel接受构造函数中的Model参数:我将创建一个特定的Model并将其提供给ViewModel的构造函数.我试图了解ImportingConstructorAttribute是如何工作的,似乎是拥有自定义构造函数的方法.但我无法弄清楚如何使用它.

有人可以举例说明使用ImportingConstructorAttribute吗?

提前致谢

wpf mef

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

是否有用于整理VBScript的实用程序?

我想要一个工具来整理VBScript代码.我正在寻找与Perl相同的工作,或者为C++和Java代码执行相同的工作.

我看了,但没有在这里或谷歌找到任何东西.开源软件将是首选.

有人能指点我吗?

vbscript tidy

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

两次添加相同的对象

我有一个标签和两个面板.我想在每个面板中添加标签,但渲染后只显示一个标签.我可以创建第二个标签,但我认为,必须可以两次添加相同的标签.这是我的代码:

// Create labels
Label sectorLabel = new Label("Bereich");

// Create panels/rows
HorizontalPanel row1 = new HorizontalPanel();
HorizontalPanel row2 = new HorizontalPanel();

// Add content to row1
row1.add(sectorLabel);

// Add content to row2      
row2.add(sectorLabel);
Run Code Online (Sandbox Code Playgroud)

gwt gxt

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

禁止在App Store批准过程中使用第三方私有API?

我即将完成我的第一个iPhone应用程序.

我听说有些应用程序因使用某些私有API而被拒绝.

我也在使用一些私有API,如ASIHTTPRequest,MBProgressViewHUD.

因此,请告诉我这些或任何其他私有API被拒绝,我应该确保不要现在或将来的应用程序使用它们.

您可以列出它们,或者只是说明如何在使用私有API时采取预防措施.

iphone iphone-privateapi app-store appstore-approval

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