Geeky latitude question answered
Jun. 30th, 2010 11:09 amSurprising results
Jun. 25th, 2010 11:43 amScanning the list by opening a text file and iterating through: 7 seconds
Importing the list into a SQLite DB and using SELECT LIKE: 15 seconds
Computing the set of substrings in Python and using SELECT IN: 19 seconds
If you'd asked me going in, I would have expected these to be in the other order. Of course, there are some other tricks I can start using with indexing the SQL tables and optimizing my queries that will help.
Surprising results
Jun. 25th, 2010 11:43 amScanning the list by opening a text file and iterating through: 7 seconds
Importing the list into a SQLite DB and using SELECT LIKE: 15 seconds
Computing the set of substrings in Python and using SELECT IN: 19 seconds
If you'd asked me going in, I would have expected these to be in the other order. Of course, there are some other tricks I can start using with indexing the SQL tables and optimizing my queries that will help.
Oh, no....
Jun. 12th, 2008 12:02 amMy Linux server no longer seems to be able to mount samba drives, which means that the nightly backups of my Windows machine aren't happening. I could reboot the Linux box to see if that would help, but....
/home/andrew> uptime 23:59:16 up 363 days, 16:49 .....
If I wait for the weekend, it will have gone an entire year without needing to be rebooted. I think I'll wait....
Oh, no....
Jun. 12th, 2008 12:02 amMy Linux server no longer seems to be able to mount samba drives, which means that the nightly backups of my Windows machine aren't happening. I could reboot the Linux box to see if that would help, but....
/home/andrew> uptime 23:59:16 up 363 days, 16:49 .....
If I wait for the weekend, it will have gone an entire year without needing to be rebooted. I think I'll wait....
OK, LJ Brain Trust
Mar. 21st, 2008 10:10 amBoth Passover and Easter are scheduled based on the 19-year Metonic cycle. In some years, such as this one, however, Judaism intercalates the extra month one year before the Western Church does, resulting in Easter and Passover not coinciding. What is the nature of the difference in calculation, when was that difference introduced, and why?
OK, LJ Brain Trust
Mar. 21st, 2008 10:10 amBoth Passover and Easter are scheduled based on the 19-year Metonic cycle. In some years, such as this one, however, Judaism intercalates the extra month one year before the Western Church does, resulting in Easter and Passover not coinciding. What is the nature of the difference in calculation, when was that difference introduced, and why?
Happy bissextile day!
Feb. 24th, 2008 12:00 am(Even if the Roman Catholic Church gave up the good fight 28 years ago, purists know when to intercalate!)
Note to
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
Happy bissextile day!
Feb. 24th, 2008 12:00 am(Even if the Roman Catholic Church gave up the good fight 28 years ago, purists know when to intercalate!)
Note to
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
Looking into Linux VPS hosting
Feb. 19th, 2008 03:43 pmThanks!
Looking into Linux VPS hosting
Feb. 19th, 2008 03:43 pmThanks!
The strangest SQL I've ever written
Nov. 2nd, 2007 12:30 pmSELECT -- various aggregation functions FROM RecipientGroup g CROSS JOIN (SELECT 0 AS b_UsingTestData UNION SELECT 1) AS TestDataFlag LEFT OUTER JOIN RecipientData rd ON rd.GroupID=g.GroupID AND rd.b_IsTestRecord = TestDataFlag.b_UsingTestData GROUP BY g.GroupID, TestDataFlag.b_UsingTestData ORDER BY g.GroupID, TestDataFlag.b_UsingTestData
OK, SQLheads, is there a better way to ensure that every group's aggregate data includes rows for both the test records and the live records, even if a particular group only has test or live data? Because that cross join in bold feels like it's either incredibly elegant and idiomatic or the ugliest kludgy hack ever, and I'm too close to it to be able to tell which. (This is for Microsoft SQL Server 2000 and 2005)
The strangest SQL I've ever written
Nov. 2nd, 2007 12:30 pmSELECT -- various aggregation functions FROM RecipientGroup g CROSS JOIN (SELECT 0 AS b_UsingTestData UNION SELECT 1) AS TestDataFlag LEFT OUTER JOIN RecipientData rd ON rd.GroupID=g.GroupID AND rd.b_IsTestRecord = TestDataFlag.b_UsingTestData GROUP BY g.GroupID, TestDataFlag.b_UsingTestData ORDER BY g.GroupID, TestDataFlag.b_UsingTestData
OK, SQLheads, is there a better way to ensure that every group's aggregate data includes rows for both the test records and the live records, even if a particular group only has test or live data? Because that cross join in bold feels like it's either incredibly elegant and idiomatic or the ugliest kludgy hack ever, and I'm too close to it to be able to tell which. (This is for Microsoft SQL Server 2000 and 2005)
Circuit geeks, help!
Jun. 15th, 2007 12:07 pmShould I give up and look to buy (or heaven help me build) some sort of inexpensive, lightweight, compact amplifier with lots of independent outputs?
Circuit geeks, help!
Jun. 15th, 2007 12:07 pmShould I give up and look to buy (or heaven help me build) some sort of inexpensive, lightweight, compact amplifier with lots of independent outputs?
Tools I use
Jan. 2nd, 2007 09:47 amAutoHotKey is like the old DOS utility ProKey (remember them?) It lets me define all sorts of key macros, so for example I can use the keyboard to quickly switch to a particular app, autocorrect typos in any program, etc. [Windows only]
Taskbar Shuffle is like the old PCMag utility "Button Boogie" -- it lets me rearrange the tabs in my Windows taskbar. [Windows only, duh]
Unison is a tool for keeping multiple file trees synchronized. Layered on top of ssh, it's what I use to keep files in sync among my home, work, and backup computers. It's like rsync except that it works among an arbitrarily large number of nodes. [All modern platforms]
And, of course: GAIM, emacs, cygwin, perl, Opera, VNC. I can elaborate on any of those if you want, but I think they are all sufficiently well-known that I don't need to provide links or explanations.