Friday, August 31, 2012

Secret Gseos methods?

Found this in some of Martin's Python code, looks like exactly what we should have been using for many of our prompt boxes:

Gseos.MB_YESNO

Thursday, August 30, 2012

argument after * must be a sequence

While trying to call my new python code through a Gseos.Tsequencer, I kept getting this error: "argument after * must be a sequence". The code runs fine when called directly. It turns out the problem was because my routine had only one argument aside from the sequence ID. When you call a routine through the Tsequencer, you feed in your arguments and it prepends the sequence ID as the first argument. Other routines are called in the Tsequencer like: Gseos.Tsequencer("name", routine(argument1, argument2, argument3, argument4)). I was calling mine this way: Gseos.Tsequencer("name", routine(argument)). According to this site:

https://code.djangoproject.com/ticket/14088

I have to have the arguments to the routine in the format of a "tuple" (or maybe it's a "list"). I think this might be so that the overloading with the sequence ID can work. That would be like: Gseos.Tsequencer("name", routine(argument,)).

Sure enough, it worked!

Wednesday, August 29, 2012

Excel 2010 transpose rows and columns

Select the section to tranpose, and use "paste special" with transpose selected (or in the case of the windows 7 version click the transpose icon under paste special). Super easy.

http://www.howtogeek.com/howto/12366/convert-a-row-to-a-column-in-excel-the-easy-way/

No dos2unix for mac OSX

Nope. You've got to find a third party substitute, download a gnu or BSD version and stick it in /usr/bin, or do conversions much more manually. Most sites I've found recommend the latter with this command:

cat $offending_file | tr '\r' '\n' > $new_filename

for instance:

http://hints.macworld.com/article.php?story=20031018164326986

Sunday, August 26, 2012

iBook G4 powerPC os 9 classic download

Trying to get any software at all to run on this old iBook G4. All downloads including f#$%ng flash for pbskids.org require os9 classic. I could swear that my previous search for this topic had led me to an Apple page where it could be downloaded from, but I can't find it now. So here's a bin for the clues that I have been able to find so far.

My system's stats are: iBook G4 with an 800 MHz PowerPC G4 (v3.3), 640 MB DDR SDRAM, running Mac OS X Version 10.4.11

This page describes a process of just ganking the system folder from another mac:

http://hintsforums.macworld.com/showthread.php?t=96961

Here is a page that supposedly gives hints on how to do exactly what it is that I am trying to do, except that the font and page formatting make it unreadable:

http://reviews.cnet.com/8301-13727_7-10331436-263.html?tag=mfiredir

Here is the starting point of the intestine on the Apple "Knowledge Base":

http://support.apple.com/kb/TS1929

Sadly, links from that page are no longer good (they redirect to a top-level search page)

I recall hitting this forum thread before, this is the one where somebody says that mac 9.2.2 is available "free from Apple":

https://discussions.apple.com/thread/1083224?start=0&tstart=0

OK, here is the Apple.com page that sure looks like it's a free download of 9.2.2:

http://support.apple.com/kb/DL1293?viewlocale=en_US


end.

Saturday, August 25, 2012

Vanguard 1 schematic

Going to the Air & Space Museum is a somewhat different experience for me than most folks, I am thrilled to look at the wiring and connectors on the planes and spacecraft! The height of my last visit was noticing the first Vanguard 1 right there on display under glass. It is shown bent up and (possibly artificially) broken open. You can look right inside, where there are apparent some kind of metal cylinder with relatively standard-looking mini-rf connectors from which little coax cables lead (presumably to the antennas). The cylinder was a bit of a mystery, but I wondered if it would be possible to find the schematics for the satellite somewhere online, they couldn't be very large.

Of course such a thing was easily found. This article:

http://aa1tj.blogspot.com/2012/06/vanguard-1-satellite-transmitter.html)

is by a guy who built a copy of the Vanguard 1 transmitter, apparently called a "minitrack" transmitter, and then used it to get the attention of his radio friends. There's complete contemporary schematics, a description of how he used antique transistors and why, and pictures of his build. Then it wanders off into rf jokes between him and his friends. So nerdy, and yet he reconstructed technology history in the most genius way; this is really living and thinking!

This article has a mechanical schematic that shows the cylinder:

http://weebau.com/satellite/V/vanguard%201.htm

This article has a post-recovery photo of TV-3 which does not show its body to have been split, which makes me suspicious of the display at the Smithsonian:

http://nssdc.gsfc.nasa.gov/nmc/spacecraftDisplay.do?id=1958-002B

Thursday, August 16, 2012

How to tell what process is preventing my USB drive from ejecting

Results from the above query actually led to an answer, finally.

First of all, I found, downloaded, and tried DevEject, which has a nice GUI that identifies the reason why the "cannot eject xxxxx right now, try again later" message is coming up.

http://www.technostarry.com/windows/how-to-solve-usb-drive-is-in-use-problem-prevent-usb-locking/

http://deveject.com/

In my case, this led to the discovery, obvious in retrospect, that the TortoiseSVN cacheing process (tsvncache.exe) was the process grinding away in the directories on my USB backup drive. Further queries revealed that it's pretty easy to curtail this cacheing to just the directories on my main drive that I need it to show the SVN status of. This has the fortunate side effect of eliminating a lot of unnecessary system load as well. I am far from the first person to have had this problem, and there are lots of forum threads and web pages discussing how to do this:

http://assorted-experience.blogspot.com/2008/03/optimizing-tsvn-cache.html

Note that the above link hints that Process Explorer might have accomplished what DevEject does.

http://superuser.com/questions/69699/prevent-tsvncache-from-running

http://www.paraesthesia.com/archive/2007/09/26/optimize-tortoise-svn-cache-tsvncache.exe-disk-io.aspx





Wednesday, August 8, 2012

Goody Woodgrain Brush

Info about the types of hairbrushes to buy more of:

1. Goody Woodgrain Brush #04391
2. Goody Boar Bristle Round Brush #17886
3. Conair Detangling shower comb #13385Z

Tuesday, August 7, 2012

Excel decoding and adding times

Writing this Excel task taught me a lot of nice tips and tricks! The job was: A comma delimited file had a column of times not quite in a standard format, the times were for "on" and "off" events, I had to total the elapsed time between each "on" and "off". To do this, I had to decode the timestamp into Excel time format, verify that each on and off matched by comparing that the other column contents matched, and then add each total time.

New column 1: The source column has timestamps in this format: "2012/03/29_11:06:46" Set cell format of the new column to Date expressed as 1/1/2001 13:30. Then use this formula:

=DATEVALUE(MID(E3,1,10))+TIMEVALUE(MID(E3,12,8))

The following links contained all the information needed to figure this part out:

http://superuser.com/questions/274494/convert-text-string-to-date-time-format
https://exceljet.net/formula/convert-date-string-to-date-time

New column 2: Compares the "ON/OFF" column in the current and adjacent rows, along with the other identification column data to determine if the ON event matches the off event:

=IF(OR((AND(D3=$N$1, B3=B4,C3=C4,F3=F4,G3=G4,H3=H4, D4=$O$1)),(AND(D3=$O$1, B3=B2,C3=C2,F3=F2,G3=G2,H3=H2, D2=$N$1))),"Matched","Oops")

$N$1 and $O$1 contained the strings ON and OFF for comparison purposes. There was a much harder way to do this without just creating cells to compare to, but this way was just so much simpler.

This link demystified the syntax for OR and AND in conjunction with IF:

http://www.experiglot.com/2006/12/11/how-to-use-nested-if-statements-in-excel-with-and-or-not/

Here are a couple of links on the problem of trying to do an equate comparison on text cells. They too feel that the solution that I went with is a fallback and inelegant, but list it anyhow:

http://superuser.com/questions/284022/comparing-two-strings-in-excel

http://www.mrexcel.com/archive/Formulas/2870.html

New column 3: If the row is an "OFF" with a matching "ON" then print the total elapsed time. If not, print a blank string. This shows how I continue to cling to visual readability in the output. The basic test uses new column 2, comparing it to another preconfigured cell $P$1 that has the word "Matched" entered.

=IF(AND(D3=$O$1,J3=$P$1),I3-I2,"")

New columns 4 and 5: Cell format is time as 39:00:00. First cell of each column contains 0. Checks one of the other identity columns for whether it's an "A" or "B" ON/OFF event. If matched, and it's an "OFF" event, then add the time from new column 3 to the running time total, otherwise just use the previous cell's total.

=IF(AND(C3=$Q$1,D3=$O$1,J3=$P$1),L2+K3,L2)
=IF(AND(C3=$R$1,D3=$O$1,J3=$P$1),M2+K3,M2)

Off to the side, I printed a list of one of all of the different options for one of the identity columns, using this handy tip:

http://www.windowsreference.com/ms-office/how-to-extractlist-unique-values-in-a-column-in-microsoft-excel/


unix svn show log

Still getting the hang of command line svn, had to look up show log. This page answered my question and more:

http://stackoverflow.com/questions/4881129/how-do-you-see-recent-svn-log-entries

Most useful was show log -v !!!!