Questions

C# Json.NET Render Flags Enum as String Array

In a .NET Application, I have a set of values that are stored as a `[Flags] enum`. I want to serialize these to json, but instead of having the result be an integer, I'd like to get an array of string...

31 Mar at 14:36

Convert string[] to Int[] without losing leading zeros

``` string param = "1100,1110,0110,0001"; ``` ``` int[] matrix = new[] { 1,1,0,0, 1,1,1,0, 0,1,1,0, 0,0,0,1 }; ``` First of al...

6 Apr at 05:25

Property 'X' is private and only accessible within class 'xyzComponent'

I'm trying to build angular2 application for for that I'm following this [blog](http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/). After my successful com...

How to get values from input types using this.refs in reactjs?

Not able to get values of input type using this.refs... how to get that values from input type ``` export class BusinessDetailsForm extends Component { submitForm(data) { console.log(th...

15 May at 11:5

Export/Import Visual Studio 2015 rule set into SonarQube

: We are building C# code within Visual Studio 2015 and generating CodeAnalysis report using default ruleset available within Visual Studio 2015. : While running same code into SonarQube integrated wi...

Parsing a JSON date into a C# DateTime

i have an API that get information from targetProcess and put that information in sql tables. the issue comes when a targetProcess field is date because i recieved it as json date `"/Date(14092020000...

23 May at 12:10

CSS grid wrapping

Is it possible to make a CSS grid wrap without using media queries? In my case, I have a non-deterministic number of items that I want placed in a grid and I want that grid to wrap. Using Flexbox, I'...

3 Nov at 12:30

Node update a specific package

I want to update my Browser-sync . How can I achieve this? My current version of Browser-sync does not have the Browser-sync GUI :( ``` ├─┬ browser-sync@1.9.2 │ ├── browser-sync-client@1.0.2 ```

How do I add features to Visual Studio 2017?

Let's say that when I installed Visual Studio 2017 I decided to use the "Windows Universal Platform" packages. Later, I realize that I'd like to install the ".Net Desktop packages" (either instead, o...

29 Apr at 12:56

How to bind the values of the itemsource (array of strings) to a label in a ListView

I have an array of strings, that I have set as the item source of a ListView. The ListView now has the same amount of rows as the array has elements. However I don't know what to set the binding as. I...

Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?

I just installed Python 3.6.1 for MacOS X When I attempt to run the Console(or run anything with Python3), this error is thrown: ``` AttributeError: module 'enum' has no attribute 'IntFlag' $ /Libr...

Automatically hard wrap lines at column in VSCode

How can I automatically hard wrap lines in VSCode? By that I mean if a line reaches a specified column, automatically insert a newline at the word boundary closest to that column without going over. V...

30 Mar at 15:29

Sizing elements to percentage of screen width/height

Is there a simple (non-LayoutBuilder) way to size an element relative to screen size (width/height)? For example: how do I set the width of a CardView to be 65% of the screen width. It can't be done ...

typescript: error TS2693: 'Promise' only refers to a type, but is being used as a value here

I am trying to use Typescript for my AWS Lambda and i am getting the following errors where ever I use promises. I tried using the following variations in the code Using the Promise constructor ...

24 Jul at 18:32

Injecting Single Instance HttpClient with specific HttpMessageHandler

As part of an ASP.Net Core project that I am working on I have a requirement to communicate with a number of different Rest based API Endpoints from within my WebApi. To achieve this I am using a num...

TypeScript filter out nulls from an array

TypeScript, `--strictNullChecks` mode. Suppose I have an array of nullable strings `(string | null)[]`. What would be a way to remove all nulls in a such a way that the result has type `string[]`? ``...

5 Jul at 12:55

Is Microsoft.AspNet.WebApi.Client supported in .NET Core or not?

I'm currently trying to do some JSON formatting using the HttpClient in .NET Core and MediaTypeFormatters. Especially the function "ReadAsAsync(..., MediaTypeFormatter, ...)" ([https://msdn.microsoft....

4 Dec at 22:15

Can I make a CSS grid with dynamic number of rows or columns?

What I wanna do is to make a [CSS grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) with a dynamic number of cells. For the sake of simplicity, let's assume there will always be ...

7 Feb at 10:4

Type 'void' is not assignable to type 'ObservableInput<{}>'

This error started to pop up after I migrated to TS 2.2.2, so I'm assuming that's the problem... The code did not stop working, but now I receive that error and I tried a few things like returning an ...

30 Mar at 11:5

Typescript : require statement not part of an import statement

Typescript version 2.2.2 I wrote this require in my UserRoutzr.ts ``` const users = <IUser[]> require(path.join(process.cwd() + "/data")); ``` TSLint is raising the following warning: ``` require...

30 Mar at 08:39

is it possible to unload an Assembly loaded dynamically in dotnet core?

in .net framework was possible to load an assembly in separate AppDomain then unload it. In .NET core AppDomain not available and replaced by `AssemblyLoadContext`. I can load assembly to `AssemblyLoa...

4 Jun at 03:43

How to detect tablet mode

I'm using the following code to detect if a user is in tablet mode or not. I'm on a Surface Pro and when I decouple the keyboard and make the PC into a tablet, `IsTabletMode` returns true (which it sh...

5 Aug at 17:40

How to declare a C# Record Type?

I read [on a blog](https://www.codeproject.com/Articles/1131035/New-Features-of-Csharp) that C# 7 will feature record types ``` class studentInfo(string StudentFName, string StudentMName, string Stud...

22 May at 09:15

C# Method overload resolution not selecting concrete generic override

This complete C# program illustrates the issue: ``` public abstract class Executor<T> { public abstract void Execute(T item); } class StringExecutor : Executor<string> { public void Execute(...

29 Mar at 23:9

Ignoring exceptions when using c# selenium webdriverWait wait.untill() function

In order to check if an Element is exists and clickble i'm trying to write a boolean method which will wait for the element to be enabled and displyed using C# selenium's webDriverWait as follow: In c...