Delete last commit in bitbucket
I made a mistake and I don't know how to delete my latest push in the repository. I pull the latest updates of the app but it has conflicts and I push it to repository. How to delete my last commit?...
- Modified
- 12 Feb at 16:7
Vertically align an image inside a div with responsive height
I have the following code which sets up a container which has a height that changes with the width when the browser is re-sized (to maintain a square aspect ratio). HTML ``` <div class="responsive-c...
- Modified
- 29 Aug at 16:29
How do you get the Git repository's name in some Git repository?
When you are working in some Git directory, how can you get the Git repository name in some Git repository? Are there any Git commands? ``` # I did check out bar repository and working in somewhere ...
- Modified
- 17 Jul at 12:28
PHP variables don't evaluate in the query
I am pretty new to PHP and MySQL and I just can't figure this one out. I have searched all around the forum but haven't found an answer I can make sense of. I originally was using mysql_fetch_assoc() ...
Converting XML to JSON using Python?
I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results...
- Modified
- 9 Jun at 23:47
Running code in main thread from another thread
In an android service I have created thread(s) for doing some background task. I have a situation where a thread needs to post certain task on main thread's message queue, for example a `Runnable`. Is...
- Modified
- 7 Oct at 15:2
How to clear memory to prevent "out of memory error" in VBA?
I am running VBA code on a large Excel spreadsheet. How do I clear the memory between procedures/calls to prevent an "out of memory" issue occurring?
What does this symbol mean in JavaScript?
## What is this? This is a collection of questions that come up every now and then about syntax in JavaScript. This is also a Community Wiki, ## Why is this? Stack Overflow does not allow searc...
- Modified
- 20 Jun at 09:12
Extract a substring using PowerShell
How can I extract a substring using PowerShell? I have this string ... ``` "-----start-------Hello World------end-------" ``` I have to extract ... ``` Hello World ``` What is the best way to d...
- Modified
- 10 Dec at 20:8
How can I generate a tsconfig.json file?
How can I generate a `tsconfig.json` via the command line? I tried command `tsc init`, but this doesn't work.
- Modified
- 21 Apr at 23:12
References with text in LaTeX
In LaTeX you can easily reference a section by using `\label{}` next to a section and then `\ref{}` to create the reference. However, the reference only includes the number of the section, or the page...
- Modified
- 14 Nov at 08:15
Bash syntax error: unexpected end of file
Forgive me for this is a very simple script in Bash. Here's the code: ``` #!/bin/bash # june 2011 if [ $# -lt 3 -o $# -gt 3 ]; then echo "Error... Usage: $0 host database username" exit 0 fi `...
Convert double to float in Java
I am facing an issue related to converting `double` to `float`. Actually, I store a float type, `23423424666767`, in a database, but when we get data from the database in the below code, `getInfoValue...
How to use border with Bootstrap
How can I solve this problem? When you add borders to a div, the div is not centered and the `span12` class is not centered. I would like to center the div with the borders ``` <div class="row" > ...
- Modified
- 14 Mar at 16:48
More elegant way of declaring multiple variables at the same time
To declare multiple variables at the "same time" I would do: ``` a, b = True, False ``` But if I had to declare much more variables, it turns less and less elegant: ``` a, b, c, d, e, f, g, h, i, ...
- Modified
- 18 Jun at 17:3
What are Unicode, UTF-8, and UTF-16?
What's the basis for Unicode and why the need for UTF-8 or UTF-16? I have researched this on Google and searched here as well, but it's not clear to me. In [VSS](https://en.wikipedia.org/wiki/Microsof...
What's the difference between "Request Payload" vs "Form Data" as seen in Chrome dev tools Network tab
I have an old web application I have to support (which I did not write). When I fill out a form and submit then check the "Network" tab in Chrome I see "Request Payload" where I would normally see "F...
- Modified
- 16 Apr at 19:16
Select Pandas rows based on list index
I have a `dataframe df`: ``` 20060930 10.103 NaN 10.103 7.981 20061231 15.915 NaN 15.915 12.686 20070331 3.196 NaN 3.196 2.710 20070630 7.907 NaN 7...
Send Outlook Email Via Python?
I am using `Outlook 2003`. What is the best way to send email (through `Outlook 2003`) using `Python`?
How to convert a Django QuerySet to a list?
I have the following: ``` answers = Answer.objects.filter(id__in=[answer.id for answer in answer_set.answers.all()]) ``` then later: ``` for i in range(len(answers)): # iterate through all exi...
- Modified
- 4 Sep at 08:39
Passing a variable to a powershell script via command line
I am new to powershell, and trying to teach myself the basics. I need to write a ps script to parse a file, which has not been too difficult. Now I want to change it to pass a variable to the script...
- Modified
- 7 May at 19:27
Java substring: 'string index out of range'
I'm guessing I'm getting this error because the string is trying to substring a `null` value. But wouldn't the `".length() > 0"` part eliminate that issue? Here is the Java snippet: ``` if (itemdesc...
- Modified
- 8 Feb at 20:20
What is private bytes, virtual bytes, working set?
I am trying to use the perfmon windows utility to debug memory leaks in a process. This is how perfmon explains the terms: is the current size, in bytes, of the Working Set of this process. The Wor...
- Modified
- 30 May at 04:34
Check if two lists are equal
I have a class as follows: ``` public class Tag { public Int32 Id { get; set; } public String Name { get; set; } } ``` And I have two lists of tag: ``` List<Tag> tags1; List<Tag> tags2; ``` ...
How to provide user name and password when connecting to a network share
When connecting to a network share for which the current user (in my case, a network enabled service user) has no rights, name and password have to be provided. I know how to do this with Win32 funct...
- Modified
- 17 Nov at 13:21