小编Was*_*sim的帖子

Mongo查询嵌入式文档中的动态字段

我有以下结构:

{
   "FiledA" : "FiledAValue",
   "FiledB" : "FiledBValue",
   "FiledC" : {
          "X" : "XValue",
          "Y" : "YValue",
          "Z" : "ZValue"
   },
}
Run Code Online (Sandbox Code Playgroud)
  • FiledC内容可能是动态的(其他文件不是x,y,z)
  • 用户将发送一个查询,例如{"FiledA" : "12" , "FiledC" : "333"} 查询应该与FiledA匹配12,如果有任何FiledC,其中一个filds包含333

我如何在查询中解决FiledC问题

提前致谢 ...

mongodb

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

绑定网格列宽


我在设计XAML时面临以下问题.

我需要到最后来安排我的数据,如网格,但有一个自定义DataTemplate.所以我创建了一个顶部Grid,其中包含数据项的两个标题标签.下面Grid我建立一个StackPanelItemsControl它包括DataTemplate用于显示我的数据.一切都很好,当我运行应用程序时,我得到标题标签和下面的数据项像网格.我的问题是标签和项目的内容没有正确对齐.所以我想到Width将标题标签列绑定到ActualWidth其中ItemTemplate,但不幸的是,这不起作用.

是否有任何干净的方式来实现这一目标?
提前致谢 ...

.net wpf binding wpf-controls

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

以编程方式配置wcf服务

我有一个远程wcf服务,我通过WSHttpBinding连接它.如果我使用空服务构造函数,这意味着它将从app.config获取所有配置,一切正常,(我的意思是MyService s = new MyService()).现在我想以编程方式配置wcf.这很简单,直到我到达身份验证问题,这很难做到.这是我使用的app.config,你可以看到我的安全配置.

<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="SecuredEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00"
                receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
                transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="true" />
                <security mode="Message">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" negotiateServiceCredential="true"
                        algorithmSuite="Default" />
                </security>
            </binding>               
        </wsHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://MyWcfService.svc"
            binding="wsHttpBinding" bindingConfiguration="SecuredEndPoint"
            contract="ServiceReference1.IMyService" name="SecuredEndPoint">
            <identity>
                <certificate encodedValue="*******************************************************************" />
            </identity>
        </endpoint>            
    </client>
</system.serviceModel>
Run Code Online (Sandbox Code Playgroud)

.net wcf wcf-binding wcf-security wcf-data-services

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

使用第7层或第4层进行负载平衡

我很想知道应用负载均衡的Layer7或Layer4之间有什么不同.其中一个更好吗?我如何决定哪个更符合我的系统?

提前致谢 ...

.net iis-7 load-balancing iis-7.5

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