Avoiding “resource is out of sync with the filesystem”

You can enable this in Window – Preferences – General – Workspace – Refresh Automatically (called Refresh using native hooks or polling in newer builds) The only reason I can think why this isn’t enabled by default is performance related. For example, refreshing source folders automatically might trigger a build of the workspace. Perhaps some people want … Read more

System.out.println function syntax in C++

As larsmans already pointed out, java has overloads on the operator +. So you can concat strings with integer. This is also possible in C++ but not out of the box for all types. You could use a templated functions like this. But I would recommend to take a look at boost::format. I guess this library … Read more

Difference between map and collect in Ruby?

There’s no difference, in fact map is implemented in C as rb_ary_collect and enum_collect (eg. there is a difference between map on an array and on any other enum, but no difference between map and collect). Why do both map and collect exist in Ruby? The map function has many naming conventions in different languages. Wikipedia provides an overview: The map function originated in functional programming languages but is today supported (or may be … Read more