How to remove file from Git history?
Some time ago I added info(files) that must be private. Removing from the project is not problem, but I also need to remove it from `git` history. I use Git and Github (private account). Note: On [thi...
Pandas rename column by position?
I was just wondering if I can rename column names by their positions. I know how to rename them by their actual names using: `df.rename(columns = {})` How do I do it if I do not know the column nam...
Replacing values greater than a number in pandas dataframe
I have a large dataframe which looks as: ``` df1['A'].ix[1:3] 2017-01-01 02:00:00 [33, 34, 39] 2017-01-01 03:00:00 [3, 43, 9] ``` I want to replace each element greater than 9 with 11. So, t...
How to add a variable to Python plt.title?
I am trying to plot lots of diagrams, and for each diagram, I want to use a variable to label them. How can I add a variable to `plt.title?` For example: ``` import numpy as np import matplotlib.pypl...
- Modified
- 8 Jan at 17:31
how to get value from appsettings.json
``` public class Bar { public static readonly string Foo = ConfigurationManager.AppSettings["Foo"]; } ``` In the .NET Framework 4.x, I can use the `ConfigurationManager.AppSettings ["Foo"]` to g...
- Modified
- 3 May at 10:35
Null propagation feature and Razor views
Hello I have a strange issue. I use the null propagation feature in my razor pages like this ``` @(Model.ligneDossierLie?.dossier_id) ``` my project is based on 4.6.1 Framework and I use the last ...
- Modified
- 3 May at 10:44
Format date within View in ASP.NET Core MVC
I have problem in regarding with converting the datetime to date using a model. ``` public partial class LoanContract { [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")] public DateTime ...
- Modified
- 3 May at 10:56
super(type, obj): obj must be an instance or subtype of type
Why do I get the following error, and how do I resolve it? > TypeError: super(type, obj): obj must be an instance or subtype of type
- Modified
- 17 Apr at 12:33
.net Core X Forwarded Proto not working
I am working to get my .net core 1.1 application working behind a load balancer and enforcing https. I have the following setup in my Startup.cs ``` public void Configure(IApplicationBuilder app, IHos...
- Modified
- 1 Mar at 14:55
Golang - DTOs, Entities and Mapping
I am new to Go having come from a C# background, and I am just plain confused about structure a Go application. Say I am building a REST API that will sit on top of a database. Also, say that, even af...
COPY with docker but with exclusion
In a Dockerfile, I have ``` COPY . . ``` I want to exclude an entire directory, in my case, node_modules directory. Something like this: ``` COPY [all but **/node_modules/**] . ``` Is this poss...
- Modified
- 2 May at 21:48
How to parse huge JSON file as stream in Json.NET?
I have a very, very large JSON file (1000+ MB) of identical JSON objects. For example: ``` [ { "id": 1, "value": "hello", "another_value": "world", "value_obj": { ...
Simulate a button click in Jest
Simulating a button click seems like a very easy/standard operation. Yet, I can't get it to work in Jest.js tests. This is what I tried (and also doing it using jQuery), but it didn't seem to trigger ...
- Modified
- 24 Sep at 17:45
force css grid container to fill full screen of device
How do I force a css grid container take the full width and height of the device screen for a single page app? Modified example is from Mozilla: [Firefox documentation](https://developer.mozilla.org/e...
Cant add Docker Support Visual Studio 2017
I'm using VS 2017. I have a web service and I want to add docker support to it. When I right click and open up the menu to add docker support it is greyed out. What causes it to be greyed out? How can...
- Modified
- 2 May at 22:14
React JS get current date
I want to output the current date in my componnent. In the console my code works, but the React console says: > bundle.js:14744 Uncaught RangeError: Maximum call stack size exceeded My component looks...
- Modified
- 21 Feb at 14:38
How to use custom preprocessor directives in .Net Core
I am trying to use a preprocessor directive in .Net core, but I can't determine the correct way to get the directive to be set: ``` static void Main(string[] args) { Console.WriteLine("Hello Worl...
How to deserialize a WCF soap response message from a file with DataContractSerializer?
When I call a web service operation, WCF deserializes the message to the proxy class with the DataContractSerializer: why couldn't I do the same ? Here is the soap message in the file ActLoginRespons...
- Modified
- 9 May at 08:3
google console error `OR-IEH-01`
i am trying to upload an android application on google play store (google play developer console). i am adding a new visa card and press pay and it gives me this error: > An unexpected error has occu...
- Modified
- 2 May at 15:14
The inline constraint resolver of type 'DefaultInlineConstraintResolver' was unable to resolve the following inline constraint: 'apiVersion'
I have a basic WebApi implementation setup with the default Values controller. After [reading a blog about RESTful WebApi Versioning](https://www.hanselman.com/blog/ASPNETCoreRESTfulWebAPIVersioningMa...
- Modified
- 24 Dec at 19:51
ASP.NET Core - Overriding the default ControllerFactory
I'm in a specific situation where I'd like to override the default ASP.NET ControllerFactory. I'd like to do this because I want to be in full control of what type of controller I handle each reques...
- Modified
- 2 May at 13:57
servicestack client authentication encrypt password
I have Xamarin application that is using servicestack as back-end API the current implementation to authenticate users is sending plain text from client side to server then authenticate users , what i...
- Modified
- 14 Aug at 20:26
The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0) xamarin
the error is on visual studio 2017 and xamarin: > Severity Code Description Project File Line Suppression StateWarning The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is g...
- Modified
- 28 Jul at 22:1
Why is TryParse in C#7 syntax (empty out parameter) emitting a warning if you compile it?
In C#7, you are allowed to do ``` if (int.TryParse("123", out int result)) Console.WriteLine($"Parsed: {result}"); ``` or - if you don't use the result and just want to check if the ...
- Modified
- 14 Sep at 12:55
Pagination in a .NET Core API Project
I am trying to implement pagination on `.NET Core` `RESTful` API's (with `EF`). Rather than re-inventing the wheel, I was hoping there was a way to either use a generic function that could hook into...
- Modified
- 2 May at 10:47