小编Fai*_* S.的帖子

在DB4O中按类型查询

如何将类类型传递给C#中的函数?

当我进入db4o和C#时,我在阅读教程后编写了以下函数:

    public static void PrintAllPilots("CLASS HERE", string pathToDb)
    {
        IObjectContainer db = Db4oFactory.OpenFile(pathToDb);
        IObjectSet result = db.QueryByExample(typeof("CLASS HERE"));
        db.Close();
        ListResult(result);
    }
Run Code Online (Sandbox Code Playgroud)

.net c# db4o function argument-passing

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

从C#访问SQL Server 2008上的存储过程的好方法

我试图从我的ASP.NET/C#web应用程序访问存储过程.

是否有一种特别好的方法(也是将参数传递给它的好方法)?

我按照以下步骤操作,绝对不喜欢这种方法,因为您将该过程作为字符串输入(不可调试):http://www.c-sharpcorner.com/UploadFile/dclark/InsOutsinCS11302005072332AM/InsOutsinCS.aspx

c# asp.net ado.net

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

如何使用批处理脚本停止正在运行的*.JAR文件?

我们在重新启动关闭正在运行的*.JAR文件时遇到问题started with the "java -cp".

杀死java.exe工作正常.

但是......应用程序没有更平滑的方式吗?(它在关闭时保存数据)

另外,如何"Enter any key to continue..." 使用批处理文件模拟以下消息中的任何键输入?

谢谢大家的帮助!

java jar batch-file

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

`while(condition){// work}和`do {// work} while(condition)`有什么好处?

我发现自己遇到了一个面试问题,其目标是编写一个排序算法,对一系列未排序的int值进行排序:

int[] unsortedArray = { 9, 6, 3, 1, 5, 8, 4, 2, 7, 0 };
Run Code Online (Sandbox Code Playgroud)

现在我用Google搜索并发现那里有很多排序算法!最后,我可以激励自己深入研究Bubble Sort,因为它看起来很简单.

我阅读了示例代码并找到了一个如下所示的解决方案:

    static int[] BubbleSort(ref int[] array)
    {
        long lastItemLocation = array.Length - 1;
        int temp;
        bool swapped;

        do
        {
            swapped = false;
            for (int itemLocationCounter = 0; itemLocationCounter < lastItemLocation; itemLocationCounter++)
            {
                if (array[itemLocationCounter] > array[itemLocationCounter + 1])
                {
                    temp = array[itemLocationCounter];
                    array[itemLocationCounter] = array[itemLocationCounter + 1];
                    array[itemLocationCounter + 1] = temp;

                    swapped = true;
                } …
Run Code Online (Sandbox Code Playgroud)

programming-languages while-loop conditional-statements c#-4.0

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