This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Doug Slattery

Ranch Hand
+ Follow
since Sep 15, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Doug Slattery

Hmmm... I wonder if the economics make sense. I had to upgrade to one of those lots-of-blades vibrating razor because they didn't have any blades for my previous non-vibrating one. I have to say that it does give me a less irritating shave vibrating than not. I also haven't changed the blade since ... Hmmm .... I think Thanksgiving. Much better than twin blade disposables I've used while traveling, which go dull in less than a week.

It is about time to change the blade. It's starting to snag & pluck now

- Doug
7 years ago

why cant we make a c++ program compile to something like bytecode



Maybe I'm missing the point, but wouldn't that be a .o file? Most compilers can build a .o file in a standard format like COFF (I'm showing my age ;) ) which can be linked by compilers on other platforms/OS's supporting the same format.

Even GCC has cross compiler capabilities so you can build say an IBM RS-6000 executable on a Linux x86 platform.

Let's not forget that the JVM is written (mostly) in C and Java is an interpreted language. You still need a platform specific JVM to run your "runs anywhere" java code.

Thanks,
- Doug

-- Nothing is impossible if ImPossible.
7 years ago

I agree, don't mess around with C unless you have to. It's an old low level language that may stand in the way of your learning process at this time.



If you are trying to learn OO programming, then C is not a good choice. Go with C++.

I don't agree that C is a low level language though, but that's just me ;). I started with C in the late '80s & used it solidly for almost 20 years. Now I am pretty much just doing Java. C gives you the freedom to do pretty much what you want programmatically. You are not bound by contracts or "save me from myself" issues the compiler tries to enforce as with Java.

I still prefer C and have a coding style that mimics OO which has evolved over the years.

As for books, I can't recommend a modern publication for C, but for C++ the book by the man himself - Stroustrup, The C++ Programming Language 3rd edition (don't know if a later version has been published) is pretty good.

Hope that helps.
- Doug

-- Nothing is impossible if ImPossible
7 years ago


Could you share your approach in case others have similar issues?



Sure.

I was using org.dbunit.operation.DatabaseOperation.REFRESH.execute(connection, dataSet) in my base test class that gets extended by the unit tests to load the test data from an xml file. The xml file was created from a db export of a good test data set and could be used as is this way. It worked great with HSQL.

If the database is discovered by the class to be Oracle, it doesn't use that, and instead loads the test data via connection.createStatement().execute(<sql string>). The <sql string> is read from an sql file. The xml file data set was fairly small, so converting it to a bunch of inserts cost less than continuing to fight the other problem.

Thanks,
- Doug

-- Nothing is impossible if ImPossible
Thanks for the tip Avi,

Unfortunately, oracle.jdbc.OracleConnection is not what I need. org.dbunit.ext.oracle.OracleConnection is what I am using.

Too bad that class doesn't have the synonym properties as the Oracle JDBC class.

Anyway, we've gone with an alternative approach that is working.

Take care,
- Doug

-- Nothing is impossible if ImPossible
Howdy Ranchers,

I've setup a dbunit unit test for some DAO's I worked on. I was using HSQL (which worked) and am moving it to Oracle 11g.

The data is loaded via dbunit's FlatXmlDataSetBuilder, Spring 2.5.6 LocalContainerEntityManagerFactoryBean and Hibernate 3.4 OracleDriver.

The database is setup using synonyms and I used dbunit's DabaseConfig.setProperty() method to set the table type to "SYNONYM". It was a bit of a struggle getting that figured out. I had to debug dbunit down into IMetadataHandler.getTables() to get that working.

I'm stuck now on the getColumns() problem and not sure what to look for. Google produced GRANT SELECT on the tables, but I'm able to do SELECTs from SQL Explorer in Eclipse. I'm not knowledgeable enough about SQL to know where the SELECT on table columns should be applied (if that is really the problem).

Anyone have any ideas?

Thanks,
- Doug

-- Nothing is impossible if ImPossible
Hi folks,

I've been looking for a solution to this problem and have only found examples using mapping.

[Edit]Fat fingered something.

I need to format the output of a result set to certain column lengths based on the DDL declared length.

If for instance my entity named "USER" has:

I'd like to do something like:

This is a simple example of how I'd like to do it and realize there's more elbow grease involved, but hopefully it makes sense.

Anyone done anything like this before?

[Edit] Forgot to mention I'm using Hibernate.

Thanks,
-Doug

-- Nothing is impossible if ImPossible
Here's a really weird one...

I'm running RHEL 5.2 with KDE 3.5.4 at work.

On just the 32-bit versions of Galileo and Ganymede, the menu & dialog fonts are hollow boxes, as if the font/char set can't be found. 64-bit runs fine.

I'm suspecting there may be a missing 32-bit rpm which is why the 64-bit is working.

Just wondering if anyone has ran into this kind of problem. I've been striking out on Google.

Thanks,
- Doug

-- Nothing is impossible if I'mPossible
If anyone is interested, the problem was finally solved the other day. It went all the way up to the top level support at IBM, so I feel better that it wasn't something stupid.

The problem is that the nscd (name service cache daemon) wasn't running on the boxes that Clearcase was failing on. We work in an LDAP environment, but the Clearcase clients don't. Nscd is configured to bypass the LDAP authentication via /etc/nscd.conf, and since nscd wasn't running, authentication fell back to LDAP configured in /etc/nsswitch.conf used by the dns(?).

The clue came by analyzing output from tcpdump and strace which showed Clearcase trying to connect to an LDAP server, which was being rejected causing the signal 13 error. Once nscd was running, we did another tcpdump/strace round and the output revealed everything was happy.

Hopefully, this can be useful to some other unfortunate soul down the road.

- Doug

-- Nothing is impossible if ImPossible
Been down that road already. Signal 13 is a broken pipe, so I strongly suspect the cleartool binary forks/execs a child process, which error's out creating a branch and abruptly exits, triggering the signal.

We are suspecting permissions though and are waiting for the storage group to get back to us with mount permissions to the /opt/rational disto directory.

Thanks,
- Doug

-- Nothing is impossible if I'mPossible
Hi Tamir & thanks for your interest in this anomoly

We are still trying to resolve the problem and yes, it occurs trying to check out an existing element for the first time from the view on the new machine. If I check out a file on a working machine, check it in on the "broken" one and check it out again on the "broken" one, it works, but I still get the signal 13 message.

Ironically, we have another new machine with the exact same version of Linux which is able to check out files (first time) with no problems.

We've tried uninstalling/reinstalling clearcase with both mount and local copies of the distro. IBM is even in the loop now and hasn't been able to come up with a solution.

It must be pretty fubar :-x with these new machines.

- Doug

-- Nothing is impossible if I'mPossible
Howdy ranchers,

I'm getting the following error checking out files on 64 bit linux:

cleartool co -nc wsflmenu.h
cleartool: Error: Child process aborted with signal 13
cleartool: Error: Unable to invoke operation "create_branch" for manager "text_file_delta": -1
cleartool: Error: (Operation pathname was: "/opt/rational/clearcase/lib/mgrs/text_file_delta/create_branch")
cleartool: Error: Unable to store new version.
cleartool: Error: Unable to create branch requested by -mkbranch option in config spec.
cleartool: Error: Unable to check out "wsflmenu.h".


The same files check out successfully on 32 bit linux from the same view.

64 bit linux ver: redhat-release-5Client-5.2.0.4
32 bit linux ver: redhat-release-3WS-13.8.3

Anyone run in to anything similar to this or have any ideas besides "google is your friend"?

Thanks,
- Doug

-- Nothing is impossible if I'mPossible
I know this may be off topic, but I was curious if any fellow ranchers have come across this in their coding ventures.

I'm working on a 'C' project changing an interface from a vendor api that only supports HP to a SOAP interface on Linux to access a web service. The response object has CDATA in the XML stream that Axis2/C is not deserializing. From doing some googling, I get the impression that others have encountered issues with CDATA and Axis2 in general, and am wondering if it is even supported.?.?

The only work around that I've found that might work, is to add a callback where the raw xml is being read from the response and calling it so my app can parse it out manually. There is only a single CDATA element in the response, so it will be pretty simple. I'd rather not do that for obvious reasons.

I'm using version 1.6.0

Any thoughts are appreciated.
- Doug

-- Nothing is impossible if I'mPossible
10 years ago
I saw it yesterday afternoon before school got out and the theatre was mostly empty. That alone made it a better movie .

Overall, not a bad movie with an interesting twist. Yeah, there were some cheezy parts and scenes that reminded me of other movies - like Willy Wonka, Star Wars & a couple others.

I didn't know the enterprise was constructed with steel I-beams and it looked like the engineering scenes were filmed in a huge warehouse.

Filled with action, romance, comedy & drama (besides sci-fi) along with good - not too phony special effects. They also did a good job of setting the plot and keeping the energy intensifying to the end of the movie.

I'm trying not to give away anything - if you haven't noticed by now. If you are a classic Star Trek fan, I'd recommend it. They did a pretty good job with the main characters, but the bridge looked totally different (go figure).

- Doug

-- Nothing is impossible if I'mPossible
10 years ago
Looks like bird strikes aren't limited to planes.

- Doug
-- Nothing is impossible if I'mPossible
10 years ago