小编Raf*_*per的帖子

错误的连接字符串NHibernate 3.3

如何使用SQL Server 2012为Nhibernate编写正确的连接字符串?

我还要写数据库名吗?

错误:错误的"初始目录"出错

NHibernate的连接字符串错误(我从我的服务器复制此连接字符串):

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
  <session-factory>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="dialect">NHibernate.Dialect.MsSqlCeDialect</property>
    <property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property>
    <property name="connection.connection_string">Data Source=RAFAL-KOMPUTER\MSSQLSERVER4;Initial Catalog=rafal;Integrated Security=True</property>
    <property name="show_sql">true</property>
  </session-factory>
</hibernate-configuration>
Run Code Online (Sandbox Code Playgroud)

我从这部分复制连接字符串: 在此输入图像描述

我也在尝试这个,但没有帮助.

<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
    <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
    <property name="connection.connection_string">Data Source=RAFAL-KOMPUTER\MSSQLSERVER4;Initial Catalog=rafal;Integrated Security=True</property>
Run Code Online (Sandbox Code Playgroud)

我不知道如何正确配置SQL Server 2012

c# asp.net nhibernate asp.net-mvc sql-server-2012

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

jquery.min.js无法加载资源

为什么这个链接不起作用?

//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="Description" content=" [wstaw tu opis strony] ">
    <meta name="Keywords" content=" [wstaw tu slowa kluczowe] ">
    <meta name="Author" content=" [dane autora] ">
    <title>[tytu? strony] </title>
    <link rel="stylesheet" href="style.css" type="text/css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".animat_kon").click(function () {
                $(".animat_text").slideToggle("slow");
            });
        });
    </script>
</head>
Run Code Online (Sandbox Code Playgroud)

错误示例: 在此输入图像描述

javascript debugging

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

JQuery - 字符串列表

在JQuery中,为什么我要information Undefined使用以下代码?

JS - 右边部分是Undefined

var s = $("[name='CountAnswer']").val();
Run Code Online (Sandbox Code Playgroud)

HTML

<input style="width:150px" type="text" id="CountAnswer_1_" name="CountAnswer[1]">
<input style="width:150px" type="text" id="CountAnswer_2_" name="CountAnswer[2]">
<input style="width:150px" type="text" id="CountAnswer_3_" name="CountAnswer[3]">
Run Code Online (Sandbox Code Playgroud)

javascript jquery

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

列表(模型)工厂

我想在数据列表中创建数据列表.我相信这很难解释,但我会尽力解释我的问题.我创建了数据列表,但在此列表中,一些参数也是数据列表.我必须使用此代码编写,因为这是限制(我们的工厂).如果我获取的数据不是数据列表,那么一切正常.哪里有问题?如果我在列表中写列表,我会收到错误.也许你可以看到我的错误.

程序是编译的.

问题(我使用NHibernate中的映射从第三个表中获取数据):

DestynationName = (List<dictionaryNewInfoSupportList>x.DictImportantInformationSDestination.Select(n=> new DictionaryNewInfoSupportList { Id = n.Destination.Id, Name = n.Destination.Desciption}).ToList();
Run Code Online (Sandbox Code Playgroud)

模型中的DestynationName

public Ilist<dictionaryNewInfoSupportList> DestynationName;
Run Code Online (Sandbox Code Playgroud)

类:

class dictionaryNewInfoSupportList
{
public string Name {get; set;}
public int Id {get; set;}
}
Run Code Online (Sandbox Code Playgroud)

重要:

public IEnumerable<DictionaryListModel> OnList(DictionayDisplayModel dictionary DisplayModel, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
{
var displayModel = (DictionaryNewInfoDisplayModel)dictionaryDisplayModel;
if (displayModel == null)

var list = _dictImportantInformation.GetList().Select(
x=> new DictionaryNewInfoListModel
    {
        Id = x.Id
        Description = x.Description,
        IsActiveYN = x.IsActive,
        DestynationName = …
Run Code Online (Sandbox Code Playgroud)

c# nhibernate asp.net-mvc-3

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

Juno - Java Build Path - 项目无法读取或不是有效的ZIP文件

我收到此错误:

说明资源路径位置类型存档所需的库:项目"Home"中的"src/Program.java"无法读取或不是有效的ZIP文件主页构建路径构建路径问题

在此输入图像描述

在此输入图像描述

导致此错误的原因是什么?如何解决?

java jar

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

串?对于方法中的C#

我想要像tkis"int?"这样的东西.但是对于字符串.你知道如果我不给参数数据我就不会有错误.我需要一些关于这个问题的想法.

Example(4);

public void Example(int, string?){} 
Run Code Online (Sandbox Code Playgroud)

对于你们所有人,我给予积分.感谢帮助.主题[关闭] :)

c#

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

列名SQL Server 2012无效

RowssWHERE条款中使用name我该怎么办?

SELECT TOP 10 
    ROW_NUMBER() OVER(ORDER BY dp.IdPytanie) AS Rowss,
    dp.IdPytanie
    ,dp.SpecjalnePytanie
 FROM dodajtemat_pytanie dp
 WHERE 
    (@RowBegining = 0 OR convert(int,Rowss) >= @RowBegining)
    AND (@RowEnd = 0 OR Rowss <= @RowEnd)
Run Code Online (Sandbox Code Playgroud)

错误 在此输入图像描述

这项工作 - >

 @RowEnd = 0 OR ROW_NUMBER() OVER(ORDER BY dp.IdPytanie) <= @RowEnd
Run Code Online (Sandbox Code Playgroud)

sql t-sql sql-server sql-server-2012

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

切两个词之间的文本

我想得到这个:

000020004641,000020006307,000020001441
Run Code Online (Sandbox Code Playgroud)

现在我明白了:

000020004641;1003000020006307#000020006307;1003000020001441#000020001441
Run Code Online (Sandbox Code Playgroud)

在我看来,我必须在两者之间剪切文字; #这个#但我不知道怎么做.

你知道怎么做吗?

sql t-sql sql-server

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

字符串或二进制数据将被截断-添加新行(实体框架)

当我尝试添加新行时出现此错误。

HexStringToByteArray("0x546F206A65737420707573747920706C696B0D0A");
Run Code Online (Sandbox Code Playgroud)

字符串或二进制数据将被截断。\ r \ n该语句已终止。

attachement.ATF_ID = 244512;
attachement.ATF_WFDID = 160489;
attachement.ATF_ATTID = 244512;
attachement.ATF_Name = "teska14.txt";
attachement.ATF_FileType = ".txt";
attachement.ATF_Value = HexStringToByteArray("0x546F206A65737420707573747920706C696B0D0A");
attachement.ATF_FileIsOcr = 0;
attachement.ATF_CreatedBy = "test";
attachement.ATF_UpdatedBy = "test";
attachement.ATF_OrginalValueHash = HexStringToByteArray("0x4C35C01D7E10FB7F7440D39932265E7C7F09A4D17FEFB55AE9E1DDAC97AD373E");
attachement.ATF_OrginalName = "test.txt";
attachement.ATF_Version = -1;
context2.WFAttachmentFiles.AddObject(attachement);
//context.AddToWFAttachmentFiles(attachement);
//context.WFAttachmentFiles.AddObject(attachement);
context2.SaveChanges();
Run Code Online (Sandbox Code Playgroud)

HEC代码:

public static byte[] HexStringToByteArray(string hexString)
{
    if (string.IsNullOrWhiteSpace(hexString))
        throw new ArgumentNullException("hexString");

    if (hexString.Length % 2 != 0)
        throw new Exception("Invalid hex string");

    var bytes = new byte[hexString.Length / 2];
    for (int i = …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework

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

ssl自签名证书错误 - localhost

我正在使用这个非常有趣的课程,但我遇到了一些问题.

http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api

我得到证书错误但我明白为什么会出现这个问题.此证书应连接到我的计算机名称.我不明白他如何生成此证书以及如何编辑此问题.

在此输入图像描述

这是重要的代码.用证书名称解决这个问题需要做些什么?

using System;
using System.Net;
using System.Net.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;

namespace LocalAccountsApp.Filters
{
    public class RequireHttpsAttribute : AuthorizationFilterAttribute
    {
        public int Port { get; set; }

        public RequireHttpsAttribute()
        {
            Port = 443;
        }

        public override void OnAuthorization(HttpActionContext actionContext)
        {
            var request = actionContext.Request;

            if (request.RequestUri.Scheme != Uri.UriSchemeHttps)
            {
                var response = new HttpResponseMessage();

                if (request.Method == HttpMethod.Get || request.Method == HttpMethod.Head)
                {
                    var uri = new UriBuilder(request.RequestUri);
                    uri.Scheme = Uri.UriSchemeHttps;
                    uri.Port = this.Port;

                    response.StatusCode = HttpStatusCode.Found; …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-web-api

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