How to change the default target of `make`?
The default target of make is the first target. But can I change the default target in Makefile and how to change the default target of make? The default goal of make is the first target whose name...
View ArticleHow to remove newline characters from a string in C++?
How to remove newline characters from a string in C++? For example, a string like line 1 line 3 line 4 should be converted to line 1line 3line 4 In short, use this code snippet:...
View ArticleHow to make Vim indent C++11 lambdas correctly?
Vim seems not indent C++11 lambas very well. How to make Vim indent C++11 lambdas correctly? For this following program, Vim indents it as #include <iostream> #include <string> #include...
View ArticleHow to operator[] access element in a const map in C++?
How to operator[] access element in a const map in C++? For example, the compiler will report error on this piece of code: #include <iostream> #include <string> #include <map>...
View ArticleHow to not use concrete types in lambda function parameters in C++11?
C++11 requires that lambda function parameters be declared with concrete types. This is sometimes annoying. auto is really nice, especially when the type is complex like...
View ArticleHandling Sparse Files on Linux
Sparse files are common in Linux/Unix and are also supported by Windows (e.g. NTFS) and macOSes (e.g. HFS+). Sparse files uses storage efficiently when the files have a lot of holes (contiguous ranges...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in C++?
In C++, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In C++, you may print the string and then 'n'...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in C++?
In C++, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In C++, you may print the string and then 'n'...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in OCaml?
In OCaml, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In OCaml, you may print a string with the end...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in OCaml?
In OCaml, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In OCaml, you may print a string with the end...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in OCaml?
In OCaml, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In OCaml, you may print a string with the end...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in OCaml?
In OCaml, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In OCaml, you may print a string with the end...
View ArticleHow to print a line to STDERR and STDOUT in Perl?
In Perl, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In Perl, to nicely print a new line to STDOUT,...
View ArticleHow to print a line to STDERR and STDOUT in OCaml?
In OCaml, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely? And similarly, how to print the line to STDERR? In OCaml, you may print a string with the end...
View Article