visual-studio-2012

Numbered back reference followed by literal number

醉酒当歌 提交于 2019-12-19 08:31:24
问题 I'm trying to perform a regular expression substitution. The specific issue I can't seem to figure out is that following my 2nd backreference, I have a string literal number (the numeral one). Using MS Visual Studio 2012 (C++ console project...not .NET), it doesn't work. I assume because it takes my backreference as $21, instead of $2. I've tried various syntax but can't come up with something that works! std::string input = "my_variable_name_iei_lo1"; std::string regx = "(\\w+)iei_(lo_hi)1";

Numbered back reference followed by literal number

一笑奈何 提交于 2019-12-19 08:31:03
问题 I'm trying to perform a regular expression substitution. The specific issue I can't seem to figure out is that following my 2nd backreference, I have a string literal number (the numeral one). Using MS Visual Studio 2012 (C++ console project...not .NET), it doesn't work. I assume because it takes my backreference as $21, instead of $2. I've tried various syntax but can't come up with something that works! std::string input = "my_variable_name_iei_lo1"; std::string regx = "(\\w+)iei_(lo_hi)1";

Report error/warning if missing files in project/solution in Visual Studio 2012 / 2013

非 Y 不嫁゛ 提交于 2019-12-19 08:16:48
问题 Visual Studio no longer supports macros, so the answer in the following question is only valid for previous releases: Report error/warning if missing files in project/solution in Visual Studio Is there a way for Visual Studio 2012 / 2013 to report an error/warning when you build a solution that has missing files? 回答1: Based on VS macro code you referenced, I've created an extension for Visual Commander to report warning: Imports EnvDTE Imports EnvDTE80 Public Class E Implements

Read xml node attribute

≡放荡痞女 提交于 2019-12-19 08:12:42
问题 I have an xml document that have nodes like this, <ITEM id="1" name="bleh"... /> What I want to do is get all id's attribute value for each ITEM node that exists in the document. So, how can I do that? Edit: I've tried this way and it didn't works: XmlDocument Doc = new XmlDocument(); Doc.Load("example.xml"); XmlNodeList nodeList = Doc.SelectNodes("/ITEM"); foreach (XmlNode node in nodeList) { string id = node.Attributes["id"].Value; Console.WriteLine(id); } 回答1: You should use

Should std::atomic<int*>::load be doing a compare-and-swap loop?

混江龙づ霸主 提交于 2019-12-19 07:58:50
问题 Summary : I had expected that std::atomic<int*>::load with std::memory_order_relaxed would be close to the performance of just loading a pointer directly, at least when the loaded value rarely changes. I saw far worse performance for the atomic load than a normal load on Visual Studio C++ 2012, so I decided to investigate. It turns out that the atomic load is implemented as a compare-and-swap loop, which I suspect is not the fastest possible implementation. Question : Is there some reason

using OpenSSL in Visual Studio 2012

谁都会走 提交于 2019-12-19 06:56:09
问题 I have downloaded the latest release version of Openssl from http://www.openssl.org/source/ I would like to use it in Visual Studio 2012, especially getting the md5/sha-1 hash of a file, but I can not include / setup the environment with the openssl library. To be honest I got confused what to include, and where, however I have read the README-s. I'm getting this error. Error 1 error LNK2019: unresolved external symbol _MD5_Init referenced in function _main So my question is, I have

using OpenSSL in Visual Studio 2012

泪湿孤枕 提交于 2019-12-19 06:54:50
问题 I have downloaded the latest release version of Openssl from http://www.openssl.org/source/ I would like to use it in Visual Studio 2012, especially getting the md5/sha-1 hash of a file, but I can not include / setup the environment with the openssl library. To be honest I got confused what to include, and where, however I have read the README-s. I'm getting this error. Error 1 error LNK2019: unresolved external symbol _MD5_Init referenced in function _main So my question is, I have

Resharper 8.1 Test Runner slowing down Visual Studio Text Editing

坚强是说给别人听的谎言 提交于 2019-12-19 05:33:11
问题 I've got a fairly small C# solution with about 5 projects in it. I am using Visual Studio 2012 with Update 4, and Resharper 8.1 (build 8.1.23.546). It's on an I7 with an SSD and 16GB RAM, with oodles of disk space. Performance on this machine is fantastic for everything else. I have R# set to be my unit test runner, and I've noticed that as soon as I run any unit tests (one or many, pass or fail, makes no difference), the Visual Studio text editor becomes almost unusable. Typing into the

Resharper 8.1 Test Runner slowing down Visual Studio Text Editing

孤街醉人 提交于 2019-12-19 05:33:10
问题 I've got a fairly small C# solution with about 5 projects in it. I am using Visual Studio 2012 with Update 4, and Resharper 8.1 (build 8.1.23.546). It's on an I7 with an SSD and 16GB RAM, with oodles of disk space. Performance on this machine is fantastic for everything else. I have R# set to be my unit test runner, and I've noticed that as soon as I run any unit tests (one or many, pass or fail, makes no difference), the Visual Studio text editor becomes almost unusable. Typing into the

How to have a file open normally in Resharper instead of in “Keep Open” mode

两盒软妹~` 提交于 2019-12-19 05:06:11
问题 I'm using Visual Studio 2012 Ultimate and Resharper and whenever I search for (and open a file) by name (using the "Go To File" shortcut of Control-Shift-T) the file opens in a "Keep Open" mode, instead of opening normally. I've searched and can't find anyway to open the file normally. What setting can I change to make it open normally? 回答1: Simply go to : Tools >> Options >> Environment >> Tabs and Windows Then uncheck the "Allow new files to be opened in the preview tab" in the Preview Tab