Questions

Laravel throws 'The bootstrap/cache directory must be present and writable' error after update

I used 'composer update', which updated a few packages. During the updating process the website still functions. However, after it says 'The compiled services file has been removed', the website doesn...

1 May at 11:28

How to check undefined in TypeScript

I am using this code to check whether a variable is undefined, but it's not working. ``` var uemail = localStorage.getItem("useremail"); if (typeof uemail === "undefined") { alert('undefined'); }...

24 Feb at 19:12

Proper way to move Rigidbody GameObject

I just started learning Unity. I tried to make a simple box move by using this script. The premise is, whenever someone presses 'w' the box moves forward. ``` public class PlayerMover : MonoBehaviour...

15 Jun at 16:46

multiple JsonProperty Name assigned to single property

I have two format of JSON which I want to Deserialize to one class. I know we can't apply two `[JsonProperty]` attribute to one property. Can you please suggest me a way to achieve this? ``` string ...

14 Nov at 08:41

How to get a single value from FormGroup

I am aware that I can get the values of a form using ``` JSON.stringify(this.formName.value) ``` However, I want to get a single value from the form. How do I go about doing that?

Composite Key EF Core getting error when using Fluent Api

So I have the following class in Entity Framework Core. I am trying to do a code first migration and can't for the life of me figure out how to make the fluent API for this work. ``` public class Pa...

How to get root directory of project in asp.net core. Directory.GetCurrentDirectory() doesn't seem to work correctly on a mac

My project has a folder structure to the tune of: - - - - - In the server (running in the Project/Server folder) I refer to the folder like this: ``` var rootFolder = Directory.GetCurrentDirectory...

6 Dec at 22:22

services.AddSwaggerGen() giving error

All I'm trying to do is add swagger to an ASP.Net Core application. I'm watching a tutorial and all I see them do is add `services.AddSwaggerGen();` under the configure services area in the Startup.cs...

30 Apr at 20:4

Null value when Pass values [FromBody] to post method by Postman plugin

I use api controller in ASP.net web API and i need to pass value to post method by [FromBody] type.. ``` [HttpPost] public HttpResponseMessage Post( [FromBody]string name) { .... } ``` i us...

30 Apr at 07:15

Using a DelegatingHandler in HttpClient class from windows forms - Inner handler has not been set

I'm writing a custom message handler to handle authentication cookie timeouts to my API. For example, if my code base makes a call to the API and in turn receives a 401 then it should retry the log...

How to handle multi value cookies in ASP.NET Core?

In the full .NET framework we have support for multi value cookies. e.g. a cookie could have multiple values: ``` HttpCookie aCookie = new HttpCookie("userInfo"); aCookie.Values["userName"] = "patrick...

18 Dec at 23:7

How to use Acrylic Accent in Windows 10 Creators Update?

I can't find any detailed document to use Acrylic Accent ([CreateBackdropBrush](https://learn.microsoft.com/en-us/uwp/api/Windows.UI.Composition.Compositor)). I found a [post](https://stackoverflow.co...

How-to migrate Wpf projects to the new VS2017 format

I'm migrating my projects to the new visual studio 2017 format which is working nicely for all standard libraries only now I run into problems with my UI libraries where I use Wpf / Xaml. I cannot fi...

29 Apr at 08:44

How to get IP address of running docker container

I am using Docker for Mac. I am running a nodejs based microservice in a Docker container. I want to test node microservice through the browser. How to get IP address of running docker container?

22 Mar at 06:15

Flutter - Container onPressed?

I have this container: ``` new Container( width: 500.0, padding: new EdgeInsets.fromLTRB(20.0, 40.0, 20.0, 40.0), color: Colors.green, child: new Column( children: [ new...

20 Feb at 15:55

How to upload an image in React JS?

``` <div className="mb-1"> Image <span className="font-css top">*</span> <div className=""> <input type="file" id="file-input" name="ImageStyle"/> </div> </div> ``` This is ...

29 Apr at 06:44

How can I create a JsonPatchDocument from comparing two c# objects?

Given I have two c# objects of the same type, I want to compare them to create a JsonPatchDocument. I have a StyleDetail class defined like this: ``` public class StyleDetail { public s...

30 Mar at 01:39

How to save & load xgboost model?

From the [XGBoost guide](https://xgboost.readthedocs.io/en/latest/python/python_intro.html#training): > After training, the model can be saved.``` bst.save_model('0001.model') ``` The model and its fe...

3 Jan at 21:53

Visual Studio 2017 does not have Business Intelligence Integration Services/Projects

I do not see an option to create an SSIS project using Visual Studio 2017.

Adding Autofac to WPF MVVM application

I can't seem to find an solution to this problem. I've seen several questions about this, but none really give me a solution. I am totally new to Autofac and haven't really done much WPF + MVVM, but k...

What does it mean for a property to be [Required] and nullable?

What does it mean for a property to be `[Required]` and nullable? (example below) It seems that if it is `[Required]` it couldn't possibly be `null` (no value), and if it is able to be `null` it could...

28 Apr at 22:55

Only numbers. Input number in React

I'm trying to exclude minus and plus from input, but it's going wrong: ``` handleChange(event) { const value = event.target.value.replace(/\+|-/ig, ''); this.setState({financialGoal: value}); } `...

27 Mar at 17:41

Update-Database command is not working in ASP.Net Core / Entity Framework Core because object in database already exists

I was updating my database by the command line, but then I manually updated one of my tables. This seems to have disrupted my ability to update-database. I receive the following error when I try to ...

Static classes can be used as type arguments via reflection

When trying to use a static class as a type parameter, the C# compiler will throw an error: `var test = new List<Math>();` > error CS0718: `System.Math': static classes cannot be used as generic arg...

23 May at 12:10

Laravel Mix "sh: 1: cross-env: not found error"

I have been trying to set up Laravel Mix in my project and followed the install guide on the Laravel website however keep getting errors. ``` { "private": true, "scripts": { "dev": "cross-env...

4 May at 16:16