What is the css / html `root` element?

There is no element called root in HTML. The html element itself is “the root element” (which is the term given to the element which is the ancestor of all the other elements in the document), but this would be matched by html { }. However, see the :root pseudo-class (with a colon).

Netbeans or Eclipse for C++? [closed]

I haven’t used NetBeans, but Eclipse CDT (C Developer Tools, which includes C++), especially with the latest version, is really quite excellent: Syntax checking and spell checking Syntax highlighting that distinguishes between library calls and your function calls and between local and member variables and is even applied to code that’s #ifdef’ed out Macro expansion … Read more

How to correctly get image from ‘Resources’ folder in NetBeans

This was a pain, using netBeans IDE 7.2. You need to remember that Netbeans cleans up the Build folder whenever you rebuild, so Add a resource folder to the src folder: (project) src project package folder (contains .java files) resources (whatever name you want) images (optional subfolders) After the clean/build this structure is propogated into … Read more

build.xml in Java project

build.xml usually is an ant build script. It contains information necessary to build the project to produce the desired output, be it Javadocs, a compiled project, or a JAR file. I believe Eclipse has ant built-in, so it should be possible to execute the build.xml by choosing “Run As…” and “Ant Build”. The build.xml file, … Read more

Deployment error:Starting of Tomcat failed, the server port 8080 is already in use

goto command prompt netstat -aon for linux netstat -tulpn | grep ‘your_port_number’ it will show you something like TCP 192.1.200.48:2053 24.43.246.60:443 ESTABLISHED 248 TCP 192.1.200.48:2055 24.43.246.60:443 ESTABLISHED 248 TCP 192.1.200.48:2126 213.146.189.201:12350 ESTABLISHED 1308 TCP 192.1.200.48:3918 192.1.200.2:8073 ESTABLISHED 1504 TCP 192.1.200.48:3975 192.1.200.11:49892 TIME_WAIT 0 TCP 192.1.200.48:3976 192.1.200.11:49892 TIME_WAIT 0 TCP 192.1.200.48:4039 209.85.153.100:80 ESTABLISHED 248 TCP 192.1.200.48:8080 … Read more

How to refresh JPA entities when backend database changes asynchronously?

I recommend adding an @Startup @Singleton class that establishes a JDBC connection to the PostgreSQL database and uses LISTEN and NOTIFY to handle cache invalidation. Update: Here’s another interesting approach, using pgq and a collection of workers for invalidation. Invalidation signalling Add a trigger on the table that’s being updated that sends a NOTIFY whenever … Read more