I must try this some time a title related Google search appended after each blog post.
If Regedit is not working for you, try Regedt32.exe it has more options.
import electric.registry.Registry;
import electric.util.Context;
public class GoogleShell {
public static void main( String[] args ) throws Exception{
String key = args[0];
// set proxy location and authentication credentials
Context context = new Context();
/* Set proxy if necessary..
context.setProperty( "proxyHost", "your.proxy.here" );
context.setProperty( "proxyPort", "8080" );
*/
// bind to web service whose WSDL is at the specified URL
String url = "http://api.google.com/GoogleSearch.wsdl";
IGoogleSearchService google = ( IGoogleSearchService ) Registry.bind(
url, IGoogleSearchService.class, context
);
// invoke the web service as if it was a local java object
String ret = google.doSpellingSuggestion( key, "Britney Spars" );
System.out.println( "Spelling = " + ret );
GoogleSearchResult result = google.doGoogleSearch(
key, "Stuart Woodward", 0, 10, false, "", false, "lang_en", "latin1", "latin1"
);
for ( int i = 0; i < result.endIndex; i++ )
System.out.println( result.resultElements[i].URL );
}
}
Output was:Spelling = Britney Spears http://www2.gol.com/users/stuart/ http://www2.gol.com/users/stuart/celtihs.html http://www.natural-metrics.freeserve.co.uk/ http://www.stuartwoodward.com/history.html http://www.stuartwoodward.com/ http://www.stuartwoodward.com/resume/ http://stuartcw.livejournal.com/ http://stuartcw.livejournal.com/calendar http://lists.w3.org/Archives/Public/www-international/1998JulSep/0052.html http://www.tokyopc.org/tpc/officers.html
By 1908-9, 860 million postcards were sent through the post in the UK each week. That's more than double the number of text messages sent today.That's an amazing amount of postcards considering the population. But then again, as Tim said, the mail was delivered 4 times a day then..
I must try this..I must try this...I must try this
Clover is a code coverage tool for Java. It discovers sections of code that are not being executed. This is used to determine where tests are not adequately exercising the code.
Java Cannery fixes all that. It's a pure-Java application that decompiles and recursively scans a target class for all its dependencies and packages them up into a jar file for you.
A java servlet on machine A could not connect to a web server on machine B. It could however connect to a web server on machine C and it was possible to connected from A to B from the command line and brower so we know that A can see B but somehow the Java process couldn't.
In the end the problem was that Java internally caches the DNS lookups and the host file had changed since the program had started running. The solution was to reset the JVM. (Thanks to DanL for figuring this one out.)
If you get this error message "550
This is not the first time that this setting has had me stumped while trying to set up FTP to access to a Microsoft IIS server. The required setting is hidden a level or two down and is not some that you remember after six months.
To read: DATA MODEL PATTERNS: Conventions of Thought a database modelling book.
Found a mention of ProGuard, an open source code obfuscator and shrinker, on Rebelutionary
I was saying to Tim and Dan the other day about how I thought it would be difficult for a single developer to keep up with the all the Jakata project and Java standard libraries but maybe it is very important to make the effort to do this, as this quote from Tony Bowden indicates:
A Perl programmer, for example, who has a deep knowledge of what's available on the CPAN and who has the basic competence to write the glue code that ties together 5 or 6 different modules will, for 90% of the projects in which Perl is used, be at least 10 times more productive, and produce much more maintainable and accurate code, than an 'expert' Perl programmer who knows enough to write all this himself (and so does so).
JUnit 3.8 has been released. Download here
I just realized pinging weblogs.com is not enabled by default and that the name of this blog on their list was the really anonymous "Tech Blog".
Wow! A free blogroll site. I wonder if Americans realize how close blogroll is to bog-roll.
I had a sudden panic when my JUNIT test cases failed but later figured out it was a configuration error in the test case setup. Unfortunately since it was test code it assumed the configuration would be correct. Production code tends to be more forgiving as it reports the errors more fully but the test code quick and dirty and fails nastily when it hits something it can't cope with.
JPublish is a powerful web publishing system which uses the Velocity template engine in combination with a content management framework to build dynamic web sites. JPublish was designed to ensure a clean separation of content, programming logic, and presentation logic.
public void tieUpDamsel (Humans damsel) {
this.damsel = damsel;
numberOfDamsels++;
System.out.println("The Villain has tied up " + damsel.whatIsYourName());
}
Via Tony Bowden
It's amazing how IP addresses still manage to get embedded in all sorts of config files. They cause no end of problems when servers change IP addresses! (Now I find that the IP addresses were in the HOSTS file because the servers were used at a demo and just connected together without DNS. Doh!). They remained there until the server was moved several months later...
I'm trying to figure out how to setup Tomcat Workers right now.
"A Tomcat worker is a Tomcat instance that is waiting to execute servlets on behalf of some web server. For example, we can have a web server such as Apache forwarding servlet requests to a Tomcat process (the worker) running behind it."
This Doc is the key doc for 3.2:
Tomcat - A Minimalistic User's Guide
It seems things changed a lot between 3.2 and 3.3. This is the 3.3 doc
Tomcat-Workers-HowTo.
OK, we figured it out. In the workers.properties file there are two default workers defined who happen to be named after the protocol that they use for communicating between Tomcat and Apache. So we made two more workers w1 & w2 and then changed the Apache configuration to use these two workers handle the different hosts instead of having all hosts handled by the same default worker.
The trickiest thing was the the default worker was named after it's protocol which looked like it was a protocol setting rather than a worker setting. The Tomcat configuration also had to be changed to support the extra port required by the workers.
As a result we have a much better knowledge of how the three config files work together.
Actually we didn't figure it out for several hours later. You have to make sure that the two Tomcats are really running separately by starting them up separately. If you only start one Tomcat you only have one JVM running. There is nothing automatic about this process at all, it's a matter of plugging ports together. It much lower tech than it seems at first.
Finally got Moveable Type working...phew what a struggle. I learned fast and hard about Perl, Perl Modules, cgiwrap.
I found a quick way of adding Spell Checking to Web Forms if you use Microsoft Word and Explorer and then saw a later message that has an even better Explorer spell checking solution that doesn't open Word.