C# Redis Client exceeded 6000 connections per hour limit
We are getting the following error. We found that we have to upgrade to a premium plan of servicestack. But their License plan is a bit confusing, it says number of developers, can we use this for mul...
- Modified
- 12 Jan at 20:7
ASP.NET Core targeting full framework with EF6 and Identity
I currently have a .NET Core Web App targeting the full .NET Framework and a .NET 4.6.1 class library project that contains my EF6 implementation. I have these two currently working together. Now I...
- Modified
- 12 Jan at 18:29
Powershell Invoke-WebRequest Fails with SSL/TLS Secure Channel
I'm trying to execute this powershell command `Invoke-WebRequest -Uri https://apod.nasa.gov/apod/` and I get this error. https requests appear to work ("[https://google.com](https://google.com)") ...
- Modified
- 30 Nov at 04:51
Dapper materializing to a Tuple
I need return a list from dapper with the new tuple in C# 7. ``` public static List<(int StyleId, decimal StyleCode)> GetOnlyServices() { var query = $@" SELECT ST.style_id as...
MongoDB: Server has startup warnings ''Access control is not enabled for the database''
I firstly installed MongoDB 3.4.1 today. But when I start it and use MongoDB shell, it gave me these warnings below: ``` C:\Users\hs>"C:\Program Files\MongoDB\Server\3.4\bin\mongo.exe MongoDB she...
- Modified
- 25 Feb at 03:18
Get properties of a Dynamic Type
I would like to know how to get the properties of my dynamic type. This is the function to get the List, ``` var result = _files.GetFileContent(reportId).Result; ``` As example I get an object ret...
- Modified
- 12 Jan at 13:4
Cross-platform USB communication using ASP.NET Core
## Overview I've ported a web application to .NET Core and I'm finding that it's able to communicate with a microcontroller over USB when running on Windows but not when running on Linux. I'm tryi...
- Modified
- 12 Jan at 17:27
How to efficiently generate combination without repetition with certain distinctive number between them
How to efficiently generate sets of where all sets has certain distinctive number between each other. : --- ## Example : Range Number = 0,1,2,3,4,5,6,7 ==> total 8 numbers . Combination = ...
- Modified
- 20 Jun at 09:12
How to check if a section in MVC Core configuration file exist?
How can I check if a specific section in loaded ASP.NET Core configuration file exist? I have a JSON configuration file that I load it in `Startup` class via `ConfigurationBuilder.AddJsonFile` method...
- Modified
- 12 Jan at 06:27
I want to create xlsx (Excel) file from c#
This is a code which could create only create xls file. But I want to create xlsx (Excel) file; how can I do that from this code or else can I have another code which I could use to create xlsx files....
Unable to update JToken value
I'm trying to update the value of JToken but its reference is not getting updated. JSON string: ``` { "Title": "master", "Presentation": [ { "Component": { "Content": { ...
Union all support in ServiceStack ORM lite 4.5.4
In my application user can define multiple filters for specific type. I would like to somehow combine these queries in single one. ``` SqlExpression<Notice> query1 = Db.From<Notice>(s=>s.param1 == 2)...
- Modified
- 11 Jan at 19:57
Resize the image in jupyter notebook using markdown
I want to add the image in the Jupyter notebook and I want to have particular height and width. When I try to add the image using > `![](img.png)` the code is adding the complete image but as per ...
- Modified
- 10 Sep at 14:51
How to print an exception in Python 3?
Right now, I catch the exception in the `except Exception:` clause, and do `print(exception)`. The result provides no information since it always prints `<class 'Exception'>`. I knew this used to work...
- Modified
- 19 Nov at 22:49
Encrypt / Decrypt in C# using Certificate
I'm having trouble finding a good example in encrypting / decrypting strings in C# . I was able to find and implement an example of and validating a signature, as shown below. Could someone point me ...
- Modified
- 11 Jan at 15:26
Return both a byte array and a message from a web service
I have a web service written in which returns a that the figures out is and lets it be opened. That is happy path. But what if I get an error? then I'd like to return an error of some kind, let's...
- Modified
- 18 Jan at 07:55
T-SQL rounding vs. C# rounding
I am using Microsoft [SQL Server Express](https://en.wikipedia.org/wiki/SQL_Server_Express) 2016 to write a [stored procedure](https://en.wikipedia.org/wiki/Stored_procedure). One of the requirements ...
- Modified
- 29 Jul at 23:4
PostgreSQL "Column does not exist" but it actually does
I'm writing a `Java` application to automatically build and run SQL queries. For many tables my code works fine but on a certain table it gets stuck by throwing the following exception: ``` Exception...
- Modified
- 28 Mar at 19:4
Using ServiceStack.Text without other dependancies
I've tried to make use of ServiceStack.Text package (on PCL & MonoAndroid) without any other dependencies however I cannot get this to work. From your GitHub page > FREE high-perf Text Serializers and...
- Modified
- 20 Jun at 09:12
Entity framework change tracking after calling ToList()
I am struggling to understand something with change tracking in EF6. I have code similar to this. ``` public class SomeClass { private List<User> _users; private DAL _dal; public void P...
- Modified
- 1 Jun at 08:39
In C# 7 is it possible to deconstruct tuples as method arguments
For example I have ``` private void test(Action<ValueTuple<string, int>> fn) { fn(("hello", 10)); } test(t => { var (s, i) = t; Console.WriteLine(s); Console.WriteLine(i); }); ``` ...
Open a new tab in an existing browser session using Selenium
My current code below in C# opens a window then navigates to the specified URL after a button click. ``` protected void onboardButton_Click(object sender, EventArgs e) { IWebDriver driver = new Ch...
- Modified
- 10 Jul at 15:40
Assign value directly to class variable
I don't know if this is that easy nobody is looking for that, but I didn't found anything... I want to do the following: ``` public class foo { string X { get; set ...
- Modified
- 11 Jan at 12:26
OpenCV - Saving images to a particular folder of choice
I'm learning OpenCV and Python. I captured some images from my webcam and saved them. But they are being saved by default into the local folder. I want to save them to another folder from direct path....
- Modified
- 11 Jan at 10:29