Similar Posts
Cannot start VM with error “no network with matching name ‘default'”
I update libvirt version and want to start VM with the new libvirt tools but I failed as follows. > sudo virsh start kvm1 error: Failed to start domain kvm1 error: Network not found: no network with matching name ‘default’ It seems that the default ‘virbr0’ is missing after I update libvirt so I solve…
Is cin much slower than scanf in C++?
I frequently hear that cin is significantly slower than scanf in C++. Is this true? And how to improve the efficiency of cin? It is really nice to use most of time. One discussion about that cin is very slow is here: http://apps.topcoder.com/forums/?module=Thread&threadID=508058&start=0&mc=7 In short: cin is not always slower (can be faster actually, see…
Win32 Programming: Operation on Files
Here, we show some example code on Win32. The code are operations on file on Win32 OSes. The code here uses some MFC classes. Recursively show the files from a path: void Show(const char *folderPath) { CFileFind finder; CString path(folderPath); path += “*.*”; BOOL bWorking = finder.FindFile(path); while (bWorking) { bWorking = finder.FindNextFile(); cout <<…
git: how to merge upstream with fork repo
How to merge upstream into local fork repo with git? Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/ Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/ Read more: Git: setting a local branch’s upstream tracking branch How to install the MATE fork of Gnome 2 on Fedora 17? How to merge a commit from another…
How to sort lines by length in Linux?
I have a text file with many lines of text. In Linux, how to sort the lines by their length? You can make use of awk together with the sort program like awk ‘{ print length(), $0 | “sort -n” }’ /path/to/text/file Here, we use awk to calculate the text length and sort -n to…
How to jailbreak iOS 7.1.2?
How to jailbreak iOS 7.1.2 on a iPhone 4s? The Pangu Jailbreak Tool ( http://en.pangu.io/ ) works like a charm for my iPhone 4S with iOS 7.1.2. Remember to back up your data before jailbreaking your iPhone. Read more: How to un-trust a computer that I have trusted with iOS 7 device? How to make…