Questions

Setting "checked" for a checkbox with jQuery

I'd like to do something like this to tick a `checkbox` using : ``` $(".myCheckBox").checked(true); ``` or ``` $(".myCheckBox").selected(true); ``` Does such a thing exist?

How to remove an element from a list by index

How do I remove an element from a list ? I found `list.remove()`, but this slowly scans the list for an item .

29 Mar at 09:37

How do you format code in Visual Studio Code (VSCode)?

What is the equivalent of + + and + + on Windows in Visual Studio for formatting, or "beautifying" code in the Visual Studio Code editor?

1 May at 20:19

Convert integer to string in Python

How do I convert an integer to a string? ``` 42 ⟶ "42" ``` --- [How do I parse a string to a float or int?](https://stackoverflow.com/questions/379906/)[floating-point values are not precise](...

18 Feb at 17:18

Which JSON content type do I use?

There are many "standards" for the [JSON](http://en.wikipedia.org/wiki/JSON) content type: ``` application/json application/x-javascript text/javascript text/x-javascript text/x-json ``` Which one do...

29 Aug at 10:22

How do I get the number of elements in a list (length of a list) in Python?

How do I get the number of elements in the list `items`? ``` items = ["apple", "orange", "banana"] # There are 3 items. ```

13 Oct at 18:5

Selecting multiple columns in a Pandas dataframe

How do I select columns `a` and `b` from `df`, and save them into a new dataframe `df1`? ``` index a b c 1 2 3 4 2 3 4 5 ``` Unsuccessful attempt: ``` df1 = df['a':'b'] df1 = d...

19 May at 22:1

How do I get a substring of a string in Python?

I want to get a new string from the third character to the end of the string, e.g. `myString[2:end]`. If omitting the second part means 'to the end', and if you omit the first part, does it start from...

16 Dec at 02:7

How do I make a redirect in PHP?

Is it possible to redirect a user to a different page through the use of PHP? Say the user goes to `www.example.com/page.php` and I want to redirect them to `www.example.com/index.php`, how would I d...

RegEx match open tags except XHTML self-contained tags

I need to match all of these opening tags: ``` <p> <a href="foo"> ``` But not these: ``` <br /> <hr class="foo" /> ``` I came up with this and wanted to make sure I've got it right. I am only ca...

26 May at 20:37

How do I get the value of text input field using JavaScript?

I am working on a search with JavaScript. I would use a form, but it messes up something else on my page. I have this input text field: ``` <input name="searchTxt" type="text" maxlength="512" id="sear...

19 Sep at 19:39

Delete a column from a Pandas DataFrame

To delete a column in a DataFrame, I can successfully use: ``` del df['column_name'] ``` But why can't I use the following? ``` del df.column_name ``` Since it is possible to access the Series via `...

6 Feb at 03:5

How to redirect one HTML page to another on load

Is it possible to set up a basic HTML page to redirect to another page on load?

25 Jan at 14:57

How can I safely create a directory (possibly including intermediate directories)?

I am writing a file using Python, and I want it to be placed in a specific path. How can I safely make sure that the path exists? That is: how can I check whether the folder exists, along with its par...

Find all tables containing column with specified name - MS SQL Server

Is it possible to query for table names which contain columns being ``` LIKE '%myName%' ``` ?

25 Apr at 13:48

Finding duplicate values in a SQL table

It's easy to find duplicates with one field: ``` SELECT email, COUNT(email) FROM users GROUP BY email HAVING COUNT(email) > 1 ``` So if we have a table ``` ID NAME EMAIL 1 John asd@asd.com ...

28 Sep at 16:11

How to convert list to string

How can I convert a list to a string using Python?

14 Sep at 19:41

Find (and kill) process locking port 3000 on Mac

How do I find (and kill) processes that listen to/use my TCP ports? I'm on macOS. Sometimes, after a crash or some bug, my Rails app is locking port 3000. I can't find it using `ps -ef`... When runnin...

27 Jan at 02:30

Can comments be used in JSON?

Can I use comments inside a [JSON](https://en.wikipedia.org/wiki/JSON) file? If so, how?

5 Jul at 00:35

How do I resolve merge conflicts in a Git repository?

How do I resolve merge conflicts in my Git repository?

How to modify existing, unpushed commit messages?

I wrote the wrong thing in a commit message. How can I change the message? The commit has not been pushed yet.

What is the difference between 'git pull' and 'git fetch'?

What are the differences between [git pull](https://git-scm.com/docs/git-pull) and [git fetch](https://git-scm.com/docs/git-fetch)?

How can I change an element's class with JavaScript?

How can I change the class of an HTML element in response to an `onclick` or any other events using JavaScript?

27 Oct at 05:52

How do I change the URI (URL) for a remote Git repository?

I have a repo (origin) on a USB key that I cloned on my hard drive (local). I moved "origin" to a NAS and successfully tested cloning it from here. I would like to know if I can change the URI of "ori...

24 Aug at 19:29

Tab character instead of multiple non-breaking spaces ("nbsp")?

Is it possible to insert a tab character in HTML instead of having to type `&nbsp;` four times?

17 Feb at 02:21