how to disable DIV element and everything inside
I need to disable a DIV and all it's content using Javascript. I can swear that doing a simple ``` <div disabled="true"> ``` was working for me before, but for some reason it no longer works. I ...
- Modified
- 14 Feb at 05:28
How do you merge two Git repositories?
Consider the following scenario: I have developed a small experimental project A in its own Git repo. It has now matured, and I'd like A to be part of larger project B, which has its own big reposito...
- Modified
- 17 Feb at 20:38
How to reload page every 5 seconds?
I am converting one layout to html; once I make the changes in code/html/css, every time I have to hit F5. Is there any simple javascript/jQuery solution for this? I.e. after I add the script, reload ...
- Modified
- 3 Apr at 17:52
Converting JSON String to Dictionary Not List
I am trying to pass in a JSON file and convert the data into a dictionary. So far, this is what I have done: ``` import json json1_file = open('json1') json1_str = json1_file.read() json1_data = jso...
add onclick function to a submit button
I'm just learning javascript and php. I created a contact form and I'd like the submit button to accomplish two things when I press it: 1. submit the data to me (this part is working) 2. read my on...
java.util.Date to XMLGregorianCalendar
Isn't there a convenient way of getting from a java.util.Date to a XMLGregorianCalendar?
- Modified
- 25 May at 14:25
Should I make HTML Anchors with 'name' or 'id'?
When one wants to refer to some part of a webpage with the "`http://example.com/#foo`" method, should one use ``` <h1><a name="foo"/>Foo Title</h1> ``` or ``` <h1 id="foo">Foo Title</h1> ``` The...
- Modified
- 2 Aug at 14:38
How to return 2 values from a Java method?
I am trying to return 2 values from a Java method but I get these errors. Here is my code: ``` // Method code public static int something(){ int number1 = 1; int number2 = 2; return numb...
- Modified
- 4 Oct at 14:6
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied:
I have windows 10. I have completed installing Tensorflow. It works. It says "Hello Tensorflow!". But it has all of this before it: ``` 2018-08-18 18:16:01.500579: I T:\src\github\tensorflow\tensorflo...
- Modified
- 19 Dec at 08:2
Query for documents where array size is greater than 1
I have a MongoDB collection with documents in the following format: ``` { "_id" : ObjectId("4e8ae86d08101908e1000001"), "name" : ["Name"], "zipcode" : ["2223"] } { "_id" : ObjectId("4e8ae86d0...
- Modified
- 11 Jun at 05:6
Convert DataFrame column type from string to datetime
How can I convert a DataFrame column of strings (in format) to datetime dtype?
- Modified
- 27 Jan at 02:5
Sass Variable in CSS calc() function
I'm trying to use the `calc()` function in a Sass stylesheet, but I'm having some issues. Here's my code: ``` $body_padding: 50px body padding-top: $body_padding height: calc(100% - $body_pad...
Why does git say "Pull is not possible because you have unmerged files"?
When I try to pull in my project directory in the terminal, I see the following error: ``` harsukh@harsukh-desktop:~/Sites/branch1$ git pull origin master U app/config/app.php U app/config/database.p...
- Modified
- 20 Dec at 09:55
The definitive guide to form-based website authentication
> #### Moderator note: This question is not a good fit for our question and answer format with the [topicality rules](/help/on-topic) which currently apply for Stack Overflow. We normally use a "his...
- Modified
- 11 Nov at 19:35
What does -> mean in Python function definitions?
I've recently noticed something interesting when looking at [Python 3.3 grammar specification](http://docs.python.org/3.3/reference/grammar.html): ``` funcdef: 'def' NAME parameters ['->' test] ':' su...
- Modified
- 18 Nov at 17:47
Convert JSON to Map
What is the best way to convert a JSON code as this: ``` { "data" : { "field1" : "value1", "field2" : "value2" } } ``` in a Java Map in which one the keys are (field...
- Modified
- 27 Nov at 22:18
How do I load a file from resource folder?
My project has the following structure: ``` /src/main/java/ /src/main/resources/ /src/test/java/ /src/test/resources/ ``` I have a file in `/src/test/resources/test.csv` and I want to load the file...
What's the best way to limit text length of EditText in Android
What's the best way to limit the text length of an `EditText` in Android? Is there a way to do this via xml?
- Modified
- 5 Dec at 12:41
Including both href and onclick to HTML <a> tag
If I have this element: ``` <a href="www.mysite.com" onClick="javascript.function();">Item</a> ``` How can I make both `href` and `onClick` work, preferably with `onClick` running first?
- Modified
- 26 Jul at 08:52
How can I split and parse a string in Python?
I am trying to split this string in python: `2.7.0_bf4fda703454` I want to split that string on the underscore `_` so that I can use the value on the left side.
Counting DISTINCT over multiple columns
Is there a better way of doing a query like this: ``` SELECT COUNT(*) FROM (SELECT DISTINCT DocumentId, DocumentSessionId FROM DocumentOutputItems) AS internalQuery ``` I need to count the n...
- Modified
- 6 Jan at 17:6
How can I remove an SSH key?
I currently have an old SSH key uploaded on a server. The problem is I lost my `~/.ssh` directory (with the original `id_rsa` and `id_rsa.pub` files). Consequently, I want to remove the old SSH key di...
- Modified
- 23 Aug at 17:13
CSS to set A4 paper size
I need simulate an A4 paper in web and allow to print this page as it is show on browser (Chrome, specifically). I set the element size to 21cm x 29.7cm, but when I send to print (or print preview) it...
- Modified
- 3 Apr at 09:21
Vertical rulers in Visual Studio Code
### Rendering More than One Ruler in VS Code --- VS Code's default configuration for a ruler is demonstrated below. ``` "editor.ruler": 80 ``` The issue I am having with the default VS Code con...
- Modified
- 7 Jun at 13:25
How to count the frequency of the elements in an unordered list?
Given an unordered list of values like ``` a = [5, 1, 2, 2, 4, 3, 1, 2, 3, 1, 1, 5, 2] ``` How can I get the frequency of each value that appears in the list, like so? ``` # `a` has 4 instances of `1...