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
How to read values from the querystring with ASP.NET Core?
I'm building one RESTful API using ASP.NET Core MVC and I want to use querystring parameters to specify filtering and paging on a resource that returns a collection. In that case, I need to read the ...
- Modified
- 10 Jan at 20:2
What is class="mb-0" in Bootstrap 4?
The [latest documention](https://v4-alpha.getbootstrap.com/content/typography/#blockquotes) has: ``` <p class="mb-0">Lorem ipsum</p> ``` What is `mb-0`?
- Modified
- 1 Jul at 14:16
What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?
Python 3.3 includes in its standard library the new package `venv`. What does it do, and how does it differ from all the other packages that match the regex `(py)?(v|virtual|pip)?env`?
- Modified
- 13 Jun at 01:22
EF Core nested Linq select results in N + 1 SQL queries
I have a data model where a 'Top' object has between 0 and N 'Sub' objects. In SQL this is achieved with a foreign key `dbo.Sub.TopId`. ``` var query = context.Top //.Include(t => t.Sub) Doesn't ...
- Modified
- 31 May at 07:1
How to list of more than 1000 records from Google Drive API V3 in C#
This is the continuation of original question in this [link][1]. Through the below code, I can able to fetch 1000 records but I have in total 6500++ records in my drive. Searching google but unable to...
- Modified
- 6 May at 10:39
C# ServiceStack.Text analyze stream of json
I am creating a json deserializer. I am deserializing a pretty big json file (25mb), which contains a lot of information. It is an array for words, with a lot of duplicates. With `NewtonSoft.Json`, I ...
- Modified
- 10 Jan at 19:7
Customize ServiceStack v3 JsConfig based on request header
I have an existing v3 ServiceStack implementation and I want to change the way in which the dates are serialized/deserialized. However, since there are a large number of existing external customers us...
- Modified
- 23 May at 11:53
WPF: Is there a way to override part of a ControlTemplate without redefining the whole style?
I am trying to style a WPF xctk:ColorPicker. I want to change the background color of the dropdown view and text **without** redefining the whole style. I know that the ColorPicker contains e.g. a par...
- Modified
- 6 May at 18:49
Will scikit-learn utilize GPU?
Reading implementation of scikit-learn in TensorFlow: [http://learningtensorflow.com/lesson6/](http://learningtensorflow.com/lesson6/) and scikit-learn: [http://scikit-learn.org/stable/modules/generat...
- Modified
- 23 Sep at 10:23