小编Use*_*999的帖子

SSRS表达式:textbox的值表达式具有对聚合无效的scope参数

我收到以下错误:

Error   1   [rsInvalidAggregateScope] The Value expression for the text box 
‘Textbox2’ has a scope parameter that is not valid for an aggregate function.  
The scope parameter must be set to a string constant that is equal to either 
the name of a containing group, the name of a containing data region, or 
the name of a dataset.
Run Code Online (Sandbox Code Playgroud)

我的Textbox2背后的表达式(我添加了一些空格以便于阅读):

Iif(Parameters!ReportParameterPersoneelsNr.Value.Equals(String.Empty),

       "Prestaties " + First(Fields!firmanaam.Value, "DataSetHrm") + 
        "(" + First(Fields!indienstfirmanr.Value, "DataSetHrm") + ")",

       "Prestaties " + First(Fields!naam.Value, "DataSetHrm") + " " …
Run Code Online (Sandbox Code Playgroud)

aggregate concatenation reporting-services ssrs-2008 ssrs-expression

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

Bootstrap:CSS - list-group-item的高度

请考虑关注JSFiddle:

http://jsfiddle.net/7W2r4/12/

您可能会注意到:list-group-item完全崩溃了.我似乎无法让它自动调整.(例如height:auto;)

然而,当我提供css规则:height:20px;,然后调整行大小.如何使list-group-item的高度调整为内容大小?

感谢您的时间.

html css twitter-bootstrap

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

List <BlockingCollection <T >>线程安全吗?

我不想维护几个BlockingCollections的列表

List<BlockingCollection<ExtDocument>> a = new List<BlockingCollection<ExtDocument>>();
Run Code Online (Sandbox Code Playgroud)

如果任何"队列"仍有待处理的项目,则检查子线程:

if (a.Where(x => x.IsAddingCompleted).Count > 0)
Run Code Online (Sandbox Code Playgroud)

如果列表中的项目数在初始化后没有变化(集合中的阻止列表的内容将改变其他情况......),List<T>在这种情况下使用a 是线程安全的吗?

或者我应该选择array of BlockingCollection以下结构:

BlockingCollection<BlockingCollection<workitem>> a = new BlockingCollection<BlockingCollection<workitem>>();
Run Code Online (Sandbox Code Playgroud)

c# multithreading

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

Jquery - 向表中添加新行(IE友好版)

我遇到了JQuery和Internet Explore(IE)的问题.我添加行的方法似乎不适用于IE(Chrome和Firefox没有问题)

想象一下下表

<table border="1">
    <tr>
        <td><button class="btn">btn1a</button></td>
        <td><button class="btn">btn1b</button></td>
        <td>zever</td>
        <td>zeverin pakskes</td>
    </tr>
    <tr>
        <td><button class="btn">btn2a</button></td>
        <td><button class="btn">btn2b</button></td>
        <td>zever</td>
        <td>zeverin pakskes</td>
    </tr>
    </table>
Run Code Online (Sandbox Code Playgroud)

要添加行(当用户单击"按钮"时),我执行以下方法

$(document).ready(function(){
    $('.btn').on('click',function(){
        var parentrow = $(this).parent().parent();
        parentrow.after('<tr ><td colspan="4">Dit is een colspan rij</td></tr>');
    });
});
Run Code Online (Sandbox Code Playgroud)

问题:我如何改变我的方法,以便它也适用于IE?(例如正在添加行)?

注意:我正在使用以下JQuery - 库

<script src="https://code.jquery.com/jquery.js"></script>
Run Code Online (Sandbox Code Playgroud)

html javascript jquery internet-explorer html-table

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

从其他html文件打开Modal(bootstrap)

我正在建立一个网站使用bootstrap.但我有点死路一条.我已经从给定的例子中创建了一个模态(见下文).正如您可能看到的,这是从他们的网站直接采取的模式.

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Nieuwe Taak toevoegen</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

我用一个按钮打开这个对话框.

<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#myModal" >
Run Code Online (Sandbox Code Playgroud)

但我想保持我的模态分开aspx/html-files.当它们保持不同时,我如何打开这些模态html/aspx - files

例如: 如果按钮在里面index.Html但是模态在里面newTaskModal.html,我将如何打开模态?(如果两者都在index.html内,那么没有问题)

注意:我不/不能使用HTML5(公司标准)

html javascript asp.net twitter-bootstrap

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

为什么HttpGet只需要一些动作?

让我先描述一下情况:

我有一个基本的控制器,看起来像这样:

public class SearchRequestController : ApiController
{
    public IEnumerable<ObjectA> GetAllRequests() {...}
    {}
    public IEnumerable<ObjectA> GetLatestRequest() {...}
    {}
}
Run Code Online (Sandbox Code Playgroud)

使用以下路由

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }
Run Code Online (Sandbox Code Playgroud)

我可以轻松地使用如下功能

 Http://myServer/myvirtualdirectory/api/SearchRequest/GetAllRequests
 Http://myServer/myvirtualdirectory/api/SearchRequest/GetLatestRequest
Run Code Online (Sandbox Code Playgroud)

现在我想添加以下控制器

 public class UserController : ApiController
 {
    public IEnumerable<UserObject> SearchUsersByInput() {...}
 }
Run Code Online (Sandbox Code Playgroud)

但是以下GET不起作用

 Http://myServer/myvirtualdirectory/api/User/SearchUsersByInput

 I'm getting a 405: {"Message":"The requested resource does not support http method 'GET'."} 
Run Code Online (Sandbox Code Playgroud)

但是当我改变我的功能时,它可以工作如下:

 public class …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-web-api

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

将 document.getElementsByClassName 转换为 Jquery

我有以下一段代码,我似乎无法转换为 Jquery,有人可以帮助我。

纯JS工作代码:

var elements = document.getElementsByClassName("glyphicon glyphicon-comment");
for (var i = 0, length = elements.length; i < length; i++) {
     $('#' + elements[i].id).tooltip();
     }
}
Run Code Online (Sandbox Code Playgroud)

我的 Jquery 尝试(都不起作用):

尝试 1:

 $(".glyphicon glyphicon-comment").tooltip();
Run Code Online (Sandbox Code Playgroud)

尝试 2:

$(".glyphicon glyphicon-comment").each( function() {
    $(this).tooltip();
});
Run Code Online (Sandbox Code Playgroud)

按钮示例:

<span class="glyphicon glyphicon-comment" data-toggle="tooltip" data-placement="left" id="commentTask1" data-original-title="This is comments"></span>
Run Code Online (Sandbox Code Playgroud)

有人能发现我犯的错误吗?

感谢您的努力。

javascript jquery

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

创建数组时SystemOutOfMemoryException

我正在SystemOutOfMemoryException创建一个数组.然而length我的阵列does not超过了Int32.MaxValue.

这是代码(请不要判断代码,不是我的代码至少7年)

Dim myFileToUpload As New IO.FileInfo(IO.Path.Combine(m_Path, filename))
Dim myFileStream As IO.FileStream
Try
    myFileStream = myFileToUpload.OpenRead
    Dim bytes As Long = myFileStream.Length //(Length is roughly 308 million)
    If bytes > 0 Then
        Dim data(bytes - 1) As Byte // OutOfMemoryException is caught here
        myFileStream.Read(data, 0, bytes)
        objInfo.content = data
    End If
Catch ex As Exception
    Throw ex
Finally
    myFileStream.Close()
End Try
Run Code Online (Sandbox Code Playgroud)

根据这个问题" .NET数组的SO最大尺寸 ",这问题" 的阵列的最大lenght "的最大长度是2,147,483,647 elements Or Int32.MaxValue而且 …

.net vb.net arrays io

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

Memorystream.Read()总是返回0 bytesRead,空字节[]

我现在有一个的MemoryStream约为长度30000(Named memStream here)我希望此的MemoryStream中chunks使用下面的代码(I拾起的净和改性有点):

        byte[] chunk = new byte[4096];
        bool hasNext = true;

        while(hasNext)
        {
            int index = 0;

            while (index < chunk.Length)
            {
                int bytesRead = memStream.Read(chunk, index, chunk.Length - index);
                if (bytesRead == 0)
                {
                    break;
                }
                index += bytesRead;
                //Do something with this chunk
            }
            if (index != 0) // Our previous chunk may have been the last one
            {
                //Do something with the last chunk
            }
            if …
Run Code Online (Sandbox Code Playgroud)

.net c# memorystream

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

计算CPU使用率:代码改进

我正在计算几台服务器上的CPU使用率.但计算非常非常缓慢.

到目前为止,这是我的代码:

While it <= 5
    Dim myOptions As New ConnectionOptions
    myOptions.Username = _myParameters("user")
    myOptions.Password = _myParameters("password")

    Dim myRoot As String = "\\" & _myParameters("server") & "\root\cimv2"
    Dim myScope As New ManagementScope(myRoot, myOptions)

    Dim myQuery As New ObjectQuery(String.Format("select * from Win32_Processor"))

    Dim mySearcher As New ManagementObjectSearcher(myScope, myQuery)
    Dim myCollection As ManagementObjectCollection = mySearcher.Get

    For Each OS As ManagementObject In myCollection
        values.Add(OS("LoadPercentage"))
    Next

    Threading.Thread.Sleep(100) //Set some time between two calculations
    itCounter += 1
End While
Run Code Online (Sandbox Code Playgroud)

代码每次都挂起

For Each OS As ManagementObject …
Run Code Online (Sandbox Code Playgroud)

.net vb.net performance performancecounter cpu-usage

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