RegEx match exactly 4 digits

Ok, i have a regex pattern like this `/^([SW])\w+([0-9]{4})$/` This pattern should match a string like `SW0001` with `SW`-Prefix and 4 digits. I thougth `[0-9]{4}` would do the job, but it also matc...

8 Mar at 15:11

C# 7 .NET / CLR / Visual Studio version requirements

What are the minimum .NET framework and CLR version requirements for running C# 7? Also, do I need VS 2017 to compile C# 7?

1 Mar at 09:59

How to get history on react-router v4?

I having some little issue migrating from React-Router v3 to v4. in v3 I was able to do this anywhere: ``` import { browserHistory } from 'react-router'; browserHistory.push('/some/path'); ``` How ...

31 Oct at 09:46

Why does Entity Framework try to SELECT all columns even though I have specified only two?

I've inherited an ASP MVC project that uses Entity Framework 6.1.3 to interact with a Dynamics CRM 2011 SQL database. I'm using this query to try and get all active accounts that have an account numb...

How to update the constant height constraint of a UIView programmatically?

I have a `UIView` and I set the constraints using Xcode Interface Builder. Now I need to update that `UIView` instance's height constant programmatically. There is a function that goes like `myUIView....

VS 2017 Bug or new features?

After upgrading to VS 2017 I got the following error from this code (which has always been working perfectly) ``` byte[] HexStringToByteArray(string hex) { if (hex.Length % 2 == 1) ...

8 Mar at 12:52

Visual Studio 2017 - Git failed with a fatal error

I am using Visual Studio 2017 Community Edition (CE), and I have signed into my Microsoft account and I am connected to VSTS. I can see all my projects and repositories, but when I attempt to pull/fet...

Creating Diagonal Pattern in WPF

I want to create diagonal hatch pattern in WPF. I am using following XAML code to generate it: ``` <VisualBrush x:Key="HatchBrushnew" TileMode="Tile" Viewport="0,0,30,30" ViewportUnits="Abso...

8 Mar at 10:4

ReactJS, find elements by classname in a React Component

I've a React component. Some elements will be inserted through the children. Some of these elements will have a specific classname. How can I get a list of these DOM nodes in my outermost Component? ...

8 Mar at 08:14

How to pass data to dialog of angular material 2

I am using [dialog box](https://material.angular.io/components/component/dialog) of angular material2. I want to pass data to the opened component. Here is how I am opening dialog box on click of a b...

10 Dec at 12:56

MSBuild support for T4 templates in Visual Studio 2017 RTM

In Visual Studio 2015, I'm using the NuGet package `Unofficial.Microsoft.VisualStudio.TextTemplating.14.0.0` which allows me to transform T4 templates directly from MSBuild, whenever a project is buil...

What is the difference between Publish methods provided in the Visual Studio?

When I click on the Publish method following options show up: [](https://i.stack.imgur.com/93V8R.png) What is the significance of each method?

Tuple syntax in VS 2017

In VS2017 RC, when you tried to use new tuple syntax, you received the following error: > CS8179 Predefined type 'System.ValueTuple`X' is not defined or imported In order to use tuple syntax, y...

7 Mar at 21:28

Typescript + React/Redux: Property "XXX" does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes

I'm working on a project with Typescript, React and Redux (all running in Electron), and I've run into a problem when I'm including one class based component in another and trying to pass parameters b...

7 Mar at 20:38

Joi validation of array

trying to validate that an array has zero or more strings in one case and that it has zero or more objects in another , struggling with Joi docs :( ``` validate: { headers: Joi.object({ ...

10 Jul at 18:21

frame border width in Xamarin.Forms

I use `Xamarin.Forms`, I have `Image`. I want to Border with `Corner Radius` and `Border Width`. Can I do it ? I try to use `Frame`. It good but it has only `Border Width` = 1 and I can't change this....

7 Mar at 18:28

Enable PHP Apache2

I can find the php5 mod in the mods-available directory, but I'm not sure how to get it into the mods-enabled directory. Also, I just wanted to check that this is the way to enable php on my device.....

7 Mar at 17:39

Psql could not connect to server: No such file or directory, 5432 error?

I'm trying to run `psql` on my Vagrant machine, but I get this error: ``` psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Uni...

4 Jan at 22:32

Error:Failed to open zip file. Gradle's dependency cache may be corrupt

I updated android studio 2.3 and there is a bug, gradle doesn't build and it keeps giving me the same error for all projects. ``` Error:Failed to open zip file. Gradle's dependency cache may be corr...

Error when executing `jupyter notebook` (No such file or directory)

When I execute `jupyter notebook` in my virtual environment in Arch Linux, the following error occurred. `Error executing Jupyter command 'notebook': [Errno 2] No such file or directory` My Python ver...

14 Jul at 02:8

Return Json object from Asp.net webMethod to Ajax call

I have following Ajax call method and The asp.net webmethod. My asp.net function is returning some values I need those back in Ajax call .. I have tried lot of things but not succeded yet. ``` <s...

7 Mar at 12:12

How to mock RestSharp portable library in Unit Test

I would like to mockup the RestClient class for test purposes ``` public class DataServices : IDataServices { private readonly IRestClient _restClient; public DataServices(IRestClient restC...

7 Mar at 12:40

Heartbeat explanation

i'm using servicestack in my server application. This is the code to start the service: ``` public override void Configure(Container container) { LogManager.LogFactory = new KCServiceObje...

7 Mar at 10:47

Is there a difference between `x is int?` and `x is int` in C#?

``` class C<T> where T : struct { bool M1(object o) => o is T; bool M2(object o) => o is T?; } ``` The two methods above seems to behave equally, both when passing `null` reference or boxed ...

7 Mar at 00:47

asp.net core defaultProxy

In net 4.5 we are working with proxy like this: ``` <system.net> <!-- --> <defaultProxy enabled="true" useDefaultCredentials="false"> <proxy usesystemdefault="True" proxyaddress="http...