Skip to main content

Posts

Installing OpenCV 2.0.0 on MacOS X 10.6.1 Snow Leopard ( Xcode IDE )

I have recently started experimenting with OpenCV. Setting the environment on Windows/Visual Studio is pretty straight forward and works fine. However since my preferred development environment is MacOS X / Unix i preferred to switch environments. I must say that the installation went quite smooth, even though on the internet i found a number of posts on a number of issues. The steps i followed were the following: 1. download opencv library from http://sourceforge.net/projects/opencvlibrary/ 2. go to the downloads/opencv-2.0.0 directory 3. execute ./make_frameworks.sh this creates an opencv framework which comes very handy when developing using Xcode The process takes quite some time .... Once completed using Xcode open the sample project (FaceTracker) for MaxOS x which is found under the opencv-2.0.0/samples directory clean, build and off you go ... camera on my mac book pro was as well recognized without problems.

SPSS Regression using Matrices

The SPSS syntax below does several linear regression calculations (model parameter values, sum of squares, F value, F test, R, Rsquare, t tests, etc) using matrices ... just change the data file and initialization part as required and off you go ...... /* ####### DATA FILE ################################################################################### */ FILE HANDLE data /NAME='c:\data\ratty2.sav'. /* ####### INITIALIZATION AND DATA MATRIX ############################################################## */ MATRIX. COMPUTE N=21. /* no of data rows */ COMPUTE IND_VARS=3. /* no of independet variables */ GET Y /FILE=data /VARIABLES =size. /* puts y-variable into column matrix called Y */ GET X1 /FILE=data /VARIABLES =t,z2,z3 /* put independent variables into a matrix called X1 */ /* ########## MATRIX CALCULATIONS #################################################################### */ COMPUTE j=make(N,...

Java Design Patterns

Today i had the pleasure to present a session at the monthly Java User Group Malta meeting ... its always a pleasure to meet other Java Developers in our community and aspiring students. Click on the post tile to link to the presentation ... Regards and good luck guys ... hope to meet again for other sessions.

Java Web Application Properties

One of the most common application requirements is usually to create a central place where to keep application properties or application settings. These properties are normally settings or general properties that are applied to the application during runtime. A number of options exist, including creating string properties on your application server and accessing them as JNDI resources. However one of the still most practical approaches is to keep a properties config file with a simple propertyName =propertyValue   type of structure. The example below is an example of an Application Config class that loads the application properties from a file named config.properties which is stored in the root of the source packages (root package) and hence automatically deployed with the application jar file during the build process. import java.io.IOException; import java.io.InputStream; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; public cl...

Glassfish and MySQL - Connection Issue

Hi all I recently downloaded the new Netbeans 6.1 including the Glassfish v2 package to replace my previous versions. Once I moved my application to the new platform I had to temporarily deploy the application database from Oracle to MySQL to test on my local machine. My application is built on JavaEE and for the persitence layer I am making use of data access objects (using Toplink) fronted by a set of session beans. After porting the database for testing I started getting the following error: Internal Exception: java.sql.SQLException: Error in allocation a connection. Cause: No PasswordCredential found This problem doesn't occur during development within Netbeans (hence all jdbc resources and Persistence units work fine from within netbeans) but occurs on deployment on Glassfish. From some google searches i found that this problem existed for some time with previous versions but still exists with the latest installation of Netbeans/Glassfish including a bundled MySQL. A solution ...