January 27, 2004

Large blobs

I ran into an annoying issue with one of my web hosts... max_allowed_packet on MySQL was set to 1 MB and they were insistent on it. Naturally, I tried to find a way around it. It turns out that it has been done before - see Handling huge BLOB fields with DBI and MySQL. Essentially the idea is to split up the BLOB into smaller chunks and upload each separately. It isn't actually that bad.

Posted by torque at 10:23 AM | TrackBack

January 26, 2004

MapPoint

Nifty, Microsoft offers a SOAP-based mapping web service called MapPoint. Like Mapquest, but even cooler. They offer a 45-day evaluation license. I haven't seen anything written in PHP yet, e.g., nusoap, but I did find a Perl-based implementation. Cool stuff. Wonder how much it costs to do for real.

Update
Gee, this is serious stuff. On Google Groups I found a posting on pricing from 6/2003. $10,000 annual platform charge, $5000 for 500,000 transactions (1¢ each) - a render, find, and route each constituting a method. You can imagine things adding up pretty fast. Of course, if you really splurge it is 10 million transactions for $70,000 (0.7¢ each), though this is hardly a discount. Maybe times have changed?
For my application I was thinking of building probaby 200-300 route maps, each consisting of the route computation, a couple find methods, and a render method (or is it one), so it might be 1500 or so that I need. $15. I guess that isn't too bad... The 10 million number is a bit discouraging, since you won't really see too many people reselling.

Posted by torque at 1:35 AM | TrackBack

January 23, 2004

Storing files database

Leon Atkinson wrote a good article on this.

Posted by torque at 12:35 PM | TrackBack

January 22, 2004

Take down Jay Kim!

This guy commented on every single one of my blog entries advertising his drug websites. Arrgghhh... Unfortunately this version of MoveableType has no straight-forward way of clearing out this mess, except by deleting one by one. Work with me folks, let the hunt begin! Is it even his real name? I started at xenical-i.us

Jay Kim
24 Finchley Road
London 10024 UK
The registrant email is e-webmaster@support24x7.biz.

What's at 24 Finchley Road? Thanks to Google I found a list of restaurants in London. The Lord's Rendezvous is a Chinese restaurant located at 24 Finchley Road, NW8 6ES. The phone number is 0171 722 4750. More information on the Lord's Rendezvous can be found in the Diary of Anne Ku. Interesting, a restaurant in London previously known as the Lord's Rendezvous is now known as the Royal China Restaurant. But is it at 24 Finchley Road? I tried looking for "24 Finchley" and "London" and found

D Aiou
24 Finchley Road, London, NW8 6ES
Tel: 02077224750 Fax:
ADDED: 01 September 2002
at www.townandabout.com. A map can be found here. Sure enough, St. John's Wood.

You know what's kinda funny, 24 Finchley is this restaurant site in the UK, and yet the Postal Code is 10024, New York, NY. What's up with that? Slightly more information is available at the godaddy registrar

Administrative Contact:
Kim, Jay
e-webmaster@support24x7.biz
24 Finchley Road
London 10024
United Kingdom
44-207-339756
Is this the real number? It says that it was created 03-Aug-03. Not quite a proper uk number but very close. All his sites are hosted from the same server. Take a look at http://www.whois.sc/xenical-i.us. On whois.sc you can look up the 1299 other names that are hosted at the server. It's a big list of spammer sites. The IP address is 69.10.154.5, hosted in Canada by Rackforce Hosting.

Posted by torque at 1:00 PM | TrackBack

Tooltips

This is cool... http://www.walterzorn.com/tooltip/tooltip_e.htm

Posted by torque at 9:24 AM | Comments (0) | TrackBack

January 21, 2004

ODBC via HTTP?

Most pages I have found on the web talk about accessing an ODBC database via scripting languages, e.g., PHP or ASP. What I really wanted to accomplish was to, as John Lim puts it, providing access to a database as a Web Service. A web host I am using only allows localhost access to MySQL databases. However, I would like to be able to access the data in the database using products such as Microsoft Word to do mail merges, or to use Microsoft Access to do reporting or some limited database administration. What it will probably involve is some sort of data transfer over HTTP and a customized ODBC driver. I originally wanted to just make a dynamic csv using PHP and link to that using Microsoft Word. It gave hints of wanting to work, but just never did. Oh I have to say that a simple solution (though sub-optimal) is to get the client to download results from a query - but then each time they run the mail merge they have to get a fresh copy...

Posted by torque at 11:04 AM | Comments (0) | TrackBack

January 17, 2004

PHP XSL XML

Where do I start? I found a good article by Benson Wong entitled "Using PHP and XSL to Transform XML into Web Content".

Posted by torque at 2:46 PM | Comments (0) | TrackBack

January 16, 2004

Open Patent Services

I've been looking for a cleaner way of downloading patent information (besides the USPTO's grotesque oh so 90's interface and the EPO's esp@acenet excessively fancy look. Then I found Open Patent Services. The documentation is stored in the aforementioned link, but the really useful stuff can be found right here. To figure this out, I need to learn SOAP, maybe some XSLT.

Posted by torque at 2:06 PM | Comments (3) | TrackBack

January 15, 2004

Automate Word to Perform a Client-Side Mail Merge

A good template for automating word using VBscript can be found here. Keep in mind that to create an object means you might have to change some settings on IE.

Posted by torque at 1:44 PM | Comments (0) | TrackBack

January 14, 2004

Plesk, MySQL, and remote access

Arrghh. It appears to be tricky.

Posted by torque at 5:13 PM | Comments (0) | TrackBack

January 9, 2004

TIA, INA, etc.

Wil Grover (972.644.5580) from TI called this afternoon, recommending, as I had expected, the ADS1255 for my EEG project. He had some other recommendations. He recommended that I use a transimpedance amplifier rather than an instrumentation amplifier. Specifically, he suggested building one from either an IVC102, OPA129 or DDC112. I'll have to look at those. These would be connected to the scalp. Then, we would have an instrumentation ampflier, outputing a single ended output into the ADC.

Posted by torque at 2:42 PM | Comments (0) | TrackBack

esp@cenet

I hate how you can only print or save one page at a time on esp@cenet. This is a record of my efforts to make life a bit easier. I was interested in obtaining a copy of GB2388196: Electrodynamic sensor. Incidentally, if you are interested in getting PDFs of US patents you should take a look at Oren Tirosh's pat2pdf.

After coming off a search on one of the inventors, Prance, we get to:

http://v3.espacenet.com/textdoc?sf=a&FIRST=1&CY=ep&LG=en&DB=EPODOC&TI=&AB=&PN=&AP=&PR=&PD=&PA=prance&IN=&EC=&IC=&F=0&IDX=GB2388196
How much of this is necessary? I sliced out the terms until I was left with
http://v3.espacenet.com/textdoc?IDX=GB2388196
which seems to work. The various tabs use this number but under different directories, and they add a QPN number which doesn't seem to make a difference. The directory 'origdoc' takes you to the original document.
http://v3.espacenet.com/origdoc?IDX=GB2388196
We can print a single page using the Print link, which points to
http://v3.espacenet.com/pdfdoc?IDX=GB2388196&F=64
Now, this prints the current page... I'm not exactly sure how though. If we change the page on the viewer, the print link does not change but the page being printed does. That's peculiar! The key is F=64 - F=64 creates a PDF that prints on entry. If we cut and paste the link to another page, it displays the first page and tries to print. If we save this file and open it offline, it tries to print on entry.

Ok, I'm getting closer.

http://v3.espacenet.com/pdfdoc?IDX=GB2388196&PGN=3&F=64
Will bring up, on a new window, the third page, attempting to print on entry. This can be saved, rather than opened. Then all the PDFs can be stitched together. The nice thing about F=64 is that the saved/printed file has only 1 page. If you try to save without F=64, you will be unable to print. Worse, the saved file with have N pages where N is the total number of pages, with exactly one viewable page.

So, the proper method would be to go through and save all the pages, then put it all together using a PDF utility.

Posted by torque at 2:10 PM | Comments (0) | TrackBack

Measure Bias Current rather than Impedance

Bob Pease is the man. In his book on analog circuitry, he suggests rather than measuring input impedance, measuring the input bias current. The equation he gives for an ordinary differential bipolar stage (with no emitter-degeneration resistors or internal bias-compensation circuitry) is 1/(20 x Ib) where Ib is the bias current [1]. Now, one problem is that if you are actively seeking op amps with low bias current, wouldn't you expect them to have some sort of bias compensation circuitry?

References
[1] R.A. Pease, Troubleshooting Analog Circuits, Boston: Butterworth-Heinemann, 1991, p. 96.

Posted by torque at 11:25 AM | Comments (0) | TrackBack

MySQL -> XML Web Services

Helpful link here, if you ever have to do it.

Posted by torque at 9:26 AM | Comments (0) | TrackBack

January 8, 2004

Cantaloupe

I decided to grow cantaloupe this year. I found an interesting article from the University of Georgia on growing Cantaloupe and Specialty Melons. They suggest plastic mulch with under-plastic trickle irrigation... hmmm, sounds pretty complicated. I wonder if I can do it hydroponically.

Posted by torque at 10:46 PM | Comments (0) | TrackBack

Double layer

On one hand, it is good news, on the other hand, it is not. I found a paragrah on the ACamp website on how DC bias currents cause double layers to form.

AC-coupled amplifiers with true AC-coupled inputs have capacitors on the inputs that form high pass filters. In addition to rejecting DC and low frequency signals, the input capacitors also block all DC bias currents from flowing across the amplifier inputs. One advantage is that blocking input DC bias currents eliminates double layer charging across the electrode surface of an input transducer, which significantly increases the transfer of analog biomedical signals across the tissue/transducer interface. Input capacitors also create added patient safety during clinical measurements. Similar advantages also apply to other analog amplifier systems including audio amplifier.
I've been saying this for a long time! The inventor is Dr. Michael F. Suesserman, from Seattle, WA (Patent 5,300,896). I wonder how many people have licensed his technology... a search on Suesserman on flashpoint reveals that he wrote a number of articles with Francis Spelman, who in turn did a substantial amount of research on EEG.

Posted by torque at 5:41 PM | Comments (0) | TrackBack

A conversation with Analog Devices

I spoke with Tim at Analog Devices regarding my requirements, essentially, at 0.01 - 100Hz, noise below 100 nV/&sqrt;Hz, and fA input bias current. We first looked at the AD549, which has 60 fA input bias current, but really high 1/f noise. Then we looked tat the AD8551, a CMOS chopper architecture with pA input bias current. He said that he could not do both chopper and fA input bias current. Finally, we looked at the AD8605, which seemed to be a good compromise between the two. I'll have to look in more detail. Recall the LMC622 has 2 fA input bias current, but rather high noise... what I really need is a chart comparing everything.

Posted by torque at 2:06 PM | Comments (0) | TrackBack

January 7, 2004

Read and Write INI Files

Aisha Ikram's CIniReader is very nice, and may come in handy for reading Windows INI files using VC++.

Posted by torque at 1:42 PM | Comments (1) | TrackBack

So amazing...

This guy is an inspiration to me. If you can find out who this man is, and who makes his horns, I'll buy you lunch!

Posted by torque at 9:00 AM | Comments (0) | TrackBack

January 6, 2004

Data cable

I purchased a 37-conductor cable from Jameco Electronics last year which I will be using to connect some Grass amplifiers. I cut the heads, and inside there are a bunch of colored wires. I need to hook up 33/37, which means I might as well do them all.

RedRed/BlackRed/White
YellowYellow/BlackYellow/White
OrangeOrange/BlackOrange/White
Dark GreenDark Green/BlackDark Green/White
Light GreenLight Green/BlackLight Green/White
Dark BlueDark Blue/BlackDark Blue/White
Light BlueLight Blue/BlackLight Blue/White
PurplePurple/BlackPurple/White
BrownBrown/BlackBrown/White
PinkPink/BlackPink/White
GrayGray/BlackGray/White
WhiteWhite/Black
BlackBlack/White

Now the tricky thing is that I'd like to split it into two chunks of 16 so that it is easy to flip connection... ok, I got it. I will have a "dark" side, and a "light" side.

Plug APlug B
1Red/BlackRed/White
2Yellow/BlackYellow/White
3Orange/BlackOrange/White
4Dark Green/BlackDark Green/White
5Light Green/BlackLight Green/White
6Dark Blue/BlackDark Blue/White
7Light Blue/BlackLight Blue/White
8Purple/BlackPurple/White
9Brown/BlackBrown/White
10Pink/BlackPink/White
11Gray/BlackGray/White
12White/BlackWhite
13BlackBlack/White
14RedPink
15BrownYellow
16Dark BlueLight Blue
GndPurple

That should take care of it.

Update
I decided to hook up the last few wires too... so after the 32, I'm going Gray, Dark Green, Light Green, Orange, Purple(Gnd).

Posted by torque at 11:51 AM | Comments (0) | TrackBack

January 3, 2004

On cloud nine...

The term "on cloud nine" is usually attributed to the US Weather Bureau, which once described clouds in numerical sequence, Level Nine being the very highest cumulonimbus [1]. In fact, the Weather Bureau stole the term from Dante's Paradise, in which Cloud Nine was the ninth and highest heaven [2,3].

References
[1] Michael Quinion's "Cloud Nine", which I found through Kalmon in the Clouds' Origami Denmark.
[2] "Origin of the Name 'Cloud Nine'", sheepskin.com (don't laugh... ok laugh!).

Posted by torque at 7:24 PM | Comments (0) | TrackBack

ODBC MySQL Access (Wow!)

I can't believe it took me so many years to figure this out. Once you have the ODBC connection set up, you can do Excel-esque editing. The trick is not to use Excel, but to use Access.

Fire up MS Access and start a new database, right click on the staging area and click on Link Tables.... In the "Files of type:" drop box select ODBC Databases().

Now, select the Machine Data Source tab and you should see the database of interest.

The selected tables will available for editing. Each recorded is updated as you exit the field. This is very nice! You can do update queries using Access' nice interface. It is all very beautiful.

Posted by torque at 6:05 PM | Comments (0) | TrackBack

ODBC MySQL Mail Merge

I'm trying to figure out how I can use ODBC with MySQL so that database-driven Microsoft Office applications can work smoother (e.g., mail merge). I started by installing the latest production release of MySQL Connector/ODBC. I downloaded and executed the "Driver Installer" for Windows. I then followed along the FAQ "How do I configure Connector/ODBC DSN on Windows". I then opened up Microsoft Word, selected Tools -> Letters and Mailings -> Mail Merge Wizard. I selected Envelope. After selecting an Envelope size, use Browse to select the database. It works. Use "Connect to New Data Source" and then "ODBC DSN". Nice.

Here are more detailed instructions... starting from square one. Prerequisites are a net connection, a running MySQL server, and Microsoft Word.

  1. Download and install the MySQL Connector/ODBC driver
  2. With administrator priviledges, select Control Panel -> Adminstrative Tools -> Data Sources (ODBC)

  3. Click on Add and select "MySQL ODBC 3.51 Driver"

  4. Fill out the details on your MySQL server and then click OK

  5. Now, fire up Microsoft Word and select Tools -> Letters and Mailings -> Mail Merge Wizard
  6. Though aesthetically the correct choice is "Envelopes", the practical choice is "Labels", so choose "Labels" and click Next: Starting document
  7. Click on Label options and select the correct template (for this example I chose 5160) and go on to the next step

  8. Click Browse... to use an existing list. Use "Connect to New Data Source.odc"

  9. Select "ODBC DSN"

  10. You should see the data source created earlier, in my case, "ahcouk"

  11. Now select the desired table, e.g., the invitation labels would be stored under "guests", seating name tags under "rsvp"

  12. Finish up and you should see the contents of the selected table

  13. The Mail Merge Recipients window is very powerful, allowing you to sort and filter the records as needed by simply clicking the headers and header buttons, I suggest, however, restraining yourself and using instead the (Advanced..) option available from down arrow buttons in the header. In the example below I selected for my mail merge A-list guests in the United States with the address_1 field filled and no outstanding inquiries

  14. Fancy mail merging will be reserved for a different entry. Click on Next: Arrange your labels. The mail merge fields are available when you click More items...

  15. A label template like
    «invitation»
    «address_1»
    «address_2»{ IF {MERGEFIELD address_2}="" "" "¶"}«city», «state» «zip»
    should prove useful. Don't just cut and paste, the curly brackets are inserted using Ctrl-F9, and the fields using the More items... menu. Some additional logic will be needed to cope with international addresses. You can find more information on using mail merge fields here. To replicate the first label, click on Update all labels

Posted by torque at 10:09 AM | Comments (8) | TrackBack