If you have installed Oracle Java 8 via default installers and you get the awkward message “not all requested modules can be enabled” in your Linux box when trying to create a new project in Netbeans you should configure netbeans to use the proper JDK.
To find the path of the installed JDKs you can type:
$ update-java-alternatives -l
A sample output would be:
java-7-oracle 1078 /usr/lib/jvm/java-7-oracle
java-8-oracle 1081 /usr/lib/jvm/java-8-oracle
What you have to do is locate the file netbeans.conf and set the netbeans_jdkhome variable to one of the paths displayed above.
The easiest way to find netbeans.conf is to run the following command:
find / -name netbeans.conf 2> /dev/null
This may take a while since it will search the whole disk.
You could also look at the following standard directories:
After you have found netbeans.conf, you perform the following steps:
- open netbeans.conf with any text editor you like
- set netbeans_jdkhome variable to point to the proper location, eg:
A usual headache to C++ beginners: What is the value of sizeof(int) in C/C++?
The answer is: there is no specific answer.
In theory, the C++ standard does not define explicitly the size of primitive data types but it does define their minimum size. You can read more about it at official C++ reference page
In practice though, there are 4 data models that are mostly used : LP32, ILP32, LLP64 and LP64. Both Windows and Linux 32 architectures use ILP32. Windows 64bit use LP64 and Linux 64bit use LLP 64.
If you compare the values, you will see that sizes of all floating point data types are the same regardless of architecture (float 4, double 8, long double 16) and all integer data types are the same apart from long (char 1, short 2, int 4, long long 8). Of course pointers depend on the architecture (32bit in x86 and 64 bit in AMD64)
Here is a handy table for you.
In this post I explained in summary what you have to do to run Doom 1 & 2 in your modern PC. Doom 3 is a totally different story.
The reason is that ID released two games named Doom 3 which are considered totaly different by hardcore gamers:
Continue reading Doom 3 in modern computers
- Doom3 (vanilla version). This version was released on 2004 and it is considered an old game. Doom3 vanilla version was designed as a thriller.
- Doom3 BFG, released on 2012. Doom 3 BFG was designed as a shoot em up.
How to play Doom 1 and Doom 2 to a modern pc?
You need three things:
Continue reading Doom 1 & 2 in modern computers
- The WADs
- The engine
- The add-ons (optional)
This is a selection of the operators i use frequently while taking notes. You can find a detailed table on wikipedia.
You can find ways to type the symbols here and a complete PDF for math operators here
| empty set
Here are some Copy-Q tabs to use:
- With set operators here
- With logic operators here
grep flags /proc/cpuinfo | grep " lm "
If you get any output, your cpu supports 64bit OS
Sometimes Remmina stops working for no apparent reason. If you are sure that everything else is setup properly (connection information, security settings at your server etc) then you can try to remove known hosts with the command:
One of the easiest way to render some points with gnuplot is:
- write to file (eg points.txt) the points you want to render in simple text format, one line per point (x,y pairs, no tabs no commas etc)
- create a script with the code shown below (eg graph.gnuplot)
- run the script with gnuplot (eg gnuplot graph.gnuplot)
- Open the png file with a program of your choice.
point file sample:
set terminal png
set size ratio -1
set output "./graph.png"
"points1.txt" notitle with points pointsize 0.5 linecolor rgb "green",\
"points2.txt" notitle with points pointsize 0.5 linecolor rgb "yellow",\
"points3.txt" notitle with points pointsize 0.5 linecolor rgb "black"
In some linux destributions, the default version of gnuplot does not always include PNG support.
Here it the easiest way to fix this:
- Download gnuplot from https://sourceforge.net/projects/gnuplot/
- Untar to a directory of your choice
- Open terminal at that directory
- Run the following commands:
- sudo apt-get install libgd2-dev
- make check
- sudo make install
You can find code examples for PNG terminal here:
You can read more gnuplot terminals here:
You can find a table with the most important keyboard shortcuts here