ServiceStack + Razor + Auth + Fluent Validation
I am building a very simple `ServiceStack` website using the built-in SS Razor, Auth, and Fluent validation. I've set up a simple login page, but if there is any sort of failure, I'm shown the SS `Sn...
- Modified
- 27 Oct at 14:39
Why is ReadAsStringAsync async?
So, in the following snippet, why is ReadAsStringAsync an async method? ``` var response = await _client.SendAsync(request); var body = await response.Content.ReadAsStringAsync(); ``` Originally I ...
Returning CSV from .NET Core controller
I'm having trouble having a .NET Core API Controller endpoint resolve to a CSV download. I'm using the following code which I pulled from a .NET 4.5 controller: ``` [HttpGet] [Route("{id:int}")] publ...
- Modified
- 8 Apr at 14:12
Please provide compiled classes of your project with sonar.java.binaries
I am struggling with an error with a multi-modules project, the struture is simple, it looks like this : ``` root module a module b module c pom.xml ``` After using the maven command lin...
Xamarin build ERROR : error APT0000: In <declare-styleable> ..., unable to find attribute
I received a project from another developer. I setup my machine. VS-2017 with the required components was already configured. Android SDK-Manager has the corresponding version installed. Project is c...
- Modified
- 27 Oct at 12:26
Refresh token with JwtAuthProviderReader
I'm wondering the best pratice to use `refresh-token` with `JwtAuthProviderReader`. At the moment when my expires I send a request `/access-token` to get a new one. ``` var jwt = authClient.Send(new...
- Modified
- 27 Oct at 11:25
How to open local file on Jupyter?
In[1]: ``` path='/Users/apple/Downloads/train.csv' open(path).readline() ``` Out[1]: ``` FileNotFoundError Traceback (most recent call last) <ipython-input-7-7fad5faebc9b>...
- Modified
- 29 May at 12:20
Base Uri without a trailing slash
If I create a `Uri` using the `UriBuilder` like this: ``` var rootUrl = new UriBuilder("http", "example.com", 50000).Uri; ``` then the `AbsoluteUri` of `rootUrl` always contain a trailing slash lik...
How to style material-ui textfield
I have been trying to work out how to style a [material-ui TextField](https://material-ui.com/components/text-fields/) component. ``` <TextField id="email" label="Email" className={classe...
- Modified
- 22 May at 22:12
In custom CredentialsAuthProvider, on successfull authenticate I want to send additional data in Meta property
In custom CredentialsAuthProvider, on successfull authenticate I want to send additional data in Meta property. Where can I get current response and add info to meta? I want to do this in `OnAuthentic...
- Modified
- 30 Oct at 10:4
Get a service in a IServiceCollection extension
I have this extension ``` public static class ServiceCollectionExtensions { public static IServiceCollection MyExtension(this IServiceCollection serviceCollection) { ... } } ``` a...
- Modified
- 26 Oct at 20:27
Why does a lambda expression in C# cause a memory leak?
Note: this is not just some random useless code, this is an attempt to reproduce an issue with lambda expressions and memory leaks in C#. Examine the following program in C#. It's a console applicati...
- Modified
- 26 Oct at 19:40
Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory
I have a project on Laravel 5 and I work with it at the office and at home too. It works fine, but recently at home it stopped working. Laravel show me two ErrorException ``` file_put_contents(G:\proj...
How to install redis extension for php 7
Referred this link [https://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html](https://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html) And don...
Logger provider: How can I implement a custom formatter
I implemented a custom logger provider. My custom logger has this signature: ``` public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Excep...
- Modified
- 26 Oct at 12:30
SharpZipLib: 1 is not a supported code page
I use SharpZipLib to compress file and user got this error: > 1 is not a supported code page I found [here](http://community.sharpdevelop.net/forums/t/19065.aspx) that problem is in regional setting...
- Modified
- 26 Oct at 09:18
Servicestack.Client Namespace Secured could not be found
When I try to make a new request to generate a new access-token I cannot find the type "new Secured". ``` var authClient = new JsonServiceClient("http://localhost/authentication/") { ...
- Modified
- 26 Oct at 08:52
Android studio 3.0: Unable to resolve dependency for :app@dexOptions/compileClasspath': Could not resolve project :animators
I migrate to Android studio 3.0. So, the project become unable to compile a module named ":animator" and it displays me this error: ``` Error:Unable to resolve dependency for ':app@dexOptions/compil...
- Modified
- 12 Mar at 10:19
Docker: applications works fine via docker-compose up, but how to run it via Visual Studio and debug?
I have several projects and they must be running in seperate containers, and I have some shared library that should be buit also. I have found the following [article](https://blogs.msdn.microsoft.com/...
- Modified
- 31 Oct at 04:58
Puppeteer wait page load after form submit
I submit a form using the following code and i want Puppeteer to wait page load after form submit. ``` await page.click("button[type=submit]"); //how to wait until the new page loads before taking s...
- Modified
- 24 Feb at 05:36
How do you convert any C# object to an ExpandoObject?
I've read a lot about how can be used to dynamically create objects from scratch by adding properties, but I haven't yet found how you do the same thing starting from a non-dynamic C# object that you...
- Modified
- 26 Oct at 11:26
Fetch API request timeout?
I have a `fetch-api` `POST` request: ``` fetch(url, { method: 'POST', body: formData, credentials: 'include' }) ``` I want to know what is the default timeout for this? and how can we set it to...
- Modified
- 9 Jul at 11:39
Removing duplicate columns after a DF join in Spark
When you join two DFs with similar column names: ``` df = df1.join(df2, df1['id'] == df2['id']) ``` Join works fine but you can't call the `id` column because it is ambiguous and you would get the fo...
- Modified
- 25 Dec at 16:33
Setting up Serilog to write logs to SQL Server db table
I'm trying to set up Serilog to write logs to my db table. Here's the breakdown of what I did to try and set up logging to SQL Server. 1) Install the Nuget Packages, Serilog and Serilog.Sinks.MSSq...
- Modified
- 25 Oct at 20:40
How to know the git username and email saved during configuration?
While configuring `git` I ran these two commands: ``` git config --global user.name "My Name" git config --global user.email "myemail@example.com" ``` However, I doubt whether I made a typo or not...
- Modified
- 6 Jul at 13:19