rhu: (Default)
So a few weeks back I queried: What's the median latitude of land area on the planet Earth? Not having found an answer online, I finally resorted to solving it myself. The answer and how I found it are behind the cut )
rhu: (Default)
I'm writing a little web-based word game, and put together a Python script to compute scores, which involves scanning a wordlist.

Scanning 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.
rhu: (Default)
I'm writing a little web-based word game, and put together a Python script to compute scores, which involves scanning a wordlist.

Scanning 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 am
rhu: (Default)

My 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 am
rhu: (Default)

My 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....

rhu: (Default)
A quick Google and Wikipedia search has been unable to locate a satisfactory answer to this question:

Both 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?
rhu: (Default)
A quick Google and Wikipedia search has been unable to locate a satisfactory answer to this question:

Both 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?
rhu: (Default)
Happy bissextile day to all!

(Even if the Roman Catholic Church gave up the good fight 28 years ago, purists know when to intercalate!)

Note to [livejournal.com profile] mabfan: Consequently, expect me to mark your birthday on the 28th this year.
rhu: (Default)
Happy bissextile day to all!

(Even if the Roman Catholic Church gave up the good fight 28 years ago, purists know when to intercalate!)

Note to [livejournal.com profile] mabfan: Consequently, expect me to mark your birthday on the 28th this year.
rhu: (Default)
To resolve my current email problems, I clearly need to start paying for a VPS. I know several of you use openhosting.com but I don't want to spend $20/month if I don't have to. Anyone know of a less-expensive solution? My primary goal is to run exim. A quick Google search turned up an outfit called vpslink who have a Debian VPS package with 100GB/month of bandwidth for less than $7/month if you prepay for a year, which is about the right price point. Anyone heard of them? Any better ideas?

Thanks!
rhu: (Default)
To resolve my current email problems, I clearly need to start paying for a VPS. I know several of you use openhosting.com but I don't want to spend $20/month if I don't have to. Anyone know of a less-expensive solution? My primary goal is to run exim. A quick Google search turned up an outfit called vpslink who have a Debian VPS package with 100GB/month of bandwidth for less than $7/month if you prepay for a year, which is about the right price point. Anyone heard of them? Any better ideas?

Thanks!
rhu: (Default)
Walt Mossberg reviews [WSJ Online subscription required, perhaps?] the Asus Eee, a cheap ($300-$500) Linux subnotebook. Not quite right, but getting close for what I wish for.
rhu: (Default)
Walt Mossberg reviews [WSJ Online subscription required, perhaps?] the Asus Eee, a cheap ($300-$500) Linux subnotebook. Not quite right, but getting close for what I wish for.
rhu: (Default)
SELECT
-- 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)

rhu: (Default)
SELECT
-- 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)

rhu: (Default)
What's the best way to allow N headsets to listen to one headphone-out jack? That depends on N, of course )

Should I give up and look to buy (or heaven help me build) some sort of inexpensive, lightweight, compact amplifier with lots of independent outputs?
rhu: (Default)
What's the best way to allow N headsets to listen to one headphone-out jack? That depends on N, of course )

Should 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 am
rhu: (Default)
Since this has come up several times with different people lately, here are some pieces of free software that I use regularly to simplify common tasks. You may find them useful, too:

AutoHotKey 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.

Profile

rhu: (Default)
Andrew M. Greene

January 2013

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags