How to disable PHP OPCache for certain directories

Deactivate OPCache per folderIn this article, I want to show you how to disable the OPCache based caching for certain directories. (If you need a short introduction to the subject of OPCache, you should scroll down to the blue box in this article.) Although OPCache is a good idea in almost all cases, there are, as with many thing, situations where you should make an exception. Especially when it comes to the development or if a bugfix is to be tested, it can make sense to disable OPCache.
However, since other projects that benefit from OPCache are often running on the same web server, a complete deactivation of OPCache for such test cases can not be an option. Therefore, this article is about how to disable OPCache on the directory level.
In […]

How to open the default mail client in Java

Open standard mail in JavaIn the following post there is once again a small Java code snippet, by means of which the standard mail program can be called/opened.
In order to open the standard mail application in almost any operating system, a URI with the mailto protocol is suitable. Therefore, the following Java code must be able to compose the mailto URI format.
The second difficulty is to resolve this URI (or in simple words – to execute this URI). Unfortunately, this can not be executed directly using the Runtime.getRuntime().exec()-command, but must be started as a parameter via a system-specific program. Our Java-Snippet must therefore be able to distinguish between the operating systems.
Open standard mail in Java
The sample code can be run as it is and opens the default mail program with a few […]

How to detect operating system in Java

Detect operating system in javaIn the following article, there is a short Java snippet that can be used to read the operating system of the computer running the Java program.
In addition, it is the first Java snippet at all here in the blog. Although I have been writing a few lines of Java code again and again for a couple of years, I really couldn’t befriend myself (especially with regard to my C # passion) with Java so far yet. But since I have to deal more and more with Java on the job, however, this will soon be reflected in the blog. But let’s come to the Snippet now…
Read operating system in Java
In order to identify the computer’s operating system in Java, the getProperty-method of the system-class is suitable. Using this […]

Windows 10: Fix wrong time

Fix-Win-10-wrong-time-problemFor some time, I was plagued by a small, but not less annoying, issue on Windows 10. The system time drifted intermittently one hour off. A manual changeover of the time brought success only in the short term. After a while the clock went wrong again.
The correct time zone and summer/winter time (daylight saving time) were selected in the Windows time and date settings and the automatic synchronization of the time was activated. Nevertheless the Windows clock did what it wants, but not what it was supposed to do.
Finally I found the solution to the problem inside the Windows services menu. The automatic time synchronization service was disabled. Now, after I activated the Windows Time service, the system time is correct again. You can activate the service as follows.

Press Win-Taste + R key
Enter services.msc and click ok, to start […]

Windows: How to increase the maximum screen resolution

Recently, I bought a netbook for my workshop to control a laser engraver (the DK-8 from Neje). Unfortunately, I had overlooked a small detail. The display of the netbook has only a native resolution of 1,024 x 600 pixels. However, the window of the control software requires at least 800 pixels in height, so that some of the software is not visible and thus can not be operated.
But remedy could be created by a small adjustment to the operating system. (In my case Windows 7 Starter.) By changing a key in the registry, the resolution can be increased beyond the native resolution. That’s how it works…
Increase maximum resolution in Windows
In order to support higher resolutions than the display’s native resolution, a registry key must be adjusted. Therefore open the Registry. (Either via the search in the start menu with the term “regedit” or by […]