What is the best way to declare global variables in Vue.js?
I need access to my `hostname` variable in every component. Is it a good idea to put it inside `data`? Am I right in understanding that if I do so, I will able to call it everywhere with `this.hostnam...
- Modified
- 8 Oct at 17:47
How to pass arguments to entrypoint in docker-compose.yml
I use this image: dperson/samba The image is defining its own entrypoint and I do not want to override it. I need to pass arguments to the entrypoint, easy with docker only: ``` docker run ... dperson...
- Modified
- 15 Jan at 17:35
When I use matplotlib in jupyter notebook,it always raise " matplotlib is currently using a non-GUI backend" error?
``` import matplotlib.pyplot as pl %matplot inline def learning_curves(X_train, y_train, X_test, y_test): """ Calculates the performance of several models with varying sizes of training data. The ...
- Modified
- 15 Dec at 11:8
How to specify the port an ASP.NET Core application is hosted on?
When using `WebHostBuilder` in a `Main` entry-point, how can I specify the port it binds to? By default it uses 5000. Note that this question is specific to the new ASP.NET Core API (currently in 1.0....
- Modified
- 21 Apr at 23:55
UWP application and .NET Core RC2: cannot reference netstandard1.4 packages
I have a scenario where I run a UWP client application, a UWP IOT application and a .NET Core application using a shared code base. In .NET Core RC1 I built a Class Library (Package) and used "dotnet5...
- Modified
- 7 Sep at 07:41
What is the difference between Promises and Observables?
What is the difference between `Promise` and `Observable` in Angular? An example on each would be helpful in understanding both the cases. In what scenario can we use each case?
- Modified
- 11 Jan at 02:11
How to check the installed version of React-Native
I'm going to upgrade react-native but before I do, I need to know which version I'm upgrading from to see if there are any special notes about upgrading from my version. How do I find the version of...
- Modified
- 21 May at 13:27
How can I listen for keypress event on the whole page?
I'm looking for a way to bind a function to my whole page (when a user presses a key, I want it to trigger a function in my component.ts) It was easy in AngularJS with a `ng-keypress` but it does not...
- Modified
- 20 Jun at 22:21
Timeout settings seem to have no effect
I am trying to set a timeout for a special request which will take a long time to process. Because of this, I am trying to set the timeout, like this: ``` client.RequestFilter = r => { r.Timeout ...
- Modified
- 21 May at 05:58
Firebase onMessageReceived not called when app in background
I'm working with Firebase and testing sending notifications to my app from my server while the app is in the background. The notification is sent successfully, it even appears on the notification cent...
- Modified
- 11 Jun at 13:39
How to redirect page after click on Ok button on sweet alert?
I am able to display sweet alert after the page refresh but I have to click on Ok button which I am getting on sweet alert to redirect the page.Please help me in this. ``` <?php echo '<script ty...
- Modified
- 31 May at 06:56
Async inside Using block
I have the following async function in C#: ``` private async Task<T> CallDatabaseAsync<T>(Func<SqlConnection, Task<T>> execAsync) { using (var connection = new SqlConnection(_connectionString)) ...
- Modified
- 21 May at 11:49
net::ERR_INSECURE_RESPONSE in Chrome
I am getting an error net::ERR_INSECURE_RESPONSE in the Chrome console when fetching some data from my API This error usually occurs as a result of an unsigned certificate; however, it is not an issu...
- Modified
- 20 May at 21:9
Firebase cloud messaging notification not received by device
I am having an issue with FireBase Cloud Messaging in which I get the Token from the device and send the notification test through the Google Firebase notification console however, the notification is...
- Modified
- 26 May at 13:58
C# webBrowser script error
I keep getting a script error when trying to load the page using `webBrowser.Navigate("https://home.nest.com/")`. It will pull up fine from my normal internet browser but not in my program. Can anyo...
- Modified
- 20 May at 19:18
How is C# string interpolation compiled?
I know that interpolation is syntactic sugar for `string.Format()`, but does it have any special behavior/recognition of when it is being used with a string formatting method? If I have a method: ``...
- Modified
- 20 May at 15:50
Is there any way for the nameof operator to access method parameters (outside of the same method)?
Take the following class and method: ``` public class Foo public Foo Create(string bar) { return new Foo(bar); } ``` So getting "Create" is obvious: `nameof(Foo.Create)` Is there a...
Is it possible to put a ConstraintLayout inside a ScrollView?
So recently, with Android Studio 2.2 there's a new ConstraintLayout that makes designing a lot easier, but unlike `RelativeLayout` and `Linearlayout`, I can't use a `ScrollView` to surround `Constrain...
- Modified
- 5 Apr at 21:14
Difference between @: and <text> in Razor
What's the difference between these 2 in Razor? I find that I can accomplish the same, whether I use `@:` or `<text>`.
- Modified
- 20 May at 14:17
Why is accessing an element of a dictionary by key O(1) even though the hash function may not be O(1)?
I see how you can access your collection by key. However, the hash function itself has a lot of operations behind the scenes, doesn't it? Assuming you have a nice hash function which is very efficien...
- Modified
- 21 May at 04:11
How to solve the memory error in Python
I am dealing with several large txt file, each of them has about 8000000 lines. A short example of the lines are: ``` usedfor zipper fasten_coat usedfor zipper fasten_jacket usedfor zipper fasten_pan...
ngModel for textarea not working in angular 2
I am trying to print json object in textarea using `ngModel`. I have done following: ``` <textarea style="background-color:black;color:white;" [(ngModel)]='rapidPage' rows="30" cols="120"> ...
- Modified
- 16 Mar at 19:52
How do I find and replace all occurrences (in all files) in Visual Studio Code?
I can't figure out how to find and replace all occurrences of a word in different files using Visual Studio Code version 1.0. I get the impression this should be possible since doing Ctrl + Shift + F...
- Modified
- 10 Jul at 10:32
Hosting ASP.NET Core as Windows service
As I get it in RC2 there's a support for hosting applications within Windows Services. I tried to test it on a simple web api project (using .NET Framework 4.6.1). Here's my Program.cs code: ``` usi...
- Modified
- 28 Jun at 15:41
Retrieving new Firebase access token for REST services in .NET from Google auth service
After a change of firebase authorization system, I'm trying to retrieve access token in c# from google auth server. According to new documentation: [https://firebase.google.com/docs/reference/rest/da...
- Modified
- 16 Apr at 08:26