Can variables declared inside a for loop affect the performance of the loop?

I have done my homework and found repeated assurances that it makes no difference in performance whether you declare your variables inside or outside your for loop, and it actually compiles to the ver...

9 Feb at 18:30

Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version

Here's my docker-compose.yml file: ``` version: '3.1' services: a: image: tutum/hello-world b: image: tutum/hello-world secrets: id: my_password ``` If I run `$ docker-compose-up` I...

23 Dec at 07:43

Windows Task Scheduler OR TaskService Functions in WebApi

I want to create some functions in ASP.NET Web API, which should be executed daily at specific time and do specific task like update statuses/Records/Generating Emails, SMS. Should i create a TaskSe...

9 Feb at 14:53

Adding Razor to mature, existing Servicestack project without changing existing functionality

I have a years-old ServiceStack project that provides services to both legacy Winforms apps as well as newer html/css/javascript webs. I now have the need to serve some pre-formatted views to some of ...

9 Feb at 14:7

Equivalent to AssemblyInfo in dotnet core/csproj

Since dotnet core moved back to the `.csproj` format, there is a new autogenerated `MyProject.AssemblyInfo.cs` which contains, among others: ``` [assembly: AssemblyCompany("MyProject")] [assembly: Ass...

Using MongoDB C# Driver write ElementMatch with Regex query

I need to construct the following query using MongoDB C# driver ``` db.Notes.find({ "Group._id" : 74, "CustomFields" : { "$elemMatch" : { "Value" : /batch/i } }, "IsDeleted" : false }).sort({ "Create...

15 Feb at 11:33

How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?

I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error to my Database on another server(SQL Server). This happens specially when I try to do some...

CSS change button style after click

I was wondering if there was a way to change a button's style, in css, after it's been clicked, so not a `element:active`.

6 May at 18:41

Dynamic creation of columns using csvHelper

I have a worker with various fields that are fetched from server. I am using CSVHelper package to convert this class to an excel sheet. Worker has Fields like : ``` class Worker { string name; ...

Vue.js - How to properly watch for nested data

I'm trying to understand how to properly watch for some prop variation. I have a parent component (.vue files) that receive data from an ajax call, put the data inside an object and use it to render ...

lock() inside instance constructor

I found in some code lock statement inside instance constructor. The code looks like this ``` public class MyClass { private readonly object _syncRoot = new object(); public MyClass(string p...

23 May at 11:54

Are there built-in Month name declensions in C#

I'm wondering if there's any built-in functionality in .NET for declining dates in languages that support noun declensions, (ie. In Russian the month name is `февраль`, but if I wanted to say the dat...

Servicestack AspNetWindowsAuthProvider

I am trying to get the AspNetWindowsAuthProvider working. There does not seem to be an option to pass in a domain name, or to change the ContextType to Machine instead of domain and pass in a machine...

9 Feb at 08:55

How to delete a blob using Azure Functions?

I am creating an Azure function that triggers when an image is uploaded or added to a particular Azure Storage, and it does the following: 1.) Resize the image 2.) Put the image to correct directory (...

9 Feb at 06:9

Plot multiple columns of pandas DataFrame on the bar chart

I am using the following code to plot a bar-chart: ``` import matplotlib.pyplot as pls my_df.plot(x='my_timestampe', y='col_A', kind='bar') plt.show() ``` The plot works fine. However, I want to ...

Programmatically navigate using react router V4

I have just replaced `react-router` from v3 to v4. But I am not sure how to programmatically navigate in the member function of a `Component`. i.e in `handleClick()` function I want to navigate to `/p...

ReactJs: What should the PropTypes be for this.props.children?

Given a simple component that renders its children: ``` class ContainerComponent extends Component { static propTypes = { children: PropTypes.object.isRequired, } render() { return ( ...

8 Feb at 20:14

.NET Core Identity Server 4 Authentication VS Identity Authentication

I'm trying to understand the proper way to do authentication in ASP.NET Core. I've looked at several Resource (Most of which are out dated). - [Simple-Implementation-Of-Microsoft-Identity](https://...

CSS Centering with Transform

why does centering with transform translate and left 50% center perfectly (with position relative parent) but not right 50%? Working example: ``` span[class^="icon"] { position: absolute; top: ...

8 Feb at 18:42

Control Chrome programmatically

Is it possible to control and instantiate a Chrome browser from C#? Things like opening a new window, changing the URL, reloading the tabs, etc. I've had a look for a C# Chrome API but can only find ...

17 Oct at 06:1

How do I know which cookie(s) are must to make a correct HttpWebRequest?

I am working on a download manager and trying to get cookie required contents using `HttpWebRequest`. I want to integrate my application to Chrome and so I can get the necessary cookie headers and val...

18 Feb at 22:47

How to plot a 2d matrix in python with colorbar? (like imagesc in Matlab)

In Matlab I can visualize a matrix `data` quite easily with ``` data = rand(10,10); % Createas a 10 x 10 random matrix imagesc(data); colorbar; ``` Now I want to do the same thing in python. I alre...

24 Jun at 16:29

Posting from AWS-API Gateway to Lambda

I have a simple C# Aws Lambda function which succeeds to a test from the Lambda console test but fails with a 502 (Bad Gateway) if called from the API Gateway (which i generated from the Lambda trigge...

What is the correct way to use Entity Framework as datasource for DataGridView?

I tried setting DataSource via DataGridView Designer but it wasn't listed there and then I generated new datasource via wizard which generated DataSet. [](https://i.stack.imgur.com/RwrVE.png) But no...

ServiceProvider not releasing memory for transient EF context

I have a windows service on .NET 4.6.2 where I register a EF6 DbContext as Transient using the .NET ServiceProvider (`System.IServiceProvider` interface). The service starts using around 30mb of memor...