小编fal*_*loi的帖子

Git推送到子模块的azure网站

到目前为止,我一直在通过Git向Windows Azure网站发布一个网站,没有任何问题.但今天我们在项目中添加了一个子模块,Azure似乎不喜欢使用子模块.

构建失败,因为我的应用程序依赖于子模块,Azure看到一个空文件夹而不是子模块代码.

有任何想法吗?

git azure azure-web-sites

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

使用KnockoutJS映射插件执行部分更新

现在,我正在使用这个JSON与KO Mapping插件,它工作正常:

{
  "Controls": [
    {
      "Fields": [
        {
          "Name": "emailField", 
          "Text": "email", 
          "Visible": true
        }, 
        {
          "Name": "hiddenField", 
          "Text": "text", 
          "Visible": true
        }
      ], 
      "Name": "form2", 
      "Type": "Form"
    }, 
    {
      "Data": [
        [
          "Federico Aloi", 
          20
        ], 
        [
          "Andres Lopez", 
          31
        ], 
        [
          "Pablo Perez", 
          32
        ]
      ], 
      "Fields": [
        {
          "Name": "nameField", 
          "Text": "Nombre", 
          "Visible": true
        }, 
        {
          "Name": "ageField", 
          "Text": "Edad", 
          "Visible": true
        }
      ], 
      "Name": "datagrid1", 
      "Type": "Datagrid"
    }
  ], 
  "Name": "pagina1", 
  "Title": "Probando el KO" …
Run Code Online (Sandbox Code Playgroud)

knockout-mapping-plugin knockout.js

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

MongoDb:如何从嵌套数组中取消设置属性?

我试图从三嵌套数组中删除一个属性但没有成功.以下是我要删除的数据示例:

Controls: [
    {    
        Name: 'ControlNumberOne',
        Submit: {   
            Executes: [
                {
                    Name: 'execute',
                    Type: 0
                },
                {
                    Name: 'anotherExecute',
                    Type: 0
                }
            ]
        }
    },
    {    
        Name: 'ControlNumberTwo',
        Submit: {   
            Executes: [
                {
                    Name: 'anotherFromAnotherControl',
                    Type: 1
                }
            ]
        }
    }

]
Run Code Online (Sandbox Code Playgroud)

我尝试了以下更新查询,但没有一个工作:

  • db.Page.update('Controls.Submit.Executes.Type': { $exists : true } }, { $unset : { 'Controls.Submit.Executes.Type' : 1 } }, false, true);)

  • db.Page.update('Controls.Submit.Executes.Type': { $exists : true } }, { $unset : { 'Controls.$.Submit.Executes.$.Type' : 1 } }, false, true);)

但是,如果我执行 …

mongodb

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