What is the difference between gcc/g++ and cc1/cc1plus?

What is the difference between the two, The g++ is a compiler driver. It knows how to invoke the actual compiler (cc1plus), assembler and linker. It does not know how to parse or compile the sources. and should I ever call cc1plus directly? No.

How should I cast in VB.NET?

Those are all slightly different, and generally have an acceptable usage. var.ToString() is going to give you the string representation of an object, regardless of what type it is. Use this if var is not a string already. CStr(var) is the VB string cast operator. I’m not a VB guy, so I would suggest avoiding it, but it’s not … Read more

putty – server unexpectedly closed network connection on windows

To create and save a new keep-alive connection, follow these steps: Open the PuTTY application, and go to the Options panel (labeled “Category”) on the left of the window. Select (click) the “Connection” item. In the ​​”Sending of null packets to keep the session active” area on the right, change the default value of “Seconds … Read more

Can’t install JDK 9 because “Another Java installation is in progress”

On Windows, Java prevents starting the Installer twice by creating (two) lock files. If those files exist, Java Installer show the Message: “Another Java installation is in progress (…)”. If Java Installer crashes, or Windows crashes during Java Installation, the installer cannot delete the lock files when finalizing. Solution: Deleting the lock files, unlocks the … Read more

How to use Comparator in Java to sort

There are a couple of awkward things with your example class: it’s called People while it has a price and info (more something for objects, not people); when naming a class as a plural of something, it suggests it is an abstraction of more than one thing. Anyway, here’s a demo of how to use a Comparator<T>: EDIT And an … Read more

python setup.py uninstall

Note: Avoid using python setup.py install use pip install . You need to remove all files manually, and also undo any other stuff that installation did manually. If you don’t know the list of all files, you can reinstall it with the –record option, and take a look at the list this produces. To record a list of installed files, … Read more

regular expression “.*[^a-zA-Z0-9_].*”

.*[^a-zA-Z0-9_].* will match the entire input as long as there is a non-alphanumeric/underscore somewhere in the input. [^a-zA-Z0-9_] will match only a single non-alphanumeric/underscore character (most likely the last one, if you’re using the default greedy matching) if it is somewhere in the input. Which one you want depends on the input and what you want to do … Read more

C++ Initializing a Global Array

If you actually want an array and not a vector, and you want that array dynamically sized at runtime, you would need to create it on the heap (storing it in a pointer), and free it when you’re done. Coming from Java you need to understand that there’s no garbage collection in C++ – anything … Read more