小编Luc*_*und的帖子

NHibernate GetAll

我有这个:

public static class Domain
{
    private const string sessionKey = "NHib.SessionKey";
    private static ISessionFactory sessionFactory;

    public static ISession CurrentSession
    {
        get
        {
            return GetSession(true);
        }
    }

    static Domain()
    {
    }

    public static void Init()
    {
        sessionFactory = new Configuration().Configure("Nhibernate.cfg.xml").BuildSessionFactory();
    }

    public static void Close()
    {
        ISession currentSession = GetSession(false);

        if (currentSession != null)
        {
            currentSession.Close();
        }
    }

    private static ISession GetSession(bool getNewIfNotExists)
    {               
        ISession currentSession;

        if (HttpContext.Current != null)
        {
            HttpContext context = HttpContext.Current;
            currentSession = context.Items[sessionKey] as ISession; …
Run Code Online (Sandbox Code Playgroud)

.net c# nhibernate

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

Sitecore包的generaton


我想以编程方式构建Sitecore包.你能告诉我我可以用什么课吗?或者告诉我有关此的任何手册?

在许多手册中,我只能阅读Package Designer中的创建包,但我不需要这个...

.net sitecore package

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

Sitecore自定义后端应用程序

我尝试在sitecore中找到一些关于自定义后端应用程序的内容.
任何人都可以告诉我如何在sitecore后端构建新的应用程序,如"内容编辑器","开发人员中心"或其他桌面模式?

.net backend sitecore

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

Unity3D 画布。我怎样才能获得相机?

我在我的项目中使用 Unity 原生 UI。
在场景中,我有游戏对象“Canvas”,在这个对象中我使用了一些 UI 对象。
但我在 Canvas 中没有找到任何相机,而且我不知道如何从代码中获取它。在某些任务中,我需要将 ScreenPosition 转换为 WorldPosition,但我不能。
有谁能够帮助我。如何在代码或其他替代方案中获取相机?

camera android canvas unity-game-engine

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

$ .ajax成功处理程序中的jQuery方法不起作用

我有一个功能:

$(".delete").click(function() {
    $.ajax({
        url: "ServerHandler.ashx",
        data: "mode=delete&item=" + $(this).attr("title"),
        success: function() {
            $(this).parent().parent().remove();
            alert("hi");
        }
    });
});?
Run Code Online (Sandbox Code Playgroud)

删除父对象时出现问题.它不会消失.我试图隐藏 - 没有帮助.警报称为正常.怎么解决?

抱歉英语不好.

javascript jquery parent

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

使用动态类型c#调用泛型类的静态方法

public class A<T>
{
    public static void B()
    {
    }
}
Run Code Online (Sandbox Code Playgroud)

我怎么能像这样调用方法B:

Type C = typeof(SomeClass);
A<C>.B()
Run Code Online (Sandbox Code Playgroud)

c# generics types

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

C#Math.pow(x,0.333)

private double f(double x, double zn = 1)
    {
        double X = - zn;
        X *= x * x * (x + 1);
        X *= Math.Pow((x - 2), 0.333);
        return funct ? x : X;
    }
Run Code Online (Sandbox Code Playgroud)

我有这个代码.当我试图找到Math.Pow((x-2),0.333) - 我有NaN.怎么解决?为何选择NaN?

改写...

private double f(double x, double zn = 1)
    {
        double answer = - zn;
        answer *= x * x * (x + 1);
        answer *= Math.Pow((x - 2), 0.333);
        return answer;
    }
Run Code Online (Sandbox Code Playgroud)

c# math nan pow

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