itemId stringlengths 1 34 | itemType stringclasses 4
values | site stringclasses 4
values | scrapedAt timestamp[s]date 2026-08-03 00:21:25 2026-08-03 04:01:45 | tagName stringlengths 1 34 ⌀ | questionCount int64 2 2.53M ⌀ | hasSynonyms bool 2
classes | isModeratorOnly bool 1
class | isRequired bool 1
class | link stringlengths 32 258 | _run_id stringclasses 57
values | _dataset_id stringclasses 57
values | questionId int64 1 80M ⌀ | title stringlengths 15 150 ⌀ | score int64 -10 35.3k ⌀ | viewCount int64 6 16.7M ⌀ | answerCount int64 0 296 ⌀ | isAnswered bool 2
classes | hasAcceptedAnswer bool 2
classes | tags listlengths 1 6 ⌀ | createdAt timestamp[s]date 2008-08-01 04:18:04 2026-08-03 03:37:34 ⌀ | lastActivityAt timestamp[s]date 2008-10-30 09:20:18 2026-08-03 01:36:51 ⌀ | ownerDisplayName stringlengths 3 30 ⌀ | isClosed bool 2
classes | contentLicense stringclasses 3
values | acceptedAnswerId int64 4 80M ⌀ | ownerUserId int64 1 33M ⌀ | ownerReputation int64 1 1.53M ⌀ | userId int64 13 33M ⌀ | displayName stringclasses 897
values | reputation int64 1 1.53M ⌀ | userType stringclasses 3
values | lastAccessAt timestamp[s]date 2011-01-10 08:55:57 2026-08-03 03:38:13 ⌀ | goldBadges int64 0 895 ⌀ | silverBadges int64 0 9.32k ⌀ | bronzeBadges int64 0 9.36k ⌀ | reputationChangeMonth int64 -40 1.43k ⌀ | reputationChangeYear int64 -1,146 11.7k ⌀ | websiteUrl stringclasses 302
values | location stringclasses 279
values | acceptRate int64 17 100 ⌀ | answerId int64 1.13k 80M ⌀ | isAccepted bool 2
classes | bodyText stringlengths 31 24.4k ⌀ | bodyHtml stringlengths 39 34.9k ⌀ | answers listlengths 1 3 ⌀ | answersFetched int64 0 3 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15381198 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/15381198/remove-credentials-from-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 15,381,198 | Remove credentials from Git | 1,037 | 1,835,625 | 44 | true | true | [
"windows",
"git",
"credentials"
] | 2013-03-13T09:20:21 | 2025-05-20T13:51:37 | balexandre | false | CC BY-SA 3.0 | 39,608,906 | 28,004 | 75,574 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
10237071 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/10237071/how-to-amend-a-commit-without-changing-commit-message-reusing-the-previous-one | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 10,237,071 | How to amend a commit without changing commit message (reusing the previous one)? | 1,037 | 431,631 | 8 | true | true | [
"git",
"commit",
"git-commit",
"git-amend"
] | 2012-04-19T21:28:45 | 2023-06-13T13:01:18 | Sridhar Sarnobat | false | CC BY-SA 3.0 | 10,365,442 | 714,112 | 25,814 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
3212459 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/3212459/is-there-a-command-to-undo-git-init | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 3,212,459 | Is there a command to undo git init? | 1,035 | 864,429 | 7 | true | true | [
"git",
"git-init"
] | 2010-07-09T12:16:51 | 2024-08-12T06:04:28 | Yarin | false | CC BY-SA 3.0 | 3,212,465 | 165,673 | 186,519 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
3184555 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 3,184,555 | Cleaning up old remote git branches | 1,032 | 615,235 | 10 | true | true | [
"git",
"git-branch"
] | 2010-07-06T08:14:50 | 2024-08-31T15:32:24 | Jayesh | false | CC BY-SA 4.0 | 3,184,742 | 174,527 | 53,723 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
22207256 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/22207256/undo-git-stash-pop-that-results-in-merge-conflict | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 22,207,256 | Undo git stash pop that results in merge conflict | 1,031 | 676,296 | 6 | true | true | [
"git",
"git-stash"
] | 2014-03-05T19:25:18 | 2024-08-05T11:34:28 | acjay | false | CC BY-SA 4.0 | 22,207,257 | 807,674 | 37,439 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
913701 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/913701/how-to-change-the-remote-repository-for-a-git-submodule | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 913,701 | How to change the remote repository for a git submodule? | 1,030 | 536,204 | 8 | true | false | [
"git",
"git-submodules"
] | 2009-05-27T02:35:49 | 2026-05-08T08:23:31 | Andrew Grimm | false | CC BY-SA 4.0 | null | 38,765 | 82,624 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
7206801 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/7206801/is-there-any-way-to-git-checkout-previous-branch | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 7,206,801 | Is there any way to git checkout previous branch? | 1,026 | 163,118 | 10 | true | true | [
"git",
"git-checkout"
] | 2011-08-26T15:09:11 | 2026-02-12T13:12:16 | Matt Briggs | false | CC BY-SA 4.0 | 7,207,542 | 10,771 | 42,508 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
20195304 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/20195304/how-do-i-update-the-password-for-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 20,195,304 | How do I update the password for Git? | 1,024 | 1,632,746 | 36 | true | true | [
"macos",
"git",
"change-password"
] | 2013-11-25T14:15:14 | 2026-01-19T13:47:38 | Ken M. Haggerty | false | CC BY-SA 3.0 | 20,195,558 | 1,368,904 | 26,424 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
5741407 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/5741407/how-to-undo-a-git-merge-with-conflicts | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 5,741,407 | How to undo a git merge with conflicts | 1,018 | 679,852 | 7 | true | false | [
"git",
"git-merge",
"git-merge-conflict"
] | 2011-04-21T08:20:37 | 2024-06-13T15:03:50 | Anshul | false | CC BY-SA 4.0 | null | 527,710 | 10,181 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
25356810 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/25356810/how-to-squash-all-commits-on-branch | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 25,356,810 | How to squash all commits on branch | 1,013 | 1,154,888 | 23 | true | true | [
"git",
"version-control"
] | 2014-08-18T05:25:39 | 2026-03-06T16:16:31 | user3803850 | false | CC BY-SA 4.0 | 25,357,146 | 3,803,850 | 10,287 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
2745076 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/2745076/what-are-the-differences-between-git-commit-and-git-push | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 2,745,076 | What are the differences between "git commit" and "git push"? | 1,012 | 994,858 | 15 | true | true | [
"git",
"push",
"git-commit",
"git-push",
"git-index"
] | 2010-04-30T14:17:12 | 2026-07-09T18:02:35 | ben | false | CC BY-SA 3.0 | 2,745,097 | 173,634 | 29,965 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
4754152 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/4754152/how-do-i-remove-version-tracking-from-a-project-cloned-from-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 4,754,152 | How do I remove version tracking from a project cloned from git? | 1,004 | 1,174,680 | 15 | true | true | [
"git",
"git-track"
] | 2011-01-21T00:12:09 | 2023-11-07T13:52:47 | daustin777 | false | CC BY-SA 4.0 | 4,754,175 | 69,738 | 12,828 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1064499 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1064499/how-to-list-all-git-tags | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,064,499 | How to list all Git tags? | 1,003 | 1,166,271 | 11 | true | true | [
"git",
"git-tag"
] | 2009-06-30T15:52:36 | 2024-02-02T15:32:01 | Léo Léopold Hertz 준영 | false | CC BY-SA 4.0 | 1,064,505 | 54,964 | 143,634 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
32056324 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/32056324/there-is-no-tracking-information-for-the-current-branch | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 32,056,324 | There is no tracking information for the current branch | 1,000 | 1,143,564 | 18 | true | true | [
"git",
"github",
"git-pull"
] | 2015-08-17T17:27:05 | 2024-10-23T06:19:40 | valerio0999 | false | CC BY-SA 3.0 | 32,056,416 | 1,654,520 | 12,318 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
4308610 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 4,308,610 | How to ignore certain files in Git | 1,000 | 1,647,129 | 29 | true | true | [
"git",
"gitignore"
] | 2010-11-29T22:12:24 | 2025-02-25T21:22:51 | Kohan95 | false | CC BY-SA 4.0 | 4,308,645 | 514,612 | 10,467 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
52823692 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 52,823,692 | git push --force-with-lease vs. --force | 998 | 615,707 | 8 | true | false | [
"git",
"git-push"
] | 2018-10-15T19:42:46 | 2025-10-31T14:16:37 | Alexander Mills | false | CC BY-SA 4.0 | null | 1,223,975 | 102,396 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1687262 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1687262/link-to-the-issue-number-on-github-within-a-commit-message | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,687,262 | Link to the issue number on GitHub within a commit message | 994 | 1,287,230 | 8 | true | true | [
"git",
"github",
"git-commit"
] | 2009-11-06T12:27:52 | 2022-05-05T15:42:33 | Mika Tuupola | false | CC BY-SA 3.0 | 6,742,691 | 24,433 | 20,597 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
11621768 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/11621768/how-can-i-make-git-accept-a-self-signed-certificate | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 11,621,768 | How can I make git accept a self signed certificate? | 987 | 1,844,702 | 21 | true | true | [
"git",
"version-control",
"https",
"self-signed"
] | 2012-07-23T23:00:06 | 2024-09-08T20:46:22 | Ian Vink | false | CC BY-SA 3.0 | 11,622,001 | 172,861 | 69,170 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
5717026 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/5717026/how-can-i-cherry-pick-only-changes-to-certain-files | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 5,717,026 | How can I cherry-pick only changes to certain files? | 984 | 585,898 | 19 | true | true | [
"git",
"github",
"cherry-pick"
] | 2011-04-19T13:22:54 | 2025-10-06T09:32:58 | Tobias Kienzler | false | CC BY-SA 4.0 | 79,753,812 | 321,973 | 28,065 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
2183900 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/2183900/how-do-i-prevent-git-diff-from-using-a-pager | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 2,183,900 | How do I prevent 'git diff' from using a pager? | 972 | 265,282 | 21 | true | true | [
"git"
] | 2010-02-02T12:22:08 | 2025-06-25T17:53:07 | lprsd | false | CC BY-SA 4.0 | 2,183,920 | 55,562 | 88,133 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
49478 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 49,478 | Git ignore file for Xcode projects | 970 | 359,468 | 21 | true | true | [
"xcode",
"git",
"macos",
"version-control",
"gitignore"
] | 2008-09-08T11:07:49 | 2025-01-13T08:21:06 | Hagelin | false | CC BY-SA 3.0 | 12,021,580 | 5,156 | 16,738 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
3065650 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/3065650/whats-the-simplest-way-to-list-conflicted-files-in-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 3,065,650 | What's the simplest way to list conflicted files in Git? | 966 | 722,960 | 24 | true | true | [
"git",
"git-merge",
"git-merge-conflict"
] | 2010-06-17T21:08:52 | 2026-07-11T17:30:57 | inger | false | CC BY-SA 4.0 | 10,874,862 | 174,284 | 20,344 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1402776 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1402776/how-do-i-commit-all-deleted-files-in-git | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,402,776 | How do I commit all deleted files in Git? | 966 | 231,245 | 0 | true | false | [
"git",
"git-add"
] | 2009-09-10T00:05:37 | 2023-02-04T10:44:09 | Igor Zevaka | true | null | null | 129,404 | 77,146 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
3828164 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/3828164/how-do-i-access-my-ssh-public-key | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 3,828,164 | How do I access my SSH public key? | 964 | 2,188,380 | 24 | true | true | [
"git",
"ssh",
"rsa"
] | 2010-09-30T06:03:56 | 2025-03-11T17:27:31 | sscirrus | false | CC BY-SA 4.0 | 3,828,169 | 341,583 | 57,079 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
14168677 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/14168677/merge-development-branch-with-master | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 14,168,677 | Merge development branch with master | 963 | 1,153,696 | 15 | true | true | [
"git",
"git-merge"
] | 2013-01-05T04:45:48 | 2022-05-19T12:10:34 | Pawan | false | CC BY-SA 4.0 | 14,168,817 | 784,597 | 32,511 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
2706797 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/2706797/finding-what-branch-a-git-commit-came-from | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 2,706,797 | Finding what branch a Git commit came from | 961 | 452,171 | 16 | true | true | [
"git"
] | 2010-04-25T01:23:33 | 2024-10-10T18:57:20 | Ethan Gunderson | false | CC BY-SA 4.0 | 2,707,110 | 2,066 | 11,863 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
2007662 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/2007662/rollback-to-an-old-git-commit-in-a-public-repo | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 2,007,662 | Rollback to an old Git commit in a public repo | 959 | 1,274,094 | 13 | true | true | [
"git",
"git-checkout",
"git-revert"
] | 2010-01-05T17:01:14 | 2024-08-30T02:06:20 | David | false | CC BY-SA 4.0 | 2,007,704 | 237,016 | 10,059 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
2998832 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/2998832/git-pull-fails-unable-to-resolve-reference-unable-to-update-local-ref | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 2,998,832 | git pull fails "unable to resolve reference" "unable to update local ref" | 958 | 914,354 | 42 | true | false | [
"git"
] | 2010-06-08T15:34:41 | 2024-09-26T12:48:49 | Gabrielle | false | CC BY-SA 4.0 | null | 330,515 | 9,699 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
18393498 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/18393498/gitignore-all-the-ds-store-files-in-every-folder-and-subfolder | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 18,393,498 | .gitignore all the .DS_Store files in every folder and subfolder | 957 | 568,547 | 12 | true | false | [
"git",
"macos",
"gitignore"
] | 2013-08-23T02:01:06 | 2023-03-28T16:57:15 | vickyqiu | false | CC BY-SA 4.0 | null | 2,627,407 | 9,569 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
10418975 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/10418975/how-to-change-line-ending-settings | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 10,418,975 | How to change line-ending settings | 956 | 904,233 | 8 | true | true | [
"git",
"msysgit"
] | 2012-05-02T17:45:07 | 2025-09-09T19:42:48 | qwertymk | false | CC BY-SA 4.0 | 10,419,350 | 465,546 | 35,660 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1709177 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1709177/pull-a-certain-branch-from-the-remote-server | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,709,177 | Pull a certain branch from the remote server | 954 | 2,614,016 | 18 | true | true | [
"git",
"merge",
"branch",
"pull"
] | 2009-11-10T16:18:21 | 2026-07-16T13:52:23 | tybro0103 | false | CC BY-SA 4.0 | 1,710,474 | 202,875 | 49,993 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
9229301 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/9229301/git-cherry-pick-says-38c74d-is-a-merge-but-no-m-option-was-given | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 9,229,301 | git cherry-pick says "...38c74d is a merge but no -m option was given" | 953 | 793,723 | 6 | true | true | [
"git",
"merge",
"rebase",
"cherry-pick",
"git-cherry-pick"
] | 2012-02-10T14:26:50 | 2024-02-09T01:00:17 | wufoo | false | CC BY-SA 4.0 | 9,229,393 | 566,145 | 14,911 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
7124726 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/7124726/git-add-only-modified-changes-and-ignore-untracked-files | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 7,124,726 | git add only modified changes and ignore untracked files | 949 | 640,142 | 10 | true | true | [
"git",
"commit",
"gitignore",
"staging"
] | 2011-08-19T16:40:59 | 2023-09-29T11:48:57 | Steve | false | CC BY-SA 3.0 | 7,124,760 | 93,004 | 12,573 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
9903541 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/9903541/finding-diff-between-current-and-last-version | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 9,903,541 | Finding diff between current and last version | 946 | 834,571 | 14 | true | true | [
"git",
"git-diff"
] | 2012-03-28T08:15:24 | 2024-09-30T21:54:01 | Rajeev | false | CC BY-SA 4.0 | 9,903,611 | 277,603 | 47,417 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
4850717 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/4850717/how-to-cancel-a-local-git-commit | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 4,850,717 | How to cancel a local git commit? | 945 | 1,321,924 | 8 | true | true | [
"git",
"git-reset",
"git-commit"
] | 2011-01-31T12:14:48 | 2025-01-30T13:46:01 | Amal Kumar S | false | CC BY-SA 4.0 | 4,850,743 | 457,036 | 16,151 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
39399804 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/39399804/updates-were-rejected-because-the-tip-of-your-current-branch-is-behind-its-remot | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 39,399,804 | Updates were rejected because the tip of your current branch is behind its remote counterpart | 944 | 2,386,439 | 30 | true | true | [
"git"
] | 2016-09-08T20:37:58 | 2024-01-31T23:59:31 | Mike Christensen | false | CC BY-SA 4.0 | 39,400,690 | 392,044 | 91,934 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1994463 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1994463/how-to-cherry-pick-a-range-of-commits-and-merge-them-into-another-branch | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,994,463 | How to cherry-pick a range of commits and merge them into another branch? | 943 | 663,470 | 11 | true | true | [
"git",
"git-merge",
"git-cherry-pick"
] | 2010-01-03T09:50:23 | 2025-09-22T13:09:42 | crazybyte | false | CC BY-SA 4.0 | 1,994,491 | 131,404 | 10,869 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
1910082 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/1910082/how-can-i-apply-a-specific-stash-entry | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 1,910,082 | How can I apply a specific stash entry? | 934 | 1,138,939 | 8 | true | true | [
"git",
"git-stash"
] | 2009-12-15T20:14:32 | 2026-05-19T12:37:28 | Lee | false | CC BY-SA 4.0 | 1,910,142 | 99,877 | 21,374 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
3573623 | question | stackoverflow | 2026-08-03T01:26:21 | null | null | null | null | null | https://stackoverflow.com/questions/3573623/how-to-preview-the-changes-that-git-stash-apply-will-make | NjXQGlLGE0Fm4rmFw | dEtvupaYId0bRgDMs | 3,573,623 | How to preview the changes that "git stash apply" will make? | 929 | 233,720 | 19 | true | true | [
"git",
"git-stash"
] | 2010-08-26T09:08:05 | 2025-05-08T13:44:54 | Benjol | false | CC BY-SA 4.0 | 3,579,474 | 11,410 | 67,297 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
30810322 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/30810322 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 400,212 | null | 3,620 | null | null | null | null | null | 2015-06-12T18:56:18 | 2021-08-30T15:45:33 | Dean Taylor | null | CC BY-SA 4.0 | null | 406,712 | 42,481 | null | null | null | null | null | null | null | null | null | null | null | null | null | 30,810,322 | true | Overview There are three primary browser APIs for copying to the clipboard: Async Clipboard API [navigator.clipboard.writeText] Text-focused portion available in Chrome 66 (March 2018) Access is asynchronous and uses JavaScript Promises , can be written so security user prompts (if displayed) don't interrupt the JavaSc... | <h1>Overview</h1>
<p>There are three primary browser APIs for copying to the clipboard:</p>
<ol>
<li><p><a href="https://www.w3.org/TR/clipboard-apis/#async-clipboard-api" rel="noreferrer">Async Clipboard API</a> <code>[navigator.clipboard.writeText]</code></p>
<ul>
<li>Text-focused portion available in <a href="https:... | null | null |
14494775 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/14494775 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 14,494,747 | null | 3,609 | null | null | null | null | null | 2013-01-24T05:46:32 | 2020-04-22T06:44:01 | Simon Lang | null | CC BY-SA 4.0 | null | 489,586 | 43,314 | null | null | null | null | null | null | null | null | null | null | null | null | null | 14,494,775 | true | Try this markdown:  I think you can link directly to the raw version of an image if it's stored in your repository. i.e.  | <p>Try this markdown:</p>
<pre><code>
</code></pre>
<p>I think you can link directly to the raw version of an image if it's stored in your repository. i.e.</p>
<pre><code>
</code></pre>
| null | null |
35446009 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/35446009 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 309,424 | null | 3,601 | null | null | null | null | null | 2016-02-17T00:58:48 | 2023-05-18T23:30:46 | Slava Vedenin | null | CC BY-SA 4.0 | null | 4,318,868 | 60,462 | null | null | null | null | null | null | null | null | null | null | null | null | null | 35,446,009 | false | To summarize the other answers, I found 11 main ways to do this (see below). And I wrote some performance tests (see results below): Ways to convert an InputStream to a String: Using IOUtils.toString (Apache Utils) String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8); Using CharStreams (Guava) String r... | <p>To summarize the other answers, I found 11 main ways to do this (see below). And I wrote some performance tests (see results below):</p>
<p><strong>Ways to convert an InputStream to a String:</strong></p>
<ol>
<li><p>Using <code>IOUtils.toString</code> (Apache Utils)</p>
<pre><code> String result = IOUtils.toString(... | null | null |
894877 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/894877 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 894,860 | null | 3,597 | null | null | null | null | null | 2009-05-21T20:10:52 | 2022-06-17T20:35:19 | Tom Ritter | null | CC BY-SA 4.0 | null | 8,435 | 101,620 | null | null | null | null | null | null | null | null | null | null | null | null | null | 894,877 | true | From ES6/ES2015 , default parameters are in the language specification. function read_file(file, delete_after = false) { // Code } just works. Reference: Default Parameters - MDN Default function parameters allow formal parameters to be initialized with default values if no value or undefined is passed. In ES6, you can... | <p>From <a href="https://www.ecma-international.org/ecma-262/6.0/" rel="noreferrer">ES6/ES2015</a>, default parameters are in the language specification.</p>
<pre><code>function read_file(file, delete_after = false) {
// Code
}
</code></pre>
<p>just works.</p>
<p>Reference: <a href="https://developer.mozilla.org/en/d... | null | null |
986145 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/986145 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 986,006 | null | 3,596 | null | null | null | null | null | 2009-06-12T11:18:27 | 2017-04-03T02:13:38 | Blair Conrad | null | CC BY-SA 3.0 | null | 1,199 | 244,350 | null | null | null | null | null | null | null | null | null | null | null | null | null | 986,145 | true | Arguments are passed by assignment . The rationale behind this is twofold: the parameter passed in is actually a reference to an object (but the reference is passed by value) some data types are mutable, but others aren't So: If you pass a mutable object into a method, the method gets a reference to that same object an... | <p>Arguments are <a href="http://docs.python.org/3/faq/programming.html#how-do-i-write-a-function-with-output-parameters-call-by-reference" rel="noreferrer">passed by assignment</a>. The rationale behind this is twofold:</p>
<ol>
<li>the parameter passed in is actually a <em>reference</em> to an object (but the refere... | null | null |
17848593 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/17848593 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 17,846,529 | null | 3,596 | null | null | null | null | null | 2013-07-25T03:37:31 | 2022-07-25T17:05:22 | user456814 | null | CC BY-SA 4.0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | 17,848,593 | false | Did You Start ssh-agent ? You might need to start ssh-agent before you run the ssh-add command: eval `ssh-agent -s` ssh-add Note that this will start the agent for msysgit Bash on Windows . If you're using a different shell or operating system, you might need to use a variant of the command, such as those listed in the... | <h2>Did You Start <code>ssh-agent</code>?</h2>
<p>You might need to start <code>ssh-agent</code> before you run the <code>ssh-add</code> command:</p>
<pre class="lang-bash prettyprint-override"><code>eval `ssh-agent -s`
ssh-add
</code></pre>
<p>Note that this will start the agent for <strong>msysgit Bash on Windows</st... | null | null |
7892349 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/7892349 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 7,892,334 | null | 3,595 | null | null | null | null | null | 2011-10-25T16:16:02 | 2023-06-08T14:36:17 | marc_s | null | CC BY-SA 4.0 | null | 13,302 | 761,316 | null | null | null | null | null | null | null | null | null | null | null | null | null | 7,892,349 | true | SELECT t.name AS TableName, s.name AS SchemaName, p.rows, SUM(a.total_pages) * 8 AS TotalSpaceKB, CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB, SUM(a.used_pages) * 8 AS UsedSpaceKB, CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB, (SUM(a.tot... | <pre><code>SELECT
t.name AS TableName,
s.name AS SchemaName,
p.rows,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS ... | null | null |
2518150 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/2518150 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 2,518,127 | null | 3,589 | null | null | null | null | null | 2010-03-25T18:01:04 | 2020-10-21T14:18:32 | George Hawkins | null | CC BY-SA 4.0 | null | 245,602 | 39,182 | null | null | null | null | null | null | null | null | null | null | null | null | null | 2,518,150 | true | You can enter the long form command: source ~/.bashrc or you can use the shorter version of the command: . ~/.bashrc | <p>You can enter the long form command:</p>
<pre><code>source ~/.bashrc
</code></pre>
<p>or you can use the shorter version of the command:</p>
<pre><code>. ~/.bashrc
</code></pre>
| null | null |
5506483 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/5506483 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 5,506,339 | null | 3,588 | null | null | null | null | null | 2011-03-31T21:19:11 | 2025-01-05T10:45:43 | svick | null | CC BY-SA 4.0 | null | 41,071 | 247,234 | null | null | null | null | null | null | null | null | null | null | null | null | null | 5,506,483 | true | Since git 2.13, there is a command to save a specific path to the stash: git stash push <path> . For example: git stash push -m welcome_cart app/views/cart/welcome.thtml With earlier versions: You can do that using git stash --patch (or git stash -p ) -- you'll enter interactive mode where you'll be presented with each... | <p>Since git 2.13, there is a command to save a specific path to the stash: <code>git stash push <path></code>. For example:</p>
<pre><code>git stash push -m welcome_cart app/views/cart/welcome.thtml
</code></pre>
<hr />
<p>With earlier versions:</p>
<p>You can do that using <code>git stash --patch</code> (or <co... | null | null |
2647888 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/2647888 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 2,647,867 | null | 3,583 | null | null | null | null | null | 2010-04-15T18:14:35 | 2021-05-29T04:15:22 | Sarfraz | null | CC BY-SA 4.0 | null | 139,459 | 383,695 | null | null | null | null | null | null | null | null | null | null | null | null | null | 2,647,888 | true | You can use the qualities of the abstract equality operator to do this: if (variable == null){ // your code here. } Because null == undefined is true, the above code will catch both null and undefined . | <p>You can use the qualities of the <a href="http://www.ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison" rel="noreferrer">abstract equality operator</a> to do this:</p>
<pre><code>if (variable == null){
// your code here.
}
</code></pre>
<p>Because <code>null == undefined</code> is true, the a... | null | null |
29092698 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/29092698 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 16,804,093 | null | 3,575 | null | null | null | null | null | 2015-03-17T06:32:34 | 2025-07-10T08:50:34 | Sheharyar | null | CC BY-SA 4.0 | null | 1,533,054 | 76,290 | null | null | null | null | null | null | null | null | null | null | null | null | null | 29,092,698 | true | In Android Studio, you can do this: For example, if you want to change com.example.app to my.awesome.game , then: In your Project panel , click on the little gear icon ( ), or on later versions of Android Studio, the three vertical dots, then the Appearance sub-menu. Uncheck the Compact Empty Middle Packages option You... | <h2>In Android Studio, you can do this:</h2>
<p>For example, if you want to change <code>com.example.app</code> to <code>my.awesome.game</code>, then:</p>
<ol>
<li><p>In your <em><strong>Project panel</strong></em>, click on the little gear icon ( <img src="https://i.sstatic.net/lkezT.png" alt="Gears icon" /> ), or on ... | null | null |
5466478 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/5466478 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 5,466,451 | null | 3,573 | null | null | null | null | null | 2011-03-29T00:08:55 | 2020-01-17T00:14:15 | Greg Hewgill | null | CC BY-SA 4.0 | null | 893 | 1,007,155 | null | null | null | null | null | null | null | null | null | null | null | null | null | 5,466,478 | true | You need to double the {{ and }} : >>> x = " {{ Hello }} {0} " >>> print(x.format(42)) ' { Hello } 42 ' Here's the relevant part of the Python documentation for format string syntax : Format strings contain “replacement fields” surrounded by curly braces {} . Anything that is not contained in braces is considered liter... | <p>You need to double the <code>{{</code> and <code>}}</code>:</p>
<pre><code>>>> x = " {{ Hello }} {0} "
>>> print(x.format(42))
' { Hello } 42 '
</code></pre>
<p>Here's the relevant part of the <a href="https://docs.python.org/library/string.html#formatstrings" rel="noreferrer">Python documentatio... | null | null |
1113140 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1113140 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 953,481 | null | 3,571 | null | null | null | null | null | 2009-07-11T07:12:20 | 2024-01-29T11:53:22 | Lara Bailey | null | CC BY-SA 4.0 | null | 19,563 | 805,258 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,113,140 | true | Find the last commit that affected the given path. As the file isn't in the HEAD commit, that previous commit must have deleted it. git rev-list -n 1 HEAD -- <file_path> Then checkout the version at the commit before, using the caret ( ^ ) symbol: git checkout <deleting_commit>^ -- <file_path> Or in one command, if $fi... | <p>Find the last commit that affected the given path. As the file isn't in the HEAD commit, that previous commit must have deleted it.</p>
<pre class="lang-bash prettyprint-override"><code>git rev-list -n 1 HEAD -- <file_path>
</code></pre>
<p>Then checkout the version at the commit before, using the caret (<cod... | null | null |
1016941 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1016941 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,016,896 | null | 3,567 | null | null | null | null | null | 2009-06-19T08:41:04 | 2023-08-30T13:48:56 | Josef Pfleger | null | CC BY-SA 4.0 | null | 98,401 | 74,617 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,016,941 | true | For API Level 30 , WindowMetrics.getBounds is to be used. An example of its usage can be found in the linked docs: final WindowMetrics metrics = windowManager.getCurrentWindowMetrics(); // Gets all excluding insets final WindowInsets windowInsets = metrics.getWindowInsets(); Insets insets = windowInsets.getInsetsIgnori... | <p>For <strong>API Level 30</strong>, <a href="https://developer.android.com/reference/android/view/WindowMetrics#getBounds()" rel="noreferrer"><code>WindowMetrics.getBounds</code></a> is to be used. An example of its usage can be found in the linked docs:</p>
<pre><code> final WindowMetrics metrics = windowManager.get... | null | null |
19095988 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/19095988 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,274,057 | null | 3,565 | null | null | null | null | null | 2013-09-30T13:51:26 | 2021-07-20T21:58:21 | Matt Frear | null | CC BY-SA 4.0 | null | 32,598 | 55,431 | null | null | null | null | null | null | null | null | null | null | null | null | null | 19,095,988 | false | The series of commands below will remove all of the items from the Git index (not from the working directory or local repository), and then will update the Git index, while respecting Git ignores. PS. Index = Cache First: git rm -r --cached . git add . Then: git commit -am "Remove ignored files" Or as a one-liner: git ... | <p>The series of commands below will remove all of the items from the Git index (not from the working directory or local repository), and then will update the Git index, while respecting Git ignores. <em>PS. Index = Cache</em></p>
<p><strong>First:</strong></p>
<pre><code>git rm -r --cached .
git add .
</code></pre>
<p... | null | null |
510351 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/510351 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 510,348 | null | 3,558 | null | null | null | null | null | 2009-02-04T07:05:59 | 2023-09-21T14:21:35 | Evan Fosmark | null | CC BY-SA 4.0 | null | 49,701 | 102,727 | null | null | null | null | null | null | null | null | null | null | null | null | null | 510,351 | false | This delays for 2.5 seconds: import time time.sleep(2.5) Here is another example where something is run approximately once a minute: import time while True: print("This prints once a minute.") time.sleep(60) # Delay for 1 minute (60 seconds). | <p>This delays for 2.5 seconds:</p>
<pre><code>import time
time.sleep(2.5)
</code></pre>
<hr />
<p>Here is another example where something is run approximately once a minute:</p>
<pre><code>import time
while True:
print("This prints once a minute.")
time.sleep(60) # Delay for 1 minute (60 seconds).
... | null | null |
2707195 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/2707195 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,673,841 | null | 3,558 | null | null | null | null | null | 2010-04-25T04:51:25 | 2018-10-02T15:08:55 | BalusC | null | CC BY-SA 4.0 | null | 157,882 | 1,115,937 | null | null | null | null | null | null | null | null | null | null | null | null | null | 2,707,195 | true | You can find an overview of a lot of design patterns in Wikipedia . It also mentions which patterns are mentioned by GoF. I'll sum them up here and try to assign as many pattern implementations as possible, found in both the Java SE and Java EE APIs. Creational patterns Abstract factory (recognizeable by creational met... | <p>You can find an overview of a lot of design patterns in <a href="https://en.wikipedia.org/wiki/Software_design_pattern#Classification_and_list" rel="noreferrer">Wikipedia</a>. It also mentions which patterns are mentioned by GoF. I'll sum them up here and try to assign as many pattern implementations as possible, fo... | null | null |
38723094 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/38723094 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 38,713,405 | null | 3,555 | null | null | null | null | null | 2016-08-02T14:22:10 | 2025-11-23T12:39:13 | Brynden | null | CC BY-SA 4.0 | null | 6,052,290 | 38,493 | null | null | null | null | null | null | null | null | null | null | null | null | null | 38,723,094 | true | When you [single-]click a file in the left sidebar's file browser or open it from the quick open menu ( Ctrl + P , type the file name, Enter ), Visual Studio Code opens it in what's called "Preview Mode", which allows you to quickly view files. Preview Mode tabs are not kept open. As soon as you go to open another file... | <p>When you [single-]click a file in the left sidebar's file browser or open it from the quick open menu (<kbd>Ctrl</kbd> + <kbd>P</kbd>, type the file name, <kbd>Enter</kbd>), Visual Studio Code opens it in what's called "Preview Mode", which allows you to quickly <strong>view</strong> files.</p>
<p>Preview ... | null | null |
11451731 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/11451731 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 11,451,535 | null | 3,553 | null | null | null | null | null | 2012-07-12T12:20:59 | 2020-10-28T01:32:34 | Alin Huruba | null | CC BY-SA 4.0 | null | 1,511,920 | 35,941 | null | null | null | null | null | null | null | null | null | null | null | null | null | 11,451,731 | false | Even if you haven't tracked the files so far, Git seems to be able to "know" about them even after you add them to .gitignore . WARNING: First commit or stash your current changes, or you will lose them. Then run the following commands from the top folder of your Git repository: git rm -r --cached . git add . git commi... | <p>Even if you haven't tracked the files so far, Git seems to be able to "know" about them even after you add them to <code>.gitignore</code>.</p>
<p><strong>WARNING:</strong> First commit or stash your current changes, or you will lose them.</p>
<p>Then run the following commands from the top folder of your ... | null | null |
201378 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/201378 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 201,323 | null | 3,552 | null | null | null | null | null | 2008-10-14T14:26:43 | 2025-08-18T09:41:57 | bortzmeyer | null | CC BY-SA 4.0 | null | 15,625 | 35,909 | null | null | null | null | null | null | null | null | null | null | null | null | null | 201,378 | true | The fully RFC 822 compliant regex is inefficient and obscure because of its length. Fortunately, RFC 822 was superseded twice and the current specification for email addresses is RFC 5322 . RFC 5322 leads to a regex that can be understood if studied for a few minutes and is efficient enough for actual use. One RFC 5322... | <p>The <a href="http://ex-parrot.com/%7Epdw/Mail-RFC822-Address.html" rel="noreferrer">fully RFC 822 compliant regex</a> is inefficient and obscure because of its length. Fortunately, RFC 822 was superseded twice and the current specification for email addresses is <a href="https://datatracker.ietf.org/doc/html/rfc532... | null | null |
306417 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/306417 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 306,400 | null | 3,546 | null | null | null | null | null | 2008-11-20T18:46:39 | 2021-07-31T18:58:34 | Pēteris Caune | null | CC BY-SA 4.0 | null | 5,821 | 45,631 | null | null | null | null | null | null | null | null | null | null | null | null | null | 306,417 | true | Use random.choice() : import random foo = ['a', 'b', 'c', 'd', 'e'] print(random.choice(foo)) For cryptographically secure random choices (e.g., for generating a passphrase from a wordlist), use secrets.choice() : import secrets foo = ['battery', 'correct', 'horse', 'staple'] print(secrets.choice(foo)) secrets is new i... | <p>Use <a href="https://docs.python.org/library/random.html#random.choice" rel="noreferrer"><code>random.choice()</code></a>:</p>
<pre><code>import random
foo = ['a', 'b', 'c', 'd', 'e']
print(random.choice(foo))
</code></pre>
<p>For <a href="https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_g... | null | null |
107921 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/107921 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 107,701 | null | 3,539 | null | null | null | null | null | 2008-09-20T11:18:06 | 2022-08-10T10:13:57 | benzado | null | CC BY-SA 4.0 | null | 10,947 | 84,976 | null | null | null | null | null | null | null | null | null | null | null | null | null | 107,921 | true | Remove existing .DS_Store files from the repository: find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch Add this line: .DS_Store to the file .gitignore , which can be found at the top level of your repository (or create the file if it isn't there already). You can do this easily with this command in t... | <p>Remove existing <code>.DS_Store</code> files from the repository:</p>
<pre><code>find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
</code></pre>
<p>Add this line:</p>
<pre><code>.DS_Store
</code></pre>
<p>to the file <code>.gitignore</code>, which can be found at the top level of your repository (... | null | null |
1676690 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1676690 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,676,632 | null | 3,534 | null | null | null | null | null | 2009-11-04T21:16:54 | 2019-10-07T19:25:12 | Christian C. Salvadó | null | CC BY-SA 4.0 | null | 5,445 | 832,348 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,676,690 | false | For those tasks I use most of the time block selection . Put your cursor on the first # character, press Ctrl V (or Ctrl Q for gVim), and go down until the last commented line and press x , that will delete all the # characters vertically. For commenting a block of text is almost the same: First, go to the first line y... | <p>For those tasks I use most of the time <a href="http://vimdoc.sourceforge.net/htmldoc/visual.html" rel="noreferrer">block selection</a>.</p>
<p>Put your cursor on the first <code>#</code> character, press <kbd>Ctrl</kbd><kbd>V</kbd> (or <kbd>Ctrl</kbd><kbd>Q</kbd> for gVim), and go down until the last commented lin... | null | null |
610893 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/610893 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 610,883 | null | 3,523 | null | null | null | null | null | 2009-03-04T14:48:43 | 2025-04-28T12:11:17 | Jarret Hardie | null | CC BY-SA 4.0 | null | 72,247 | 98,502 | null | null | null | null | null | null | null | null | null | null | null | null | null | 610,893 | true | Try hasattr() : if hasattr(a, 'property'): a.property See zweiterlinde's answer , which offers good advice about asking forgiveness! It is a very Pythonic approach! The general practice in Python is that, if the property is likely to be there most of the time, simply call it and either let the exception propagate, or t... | <p>Try <a href="https://docs.python.org/3/library/functions.html#hasattr" rel="noreferrer"><code>hasattr()</code></a>:</p>
<pre><code>if hasattr(a, 'property'):
a.property
</code></pre>
<p>See <a href="https://stackoverflow.com/a/610923/117030">zweiterlinde's answer</a>, which offers good advice about asking forgiv... | null | null |
339013 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/339013 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 339,007 | null | 3,517 | null | null | null | null | null | 2008-12-03T22:42:04 | 2026-03-04T22:54:12 | Harley Holcombe | null | CC BY-SA 4.0 | null | 1,057 | 183,952 | null | null | null | null | null | null | null | null | null | null | null | null | null | 339,013 | true | To pad strings: >>> print('4'.zfill(3)) 004 >>> print('-4'.zfill(3)) -04 To pad numbers: >>> n = 4 >>> print(f'{n:03}') # Preferred method, python >= 3.6 004 >>> print('%03d' % n) 004 >>> print(format(n, '03')) # python >= 2.6 004 >>> print('{0:03d}'.format(n)) # python >= 2.6 + python 3 004 >>> print('{foo:03d}'.forma... | <p>To pad strings:</p>
<pre><code>>>> print('4'.zfill(3))
004
>>> print('-4'.zfill(3))
-04
</code></pre>
<p>To pad numbers:</p>
<pre><code>>>> n = 4
>>> print(f'{n:03}') # Preferred method, python >= 3.6
004
>>> print('%03d' % n)
004
>>> print(format(n, '03')) # ... | null | null |
455366 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/455366 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 455,338 | null | 3,511 | null | null | null | null | null | 2009-01-18T16:03:00 | 2018-01-24T17:36:03 | ForYourOwnGood | null | CC BY-SA 3.0 | null | 48,728 | 40,902 | null | null | null | null | null | null | null | null | null | null | null | null | null | 455,366 | true | Try the JavaScript in operator . if ('key' in myObj) And the inverse. if (!('key' in myObj)) Be careful! The in operator matches all object keys, including those in the object's prototype chain. Use myObj.hasOwnProperty('key') to check an object's own keys and will only return true if key is available on myObj directly... | <p>Try the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in" rel="noreferrer">JavaScript <strong>in</strong> operator</a>.</p>
<pre><code>if ('key' in myObj)
</code></pre>
<p>And the inverse.</p>
<pre><code>if (!('key' in myObj))
</code></pre>
<p><strong>Be careful!</strong> T... | null | null |
48270314 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/48270314 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 48,270,127 | null | 3,507 | null | null | null | null | null | 2018-01-15T20:35:15 | 2025-11-05T09:11:52 | user400654 | null | CC BY-SA 4.0 | null | 400,654 | 95,085 | null | null | null | null | null | null | null | null | null | null | null | null | null | 48,270,314 | true | If you take advantage of how == works , you could simply create an object with a custom toString (or valueOf ) function that changes what it returns each time it is used such that it satisfies all three conditions. const a = { i: 1, toString: function () { return a.i++; } } if(a == 1 && a == 2 && a == 3) { console.log(... | <p>If you take advantage of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using" rel="nofollow noreferrer">how <code>==</code> works</a>, you could simply create an object with a custom <code>toString</code> (or <code>valueOf</code>) function that chan... | null | null |
18947390 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/18947390 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 17,271,319 | null | 3,499 | null | null | null | null | null | 2013-09-22T18:33:41 | 2023-09-15T05:07:21 | Scott Tesler | null | CC BY-SA 4.0 | null | 1,399,309 | 39,927 | null | null | null | null | null | null | null | null | null | null | null | null | null | 18,947,390 | false | On Linux or MacOS: python -m ensurepip --upgrade If you want to install pip for Python 3, replace python with python3 . See https://pip.pypa.io/en/stable/installation/ for more details. | <p>On Linux or MacOS:</p>
<pre><code>python -m ensurepip --upgrade
</code></pre>
<p>If you want to install <code>pip</code> for Python 3, replace <code>python</code> with <code>python3</code>.</p>
<p>See <a href="https://pip.pypa.io/en/stable/installation/" rel="noreferrer">https://pip.pypa.io/en/stable/installation/</... | null | null |
38139500 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/38139500 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 38,138,100 | null | 3,488 | null | null | null | null | null | 2016-07-01T07:27:11 | 2020-10-29T15:03:09 | akardon | null | CC BY-SA 4.0 | null | 3,795,379 | 46,566 | null | null | null | null | null | null | null | null | null | null | null | null | null | 38,139,500 | true | TL;DR Transient objects are always different; a new instance is provided to every controller and every service. Scoped objects are the same within a request, but different across different requests. Singleton objects are the same for every object and every request. For more clarification, this example from .NET documen... | <p><strong>TL;DR</strong></p>
<blockquote>
<p>Transient objects are always different; a new instance is provided to
every controller and every service.</p>
<p>Scoped objects are the same within a request, but different across
different requests.</p>
<p>Singleton objects are the same for every object and every request.<... | null | null |
13864829 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/13864829 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 3,601,515 | null | 3,477 | null | null | null | null | null | 2012-12-13T17:04:53 | 2021-12-06T18:12:01 | Lionel | null | CC BY-SA 4.0 | null | 1,633,643 | 35,390 | null | null | null | null | null | null | null | null | null | null | null | null | null | 13,864,829 | true | (Usually) The right way if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi where ${var+x} is a parameter expansion which evaluates to nothing if var is unset, and substitutes the string x otherwise. Quotes Digression Quotes can be omitted (so we can say ${var+x} instead of "${var+x}" ) b... | <h2>(Usually) The right way</h2>
<pre><code>if [ -z ${var+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
</code></pre>
<p>where <code>${var+x}</code> is a <a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02" rel="noreferrer">parameter ... | null | null |
6700 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/6700 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 5,223 | null | 3,474 | null | null | null | null | null | 2008-08-09T08:31:04 | 2021-11-25T12:13:16 | James Coglan | null | CC BY-SA 4.0 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null | 6,700 | true | Updated answer Here's an update as of 2016 and widespread deployment of ES5 and beyond. For IE9+ and all other modern ES5+ capable browsers, you can use Object.keys() so the above code just becomes: var size = Object.keys(myObj).length; This doesn't have to modify any existing prototype since Object.keys() is now built... | <h2>Updated answer</h2>
<p><strong>Here's an update as of 2016 and <a href="http://kangax.github.io/compat-table/es5/" rel="noreferrer">widespread deployment of ES5</a> and beyond.</strong> For IE9+ and all other modern ES5+ capable browsers, you can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript... | null | null |
10986132 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/10986132 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 10,972,176 | null | 3,474 | null | null | null | null | null | 2012-06-11T19:13:26 | 2022-08-11T19:20:53 | TheHippo | null | CC BY-SA 4.0 | null | 45,786 | 63,389 | null | null | null | null | null | null | null | null | null | null | null | null | null | 10,986,132 | false | Use npm list for local packages or npm list -g for globally installed packages. You can find the version of a specific package by passing its name as an argument. For example, npm list grunt will result in: projectName@projectVersion /path/to/project/folder └── grunt@0.4.1 Alternatively, you can just run npm list witho... | <p>Use <code>npm list</code> for local packages or <code>npm list -g</code> for globally installed packages.</p>
<p>You can find the version of a specific package by passing its name as an argument. For example, <code>npm list grunt</code> will result in:</p>
<pre class="lang-none prettyprint-override"><code>projectNam... | null | null |
4929629 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/4929629 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,531,093 | null | 3,473 | null | null | null | null | null | 2011-02-08T04:42:59 | 2019-03-14T22:47:23 | Samuel Meddows | null | CC BY-SA 4.0 | null | 525,895 | 36,872 | null | null | null | null | null | null | null | null | null | null | null | null | null | 4,929,629 | true | Use new Date() to generate a new Date object containing the current date and time. var today = new Date(); var dd = String(today.getDate()).padStart(2, '0'); var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = mm + '/' + dd + '/' + yyyy; document.write(today);... | <p>Use <code>new Date()</code> to generate a new <code>Date</code> object containing the current date and time.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var today = ... | null | null |
20236515 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/20236515 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 17,982,111 | null | 3,473 | null | null | null | null | null | 2013-11-27T07:40:28 | 2019-10-18T10:27:40 | sam | null | CC BY-SA 4.0 | null | 822,138 | 40,768 | null | null | null | null | null | null | null | null | null | null | null | null | null | 20,236,515 | true | Interpolate : body height: calc(100% - #{$body_padding}) For this case, border-box would also suffice: body box-sizing: border-box height: 100% padding-top: $body_padding | <p><a href="https://sass-lang.com/documentation/interpolation" rel="noreferrer">Interpolate</a>:</p>
<pre><code>body
height: calc(100% - #{$body_padding})
</code></pre>
<p>For this case, <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing#Values" rel="noreferrer">border-box</a> would also suffice... | null | null |
73357 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/73357 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 73,319 | null | 3,472 | null | null | null | null | null | 2008-09-16T15:06:46 | 2025-04-02T19:30:03 | Mark Biek | null | CC BY-SA 4.0 | null | 305 | 152,309 | null | null | null | null | null | null | null | null | null | null | null | null | null | 73,357 | true | First: yy or Y to copy the line (mnemonic: y ank ) or dd to d elete the line (Vim copies what you deleted into a clipboard-like "register", like a cut operation) then: p to p aste the copied or deleted text after the current line or Shift + P to p aste the copied or deleted text before the current line | <p>First:</p>
<p><kbd>yy</kbd> or <kbd>Y</kbd> to copy the line (mnemonic: <em><strong>y</strong>ank</em>)
<br />or
<br /><kbd>dd</kbd> to <em><strong>d</strong>elete</em> the line (Vim copies what you deleted into a clipboard-like "register", like a <em>cut</em> operation)</p>
<p>then:</p>
<p><kbd>p</kbd> to... | null | null |
1066603 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1066603 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,066,589 | null | 3,458 | null | null | null | null | null | 2009-06-30T23:27:25 | 2018-04-20T16:56:35 | karim79 | null | CC BY-SA 3.0 | null | 70,393 | 343,126 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,066,603 | true | Iterate through the entrySet() like so: public static void printMap(Map mp) { Iterator it = mp.entrySet().iterator(); while (it.hasNext()) { Map.Entry pair = (Map.Entry)it.next(); System.out.println(pair.getKey() + " = " + pair.getValue()); it.remove(); // avoids a ConcurrentModificationException } } Read more about Ma... | <p>Iterate through the <a href="http://www.java2s.com/Code/JavaAPI/java.util/HashtableentrySet.htm" rel="noreferrer"><code>entrySet()</code></a> like so:</p>
<pre><code>public static void printMap(Map mp) {
Iterator it = mp.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.ne... | null | null |
163659 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/163659 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 161,813 | null | 3,457 | null | null | null | null | null | 2008-10-02T17:50:25 | 2022-10-13T17:59:50 | Peter Burns | null | CC BY-SA 4.0 | null | 101 | 45,621 | null | null | null | null | null | null | null | null | null | null | null | null | null | 163,659 | true | Try: git mergetool It opens a GUI that steps you through each conflict, and you get to choose how to merge. Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It is much better than doing the whole thing by hand certainly. As per Josh Glover's comment : [This command] doesn't nec... | <p>Try:</p>
<pre class="lang-bash prettyprint-override"><code>git mergetool
</code></pre>
<p>It opens a GUI that steps you through each conflict, and you get to choose how to merge. Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It is much better than doing the whole thing ... | null | null |
7228322 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/7228322 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 4,959,975 | null | 3,446 | null | null | null | null | null | 2011-08-29T09:25:57 | 2024-04-19T14:25:04 | Francisc | null | CC BY-SA 4.0 | null | 383,148 | 81,023 | null | null | null | null | null | null | null | null | null | null | null | null | null | 7,228,322 | false | function randomIntFromInterval(min, max) { // min and max included return Math.floor(Math.random() * (max - min + 1) + min); } const rndInt = randomIntFromInterval(1, 6); console.log(rndInt); What it does "extra" is it allows random intervals that do not start with 1. So you can get a random number from 10 to 15 for ex... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min);
}
... | null | null |
100146 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/100146 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 100,003 | null | 3,445 | null | null | null | null | null | 2008-09-19T07:01:58 | 2019-03-04T21:34:19 | Thomas Wouters | null | CC BY-SA 4.0 | null | 17,624 | 134,455 | null | null | null | null | null | null | null | null | null | null | null | null | null | 100,146 | true | A metaclass is the class of a class. A class defines how an instance of the class (i.e. an object) behaves while a metaclass defines how a class behaves. A class is an instance of a metaclass. While in Python you can use arbitrary callables for metaclasses (like Jerub shows), the better approach is to make it an actual... | <p>A metaclass is the class of a class. A class defines how an instance of the class (i.e. an object) behaves while a metaclass defines how a class behaves. A class is an instance of a metaclass.</p>
<p>While in Python you can use arbitrary callables for metaclasses (like <a href="https://stackoverflow.com/questions/1... | null | null |
50834600 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/50834600 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 45,940,861 | null | 3,442 | null | null | null | null | null | 2018-06-13T10:11:09 | 2022-06-10T07:36:46 | Hrishikesh Kadam | null | CC BY-SA 4.0 | null | 3,302,026 | 37,642 | null | null | null | null | null | null | null | null | null | null | null | null | null | 50,834,600 | true | According to Network security configuration - Starting with Android 9 (API level 28), cleartext support is disabled by default. Also have a look at Android M and the war on cleartext traffic Codelabs explanation from Google Option 1 - First try hitting the URL with https:// instead of http:// Option 2 - Create file res... | <p>According to <a href="https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted" rel="noreferrer">Network security configuration</a> -</p>
<blockquote>
<p>Starting with Android 9 (API level 28), cleartext support is disabled
by default.</p>
</blockquote>
<p>Also have a look at <a href... | null | null |
432155 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/432155 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 432,037 | null | 3,441 | null | null | null | null | null | 2009-01-11T01:53:17 | 2021-12-10T09:10:59 | Bill | null | CC BY-SA 4.0 | null | 51,321 | 34,842 | null | null | null | null | null | null | null | null | null | null | null | null | null | 432,155 | true | I'm assuming you're using XML layout. <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="@string/**yourtextstring**" /> You can also use gravity center_vertical or center_horizontal according to your need. As @stealthcopter commented, in java: .setG... | <p>I'm assuming you're using XML layout.</p>
<pre><code><TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/**yourtextstring**"
/>
</code></pre>
<p>You can also use gravity <co... | null | null |
285184 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/285184 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 285,177 | null | 3,438 | null | null | null | null | null | 2008-11-12T20:12:14 | 2016-06-08T23:02:20 | Jon Skeet | null | CC BY-SA 3.0 | null | 22,656 | 1,528,952 | null | null | null | null | null | null | null | null | null | null | null | null | null | 285,184 | true | Yes, it is possible: public class Foo { private int x; public Foo() { this(1); } public Foo(int x) { this.x = x; } } To chain to a particular superclass constructor instead of one in the same class, use super instead of this . Note that you can only chain to one constructor , and it has to be the first statement in you... | <p>Yes, it is possible:</p>
<pre><code>public class Foo {
private int x;
public Foo() {
this(1);
}
public Foo(int x) {
this.x = x;
}
}
</code></pre>
<p>To chain to a particular superclass constructor instead of one in the same class, use <code>super</code> instead of <code>this</... | null | null |
493399 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/493399 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 493,386 | null | 3,434 | null | null | null | null | null | 2009-01-29T21:01:43 | 2020-01-01T21:42:50 | codelogic | null | CC BY-SA 4.0 | null | 43,427 | 74,280 | null | null | null | null | null | null | null | null | null | null | null | null | null | 493,399 | true | In Python 3, you can use the sep= and end= parameters of the print function: To not add a newline to the end of the string: print('.', end='') To not add a space between all the function arguments you want to print: print('a', 'b', 'c', sep='') You can pass any string to either parameter, and you can use both parameter... | <p>In Python 3, you can use the <code>sep=</code> and <code>end=</code> parameters of the <a href="https://docs.python.org/library/functions.html#print" rel="noreferrer"><code>print</code></a> function:</p>
<p>To not add a newline to the end of the string:</p>
<pre><code>print('.', end='')
</code></pre>
<p>To not ad... | null | null |
1128728 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1128728 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,128,723 | null | 3,431 | null | null | null | null | null | 2009-07-15T00:04:49 | 2018-10-08T12:35:00 | camickr | null | CC BY-SA 4.0 | null | 131,872 | 324,801 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,128,728 | true | Arrays.asList(yourArray).contains(yourValue) Warning: this doesn't work for arrays of primitives (see the comments). Since java-8 you can now use Streams. String[] values = {"AB","BC","CD","AE"}; boolean contains = Arrays.stream(values).anyMatch("s"::equals); To check whether an array of int , double or long contains a... | <pre><code>Arrays.asList(yourArray).contains(yourValue)
</code></pre>
<p>Warning: this doesn't work for arrays of primitives (see the comments).</p>
<hr>
<h2>Since <a href="/questions/tagged/java-8" class="post-tag" title="show questions tagged 'java-8'" rel="tag">java-8</a> you can now use Streams.</h2>
<p... | null | null |
2307314 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/2307314 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 2,307,283 | null | 3,429 | null | null | null | null | null | 2010-02-21T20:14:59 | 2020-01-01T13:03:46 | John Feminella | null | CC BY-SA 4.0 | null | 75,170 | 313,968 | null | null | null | null | null | null | null | null | null | null | null | null | null | 2,307,314 | true | I cannot understand how to identify a function with a log time. The most common attributes of logarithmic running-time function are that: the choice of the next element on which to perform some action is one of several possibilities, and only one will need to be chosen. or the elements on which the action is performed ... | <blockquote>
<p>I cannot understand how to identify a function with a log time.</p>
</blockquote>
<p>The most common attributes of logarithmic running-time function are that:</p>
<ul>
<li>the choice of the next element on which to perform some action is one of several possibilities, and</li>
<li>only one will need ... | null | null |
982704 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/982704 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 982,677 | null | 3,428 | null | null | null | null | null | 2009-06-11T18:08:24 | 2020-10-19T04:59:51 | Bob | null | CC BY-SA 4.0 | null | 45 | 100,411 | null | null | null | null | null | null | null | null | null | null | null | null | null | 982,704 | true | CTRL + M + O will collapse all. CTRL + M + L will expand all. (in VS 2013 - Toggle All outlining) CTRL + M + P will expand all and disable outlining. CTRL + M + M will collapse/expand the current section. CTRL + M + A will collapse all even in Html files. These controls are also in the context menu under Outlining. Rig... | <p><kbd>CTRL</kbd> + <kbd>M</kbd> + <kbd>O</kbd> will collapse all.</p>
<p><kbd>CTRL</kbd> + <kbd>M</kbd> + <kbd>L</kbd> will expand all. (in VS 2013 - Toggle All outlining)</p>
<p><kbd>CTRL</kbd> + <kbd>M</kbd> + <kbd>P</kbd> will expand all and disable outlining.</p>
<p><kbd>CTRL</kbd> + <kbd>M</kbd> + <kbd>M</kbd> w... | null | null |
11512211 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/11512211 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 3,740,152 | null | 3,420 | null | null | null | null | null | 2012-07-16T20:42:23 | 2021-08-11T14:31:53 | WombleGoneBad | null | CC BY-SA 4.0 | null | 1,530,024 | 34,264 | null | null | null | null | null | null | null | null | null | null | null | null | null | 11,512,211 | true | The other answers are correct, in that chmod -R 755 will set these permissions to all files and subfolders in the tree. But why on earth would you want to ? It might make sense for the directories, but why set the execute bit on all the files? I suspect what you really want to do is set the directories to 755 and eithe... | <p>The other answers are correct, in that <code>chmod -R 755</code> will set these permissions to all files and subfolders in the tree. <strong>But why on earth would you want to</strong>? It might make sense for the directories, but why set the execute bit on all the files?</p>
<p>I suspect what you really want to do ... | null | null |
3481842 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/3481842 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 3,481,828 | null | 3,416 | null | null | null | null | null | 2010-08-14T03:05:34 | 2022-07-24T23:45:38 | BalusC | null | CC BY-SA 4.0 | null | 157,882 | 1,115,937 | null | null | null | null | null | null | null | null | null | null | null | null | null | 3,481,842 | true | Use the appropriately named method String#split() . String string = "004-034556"; String[] parts = string.split("-"); String part1 = parts[0]; // 004 String part2 = parts[1]; // 034556 Note that split 's argument is assumed to be a regular expression , so remember to escape special characters if necessary. there are 12... | <p>Use the appropriately named method <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#split(java.lang.String)" rel="noreferrer"><code>String#split()</code></a>.</p>
<pre><code>String string = "004-034556";
String[] parts = string.split("-");
String part1 =... | null | null |
493018 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/493018 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 492,994 | null | 3,415 | null | null | null | null | null | 2009-01-29T19:20:10 | 2022-12-30T13:21:38 | moonshadow | null | CC BY-SA 4.0 | null | 11,834 | 89,791 | null | null | null | null | null | null | null | null | null | null | null | null | null | 493,018 | true | The Date object will do what you want - construct one for each date, then compare them using the > , < , <= or >= . The == , != , === , and !== operators require you to use date.getTime() as in var d1 = new Date(); var d2 = new Date(d1); var same = d1.getTime() === d2.getTime(); var notSame = d1.getTime() !== d2.getTim... | <p>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" rel="noreferrer">Date object</a> will do what you want - construct one for each date, then compare them using the <code>></code>, <code><</code>, <code><=</code> or <code>>=</code>.</p>
<p>The <code>==</co... | null | null |
30173220 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/30173220 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 30,172,605 | null | 3,414 | null | null | null | null | null | 2015-05-11T16:44:52 | 2025-12-22T17:11:41 | larsks | null | CC BY-SA 4.0 | null | 147,356 | 319,823 | null | null | null | null | null | null | null | null | null | null | null | null | null | 30,173,220 | true | docker attach will let you connect to your Docker container, but this isn't really the same thing as ssh . If your container is running a webserver, for example, docker attach will probably connect you to the stdout of the web server process. It won't necessarily give you a shell. The docker exec command is probably wh... | <p><code>docker attach</code> will let you connect to your Docker container, but this isn't really the same thing as <code>ssh</code>. If your container is running a webserver, for example, <code>docker attach</code> will probably connect you to the <em>stdout</em> of the web server process. It won't necessarily give... | null | null |
4421674 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/4421674 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 4,421,633 | null | 3,410 | null | null | null | null | null | 2010-12-12T12:39:44 | 2023-12-15T00:13:36 | pts | null | CC BY-SA 4.0 | null | 97,248 | 89,051 | null | null | null | null | null | null | null | null | null | null | null | null | null | 4,421,674 | true | On macOS Big Sur and later, use this command: sudo lsof -i -P | grep LISTEN | grep :$PORT or to just see just IPv4: sudo lsof -nP -i4TCP:$PORT | grep LISTEN On older versions, use one of the following forms: sudo lsof -nP -iTCP:$PORT | grep LISTEN sudo lsof -nP -i:$PORT | grep LISTEN Substitute $PORT with the port numb... | <p>On macOS <code>Big Sur</code> and later, use this command:</p>
<pre><code>sudo lsof -i -P | grep LISTEN | grep :$PORT
</code></pre>
<p>or to just see just IPv4:</p>
<pre><code>sudo lsof -nP -i4TCP:$PORT | grep LISTEN
</code></pre>
<p>On older versions, use one of the following forms:</p>
<pre><code>sudo lsof -nP -iT... | null | null |
6482403 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/6482403 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 6,482,377 | null | 3,406 | null | null | null | null | null | 2011-06-26T05:55:41 | 2021-01-28T08:38:46 | phoxis | null | CC BY-SA 4.0 | null | 702,361 | 62,661 | null | null | null | null | null | null | null | null | null | null | null | null | null | 6,482,403 | true | It is: if [ $# -eq 0 ] then echo "No arguments supplied" fi The $# variable will tell you the number of input arguments the script was passed. Or you can check if an argument is an empty string or not like: if [ -z "$1" ] then echo "No argument supplied" fi The -z switch will test if the expansion of "$1" is a null str... | <p>It is:</p>
<pre class="lang-bash prettyprint-override"><code>if [ $# -eq 0 ]
then
echo "No arguments supplied"
fi
</code></pre>
<p>The <code>$#</code> variable will tell you the number of input arguments the script was passed.</p>
<p>Or you can check if an argument is an empty string or not like:</p>... | null | null |
15772171 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/15772171 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 15,772,134 | null | 3,397 | null | null | null | null | null | 2013-04-02T18:58:39 | 2021-11-15T09:27:19 | Gareth | null | CC BY-SA 4.0 | null | 31,582 | 139,706 | null | null | null | null | null | null | null | null | null | null | null | null | null | 15,772,171 | true | It's as simple as this: git reset HEAD^ Note: some shells treat ^ as a special character (for example some Windows shells or ZSH with globbing enabled ), so you may have to quote "HEAD^" or use HEAD~1 in those cases. git reset without a --hard or --soft moves your HEAD to point to the specified commit, without changing... | <p>It's as simple as this:</p>
<pre><code>git reset HEAD^
</code></pre>
<p>Note: some shells treat <code>^</code> as a special character (for example some Windows shells or <a href="http://bewatermyfriend.org/p/2016/002/" rel="noreferrer">ZSH with globbing enabled</a>), so you may have to quote <code>"HEAD^"<... | null | null |
18706913 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/18706913 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 3,855,127 | null | 3,387 | null | null | null | null | null | 2013-09-09T20:58:29 | 2022-02-23T13:33:52 | Filip Spiridonov | null | CC BY-SA 4.0 | null | 422,476 | 36,440 | null | null | null | null | null | null | null | null | null | null | null | null | null | 18,706,913 | false | Find: sudo lsof -i :3000 Kill: kill -9 <PID> PLEASE NOTE: -9 kills the process immediately, and gives it no chance of cleaning up after itself. This may cause problems. Consider using -15 (TERM) or -3 (QUIT) for a softer termination which allows the process to clean up after itself. | <p>Find:</p>
<pre><code>sudo lsof -i :3000
</code></pre>
<p>Kill:</p>
<pre><code>kill -9 <PID>
</code></pre>
<p><strong>PLEASE NOTE:</strong> <code>-9</code> kills the process immediately, and gives it no chance of cleaning up after itself. This may cause problems. Consider using <code>-15</code> (TERM) or <code>... | null | null |
4459419 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/4459419 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 4,459,379 | null | 3,374 | null | null | null | null | null | 2010-12-16T09:55:11 | 2021-08-04T00:42:33 | Ivan Baev | null | CC BY-SA 4.0 | null | 344,437 | 33,981 | null | null | null | null | null | null | null | null | null | null | null | null | null | 4,459,419 | true | imgInp.onchange = evt => { const [file] = imgInp.files if (file) { blah.src = URL.createObjectURL(file) } } <form runat="server"> <input accept="image/*" type='file' id="imgInp" /> <img id="blah" src="#" alt="your image" /> </form> | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>imgInp.onchange = evt => {
const [file] = imgInp.files
if (file) {
blah.src = URL.createObjectURL(file)
}
}</code></p... | null | null |
8028987 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/8028987 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 8,028,957 | null | 3,358 | null | null | null | null | null | 2011-11-06T17:45:35 | 2023-07-16T19:29:37 | mario | null | CC BY-SA 4.0 | null | 345,031 | 145,831 | null | null | null | null | null | null | null | null | null | null | null | null | null | 8,028,987 | true | No output before sending headers! Functions that send/modify HTTP headers must be invoked before any output is made . summary ⇊ Otherwise the call fails: Warning: Cannot modify header information - headers already sent (output started at script:line ) Some functions modifying the HTTP header are: header / header_remove... | <h2>No output before sending headers!</h2>
<p>Functions that send/modify HTTP headers must be invoked <em><strong>before any output is made</strong></em>.
<kbd><a href="https://stackoverflow.com/a/8028979/345031"><strong>summary ⇊</strong></a></kbd>
Otherwise the call fails:</p>
<blockquote>
<p>Warning: Cannot modify h... | null | null |
8865463 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/8865463 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 8,865,458 | null | 3,357 | null | null | null | null | null | 2012-01-14T21:26:33 | 2019-12-28T15:08:29 | Michiel van Oosterhout | null | CC BY-SA 4.0 | null | 4,830 | 23,200 | null | null | null | null | null | null | null | null | null | null | null | null | null | 8,865,463 | true | You can try this basic approach: div { height: 100px; line-height: 100px; text-align: center; border: 2px dashed #f69c55; } <div> Hello World! </div> It only works for a single line of text though, because we set the line's height to the same height as the containing box element. A more versatile approach This is anoth... | <p>You can try this basic approach:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>div {
height: 100px;
line-height: 100px;
text-align: center;
border: 2px da... | null | null |
12309296 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/12309296 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 12,309,269 | null | 3,355 | null | null | null | null | null | 2012-09-06T22:23:14 | 2022-03-30T05:55:31 | phihag | null | CC BY-SA 4.0 | null | 35,070 | 290,055 | null | null | null | null | null | null | null | null | null | null | null | null | null | 12,309,296 | true | data is a Python dictionary. It needs to be encoded as JSON before writing. Use this for maximum compatibility (Python 2 and 3): import json with open('data.json', 'w') as f: json.dump(data, f) On a modern system (i.e. Python 3 and UTF-8 support), you can write a nicer file using: import json with open('data.json', 'w'... | <p><code>data</code> is a Python dictionary. It needs to be encoded as JSON before writing.</p>
<p>Use this for maximum compatibility (Python 2 and 3):</p>
<pre><code>import json
with open('data.json', 'w') as f:
json.dump(data, f)
</code></pre>
<p>On a modern system (i.e. Python 3 and UTF-8 support), you can write... | null | null |
1358573 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/1358573 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,358,540 | null | 3,349 | null | null | null | null | null | 2009-08-31T17:50:12 | 2021-05-27T09:50:00 | Peter Elespuru | null | CC BY-SA 4.0 | null | 76,794 | 33,845 | null | null | null | null | null | null | null | null | null | null | null | null | null | 1,358,573 | true | Try: find . -name '*.php' | xargs wc -l or (when file names include special characters such as spaces) find . -name '*.php' | sed 's/.*/"&"/' | xargs wc -l The SLOCCount tool may help as well. It will give an accurate source lines of code count for whatever hierarchy you point it at, as well as some additional stats. S... | <p><strong>Try:</strong></p>
<pre><code>find . -name '*.php' | xargs wc -l
</code></pre>
<p>or (when file names include special characters such as spaces)</p>
<pre><code>find . -name '*.php' | sed 's/.*/"&"/' | xargs wc -l
</code></pre>
<p><strong><a href="https://dwheeler.com/sloccount/" rel="noreferrer... | null | null |
36908 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/36908 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 36,901 | null | 3,348 | null | null | null | null | null | 2008-08-31T15:17:31 | 2023-07-31T17:47:37 | Peter Hoffmann | null | CC BY-SA 4.0 | null | 720 | 59,262 | null | null | null | null | null | null | null | null | null | null | null | null | null | 36,908 | true | The *args and **kwargs are common idioms to allow an arbitrary number of arguments to functions, as described in the section more on defining functions in the Python tutorial. The *args will give you all positional arguments as a tuple : def foo(*args): for a in args: print(a) foo(1) # 1 foo(1, 2, 3) # 1 # 2 # 3 The **... | <p>The <code>*args</code> and <code>**kwargs</code> are common idioms to allow an arbitrary number of arguments to functions, as described in the section <a href="http://docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions" rel="noreferrer">more on defining functions</a> in the Python tutorial.</p>
<p... | null | null |
16837667 | answer | stackoverflow | 2026-08-03T01:57:01 | null | null | null | null | null | https://stackoverflow.com/a/16837667 | A1Q9YxoFqTXv4WSip | M7iV6KKgtaqQHKvE8 | 1,575,141 | null | 3,343 | null | null | null | null | null | 2013-05-30T13:33:35 | 2023-01-17T19:06:47 | James Donnelly | null | CC BY-SA 4.0 | null | 1,317,805 | 129,214 | null | null | null | null | null | null | null | null | null | null | null | null | null | 16,837,667 | false | There are a couple of CSS 3 measurement units called: Viewport-Percentage (or Viewport-Relative) Lengths What are Viewport-Percentage Lengths? From the linked W3 Candidate Recommendation above: The viewport-percentage lengths are relative to the size of the initial containing block. When the height or width of the init... | <p>There are a couple of CSS 3 measurement units called:</p>
<h3><a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" rel="noreferrer">Viewport-Percentage <em>(or Viewport-Relative)</em> Lengths</a></h3>
<h4>What are Viewport-Percentage Lengths?</h4>
<p>From the linked W3 Candidate Recommendation above... | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.