Rename more than one column using withColumnRenamed
I want to change names of two columns using spark withColumnRenamed function. Of course, I can write: ``` data = sqlContext.createDataFrame([(1,2), (3,4)], ['x1', 'x2']) data = (data .withCo...
- Modified
- 31 Jan at 11:51
In Angular, how to add Validator to FormControl after control is created?
We have a component that has a dynamically built form. The code to add a control with validators might look like this: ``` var c = new FormControl('', Validators.required); ``` But let's say that I w...
- Modified
- 22 Feb at 00:35
ServiceStack as Windows Service with Razor - Setup Project
I have a servicestack project using razor exposed through a windows service, and need to create a setup project to install it (as opposed to the batch files in the demo's I've seen). Any suggestions...
- Modified
- 5 Aug at 20:25
How to add font-awesome to Angular 2 + CLI project
I'm using Angular 2+ and Angular CLI. How do I add font-awesome to my project?
- Modified
- 13 Apr at 14:32
How to include dependencies in .NET Core app docker image?
I'm trying to build a .NET Core app docker image. But I can't figure out how I'm supposed to get the project's NuGet dependencies into the image. For simplicity reasons I've create a .NET Core consol...
- Modified
- 6 Aug at 01:57
Encrypt String in .NET Core
I would like to encrypt a string in .NET Core using a key. I have a client / server scenario and would like to encrypt a string on the client, send it to the server and decrypt it. As .NET Core is s...
- Modified
- 5 Aug at 17:46
How to extract custom header value?
I have this exact code from the accepted answer in my project which I need to migrate into ASP.NET Core MVP. [How to extract custom header value in Web API message handler?](https://stackoverflow.com...
- Modified
- 16 Mar at 07:23
How to sign a JWT using RS256 with RSA private key
I am using the [jose-jwt library](https://github.com/dvsekhvalnov/jose-jwt) and want to create a signed JWT in C# using the RS256 algorithm for encryption. I have no experience with cryptography, so p...
- Modified
- 23 Oct at 18:44
PHP XML Extension: Not installed
So i'm currently installing mybb and went through a very long tutorial on how to do it. The problem is when I get to the requirements check this shows up [](https://i.stack.imgur.com/a0YrD.png) How ...
Deserialize nested JSON into C# objects
I am getting JSON back from an API that looks like this: ``` { "Items": { "Item322A": [{ "prop1": "string", "prop2": "string", "prop3": 1, "prop4": false },{ "...
- Modified
- 5 Aug at 15:48
Running a .NET Core Console Application on Mac or Windows
I've created a .NET Core console application. I want to build the app so that I can execute it on Windows or MacOS without dotnet core being installed on the machine. So I need e.g. for windows an exe...
Jetbrains Rider + Visual Studio WPF
I'm about to have a project with C# again. As I love using JetBrains IDEs, I came along Rider. The main problem for me is that I need a Windows Forms or WPF Designer for the GUI. Is there any external...
Determine Operating System in .NET Core
How can I determine which operating system my .NET Core app is running on? In the past I could use `Environment.OSVersion`. What is the current way to determine whether my app is running on Mac or Wi...
How do I visually design my database with Entity Framework Core?
I am wondering myself, how I should design my database scheme (in terms of efficiency and visuality). I am developing a ASP.NET Core application with Angular 2 and I am using [Entity Framework Core](...
- Modified
- 15 Jul at 14:17
Change bar plot colour in geom_bar with ggplot2 in r
I have the following in order to bar plot the data frame. ``` c1 <- c(10, 20, 40) c2 <- c(3, 5, 7) c3 <- c(1, 1, 1) df <- data.frame(c1, c2, c3) ggplot(data=df, aes(x=c1+c2/2, y=c3)) + geom_bar(sta...
webpack command not working
I am new to Node Js and Webpack. I tried to start a project with module-loaders. Firstly, I installed nodeJs and NPM and created a new directory called `tutorial`. I used the command prompt to cd int...
How to set component default props on React component
I use the code below to set default props on a React component but it doesn't work. In the `render()` method, I can see the output "undefined props" was printed on the browser console. How can I defin...
- Modified
- 22 Aug at 18:36
Use JWT (Authorization: Bearer) in Swagger in ASP.NET Core
I'm creating a REST api in ASP.NET Core 1.0. I was using Swagger to test but now I added JWT authorization for some routes. (with `UseJwtBearerAuthentication`) Is it possible to modify the header of ...
- Modified
- 4 Jun at 12:5
How to properly dispose the stream when using StreamContent
I'm attempting to return a stream from my webapi endpoint, and then clean up by disposing the stream. I expected this to be the correct way, but the stream is of course disposed before returning. ``...
- Modified
- 16 Sep at 17:53
UWP Button Changes Colors when Mouse hovers over
I am trying to create a UWP button which will change background color when the mouse pointer hovers over it. The trouble I am having is that by default, it seems to already do this, but not to the col...
Is it possible to run a .NET Core console application silently (hide console window)?
I'm trying to automate some tasks for myself and I wrote a few .NET Core 1.0 console applications. One of them is BrowserRouter - a simple application which, based on a URL pattern, decides which brow...
How to discard local changes and pull latest from GitHub repository
I have a directory on my machine where I store all projects from GitHub. I opened one of them and made changes locally on my machine. Project got messed up and now I want to discard all the changes I ...
sudo: docker-compose: command not found
I am trying to run docker-compose using sudo. I have both docker and docker-compose installed on Ubuntu 16.01. Due to an error while trying to download compose using curl, I ended up installing it u...
- Modified
- 9 Dec at 20:47
Where is the application.properties file in a Spring Boot project?
I started a new Spring boot project, I want to change the port number and I read that I have to modify the `/resource/application.properties` to do so. I cannot locate this file however, did I miss ...
- Modified
- 29 Sep at 04:34
AccessDenied for ListObjects for S3 bucket when permissions are s3:*
I am getting: > An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied When I try to get folder from my S3 bucket. Using this command: ``` aws s3 cp s3://bucket-...
- Modified
- 21 Jun at 10:6