You will not be able to view this website in all its glory until you upgrade your browser to one that supports web standards.


A blog of all section with no images
This template is broken! PDF Print E-mail
Written by Randy Carver   
Tuesday, 27 April 2010 03:50

So my old template standby rkymtnsunrise is broken!   I suppose its to be expected.   I created of for Mambo originally, upgraded it to Joomla 1.x and then re-upgraded it for Joomla 1.5 (quickly) when they redid the templating.

But I notice now that my box model does not flow properly when resizing the browser below the standard size.

For now, if you care about those things you'll have to deal with it.    If you don't care, good!

I've got some other stuff on my plate and will get to it soon.   Besides, I don't think many peeps are using a 5 or 6 year old template!

Ciao!

-- Randy

 
Injecting JNDI datasources for JUnit Tests outside of a container PDF Print E-mail
Written by Randy Carver   
Tuesday, 27 April 2010 03:44

I was working on some webservices that we're moving into libraries the other day, and needed to run a full set of tests using junit, but outside of a container. I didn't want to create and deploy an entire test harness, I just wanted to run the junit tests in the nb ide. But I couldn't get the test to inject the datasource resource so it was usable. I finally got it working, but I'll spare you all the pain I went through to get here. Here's how I did it in my test class:

    @BeforeClass
public static void setUpClass() throws Exception {
// rcarver - setup the jndi context and the datasource
try {
// Create initial context
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
System.setProperty(Context.URL_PKG_PREFIXES,
"org.apache.naming");
InitialContext ic = new InitialContext();

ic.createSubcontext("java:");
ic.createSubcontext("java:/comp");
ic.createSubcontext("java:/comp/env");
ic.createSubcontext("java:/comp/env/jdbc");

// Construct DataSource
OracleConnectionPoolDataSource ds = new OracleConnectionPoolDataSource();
ds.setURL("jdbc:oracle:thin:@host:port:db");
ds.setUser("MY_USER_NAME");
ds.setPassword("MY_USER_PASSWORD");

ic.bind("java:/comp/env/jdbc/nameofmyjdbcresource", ds);
} catch (NamingException ex) {
Logger.getLogger(MyDAOTest.class.getName()).log(Level.SEVERE, null, ex);
}

}
As you can see, in this case I used the OracleConnectionPoolDataSource, you should use the datasource for your db connection. Don't forget to link in the appropriate db jar (in my case it was ojdbc14.jar) The code that is used to retrieve the datasource (which works for test and production) looks like this:
        Context initContext = new InitialContext();
Context webContext = (Context)initContext.lookup("java:/comp/env");

DataSource ds = (DataSource) webContext.lookup("jdbc/nameofmyjdbcresource");
viola!
 
Change the default JDK for NB 6.x PDF Print E-mail
Written by Randy Carver   
Tuesday, 27 April 2010 03:30

So what I really wanted to do was be able to use the ant command line build to build the api's, then pull up the services that I'm working on in NB and not get a library version mismatch.

The file I needed to modify was the netbeans.conf. On a windows box (I think - from the info out there) The file is located in C:\Program Files\netbeans-?.?\etc\netbeans.conf. On a mac the file is located in Applications/NetBeans/NetBeans ?.?app/Contents/Resources/NetBeans/etc/netbeans.conf

To change the default modify the line:

# Default location of JDK, can be overridden by using --jdkhome <dir>:netbeans_jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
Last Updated on Tuesday, 27 April 2010 03:39
 
Back Online Here PDF Print E-mail
Written by Randy Carver   
Tuesday, 27 April 2010 03:21

So as some of you know I was part of the last RIF at Sun before the EU gave their approval and the deal with Oracle closed.   Most of my newer content is over at RandyStuph at blogs.sun.com.   I'll gradually move some of the more useful stuff over here.

A lot of content is missing that was published here due to an unfortunate security event last year.   Suffice it to say that even when life gets busy you should still read security alerts from your cms group!

Since leaving Sun, I've been working on WILbur for my new company Blue Otter Software!   The Water Information Library is a Web application to allow organizations with Water quality data a way to organaize that data in a standard database (I'm using a CUAHSI erd - more on that later) and then make that data freely, easily, and quickly available via the internet to the general public.

I'm hoping to go Live in May with the Public Front end, and June for the administrative portion.

More to follow!

Ciao!

-- Randy

Last Updated on Tuesday, 27 April 2010 03:38
 
Test of Joomla xmlrpc via ecto PDF Print E-mail
Written by Randy Carver   
Tuesday, 22 April 2008 11:27

This is a test

 
mp3's grouped by bpm - part two PDF Print E-mail
Written by Randy Carver   
Tuesday, 27 November 2007 07:46
Well I got bpmdj working on my gentoo box.   Had to build qt 4 with the qt3support use flag.

But it doesn't do what I want.   The interface is pretty difficult to get a grasp of, and it seems like it wants to feed the wrong idx files to the helper applications.   So it doesn't really work all that well.   bpmcount does work, BUT (why is there always a but?) it only works on raw files.  So I'd have to decode each of my mp3s to get the bpm count, and then manual update the id3 tag.   Might end up doing that.

Also tried to build bpmdetect (its a kde app) but it failed miserably, I'll probably try and dig a little deeper into it today.

On the windoze side there's a neat little app from MixMeister called BPM analyzer which will parse the bpm in an mp3 and update the id3 tag in one step.

The BPM libs I've seen are all windoze and are not open source.   So I'll be checking out bpmdetect and if that doesn't work write up an extract/analyze/update tag script.   Look for part 3 :)


Technorati Tags:
 
<< Start < Prev 1 2 3 4 Next > End >>

Page 1 of 4