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
Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet
I was trying to install Azure using `Install-Module Azure` in PowerShell. I got the following error: ``` PS C:\Windows\system32> Install-Module Azure Install-Module : The term 'Install-Module' is not...
- Modified
- 11 Jan at 10:27
Displaying current username in _Layout view
I am wanting to display the current ApplicationUsers Firstname+Lastname on my navigation bar on my _Layout view. I've found that you can pass your viewbag from the current RenderedBody controller like...
- Modified
- 11 Jan at 01:2
PredicateBuilder.New vs PredicateBuilder.True
I am using PredicateBuilder to create a search/filter section in my action. Here it is: ``` [HttpPost] public ActionResult Test(int? cty, string inumber, int? page) { var lstValues ...
- Modified
- 10 Jan at 20:57
ServiceStack OrmLite Include Column in Where Clause but Not Select
Consider the `LoyaltyCard` database DTO I have below: ``` [Alias("customer_ids")] [CompositeIndex("id_code", "id_number", Unique = true)] public class LoyaltyCard { [Alias("customer_code")] p...
- Modified
- 10 Jan at 21:47
.NET Core API Conditional Authentication attributes for Development & Production
Long story short, Is it possible to place an environment based authorization attribute on my API so that the authorization restriction would be turned off in development and turned back on in Producti...
- Modified
- 10 Jan at 20:3