在第四层数据库的三层架构中,有什么意义scaling horizontally和scaling vertically意思?
我有一个选择的过程需要很长时间才能完成,大约需要5到10分钟.
我目前没有使用NOLOCK作为MS SQL数据库引擎的提示.
与此同时,我们有另一个进程在进行更新并插入到同一个数据库和相同的表中.
第一个过程已经开始,最近过早地结束了一条消息
SQLEXCEPTION:事务在锁资源上与另一个进程死锁,并被选为死锁牺牲品.
第一个进程在相同条件但在数据库较小的其他站点上运行,因此所讨论的select语句需要更短的时间(大约30秒左右).在这些其他站点中,我没有在这些其他站点中获得死锁消息.我也没有在最初遇到问题的网站上收到此消息,但是,我认为,随着数据库的增长,我相信我必须超过一些门槛.这是我的问题:
div#thing {
  position: absolute;
  top: 0px;
  z-index: 2;
  margin: 0 auto;
}
<div id="thing">
   <p>text text text with no fixed size, variable font</p>
</div>
Run Code Online (Sandbox Code Playgroud)
股利是在顶部,但我不能居中<center>或margin: 0 auto;
我在我的项目中添加了App.config文件.我从Project> Properties> Settings面板创建了两个设置 -
我注意到当我添加设置时,我可以将范围定义为User或Application.-
如果我定义设置,因为User它转到userSettings部分,
如果我定义设置,因为Application它转到applicationSettings部分
App.config中
<configuration>
    <userSettings>
        <DemoApp.Properties.Settings>
            <setting name="MySetting1" serializeAs="String">
                <value>Value1</value>
            </setting>
        </DemoApp.Properties.Settings>
    </userSettings>
    <applicationSettings>
        <DemoApp.Properties.Settings>
            <setting name="MySetting2" serializeAs="String">
                <value>Value2</value>
            </setting>
        </DemoApp.Properties.Settings>
    </applicationSettings>
</configuration>
Run Code Online (Sandbox Code Playgroud)
但是,这些设置可以通过相同的方式访问.cs-
码
string mySetting1 = DemoApp.Properties.Settings.Default.MySetting1;
string mySetting2 = DemoApp.Properties.Settings.Default.MySetting2;
Run Code Online (Sandbox Code Playgroud)
在这两者之间应该选择的范围User和Application范围之间有什么区别?
我使用a创建一个登录,window control以允许用户登录WPF我正在创建的应用程序.
到目前为止,我已经创建了一种方法,用于检查用户是否已输入正确的凭据,username并password在textbox登录屏幕上输入binding两个properties.
我通过创建一个bool方法来实现这一点,就像这样;
public bool CheckLogin()
{
    var user = context.Users.Where(i => i.Username == this.Username).SingleOrDefault();
    if (user == null)
    {
        MessageBox.Show("Unable to Login, incorrect credentials.");
        return false;
    }
    else if (this.Username == user.Username || this.Password.ToString() == user.Password)
    {
        MessageBox.Show("Welcome " + user.Username + ", you have successfully logged in.");
        return true;
    }
    else
    {
        MessageBox.Show("Unable to Login, incorrect credentials.");
        return false;
    }
} …Run Code Online (Sandbox Code Playgroud) 鉴于以下课程,
public class Result
{      
    public bool Success { get; set; }
    public string Message { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我在这样的Controller动作中返回其中一个,
return Json(new Result() { Success = true, Message = "test"})
Run Code Online (Sandbox Code Playgroud)
但是,我的客户端框架期望这些属性是小写的成功和消息.没有实际上必须有小写的属性名称是一种方法来实现这个思想正常的Json函数调用?
在我的应用程序中,我使用jsapi实现了Google注销.
我使用网址https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=xxxxxx连接到Google,然后通过https://www.googleapis.com/plus/v1/people/xxxxxx获取用户数据来自谷歌个人资料.
现在,我需要在点击应用程序中的按钮时从Google注销用户.如何在JavaScript中实现此功能,或者至少每次用户登录时都必须询问Google登录页面.
我试过了approval_prompt=force,但似乎没有工作.
我知道Visual Studio 2010中的web.config提供了从数据库从调试模式切换到发布模式的功能.
这是我的Web.Release.config:
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
      providerName="System.Data.SqlClient" />
    <add name="Testing1" connectionString="Data Source=test;Initial Catalog=TestDatabase;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
  </system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)
这是我的Web.Debug.config代码:
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
      providerName="System.Data.SqlClient" />
    <add name="Live1" connectionString="Data Source=Live;Initial Catalog=LiveDatabase;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" …Run Code Online (Sandbox Code Playgroud) 我刚刚升级到2.3.0,现在我收到错误'你不能多次将绑定应用到同一个元素.' 我没有进入2.2.1.
我从MVC控制器获得部分视图,并在点击href后将其添加到页面中.第二次单击链接以获取局部视图时发生错误.我这样做了很多次.
有没有办法清除这一点,并避免抛出新的错误?
这是我的代码:
$.get(url + "GetAssignedCompaniesView?layoutId=" + layoutId + "&noCache=" + new Date().getMilliseconds(), function (result) {
              $("#editAssignedPartial").html($(result));
              showEditAssignedArea(true);
              $(window.document).ready(function () {
                 // error is thrown here
                 ko.applyBindings(self, window.document.getElementById("editAssigned"));
                 $("#layoutId").attr("value", layoutId);
                 updateTypeHiddenElement.attr("value", "companies");
      });
    });
Run Code Online (Sandbox Code Playgroud)
     
    
<div id="editAssignedPartial">
</div>
$(document).ready(function () {
  'use strict';
  var vm = new Vm();
  ko.applyBindings(vm, document.getElementById("area1"));
});
Run Code Online (Sandbox Code Playgroud) 我使用visual studio 2010和.N ET 4.0创建了一个非常简单的窗口服务.
除了添加了安装程序之外,此服务没有从默认的Windows服务项目添加任何功能.
如果我在我的开发箱或我们域中的其他Windows 2008 R2计算机上运行"installutil.exe appName.exe",则Windows服务安装没有问题.
当我尝试在我们的客户站点上执行相同的操作时,它无法安装,并出现以下错误.
Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.
Exception occurred while initializing the installation:
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\TestService\WindowsService1.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).
Run Code Online (Sandbox Code Playgroud)
此解决方案只有一个项目,并且没有添加依赖项.
我在我们环境中的多台机器上尝试过,在客户中尝试过两台.这些机器都是windows 2008 R2,都是全新安装.一台机器只有.net 2.0和.net 4.0.另一个.net 2,3,3.5和4.
我是每台机器上的本地管理员.
我也尝试了64位安装程序,但得到以下错误,所以我认为32位的是一个使用的.
System.BadImageFormatException
任何指导将不胜感激.谢谢.
c# ×4
.net ×1
.net-4.0 ×1
api ×1
app-config ×1
asp.net ×1
asp.net-mvc ×1
css ×1
database ×1
deadlock ×1
html ×1
installutil ×1
javascript ×1
json ×1
knockout.js ×1
mvvm ×1
oauth-2.0 ×1
performance ×1
scalability ×1
sql-server ×1
web-config ×1
winforms ×1
wpf ×1
xhtml ×1