How to log complex object using Serilog in valid json format?
I have this structure: ``` public class LogRequestParameters { public string RequestID { get; set; } public string Type { get; set; } public string Level { get; set; } public strin...
- Modified
- 28 Sep at 13:49
How to get name of dataframe column in PySpark?
In pandas, this can be done by `column.name`. But how to do the same when it's a column of Spark dataframe? E.g. the calling program has a Spark dataframe: `spark_df` ``` >>> spark_df.columns ['admit'...
- Modified
- 27 Jul at 19:0
Can I use DeepZoomTools.dll in my project and Nuget package?
I'm trying to implement [OpenSeadragon](http://openseadragon.github.io/) viewer with [Deep Zoom Image](http://openseadragon.github.io/examples/tilesource-dzi/) ([.dzi formart](https://msdn.microsoft.c...
- Modified
- 30 Sep at 07:18
SVG Fill Color Not Working
I'm new to using SVGs and can't figure out what I'm doing wrong here. For most of them, if I want to change the color, I use: ``` svg path { fill: blue; } ``` But for this one - and other's I'v...
Stream.CopyToAsync with progress reporting - progress is reported even after copying finish
I've build a simple console applications that download files from the internet. Because [I had problems with WebClient](https://stackoverflow.com/questions/39640955/webclient-downloadfileasync-not-wor...
- Modified
- 23 May at 11:47
The remote name could not be resolved when sending mail using SMTP with Host as IP address
``` MailMessage message = new MailMessage(); message.Subject = "test"; message.Body = "test"; message.To.Add("test@gmail.com"); message.From = new MailAddress("bob@internalhost.com"); SmtpClient smtp ...
- Modified
- 3 Sep at 06:30
Equivalent C# statement for this VB6 operation creating problems
I have this code line in VB: ``` Dim Sqrt As Double Sqrt = Radius ^ 2 - (CenterX - X) ^ 2 ``` The parameters in the statement above are being passed the values below: ``` X= -7.3725025845036161 D...
- Modified
- 28 Sep at 13:28
Custom credentials provider in ServiceStack using Firebase
I want to create a custom credentials provider for service stack that signs in users to Firebase using firebaseauthentication.net library. The problem I have is that after calling the authentication m...
- Modified
- 28 Sep at 13:40
Get CPU temperature in CMD/POWER Shell
In my computer I am trying to get the CPU temperature. Searching on StackOverflow I found this: ``` C:\WINDOWS\system32>wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemper...
- Modified
- 28 Sep at 07:19
Aspnet Core Decimal binding not working on non English Culture
I have an aspnet core app that runs with a non english configuration (spanish): ``` public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { ...
- Modified
- 28 Sep at 03:36
ASP.NET Core deployment to IIS error: Development environment should not be enabled in deployed applications
I followed [this article](https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS) to deploy my ASP.NET MVC Core 1.0 app to local IIS on my Windows 10 t...
- Modified
- 26 Jul at 11:44
Why do I have to encode a string when reading and writing form inputs using jquery?
I am programatically reading data from a text input using standard Jquery like this: ``` var listName = $('#list').val(); ``` and then I am adding a hidden input field into a form before submitting...
- Modified
- 6 Oct at 10:38
Is this a good way to clone an object in ES6?
Googling for "javascript clone object" brings some really weird results, some of them are hopelessly outdated and some are just too complex, isn't it as easy as just: ``` let clone = {...original}; `...
- Modified
- 31 Aug at 07:0
Check to see if year is leap year
Currently I am getting a RunTime error. My goal is to test whether or not the current year, using DateTime.Now.Year() is a leap year or not. I think the issue is that I am not properly converting year...
redirect after a fetch post call
I am creating an social login page with an Access Management (AM) server. When user click on the login button then I make a fetch http post call to AM server. AM server generates a HTTP 301 redirect r...
- Modified
- 5 Feb at 09:36
Install specific branch from github using Npm
I would like to install bootstrap-loader from github in my project using npm Currently they are maintaining two version of this project which are comaptible with webpack version 1 and 2. I would lik...
- Modified
- 23 Aug at 21:43
How to inject WCF service client in ASP.Net core?
I have WCF service that I need to access from ASP.NET Core. I have installed [WCF Connected Preview](https://visualstudiogallery.msdn.microsoft.com/c3b3666e-a928-4136-9346-22e30c949c08) and created pr...
- Modified
- 16 Dec at 15:42
Remotely connect to .net core self hosted web api
I have a simple .net core web api with one action: ``` [Route("[action]")] public class APIController : Controller { // GET api/values [HttpGet] public string Ping() { return ...
- Modified
- 21 Aug at 11:31
ServiceStack.Text JsonSerializer - SerializeToString fails whit DateTime.Max
I'm using ServiceStack.Text JsonSerializer on a web application using c#. The problem is that for an specific functionality I need to serialize date values into a json but currently is failing when th...
- Modified
- 27 Sep at 17:20
Get ServiceStack session in MVC.Net attribute
I'm using MVC.Net and servicestack with AuthFeature ``` Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { new Credent...
- Modified
- 27 Sep at 16:1
JwtSecurityToken doesn't expire when it should
I am currently using the JwtSecurityToken class in System.IdentityModels.Tokens namespace. I create a token using the following: ``` DateTime expires = DateTime.UtcNow.AddSeconds(10); JwtSecurityTok...
how to filter out a null value from spark dataframe
I created a dataframe in spark with the following schema: ``` root |-- user_id: long (nullable = false) |-- event_id: long (nullable = false) |-- invited: integer (nullable = false) |-- day_diff:...
- Modified
- 15 Sep at 10:7
'composer' is not recognized as an internal or external command in windows server
I am using windows server 2008 os. i download [composer setup.exe](https://getcomposer.org/download/) and install to my PC . when I try `composer install` . I getting an error: > 'composer' is not re...
- Modified
- 3 Dec at 20:16
SessionBag missing in servicestack version 4.5.0
I am new to servicestack and using servicestack version 4.5.0. With reference to the [ServiceStack 'session' missing?](https://stackoverflow.com/questions/31363927/servicestack-session-missing) ? wit...
- Modified
- 20 Jun at 09:12
Converting a string to JSON in C#
I'm trying to use [Simple JSON](http://wiki.unity3d.com/index.php/SimpleJSON) to convert this string to JSON : ``` "{\"objects\":[{\"id\":1,\"title\":\"Book\",\"position_x\":0,\"position_y\":0,\"posi...
- Modified
- 27 Sep at 11:9