We bought one of these and it actually works pretty well.
However, be warned that it has a HARD CODED administrator password that cannot be changed (you can even see it directly in the login page Javascript.)
DO NOT under any circumstances expose this device to the outside internet.
Friday, November 14, 2014
Friday, September 19, 2014
Java3D 1.5 64bit D3D DLL
Java3D DLL
I managed to compile a 64bit version of the D3D library required for Java3D to work in Direct3D mode on a 64bit JVM.Its built from the 1.5.2 sources and I haven't had any issues with it yet.
Get it here: j3dcore-d3d.zip
Disclaimer
==========
Use it at your own risk.
This IS NOT endorsed or supported by Sun, Oracle or any other company.
Source - Build it yourself!
If you want to build it yourself, here is a zip of the sources required.j3d-src.zip
There were retrieved using SVN from the Java3D site:
- https://java.net/projects/vecmath/sources/svn/show/tags?rev=144
- https://java.net/projects/j3d-core-utils/sources/svn/show/tags/rel-1_5_2-fcs?rev=208
- https://java.net/projects/j3d-core/sources/svn/show/tags/rel-1_5_2-fcs?rev=954
You also need:
- JDK 1.6 64bit - it won't build on later versions due to missing classes in 1.7 and 1.8
- Apache Ant 1.9.3
- DirectX9 SDK (August 2009)
- Microsoft Visual Studio C++
- I used Microsoft Visual Studio 2012 Express and it worked fine
To compile:
Edit the variables in the batch.bat to point where your put your things:- JAVA_HOME - Point it at a 64bit version of JDK 1.6
- INCLUDE - Point it at the includes for the DirectX9 SDK where dxerr.h is
- LIB - Point it to the path where d3dx9.lib is
- ANT_PATH - Point it at the bin directory in an Ant installation
The compiled DLLs will be in:
- debug: j3d-core\build\default\debug\native
- opt: j3d-core\build\default\opt\native
Let me know if you can't get it to work, I might have forgotten something.
Friday, September 5, 2014
Logstash config file for Ubuntu SSH auth.log with GeoIP
Since I spent half a day working it out and I wish someone had already done it, here is a logstash config file that handles your ssh auth.log, tags it, and then uses geoip lookup to add country information based on the source IP address. Should work using the default layout of the auth.log in Ubuntu releases. Don't forget to change/remove the "type" tag depending on your circumstances.
https://github.com/glenritchie/logstash-conf/blob/master/10-authlog.conf
Enjoy.
https://github.com/glenritchie/logstash-conf/blob/master/10-authlog.conf
Enjoy.
Friday, June 20, 2014
Slow peformance with MariaDB Java Client Connector?
Noticing a small delay in executing queries using the MariaDB Java Client Connector? Especially when the amount of data returned is small (say, a count() or something)?
Try setting this property for your JDBC connection:
Try setting this property for your JDBC connection:
tcpNoDelay=true
It's because of Nagle's Algorithm
Tuesday, April 15, 2014
Making reusable Java 8 Lambda Functions/Filters
You can create a function with parameters using Lambda in Java 8 to reduce duplicate code.
Then you can create a predicate using that function allowing you to use it as a filter for stream() allowing you to re-use your new function any number of times.This way you don't need to make a different predicate for age == 12 or age == 21.
Function< Integer, Predicate< Person >> agefunction = (age) -> person -> person.age == age;
private List< Person > getPeopleOfAge(final List< Person > people, final int testAge)
{
Predicate< Person > ageFilter = agefunction.apply(testAge);
return people.stream().filter(ageFilter).collect(Collectors.toList());
}
Subscribe to:
Posts (Atom)