visual-studio

Can I get Console to show Chinese?

孤者浪人 提交于 2021-02-07 11:54:53
问题 I've always wondered if it would be possible to show UTF8 or UTF16-Chinese text in a Console window, e.g., Console.WriteLine(chinese). For the time being, it shows up as ???. Is it possible to kick up a Console session that supports Chinese characters? 回答1: urxvt, the Unicode rxvt, is a Xwindow "console" that will show Chinese characters. Assuming you're using Windows, this can work under Cygwin or coLinux. also see Unicode characters in Windows command line - how?. I haven't yet figured out

How to achieve vector swizzling in C++?

[亡魂溺海] 提交于 2021-02-07 11:38:31
问题 struct vec2 { union { struct { float x, y; }; struct { float r, g; }; struct { float s, t; }; }; vec2() {} vec2(float a, float b) : x(a), y(b) {} }; struct vec3 { union { struct { float x, y, z; }; struct { float r, g, b; }; struct { float s, t, p; }; // Here is the problem with g++. struct { vec2 xy; float z; }; struct { float x; vec2 yz; }; }; vec3() {} vec3(float a, float b, float c) : x(a), y(b), z(c) {} }; The code above compiles and works as expected in Visual Studio and so I can use it

How to set SSRS ConsumeContainerWhitespace property in Visual Studio 2008?

╄→尐↘猪︶ㄣ 提交于 2021-02-07 11:28:33
问题 I am trying to set ConsumeContainerWhitespace using the Report Designer in Visual Studio 2008, but I can't find the property in the GUI. Since I can't find it, I'm wondering if this is new to VS 2010. Is it possible to set this property in VS 2008? If so, how is it done? 回答1: You can set this property using the VS2008 GUI. Just click on the report surface and hit F4 to bring up the properties window, and then select "Report" in the object selector at the top of the window. You should then see

submodules git visual studio “fatal: unexpected sequence in commit output” can they just checkin?

跟風遠走 提交于 2021-02-07 11:21:46
问题 Any reason why git submodules in Visual Studio 2017 just don't want to checkin? I keep getting fatal: unexpected sequence in commit output Seems like sometimes they DO checkin, but most of the time they don't. Am I misunderstanding something? 回答1: In my case the problem was that not all the files had been saved when trying to commit. This showed me where to look. "I got this exception when the file with changes I was attempting to commit was not saved" 回答2: With assistance from the main

Code Analysis Warning CA2213 - Call Dispose() on IDisposable backing field

馋奶兔 提交于 2021-02-07 11:18:23
问题 Wanted to post this, even though I figured it out as I was writing the question. Will post answer below. Getting the following warning with VS Code Analysis: Warning CA2213 'DBConn' contains field 'DBConn.k__BackingField' that is of IDisposable type: 'SqlConnection'. Change the Dispose method on 'DBConn' to call Dispose or Close on this field. But my code does call Dispose() on the DBConn property. Does it not on the backing field? I have other instances like this - where I am disposing of

How do I restore the default VS toolbar configuration?

随声附和 提交于 2021-02-07 11:17:41
问题 How do I restore the default VS toolbar configuration? By that, I mean: the set and location of enabled toolbars the set and order of items on each toolbar I know how to reset the set and order of items on a given toolbar , so if I knew which are the default-enabled toolbars (and their location) then I would be able to enable and reset each of them one by one. I don't want to reset all VS settings. 回答1: Tools > Import and Export Settings... > Import selected environment settings > Choose a

Is there a way to “map” the program execution order in Visual Studio or MATLAB?

有些话、适合烂在心里 提交于 2021-02-07 10:43:04
问题 What I mean by "map" is that I have a "main" function which calls many other programs inside, and I want to be able to see which file runs first, second, third, etc. Basically, I want to be able to see the list and order of dependencies in this large OOP design program (which the creator did not make a UML class diagram for) to help decipher the code. Surely such a functionality must exist in popular IDE's? I'm mostly dealing with C++ and MATLAB so I'm more concerned with these two

Code freezes on trying to open QDialog

混江龙づ霸主 提交于 2021-02-07 10:28:41
问题 I'm trying to debug a c++/Qt5.5 code in MSVS2010 Professional. A function has following lines of code, /* Static method approach */ QString filters("Music files (*.mp3);;Text files (*.txt);;All files (*.*)"); QString defaultFilter("Text files (*.txt)"); QFileDialog::getSaveFileName(0, "Save file", QDir::currentPath(), filters, &defaultFilter); The dialog is simply doesn't open and the application freezes. I tried the alternative was as below. /* Direct object construction approach */

Visual Studio community install crash

别来无恙 提交于 2021-02-07 09:53:01
问题 I am getting the following error whenever I try to install Visual Studio Community from the Microsoft site. It occurs immediately upon running the exe . I have downloaded many versions, run as admin, restarted my pc etc etc, and every time I am hit with this error. I have had visual studio installed on this PC previously. Selecting "Close program" ironically opens this site. Which is evidently no help. Does anyone have any idea how I can resolve this before I attempt to contact Microsoft

Visual Studio community install crash

浪尽此生 提交于 2021-02-07 09:50:14
问题 I am getting the following error whenever I try to install Visual Studio Community from the Microsoft site. It occurs immediately upon running the exe . I have downloaded many versions, run as admin, restarted my pc etc etc, and every time I am hit with this error. I have had visual studio installed on this PC previously. Selecting "Close program" ironically opens this site. Which is evidently no help. Does anyone have any idea how I can resolve this before I attempt to contact Microsoft