Pages

Monday, August 5, 2019

Guard access to outside world against your MySql Port

To Guard access to your Mysql Port from outside world just add following line to your my.ini file

bind-address=127.0.0.1

Thursday, August 1, 2019

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

The library referred to is bundled into an OS specific dll (tcnative-1.dll) loaded via JNI. It allows tomcat to use OS functionalities not provided in the Java Runtime (such as sendfile, epoll, OpenSSL, system status, etc.). Tomcat will run just fine without it, but for some use cases, it will be faster with the native libraries.
We can download the tcnative-1.dll (or libtcnative.so for Linux) and put it in the bin folder, and add a system property to the launch configuration of the tomcat server in eclipse.

Thursday, February 14, 2019

Load mnist dataset from a local file in jupyter

Recently while trying AI coding behind a proxy I was unable to load data from minist dataset from cloud.
So I manually downloaded the file "mnist.npz" kept it in {username}/.keras/datasets/ on my local machine and used the following command to load it

(X_train,y_train),(X_test,y_test)=mnist.load_data(path='mnist.npz');

And this block executed without any errors.

Monday, February 4, 2019

org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported

I had the same issue after updating my JDK in project and resolved it by replacing my .classpath file with previous one. I noticed the following changes in my .classpath file
    
         name="maven.pomderived" value="true"/>
         name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
    
The second line was missing from above code
 kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
This line was missing
     kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
    
         name="owner.project.facets" value="java"/>
    
These lines were added so I manually removed them and it all worked again.