red. Because the number of bytes returned by the first query exceeds max_length_for_sort_data, the sorting adopts regular sorting. in this case, MYSQL sorts rowid and converts random IO to sequential IO, therefore, the return value is 5 before and 6 after, while the second query uses optimized sorting, without the second data retrieval process, keeping the relative position of the record after sorting. If you want to optimize the sorting of the first statement, set max_length_for_sort_data to a
return or R
executes the code until it returns from the current function
exit or Q
abort and exit
next or n
execute next line
pp
Print variable value
help
help
Here's a concrete example of how to debug with the PDB.Listing 1. Test code exampleImport pdb a = "AAA" Pdb.set_trace () b = "BBB" c = "CCC" final = a + B + C print
and last lines in the fileSed-e '$! {H; d;} '-e x # enter a blank line when there is only one row in the file.Sed-e '1 {$ q;} '-e' $! {H; d;} '-e x # This row is displayed when there is only one row in the file.Sed-e '1 {$ d;} '-e' $! {H; d;} '-e x # when there is only one row in the file, no output# Only display rows matching Regular Expressions (simulate "grep ")Sed-n'/regexp/P' # method 1Sed '/regexp /! D' # method 2# Show only the rows that do not match the regular expression (simulate "gre
Class loading order for JavaFirst, load order1. Initialization of the static member variable of the parent class1.1. Static code block1.2, ordinary code block1.3, no parameter constructor2. Static code block for parent class3. Initialization of a static member variable of a subclass 3.1. Static code block 3.2, ordinary code block3.3, no parameter constructor4. Static code blocks for subclasses5. The normal member variable of the parent class is initialized5.1. Static code block5.2, ordinary co
Debugging with the PDB
The PDB is a Python-brought package that provides an interactive source code debugging feature for Python programs, including setting breakpoints, stepping through debugging, entering function debugging, viewing current code, viewing stack fragments, dynamically changing the values of variables, and so on. The PDB provides some common debugging commands, as detailed in table 1.Table 1. PDB Common commands
The following is a concrete example of how to use the PDB for de
current function
exit or Q
abort and exit
next or n
execute next line
pp
Print variable value
help
help
Here's a concrete example of how to debug with the PDB.Listing 1. Test code exampleImport pdb a = "AAA" Pdb.set_trace () b = "BBB" c = "CCC" final = a + B + C print finalStart debugging: Run the script directly, will stay at Pdb.set_trace (),
branch and switch it over
Git co-B # create a new new_branch Based on Branch
Git Co $ ID # checkout a historical commit record, but there is no branch information, switch to another branch will be automatically deleted
Git Co $ id-B # checkout a historical commit record and create a branch
Git Br-D # delete a branch
Git Br-D # force delete a branch (mandatory when unmerged branch is deleted)
Branch merge and rebase
Git merge # merge branch branches to the current Branch
Git merg
Git pull remote branch and merge to localgit fetch pull remote branch does not do merge ignore file. Gitignore Add file git Add. Commit all modifications git commit-am ' memo info ' push local branch to warehouse GIT push origin master:master Delete remote Branch git push origin:test from the remote code to the local repository Git pull Origin master:master create a new branch based on the branch git checkout-b dev2 master switch branch git checkout dev2 Delete Except local branch git branch-d d
be resolved first. After the conflict is resolved, the merge is completed.
Use git log -- graph to view the branch merge graph.
* Save the work site git stash. After saving, you can perform other work without affecting the last modification.
Recovery site: 1. The content in stash is not deleted when git stash apply is restored.
2. When git
distant libraryGit push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote librarygit clone https://github.com/tugenhua0707/testgit cloning from a remote repositorygit checkout–b dev Create dev branch and switch to Dev branchGit branch view all current branchesGit checkout master switches back to the master branchgit merge dev branches on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit
libraryGit push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote librarygit clone https://github.com/tugenhua0707/testgit cloning from a remote repositorygit checkout–b dev Create dev branch and switch to Dev branchGit branch view all current branchesGit checkout master switches back to the master branchgit merge dev branches on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit
)
Directory tree Browse for workspace, staging area, repository
Git ls-tree–l head (view current commit in repository) pointing to the directory tree
Git ls-files–s (view staging area) pointing to the directory tree
Submit command:
Git commit–m "Updage" (Commit staging area all modifications to repository)
Git commit–a (submit to Repository, including workspace content, this command is NOT recommended!!!) )
Save Work progress
Git sta
--NO-FF parameter, which means that Fast forwardis disabled:" Merge with No-ff the DevMerging branches, plus the--NO-FF parameter can be combined with the normal mode, the merged history has branches, can see that there has been a merger, and fast forward merge will not be seen to have been merged.First of all, the master branch should be very stable, that is, only to release the new version, usually do not work on it;So where do you work? Work on the Dev branch, that is, the dev branch is unsta
and switch to Dev branchGit branch view all current branchesGit checkout master switches back to the master branchgit merge dev branches on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit stash to hide the current job and resume work after resuming the site.Git stash list view all hidden file listsGit stash apply to reco
When working with Git pull code, colleagues often encounter conflicting situations, prompting the following information:Error:your local changes to ' C/ENVIRON.C ' would is overwritten by merge. Aborting.please, commit your changes or stash them before you can merge.This means that there is a conflict between the updated content and the locally modified content, either by committing your changes or by temporarily storing the local changes first.The p
)7) Push Branchgit push Origin master: (pushes content from the master branch locally to the remote Library origin)8) Git Pull: (from a remote crawl branch)12.git Checkout-b DevCreate Branch Dev, equivalent to the following two commands:git branch Devgit checkout dev13.git Checkout Master: (cut back to master branch)14.git Merge Dev: (merge branch dev to current branch)This must be successful if the current branch and Dev are not in conflict (if both the current branch and Dev commit changes to
In the first case, there is no conflict:1.git Add.//Go to the center of the project to package the local file meaning2.git Pull Origin dev//Download the server's code locally if it is up-to-date and will prompt already up-to-date3.git commit-m "Search Complete"4.git push origin dev//means push the code to the server if you can't ctr+c and then push it.In the second case, there is a conflict:1.git Add.//Go to the center of the project to package the local file meaning2.git Pull Origin dev//Downlo
Today in the project, accidentally deleted a few folders, and push up, do not know how to recover, later through the Git restore to the previous version, the previous version of the folder after the copy, and then jump to the latest version, the copied files to the latest version:The action to use
Git stash
git log
Git checkout
*git Checkout
Git stash Apply
Git
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.