小编ars*_*in3的帖子

Visual Studio 2013许可证产品密钥

我在等待我的公司完成许可证购买时安装了Visual Studio 2013 Professional作为试用版.

他们完成了4个许可证(64位)的购买,但没有给出Product Keys.相反,存在.iso以某种方式嵌入许可证或产品密钥的特定文件.

我想避免只卸载Visual Studio 2013以重新安装Visual Studio 2013并重新设置我的所有设置.这可能吗?有没有办法从执行.iso全新安装的其他同事桌面提取许可证/产品密钥?

这是我尝试过的(有2个同事安装):

  1. 在以下位置查找许可证信息:

    HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Licenses\*

    但它在两台电脑上都是独一无二的.

  2. 寻找产品密钥:

    HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Registration\2000.0x0000\PIDKEY

    一个安装有一个,我的安装说在尝试使用它时无效.另一个安装有一个空白PIDKEY.

  3. 向内看,SW_DVD5_Visual_Studio_Pro_2013_English_MLF_X19-20996.ISO但我没有提到许可证或产品密钥.

  4. Help > Register Product在Visual Studio中检查它们,简单地说

    许可证:已应用产品密钥

  5. 尝试从ISO进行安装/修复,但它说:

    您尝试设置的产品版本早于此计算机上已安装的版本.

    可能是因为Visual Studio 2013 Update 1和2

同样,我真的想避免重新安装VS 2013的多小时过程.有什么办法吗?

licensing visual-studio visual-studio-2013

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

如何转发声明名称空间中的类

我试图在头文件中使用前向声明来减少使用的#includes,从而减少用户包含我的头文件的依赖关系.

但是,我无法转发使用命名空间的decalre.见下面的例子.

a.hpp file:
#ifndef __A_HPP__
#define __A_HPP__

namespace ns1 {

   class a {
   public:
      a(const char* const msg);

      void talk() const;

   private:
      const char* const msg_;
   };
}

#endif //__A_HPP__

a.cpp file:
#include <iostream>

#include "a.hpp"

using namespace ns1;

a::a(const char* const msg) : msg_(msg) {}

void a::talk() const { 
   std::cout << msg_ << std::endl; 
}



consumer.hpp file:
#ifndef __CONSUMER_HPP__
#define __CONSUMER_HPP__

// How can I forward declare a class which uses a namespace
//doing this below results in …
Run Code Online (Sandbox Code Playgroud)

c++ namespaces

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

XDocument.Descendants没有返回后代

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SetNationalList xmlns="http://www.lge.com/ddc">
      <nationalList>
        <portnumber>6000</portnumber>
        <slaveaddress>7000</slaveaddress>
        <flagzone>2</flagzone>
        <flagindivisual>5</flagindivisual>
        <flagdimming>3</flagdimming>
        <flagpattern>6</flagpattern>
        <flaggroup>9</flaggroup>
      </nationalList>
    </SetNationalList>
  </s:Body>
</s:Envelope>
Run Code Online (Sandbox Code Playgroud)

XDocument xdoc = XDocument.Parse(xml);
foreach (XElement element in xdoc.Descendants("nationalList"))
{
   MessageBox.Show(element.ToString());
}
Run Code Online (Sandbox Code Playgroud)

我想遍历每个节点,nationalList但它不适合我,它foreach完全跳过循环.我在这做错了什么?

.net c# xml linq-to-xml

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

如何拆分列表并将它们作为单独的参数传递?

我的问题是我在列表中有值.我想分离这些值并将它们作为单独的参数发送.

我的代码是:

def egg():
    return "egg"

def egg2(arg1, arg2):
    print arg1
    print arg2

argList = ["egg1", "egg2"]
arg = ', '.join(argList)

egg2(arg.split())
Run Code Online (Sandbox Code Playgroud)

这行代码 (egg2(arg.split()))不起作用,但是我想知道是否可以调用一些将列表中的值分开的内置函数,因此稍后我们可以将它们作为两个不同的参数发送.类似于egg2(argList[0], argList[1]),但要动态完成,这样我就不必显式列出参数.

python list

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

无法加载文件或程序集'log4net,Version = 1.2.10.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304'

我正在使用vs2010和水晶报告版本13.0.2000.0,系统64位水晶报告运行时64位.我的应用程序在开发机器上正常运行,但是当我在服务器上部署时出现此错误

无法加载文件或程序集'log4net,Version = 1.2.10.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304'或其依赖项之一.该系统找不到指定的文件.
描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

异常详细信息:System.IO.FileNotFoundException:无法加载文件或程序集'log4net,Version = 1.2.10.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304'或其依赖项之一.该系统找不到指定的文件.

错误来源:

CR:CrystalReportViewer ID ="CrystalRportViewrRegistration"runat ="server"AutoDataBind ="true"

我已经检查了GAC程序集我没有找到log4net.dll,甚至在我的系统中我搜索了所有并尝试了各种各样的事情,比如更改运行时版本和从apache上传lo4net dll但没有运气.

crystal-reports-2010

25
推荐指数
3
解决办法
9万
查看次数

TamperMonkey中的GM_addStyle等价物

TamperMonkey是否相当于GreaseMonkey GM_addStyle添加CSS 的方法?

在GreaseMonkey中,您可以向多个元素添加一堆CSS属性,如下所示:

GM_addStyle("body { color: white; background-color: black; } img { border: 0; }");
Run Code Online (Sandbox Code Playgroud)

要在TamperMonkey中执行等效操作,我现在必须执行以下操作:

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle('body { color: white; background-color: black; }');
Run Code Online (Sandbox Code Playgroud)

这有效,但GM_addStyleTamperMonkey 是否有内置的等价物,这使我不必在每个脚本上重复这个?

css tampermonkey

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

Google地图:点击标记的自动中心地图

在我正在制作的地图上,我需要一些帮助.地图不是特别复杂,因为我是初学者,我有一堆标记(一旦完成后会有更多),可以在点击标记时打开信息窗口,或者在HTML上选择相应的下拉菜单项目时打开页面的一面.

我想做的并且无法自己找到的是当infowindow打开时自动居中地图上的标记(单击或在HTML菜单中选择).我想有一些函数可以分配给click或infowindow开启事件,但无法确定实现它的方式和方法.

我的代码:

function initialize() {

      var CarteStyles = [
        {
          featureType: "all",
          stylers: [
            { saturation: -50 }
          ]
        },
        {
        elementType: "labels",
        stylers: [
          { visibility: "off" }
        ]
      },
        {
            featureType: "road",
            stylers: [
              { visibility: "simplified" },
              { saturation: -90 }
            ]
        },
        {
        featureType: "road.local",
        "stylers": [
          { "color": "#dbdbd4" }
        ]
      },
    {
          featureType: "road",
          elementType: "labels",
          stylers: [
            { visibility: "off"}
          ]
        },
        {
            featureType: "poi",
            stylers: [
              { visibility: "off" }
            ] …
Run Code Online (Sandbox Code Playgroud)

google-maps google-maps-api-3

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

无法在45000内启动套接字

我正在使用FF版本19

它一切正常,直到昨天,突然今天早上我开始得到这个错误,我有与之前运行的相同的确切代码,没有任何改变

错误信息:

Test 'M:.TestCases.12' failed: Failed to start up socket within 45000
    OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000
    at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.ConnectToBrowser(Int64 timeToWaitInMilliSeconds)
    at OpenQA.Selenium.Firefox.Internal.ExtensionConnection.Start()
    at OpenQA.Selenium.Firefox.FirefoxDriver.StartClient()
    at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
    at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile, TimeSpan commandTimeout)
    at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile)
    at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxProfile profile)

0 passed, 1 failed, 0 skipped, took 145.80 seconds (Ad hoc).
Run Code Online (Sandbox Code Playgroud)

这是我的源代码:

public static IWebDriver GetDriver()
        {
            switch (Common.BrowserSelected)
            {
                case "ff":
                    FirefoxProfile profile = new FirefoxProfile();
                    profile.SetPreference("network.http.phishy-userpass-length", 255);
                    profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", url);
                    drv …
Run Code Online (Sandbox Code Playgroud)

c# firefox webdriver selenium-webdriver

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

LINQ to Objects是否保持其顺序

我有一个List<Person>,而是希望将它们转换为简单处理为a List<string>,执行以下操作:

List<Person> persons = GetPersonsBySeatOrder();
List<string> seatNames = persons.Select(x => x.Name).ToList();

Console.WriteLine("First in line: {0}", seatNames[0]);
Run Code Online (Sandbox Code Playgroud)

.Select()LINQ to Objects对象上的语句是否保证不会更改列表成员的顺序?假设没有添加明确的不同/分组/排序

另外,如果首先使用任意.Where()子句,是否仍保证保持相对顺序,或者有时使用非迭代过滤?


正如Fermin在上面评论的那样,这实际上是一个重复的问题.我没有选择正确的关键字来搜索stackoverflow

使用LINQ保留订单

c# linq-to-objects

16
推荐指数
1
解决办法
1662
查看次数

在MVC框架中使用Javascript文件内的Inline C#

我正在尝试使用MVC框架使内联C#在我的JavaScript文件中工作.我制作了这个小测试代码.

$(document).ready(function() {
    alert(<%= ViewData["Message"] %>);
});
Run Code Online (Sandbox Code Playgroud)

当在视图内部使用此代码时,它可以完美地工作.当我离开我的aspx视图并在JavaScript文件中尝试这个时,我得到了非法的XML字符.我认为这是MVC框架中的设计,但我无法在网上找到任何相关材料.

有没有人使用MVC框架让内联C#在JavaScript文件中工作?

javascript asp.net-mvc

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