Sunday, September 30, 2012

IDL show line numbers

How to get the fancy viewer to show the line numbers is a bit tricky. Here's the link that gave me the answer:

https://www.exelisvis.com/language/en-US/UserCommunity/UserForums/forumid/27/postid/11936/scope/posts.aspx

IDL pause for debugging

IDL can be a royal pain sometimes, but the fact that it's a scripted language comes in handy when you have to debug. Aside from being able to just start typing in IDL commands right in the current focus if a proc hangs up, you can also set breakpoints and do stepping.

I never used the following info about doing it from the command line, but this has lots of useful features.

http://idlastro.gsfc.nasa.gov/idl_html_help/BREAKPOINT.html

Formatting strings in IDL

Just a quick dump of links that I searched to get a handle on IDL's syntax for formatting strings.

These two may have been the best pages, with examples that show the nearly but not quite C-like formatting methods and a nice table of the format codes:

http://idlastro.gsfc.nasa.gov/idl_html_help/C_printf-Style_Quoted_String_Format_Code.html

http://star.pst.qub.ac.uk/idl/Format_Codes.html

This one showed one example of how to print an array to a file with formatting:

http://www.cis.rit.edu/class/simg211/datao.html

For a beginner's guide, this page was surprisingly useless:

http://www.stsci.edu/hst/training/events/IDLTopics/SSD98IDL/IDL_dataio.html#Writing%20Formatted%20Data

Here's the whole damn manual:

http://www.astro.virginia.edu/class/oconnell/astr511/IDLresources/getting-started-IDL-v7.0.pdf

Monday, September 24, 2012

Muller Universal wrist brace

Even though this wrist brace was lame because of having a thumb hole on both sides, it has turned out to be most helpful for my ganglion cycst of the 2 or 3 I've tried since buying this one. Of course, it's not in the stores anymore, but I tracked it down. It turns out that the original wrist brace had a tag that said "B306". That is this Beige 306 brace:

http://www.medshopexpress.com/050016.html?utm_source=googlepepla&utm_medium=adwords&id=19655764808&utm_content=pla&gclid=COy8zvqTuLICFYTd4AodbAgA0g#

Also this one, although they don't show the beige:

http://www.ambercity.com/wrist-brace-w-splint-beige-osfm-306-74676306018.html

Here it is on Amazon:

http://www.amazon.com/Mueller-Wrsit-Brace-withsplIncht-Beige/dp/B001B7O12O/ref=sr_1_1?s=hpc&ie=UTF8&qid=1347868022&sr=1-1&keywords=mueller+wrist+brace+306

I only figured out recently that the metal bar inside was intended to be removable!

Splitting binary file in two

All answers to this question involved using unix. No surprise.

Early hunts for an answer to this question involved the "split" command. However, split seems to be geared for cutting files into evenly sized pieces only, and not a single arbitrarily placed cut.

That's okay, because "dd" is my new best buddy. It's loaded with arguments, all of which have a lovely archaic format, and can do any number of cuts anywhere. The version of this command that I will henceforth use until the grave is any variation of the following:

for first half:
dd bs=1st location after split count=1 if=infile of=outfile
for last half
dd bs=1st location after split skip=1 if=infile of=outfile

The main hints were found in this forum thread:

http://unix.stackexchange.com/questions/6852/best-way-to-remove-bytes-from-the-start-of-a-file

This other thread is nearly all above my head; neat shmott shtuff, but this where I first got a clue of the existence of dd. I wonder what xxd is?:

http://stackoverflow.com/questions/9451890/how-to-dump-part-of-binary-file

Saturday, September 22, 2012

Samsung F210 mp3 player can't read ID3 tags

Love the F210, but the MP3 player didn't recognize album or artist for most of the songs that I brought over from Lisa's iTunes.

After some research, mp3tag seemed the best option and least likely to contain malware. This forum thread seems to go over lots of different types of mp3 tag problems and their solutions: http://social.technet.microsoft.com/Forums/en/w7itpromedia/thread/0b284232-aaf4-4cd8-8fee-91b46e9acbd9

And here's where mp3tag comes from: http://www.mp3tag.de/en/

The most likely culprit seemed to be which ID3 tag format was being used (particularly since some files worked and some didn't. There is apparently an ID3v1 and an ID3v2, files can have either or both, and they're different enough from each other to be incompatible for some players.

Here's a different product that had changing the tag version built into its front panel: http://www.maniactools.com/soft/mp3tag/copy-id3v1-to-id3v2-or-id3v2-to-id3v1.shtml

Here's how to do it in mp3tag. The key is to set the tag save type in Options, then save the tags. In practice, it is often necessary to fiddle with the tags before they will be saved. Also, the default settings for the files on my little micro-SD card seems to have been "Read Only", so saving may not have been having an effect at first (although I didn't get any feedback saying that there was a problem). http://forums.mp3tag.de/lofiversion/index.php/t6727.html

So, it turns out that the version that I needed was version 2.3! There's also a version 2.4 and maybe other later ones. The plain version 2 or maybe it's version 2.2 could not be read by the F210. Most of the tags in Lisa's iTunes were 2.2, and many were noted by mp3tag as "Bad 2.2". There are also apparently three different flavors of 2.3, UTF-8, UTF-16, and ISO something. The player didn't seem to care between UTF-16 and ISO.

This forum thread had the 2.3 answer, but it was buried under a bunch of distracting stuff about FLAC version tags: http://androidforums.com/samsung-captivate/139592-samsung-player-doesnt-recognize-my-music-tags.html

This is just an interesting forum thread by a guy who tried a bunch of stuff to fix a problem only slightly related to mine: http://forums.mp3tag.de/lofiversion/index.php/t12455.html

Tuesday, September 11, 2012

Toyota Echo OBD2 P0301

Lisa's car started shuddering as if it was running on three cylinders. We got it home and I borrowed John's OBD2 ( or OBDII) data reader, and got back a P0301 error, misfile on Cylinder 1.

At Pep Boys to buy plugs and wires, I learned that the Echo does not have wires, but instead an ignition coil module for each spark plug!

Replaced the plugs, none of them seemed worse than the others, but they all showed great wear and were well more than double the prescribed gap.

That didn't fix it. Googled for a while to double check which cylinder was #1, and came across the duh idea to swap two ignition modules around and see if the problem follows the module. It did, so I went back to Pep Boys (despite reading warnings that aftermarket modules may not work due to not adhering to Toyota specs) and got the one module that they had in stock, and now the Echo is happy again. Also did some research into the viability for replacing the injectors or cleaning them, and even bought some cleaner but haven't used it yet.

My favorite links found:

A story about using the OBD2 reader: http://www.toyotanation.com/forum/132-9th-generation-2003-2008/369315-fixed-my-p0171-code-thanks-forum.html

A story about a guy with a Ford who got a P0301 error, but he had the bad brake booster problem that I had with the Pinto: http://www.rangerpowersports.com/forum/f10/p0174-p0302-p0301-vacuum-leak-254083.html

Some idiotic answers from ranndom people on the Internet about P0301: http://wiki.answers.com/Q/What_is_code_P0300_Random_Misfire_Detected_P0302_and_P0303_on_a_Toyota_Corolla_and_how_do_you_repair_it

A guy whose similar Echo cut out. I don't think that he got and answer here: http://www.toyotalexusforum.com/toyota-camry-club/5887-toyota-echo-2000-misfire.html

A case of a bad coil: http://www.toyotanation.com/forum/26-yaris-vitz-echo-forum/370063-testing-ignition-coils-2001-echo.html

The cylinder order: http://wiki.answers.com/Q/What_is_the_firing_order_for_a_Toyota_Echo_1.5_V4

The long story where a guy got replacement coils off the Internet and they turned out to be junk: http://www.justanswer.com/toyota/1je9q-2001-toyota-echo-cylinder-check-engine-light-on-cyl-misfire.html

Replacing the Fuel Injectors: I lost the history leading up to this drawing, but the page that I was on insisted that you had to remove the valve cover first. Looking at the engine, it doesn't seem as though that would be required, but here's te diagram: http://s3.amazonaws.com/2cp-images/question_images/9553/large.jpg?1309087734

This ehow seems to agree with me: http://www.ehow.com/how_7868615_replace-fuel-injectors-1zz-fe.html

How to show file extensions in Windows 7.

In another example of Windows 7 moving towards hiding controls for things in absurd, removed locations, I could not f*$#&$g figure out how to turn on file extensions for a new Windows 7 system. Asking the question on Google came up with thousands and thousands of hits of other people asking the same question. This page described how to excavate the show folder options dialog far more clearly than I could, and with less rage-driven flecks of spittle:

http://askabouttech.com/how-to-show-file-extension-in-windows-7/

Unix Subversion get SVN level for a directory

Randomly trying variations on svn log weren't working for me, so I found out that there is a stand-alone utility to do this task: svnversion .

From here:

http://www.zorched.net/2006/07/20/getting-the-revision-number-of-your-subversion-working-copy/

Mac task manager

Trying to kill a program stuck on an infinite Rainbow Wheel wait, I'm not sure what the process name is so ps -eaf and kill won't help me. Fortunately, OSX has a task manager GUI like Windows, it's just hidden like everything else on a mac. To get the GUI task manager, just hold down option, command and escape at the same time.

From here:

http://forums.macrumors.com/showthread.php?t=100694

My eyeglass prescription

Here is all the info needed to order new glasses:

My original prescription:

The new baseline prescription by Professional Eye Care:

SPH CYL AXIS PRISM BASE
R -2.75 -1.00 007 xxx xxx
L -1.50 -1.00 0160 xxx xxx

The reading prescription: (target for either bifocals or progressive lenses)

SPH CYL AXIS PRISM BASE
R -1.00 -1.00 007 xxx xxx
L +0.25 -1.00 0160 xxx xxx

The above can also be stated as baseline prescription ADD:

R +1.75
L +1.75

The "Occupational" prescription is:

SPH CYL AXIS PRISM BASE
R -1.75 -1.00 007 xxx xxx
L -0.50 -1.00 0160 xxx xxx

to which the following ADD makes the reading prescription:

R +0.75
L +0.75

vi no wrap

Editing ascii printouts of hex dumps of packet data, want to see one per line. In vi, it's a simple command:

:set nowrap.

From here: http://www.devdaily.com/blog/post/linux-unix/vi-editor-dont-wrap-long-lines

Here's another thread that seems to indicate that there is a lot more to look into, i.e. :set newrap doesn't seem to disable an automatic newline feature that I don't know if I believe I've ever run into:

https://stackoverflow.com/questions/2280030/how-to-stop-line-breaking-in-vim

Saturday, September 8, 2012

Chigger Bites

Best links that I've found so far about chigger bites. The takeaway: These bastards are pure evil. The first thing to do is wash them off, as unlike ticks they wash off easily. They don't burrow contrary to folk wisdom. The bites are the itchiest, but just have to be treated like bites. Nail polish may work, not by fighting the chigger but by sealing the hole and preventing scratching.

Best link: http://www.medicinenet.com/chiggers_bites/article.htm

A cute children's link: http://kidshealth.org/kid/ill_injure/bugs/chigger.html

A dry article: http://www.wikihow.com/Treat-Chigger-Bites

A warning against scratching: http://animals.howstuffworks.com/arachnids/question488.htm

Samsung F210 case and headphone adapter

Accessories found for the F210.

Cases:

I can't seem to find the original case that I bought 5 years ago that has the nice snap. They all have magnetic clasps, oh well. Interestingly, there are plenty of open plastic holsters on the market still.

Bought this: http://www.amazon.com/Fashionable-Vertical-Protective-Carrying-T-mobile/dp/B002Q44UTK/ref=sr_1_37?s=wireless&ie=UTF8&qid=1347037813&sr=1-37&keywords=samsung+juke

This looks pretty ugly but strong: http://www.ebay.com/itm/Samsung-SCH-U470-Juke-Black-Stitch-Pouch-/270701790340?pt=PDA_Accessories&hash=item3f07158484

This is cheap and the right design but brown: http://www.amazon.com/Samsung-Brown-Leather-Pouch-SCH-U470/dp/B0013ALA64/ref=pd_cp_cps_0 Note Samsung part number WT17200000156

Here it is in black but for $20. Note also has a Samsung part number too http://www.amazon.com/Samsung-Black-Leather-Pouch-SCH-U470/dp/B0011WEOFS/ref=sr_1_10?s=wireless&ie=UTF8&qid=1347120604&sr=1-10&keywords=Samsung+u470+leather

Here's a nice one that I'll probably buy: http://www.daydeal.com/product.php?productid=20657

Headphone adapters:

The F210 strangely does not have a headphone jack. You have to plug into the multifunction jack at the bottom.

bought this, looks like it's OEM: http://www.amazon.com/Samsung-SCH-R410-SPH-M310-SGH-T339-AAET503CBEBSTD/dp/B002MUUNEE/ref=sr_1_1?ie=UTF8&qid=1347121303&sr=8-1&keywords=samsung+audio+adapter Update: The company that sent this did not send the part shown. Consequently, it does not fit into the recessed hole at the bottom of the phone. I could probably make it fit by filing away some of the plastic on the connector body.

bought this, it was cheap: http://www.amazon.com/SAMSUNG-ADAPTER-ETERNITY-BEHOLD-BLACKJACK/dp/B001KYJ80I/ref=sr_1_2?ie=UTF8&qid=1347121303&sr=8-2&keywords=samsung+audio+adapter Update: In retrospect, this one screamed incompatible but I didn't see it. Due to the recessed hole at the bottom of the phone, the body of the "Micro USB" connector on this one is too bulky. Some of my chargers have the same problem; clearly some phones including my Juke don't have any problem with the size of the backshell part of the connector.

didn't buy this, because it was a horrific $4 (and it didn't have my exact model in the list of phones it was compatible with, although how different could it be). Looks pretty good really: http://www.amazon.com/Hands-Free-Highlight-Eternity-Impression-Comeback/dp/B002S5R4IG/ref=pd_luc_sbs_02_04_t_lh

Update 1: Now I'm looking for a way to plug in a standard cell wired headset, the 2.5mm kind.

There's this one, which is an OEM breakout box for the connector. It seems to have 2 types of headphone jacks and one extender connector for the MicroUSB, a fact which frustrates customers wanting to use the data port and charge at the same time: http://www.amazon.com/Samsung-Multi-Adapter-2-5mm-AAET554CBE/dp/B002OT3RB4/ref=sr_1_54?ie=UTF8&qid=1348456185&sr=8-54&keywords=samsung+2.5mm+adapter. Note that the Samsung part number is AAET554CBE

The picture on this one looks to be OEM, but given how I got screwed ordering the 3.5mm, can I trust it? http://www.amazon.com/Samsung-i617-S20Pin-2-5mm-Adapter/dp/B001GV0CPA/ref=pd_cp_e_2

Here's another one. It doesn't show my phone model#, and some other reviewer said that certain adapters are not compatible with each other so maybe this one won't work: http://www.amazon.com/Samsung-SGH-T349-SGH-T749-SGH-T559-SGH-T469/dp/B002N8J89G/ref=pd_cp_e_1