What is linux equivalent of "host.docker.internal"
On Mac and Windows it is possible to use `host.docker.internal` (Docker 18.03+) inside container. Is there one for Linux that will work out of the box without passing env variables or extracting it us...
- Modified
- 14 Nov at 07:54
<div> cannot appear as a descendant of <p>
I'm seeing this. It's not a mystery what it is complaining about: ``` Warning: validateDOMnesting(...): <div> cannot appear as a descendant of <p>. See ... SomeComponent > p > ... > SomeOtherComponen...
- Modified
- 6 Dec at 16:52
Handle JSON Decode Error when nothing returned
I am parsing json data. I don't have an issue with parsing and I am using `simplejson` module. But some api requests returns empty value. Here is my example: ``` { "all" : { "count" : 0, "qu...
- Modified
- 26 May at 20:23
Which regular expression operator means 'Don't' match this character?
`*, ?, +` characters all mean match this character. Which character means 'don't' match this? Examples would help.
- Modified
- 7 Jul at 07:22
How to tell if JRE or JDK is installed
I have one computer that I intentionally installed JDK on. I have another computer with JRE, for, among other things, testing. However, when I got a java application working on this computer, and then...
Pythonic way to check if a file exists?
Which is the preferred way to check if a file exists and if not create it?
What is monkey patching?
I am trying to understand, what is monkey patching or a monkey patch? Is that something like methods/operators overloading or delegating? Does it have anything common with these things?
- Modified
- 21 Sep at 10:56
How to fix HTTP 404 on Github Pages?
[Here](https://github.com/roine/p1/tree/gh-pages) is my GitHub repository on the `gh-pages` branch. Everything looks good, I have my `index.html`, my CSS, JS and pictures folders. But when I access [...
- Modified
- 23 Mar at 15:26
How can I delete a query string parameter in JavaScript?
Is there better way to delete a parameter from a query string in a URL string in standard JavaScript other than by using a regular expression? Here's what I've come up with so far which seems to wor...
- Modified
- 28 Oct at 05:23
405 method not allowed Web API
This error is very common, and I tried all of the solutions and non of them worked. I have disabled WebDAV publishing in control panel and added this to my web config file: ``` <handlers> <remove n...
- Modified
- 28 Nov at 11:4
Why Is `Export Default Const` invalid?
I see that the following is fine: ``` const Tab = connect( mapState, mapDispatch )( Tabs ); export default Tab; ``` However, this is incorrect: ``` export default const Tab = connect( mapState, ma...
- Modified
- 28 Mar at 11:16
Custom header to HttpClient request
How do I add a custom header to a `HttpClient` request? I am using `PostAsJsonAsync` method to post the JSON. The custom header that I would need to be added is ``` "X-Version: 1" ``` This is wha...
- Modified
- 16 Jul at 14:16
Generating Random Passwords
When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "neede...
MySQL Workbench: How to keep the connection alive
I am using MySQL Workbench. Also, I am running a batch of inserts, about 1000 lines total (Ex. `INSERT INTO mytable SELECT * FROM mysource1; INSERT INTO mytable SELECT * FROM mysource2;...mysource3....
- Modified
- 30 Mar at 03:16
How to use split?
I need to break apart a string that always looks like this: > something -- something_else. I need to put "something_else" in another input field. Currently, this string example is being added to an...
- Modified
- 10 Jun at 12:38
Android studio logcat nothing to show
I installed Android Studio yesterday, and I tried to use the LogCat to see the logs. But there is nothing to show in the logcat. I used the terminal to run `./adb logcat` and it works. Is there som...
- Modified
- 1 Mar at 13:4
How to include quotes in a string
I have a string "I want to learn "c#"". How can I include the quotes before and after c#?
- Modified
- 21 Oct at 13:52
How to change UIButton image in Swift
I am trying to change the image of a UIButton using Swift... What should I do This is OBJ-C code.but I don't know with Swift: ``` [playButton setImage:[UIImage imageNamed:@"play.png"] forState:UICon...
- Modified
- 9 Nov at 07:59
Play sound on button click android
How do I get a button to play a sound from raw when click? I just created a button with id `button1`, but whatever code I write, all is wrong. ``` import android.media.MediaPlayer; public class Basi...
- Modified
- 14 Dec at 19:36
How to add a .dll reference to a project in Visual Studio
I am just beginning to use the MailSystem.NET library. However, I cannot figure out where to add the .dll files so I can reference the namespaces in my classes. Can someone please help me? I am using ...
- Modified
- 27 May at 00:10
ERROR: there is no unique constraint matching given keys for referenced table "bar"
Trying to create this example table structure in Postgres 9.1: ``` CREATE TABLE foo ( name VARCHAR(256) PRIMARY KEY ); CREATE TABLE bar ( pkey SERIAL PRIMARY KEY, foo_fk ...
- Modified
- 9 Aug at 02:2
How to check if a "lateinit" variable has been initialized?
I wonder if there is a way to check if a `lateinit` variable has been initialized. For example: ``` class Foo() { private lateinit var myFile: File fun bar(path: String?) { path?.le...
- Modified
- 27 Nov at 12:3
How to set IntelliJ IDEA Project SDK
I just installed IntelliJ IDEA and when I try to create my first Project it asks for me to set up the Project SDK. When I click on "JDK" it asks for me to select the home directory of the JDK as shown...
- Modified
- 17 Mar at 11:13
How to connect to LocalDB in Visual Studio Server Explorer?
I can't believe I couldn't find a working solution to this after an hour of searching. I'm following [this article](http://www.dotnetcurry.com/showarticle.aspx?ID=941) on Entity Framework 6.0 which gi...
- Modified
- 10 Jul at 07:33