Dr. Dobb's Journal article on Native Queries
Native Queries for Persistent Objects
By William R. Cook and Carl Rosenberger
Visit to db4objects
Exclusive Degree
Review of Native Queries
Native Queries on TheServerSide
Plain Old Java Queries on java.net
Creating EPS on windows
I didn't know you could use EMF. How do you convert it to PS?
What I do is print the picture to a postscript printer but use the "save as file" option. This produces a PS file. THen run this through Ghostview and save as EPS (with automatic cropping). I get the best results when I have a PowerPoint slide embedded inside a Word document!
Native Queries for Persistent Objects, A Design White Paper
Rapid Technology Transfer
Let me know what you think.
ODBMS.ORG
A long search
| Google Query | Time |
| shell-command csh directory-of-shell | 3:22:15 PM |
| shell-command csh directory | 3:22:21 PM |
| shell directory-of-command | 3:23:09 PM |
| shell directory-of-the-command | 3:23:41 PM |
| sh unix | 3:28:06 PM |
| sh script | 3:28:29 PM |
| csh "path to command" | 3:29:32 PM |
| csh "path to the command" | 3:29:57 PM |
| csh "path of the command" | 3:31:36 PM |
| csh "path of the current" | 3:32:04 PM |
| csh "path of the current command" | 3:32:18 PM |
| csh "path of the current shell" | 3:32:24 PM |
| csh "path of the current batch" | 3:32:32 PM |
| csh "path of current command" | 3:32:39 PM |
| sh path command that is running | 3:32:52 PM |
| unix path command "that is running" | 3:33:14 PM |
| unix path "file that is running" | 3:33:36 PM |
| csh "file that is running" | 3:34:39 PM |
| bash "file that is running" | 3:35:50 PM |
| shell directory-of-the-command | 3:36:12 PM |
| csh jar files | 3:36:48 PM |
| csh locate-jar files | 3:39:43 PM |
| csh locate-jar | 3:39:47 PM |
| csh find-jar | 3:39:51 PM |
| csh find-jar same-directory | 3:40:07 PM |
| csh jar same-directory | 3:40:10 PM |
| bin/sh same-directory | 3:41:20 PM |
| unix csh | 3:44:02 PM |
| unix csh reference | 3:44:14 PM |
| directory-where the command | 3:51:51 PM |
| directory-where the command csh | 3:52:02 PM |
| csh "path the current command" | 3:53:51 PM |
| csh "path to the current command" | 3:54:00 PM |
| unix "path to the current command" | 3:54:07 PM |
| unix "path to the executing command" | 3:54:11 PM |
| unix "path to the executing" | 3:54:15 PM |
| sh "path to the executing" | 3:56:22 PM |
| path to the executing | 3:57:06 PM |
| path to the executing unix | 3:58:08 PM |
| unix current process | 4:00:16 PM |
| shell current-process | 4:00:31 PM |
| shell "path to the executing" | 4:04:19 PM |
| shell "to the executing" | 4:06:06 PM |
| shell "of the executing" | 4:06:20 PM |
| shell "path of the executing" | 4:08:49 PM |
| shell "path of the running" | 4:10:51 PM |
| shell "path of the running" unix | 4:10:58 PM |
| shell "path of the running scriopt" unix | 4:12:24 PM |
| shell "path of the running script" unix | 4:12:26 PM |
| path "running shell" | 4:15:39 PM |
| path-of "running shell" | 4:15:53 PM |
| path-of running shell | 4:16:46 PM |
| path-to running shell | 4:16:50 PM |
| path to running shell | 4:16:52 PM |
| path of running shell | 4:16:55 PM |
| path of running | 4:16:59 PM |
| java relative-to-shell | 4:17:27 PM |
| java shell same-directory | 4:17:44 PM |
| bash "running shell" | 4:18:53 PM |
| bash "path of running" | 4:19:31 PM |
| bash "path to running" | 4:19:45 PM |
| bash path to shell | 4:20:06 PM |
| bash "path to script" | 4:21:40 PM |
| bash "path of script" | 4:22:00 PM |
| script to identify it's location | 4:25:29 PM |
| $0 alias lookup path | 4:30:54 PM |
| $0 alias path | 4:33:04 PM |
| csh scripting | 4:37:57 PM |
| csh scripting first word | 4:38:22 PM |
| dirname $0 | 4:41:14 PM |
| fletcher mattox | 4:43:47 PM |
| sh shell command files if | 4:50:20 PM |
| sh shell command files "if (" | 4:51:41 PM |
| sh shell command "if (" | 4:51:52 PM |
| introduction shell | 4:52:23 PM |
| introduction shell sh | 4:52:26 PM |
| introduction shell csh | 4:53:44 PM |
| tsh | 4:54:40 PM |
| tsh shell scripting | 4:54:59 PM |
| sh shell scripting | 4:55:02 PM |
| sh builtin variables | 5:00:50 PM |
| shell standard variables | 5:01:37 PM |
| determin unix os | 5:02:18 PM |
| determine unix os | 5:02:20 PM |
| command to find unix os | 5:02:42 PM |
| command to find unix os version | 5:02:46 PM |
| command unix os version | 5:02:51 PM |
| command unix os-version | 5:03:00 PM |
| sh substring | 5:04:09 PM |
| directory of a batch file | 5:09:48 PM |
| directory "running batch file" | 5:09:56 PM |
| directory "running batch file" -pid | 5:10:29 PM |
| directory of running batch file | 5:10:58 PM |
| cmd file directory | 5:11:07 PM |
| directory "running command" cmd | 5:11:24 PM |
| directory "running command" | 5:11:28 PM |
| directory "running command" windwos | 5:11:30 PM |
| directory "running command" windows | 5:11:32 PM |
| directory "of running" command windows | 5:11:53 PM |
| command arguments batch files | 5:12:20 PM |
| dspx | 5:15:51 PM |
| dspx batch | 5:15:55 PM |
| windows batch varialbes | 5:16:17 PM |
| windows batch variables | 5:16:19 PM |
| windows batch variables "~" | 5:16:32 PM |
| windows batch no echo off | 5:19:49 PM |
| bash variable substring replacement | 8:11:44 PM |
| windows shell command | 8:19:06 PM |
| location of batch file | 8:27:11 PM |
| location of current batch file | 8:27:25 PM |
| location of running batch file | 8:27:28 PM |
| directory "running batch file" | 8:27:35 PM |
| directory "running batch file" -pid | 8:27:42 PM |
| find directory "running batch file" -pid | 8:31:29 PM |
How to find the directory of a running shell command
I want to distribute some Java software in a way that is easy to use. The software depends upon some libraries, so I need to set the class path before running Java. I created a simple command ile (for Unix and Windows) to launch the application. I assume the libraries are in the same irectory as the command file, but had a hard time finding out what directory the command file is in. I didn't want the user to have to set up a path or do anything to install: just expand a ZIP file and go.
Eventually I found an answer. Here are the two versions. I have tried it on debian, windows and cygwin. These commands run the class foo.Foo from the foo.Jar, which also uses lib/mail.jar.
-----------------foo.bat for Windows -------------
@ECHO OFF---------------------------------------------------
set dir=%~dp0%
java -cp "%dir%/foo.jar;%dir%/lib/mail.jar" foo.Foo %1
I out to know what %~dp0% means, but I have to admit I don't. I'll look it up later.
------------------ foo.sh for Unix -------------------
#!/bin/bash---------------------------------------------------------
dir=`dirname $0`
os=`uname`
if test ${os:0:6} = "CYGWIN"
then
if test ${dir:1:8} = "cygdrive"
then
dir="${dir:10:1}:/${dir:12}"
fi
java -cp "$dir/foo.jar;$dir/lib/mail.jar" foo.Foo $*
else
java -cp "$dir/foo.jar:$dir/lib/mail.jar" foo.Foo $*
fi
Make sure the line endings are correct, and the file has execute access.
Note that java has two kinds of separators for the class path depending on whether it is unix or windows. This by itself is pretty annoying, but it gets worse: when you run cygwin it is a unix OS but it uses the windows separator. Since dirname can return \cygdrive\c\... but this is not understood by Java, I have to change it to c:\... But Java seems to understand / or \ as the separator, which is good. Lots of fun!
I am not sure that these will work everywhere. But it is a start.
They work in these cases:
- executing the command from an absolute path
- executing the command via an alias
- putting the directory on into your system PATH
AppleScript
AARRRGGGGHHHHH
* A README file that doesn't say what the software does!
* An INSTALL file that goes on for pages and page about cofiguration settings, tweaks to make files, editing this and that...
* After trying to complete the 20 steps correctly, the thing doesn't work!
* A few hours of trying to debug makefiles, configuration files, etc
Give up....
Oh well. I'm going to keep a list of the things I try that I can't get to work:
YAMPA I'm sorry this one has to be first. But the link to the install file (SOE.msi) is broken. I peeked in the folder and found one, then downloaded lots of other stuff, but couldn't get it to work.
ACL2, Emacs and Eclipse
But I've always liked being able to run a command in an editor window. An editor I wrote in college for VMS, a derivative of Z from Yale, had this features. And of course Emacs does too.
This is a problem, because using ACL2 effectively pretty much requires a good shell window. So I've been hunting around for a solution. Then I thought of Eclipse.
Eclipse has External Tools to run processes. I thought they always ran in batch mode. But I found a trick to run the process in an interactive mode, just like Emacs.
To set it up, just do this:
- From the Run/External Tools/External Tools... menu, create a new tool
- Set the program location to be the path to the ACL2 executable
- Set the working directory to be your directory (I use a variable representing the current project)
- Set the arguments to "-". This is the key to make the process take interactive input from the console.
- Then just run the tool and ACL2 appears inside a window in eclipse.
If you use the Scheme plugin and associate the Scheme Editor with .lisp files (using Preferences/File Assocations), then you will also get paren balancing, syntax coloring and formatting. You have to define some custom settings for ACL2, but this is easy to do. Send me a note and I'll give you my config file.
Oh, and here's what it looks like in action.
ACL2 newbie
I'm learning ACL2: after spending a day understanding what most people feel when they try to program a computer (why the *#@* doesn't it accept my program?), I seem to have a breakthrough that at least allows me to write some functions and make a little progress. Mostly this involves learning "The Method", and becoming a lot more sensitive to all those nagging little corner cases that don't normally ever happen. But of course, the proof system doesn't know they can't happen..
I've gotten it to accept a dozen or so functions, which for me was non-trivial. I'm having trouble now because I need to define a custom :measure on my last function, and I don't understand enough about how ACL2 does rationals (rationalp, natp, numberp, o-p, o<, etc). I assume it will make sense if I read the doc...
It's fun, in a strange way, to be a newbie... I started programming so long ago I have forgotten what it is like to not know how. But ACL2 is letting me remember!My Vonage Disaster
Updated Date: Number Transfer Progress HistoryAll this time I was paying service charges for a service that didn't work. The gave me a months credit when I asked for it. Finally I was annoyed and asked them to cancel the service. But I couldn't find the original box to send the equipment back, so they charged me for that. $386 later I have nothing but a useless Vonage box.
August 15, 2004: Awaiting Letter of Authorization
November 24, 2004: Letter of Authorization (LOA) Received
November 24, 2004: Transfer Sent to Carrier
November 24, 2004: Transfer Sent to Carrier
April 18, 2005: LNP Transfer Cancelled
I guess that is one way to make money...

