Most Popular
1500 questions
1482
votes
11 answers
How do you rename a Git tag?
Today I was looking through the logs for a project and realized that I fat fingered a tag name some time ago. Is there some way to rename the tag? Google hasn't turned up anything useful.
I realize I could check out the tagged version and make a new…
Brandon Fosdick
- 15,673
- 4
- 21
- 20
1481
votes
12 answers
How do function pointers in C work?
I had some experience lately with function pointers in C.
So going on with the tradition of answering your own questions, I decided to make a small summary of the very basics, for those who need a quick dive-in to the subject.
Yuval Adam
- 161,610
- 92
- 305
- 395
1481
votes
11 answers
How do you do block comments in YAML?
How do I comment a block of lines in YAML?
Thierry Lam
- 45,304
- 42
- 117
- 144
1476
votes
7 answers
How do I delete unpushed git commits?
I accidentally committed to the wrong branch.
How do I delete that commit?
NullVoxPopuli
- 61,906
- 73
- 206
- 352
1476
votes
27 answers
Check if checkbox is checked with jQuery
How can I check if a checkbox in a checkbox array is checked using the id of the checkbox array?
I am using the following code, but it always returns the count of checked checkboxes regardless of id.
function isCheckedById(id) {
alert(id);
…
Jake
- 25,479
- 31
- 107
- 168
1475
votes
20 answers
How do I rename both a Git local and remote branch name?
I have a local branch master that points to a remote branch origin/regacy (oops, typo!).
How do I rename the remote branch to origin/legacy or origin/master?
I tried:
git remote rename regacy legacy
But this gave an error:
error : Could not…
JayD
- 15,483
- 5
- 15
- 14
1475
votes
16 answers
Change column type in pandas
I created a DataFrame from a list of lists:
table = [
['a', '1.2', '4.2' ],
['b', '70', '0.03'],
['x', '5', '0' ],
]
df = pd.DataFrame(table)
How do I convert the columns to specific types? In this case, I want to convert…
user1642513
1473
votes
296 answers
Hidden Features of C#?
This came to my mind after I learned the following from this question:
where T : struct
We, C# developers, all know the basics of C#. I mean declarations, conditionals, loops, operators, etc.
Some of us even mastered the stuff like Generics,…
Serhat Ozgel
- 23,496
- 29
- 102
- 138
1472
votes
10 answers
Create a tag in a GitHub repository
I have a repository in GitHub and I need to tag it.
I tagged in a shell, but on GitHub, it is not showing up.
Do I have to do anything else?
The command I used in the shell is:
git tag 2.0
And now when I type git tag it shows:
2.0
So it seems…
Tanel Tammik
- 15,489
- 3
- 22
- 31
1471
votes
15 answers
How to switch databases in psql?
In MySQL, I used use database_name;
What's the psql equivalent?
Blankman
- 259,732
- 324
- 769
- 1,199
1471
votes
10 answers
How can I "add existing frameworks" in Xcode 4?
I can't find the good old "Add existing frameworks" option. How do I do this?
We're talking about Xcode 4 DP2 (in the context of iPhone development, as far as it matters...).
Ariel Malka
- 15,697
- 6
- 31
- 33
1471
votes
16 answers
Can I concatenate multiple MySQL rows into one field?
Using MySQL, I can do something like:
SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;
My Output:
shopping
fishing
coding
but instead I just want 1 row, 1 col:
Expected Output:
shopping, fishing, coding
The reason is that I'm selecting…
Dean Rather
- 31,756
- 15
- 66
- 72
1470
votes
17 answers
What is the difference between match_parent and fill_parent?
I'm a little confused about two XML properties: match_parent and fill_parent. It seems that both are the same. Is there any difference between them?
vnshetty
- 20,051
- 23
- 64
- 102
1470
votes
18 answers
Virtual member call in a constructor
I'm getting a warning from ReSharper about a call to a virtual member from my objects constructor.
Why would this be something not to do?
JasonS
- 23,480
- 9
- 41
- 46
1469
votes
18 answers
YYYY-MM-DD format date in shell script
I tried using $(date) in my bash shell script, however, I want the date in YYYY-MM-DD format.
How do I get this?
Kapsh
- 20,751
- 13
- 36
- 44