问题列表 - 第20396页

Java EE真实世界的开源应用程序

什么是优秀的Java EE现实世界(不像像PetStore这样的学习项目)开源应用程序?特别是我正在寻找在现实环境中使用ORM(JPA-Hibernate),Spring(IoC,事务管理,安全性)的示例

ps我正在寻找的一个很好的例子 - ASP.NET入门应用程序(用于.net平台)

java open-source java-ee

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

PHP SimpleTest框架可以配置为快速失败吗?

我是PHP SimpleTest框架的新手,我很惊讶地看到失败的断言不会停止测试方法.换句话说,这会在测试报告中导致两条失败消息:

function testFoo() {
    $this->assertTrue(true, 'first: %s');
    $this->assertTrue(false, 'second: %s');
    $this->assertTrue(false, 'third: %s');
}
Run Code Online (Sandbox Code Playgroud)

我的大部分单元测试经验都是使用JUnitNUnit,并且一旦第一个断言失败,它们都会暂停测试方法.也许我已经习惯了,但似乎额外的失败信息只是噪音.它让我想起旧的C编译器因为缺少分号而会出现50个错误.

我可以将SimpleTest配置为快速失败,还是只需要使用不同的样式?

php unit-testing simpletest

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

找不到存储过程'dbo.aspnet_CheckSchemaVersion'

我正在使用WinHost.com来托管我的网站.SQL数据库/成员资格系统在我的本地计算机上运行良好,但上传到服务器时它不起作用.我已经正确地遵循了所有步骤.我已经联系了我的服务支持,但已经超过2周,没有回复.

当我尝试在我的网站上的会员页面上登录或注册新用户时,我一直收到此错误.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be …
Run Code Online (Sandbox Code Playgroud)

sql sql-server stored-procedures

84
推荐指数
4
解决办法
9万
查看次数

替换行结尾的跨平台正则表达式是什么?

我有一个类似的字符串"foo\nbar",但取决于平台,可能会变成"foo\n\rbar",或者其他什么.我想用替换换行", ".是否有一个很好的(PHP)正则表达式,我会这样做?

php regex

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

中断如何在Intel 8080上运行?

中断如何在Intel 8080上运行?我搜索了谷歌和英特尔的官方文档(197X),我发现只有一点关于此的描述.我需要一个关于它的详细解释,来模拟这个CPU.

interrupt intel-8080

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

从std :: string转换为bool

将std :: string转换为bool的最佳方法是什么?我正在调用一个返回"0"或"1"的函数,我需要一个干净的解决方案来将其转换为布尔值.

c++ string boolean

48
推荐指数
7
解决办法
8万
查看次数

将域映射到MVC区域

有人在将域映射到MVC区域方面有经验吗?

这是我们的情况:

旧系统(仍然有效但很快将重定向到新商店):

www.example.com - 我们的主要网站,我们发送流量
store.example.com - 我们的商店网站是一个完全独立的网站,在谷歌索引

新系统:

www.example.com - 与以前相同的网站
www.example.com/store - 新商店网站 - 内置于ASP.NET MVC区域

由于商店是一个单独的域,谷歌会在搜索结果中为其指定一个单独的条目.我想在将来保留这个好处,但想知道是否有一个很好的方法将域(store.example.com)映射到MVC区域,或者它是否会比它的价值更麻烦.

PS.我不是想保留现有的索引 - 它是一个完全独立的商店,所以这是不可能的.我只想重定向到新商店中的相应页面.我只是试图不为了SEO目的而失去两个域的好处.

iis asp.net-mvc seo domain-mapping

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

使用python中的正则表达式从文本中删除html标记

我正在尝试查看一个html文件并从中删除所有标签,以便只留下文本,但我的正则表达式有问题.这就是我到目前为止所拥有的.

import urllib.request, re
def test(url):
html = str(urllib.request.urlopen(url).read())
print(re.findall('<[\w\/\.\w]*>',html))
Run Code Online (Sandbox Code Playgroud)

html是一个带有一些链接和文本的简单页面,但我的正则表达式不会被接收!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"和'a href ="...."标签.谁能解释我的正则表达式需要改变什么?

html python regex tags

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

C# - 数字非常小的问题 - 双数据类型中的数字不足

我正在用C#编写一个程序,它假设计算的数字很小.但是,我的所有计算都得到NaN值,因为它们对于'double'数据类型来说太小了.

C#中有一个选项来处理这种情况吗?

谢谢,伊甸园.

c# precision double

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

无需写入磁盘即可将多个文件附加到programticaly的电子邮件中

我们的项目将文件存储在sql server db中作为blob.我想从数据库中获取文件并将多个文件附加到电子邮件而无需写入磁盘.

这是我到目前为止(一切正常,没有附件):

// snip

List<System.Net.Mail.Attachment> attachments = null;
// Attachments is a child list of Messagebody object holding Attachment ids
MessageBody.Attachments = MessageBodyAttachmentList.GetMessageBodyAttachmentList(this.MessageBody.ID);

if (MessageBody.Attachments != null && MessageBody.Attachments.Count > 0)
{
    attachments = new List<Attachment>();

    foreach (Library.Entity.Messaging.MessageBodyAttachment att in MessageBody.Attachments)
    {
        using (MemoryStream memoryStream = new MemoryStream())
        {
            // create a new attachment
            Library.Attachments.Attachment attachment = Library.Attachments.Attachment.GetAttachment(att.AttachmentID);

            byte[] contentAsBytes = attachment.FileData;// FileData holds byte[] that is the contents of the file
            memoryStream.Write(contentAsBytes, 0, contentAsBytes.Length);
            memoryStream.Seek(0, SeekOrigin.Begin);

            // …
Run Code Online (Sandbox Code Playgroud)

c# email smtp attachment stream

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