tyler butler

Yiddish Curses

My friend Dan is Jewish, and he was telling me the other day about Yiddish curses. He had some pretty funny ones, and he managed to find a site or two that listed some more. I don’t know Yiddish, and I can’t even pronounce it based on the spelling, so I’m not going to waste the space of including the actual Yiddish here. If you actually want the Yiddish, go to the sites listed at the bottom of the page. Anyway, here are a few of my favorites.

  • All problems I have in my heart, should go to his head.
  • He should marry the daughter of the Angel of Death.
  • God should visit upon him the best of the Ten Plagues.
  • Venereal disease should consume his body.
  • I should outlive him long enough to bury him.
  • God should bless him with three people: one should grab him, the second should stab him and the third should hide him.
  • He should have a large store, and whatever people ask for he shouldn’t have, and what he does have shouldn’t be requested.
  • God should bestow him with everything his heart desires, but he should be a quadriplegic and not be able to use his tongue.
  • He should be transformed into a chandelier, to hang by day and to burn by night.
  • May your bones be broken as often as the Ten Commandments.
  • May you every day eat chopped liver with onions, herring, chicken soup with matzo balls, carp with horseradish, roast beef with tsimmes (a sweet side dish), pancakes, and tea with lemon – and may you choke on every bite.

[http://www.signonsandiego.com/uniontrib/20040401/news_1c1yiddish.html][1] [http://www.yiddishradioproject.org/exhibits/stutchkoff/curses.php3?pg=3][2] [1]: http://www.signonsandiego.com/uniontrib/20040401/news_1c1yiddish.html (A news story about Yiddish curses.) [2]: http://www.yiddishradioproject.org/exhibits/stutchkoff/curses.php3?pg=3 (A short list of curses… in Yiddish of course!)

Title Droppers

In my line of work, I deal with uppity people every day. When you’re in the position to serve people, you will no doubt encounter countless people who think their problem is more important than everyone else’s. This is to be expected. But what really gets me is when some fool appends their official job title to the end of their email communications, or in a phone conversation, for the sole purpose of getting better service because they’re “important.” If anything, it makes me do the exact opposite. If they think they’re that important, then screw them. I do not care if you’re the executive vice consul presidential aid’s assistant. You will wait, just like everyone else. Screw you and your self-important ego. We’ll see how you talk to me when I’m a millionaire at 25.

PS. Something else that bugs me is people that feel it necessary to include all of their titles in their email signature. This is especially troublesome for students. For example, there was a semester when I could have signed all my emails like this:

Tyler Butler
President, Delta Tau Delta, Gamma Beta Chapter
President, Keygrips Films
Technical Manager, OTS Support Desk
Team Lead, IPRO 305, HawkTour Project

Now really… for any given email, only one title makes sense. I don’t need to notify the world that I am involved in lots of different things. If I write an email where a title the pertains to me is relevant, then I’ll include it. Otherwise, I’ll let my actions, not my titles, speak for me.

Parsing XFDF in PHP

This past week at work I have been working on using Adobe Acrobat to submit form data. The value of this is that the form data can be reimported into the PDF form then printed all purty-lookin’. Anyway, Acrobat allows you to submit your form data in several different formats. One, FDF, is usable in PHP provided you load this module thingy. Unfortunately, the server I want to run the PHP script on uses Irix and the module is unavailable for Irix. Poo.

I then turned to XFDF, which is essentially FDF data all XML-ified. PHP has an XML parser built in, so I don’t have to load any crazy modules to parse the data. Unfortunately, PHP’s parser is SAX-based rather than DOM-based, so it took me a rather long time to figure out how to get it working right. Anyway, here’s the PHP code that essentially takes XFDF data (declare $file as a string pointing to the location of your XFDF file) and parses it into an associative array ($values). The array is indexed by the XFDF field names. The code below is not entirely complete since I snipped it out of a larger file, but if you look at it, I think you’ll get the idea. It’s pretty simple once you figure out the way PHP does XML processing.

/* BEGIN VARIABLE DECLARATIONS */
//global variables for XML parsing
$values = array();
$field = "";
$curTag = "";

/* BEGIN XML PROCESSING */
// XML Parser element start function
function startElement($parser, $name, $attrs)
{
    global $curTag, $field;

    //track the tag we're currently in
    $curTag .= "^$name";

    if( $curTag == "^XFDF^FIELDS^FIELD" )
    {
        //save the name of the field in a global var
        $field = $attrs['NAME'];
    }
}


// XML Parser element end function
function endElement($parser, $name)
{
    global $curTag;

    // remove the tag we're ending from the "tag tracker"
    $caret_pos = [strrpos][1]($curTag,'^');
    $curTag = [substr][2]($curTag, 0, $caret_pos);
}


// XML Parser characterData function
function characterData( $parser, $data )
{
    global $curTag, $values, $field;
    $valueTag = "^XFDF^FIELDS^FIELD^VALUE";

    if( $curTag == $valueTag )
    {
        // we're in the value tag, so put the value in the array
        $values[$field] = $data;
    }
}

// Create the parser and parse the file
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");

if (!($fp = fopen($file,"r")))
{
    die ("could not open XML for input");
}

while ($data = fread($fp, 4096))
{
  if (!xml_parse($xml_parser, $data, feof($fp)))

    {
        die(sprintf("XML error: %s at line %d",
                    xml_error_string(xml_get_error_code($xml_parser)),
                    xml_get_current_line_number($xml_parser)));
    }
}

xml_parser_free($xml_parser);
flclose($fp);

/* END XML PROCESSING */

C# MessageBox Strangeness

I am working on a C# program and I want to pop up a message box when certain fields aren’t filled out properly in the GUI. .Net’s MessageBox class makes it simple to do. However, when I ran my code, my message box looked like this:

I fooled around with it for awhile, trying different combinations of arguments to the Show() method, but I wasn’t able to figure it out. Thankfully, my Google search turned up this forum post pretty quickly. Apparent disabling McAfee’s Buffer Overflow Protection solves the problem. But this makes me wonder whose fault this is. Is it something in C#/.Net? Is it Windows’ fault? Is McAfee just really dumb? Who knows… I’m too lazy to try and figure it out right now.

Ubuntu + LVM

I spent this past weekend hacking away at my Media Box, which serves as my personal free PVR. I wanted to get Ubuntu on it with LVM so I could use all four of my hard drives as one for MythTV. I borrowed one of Vlad’s Ubuntu CD’s (mine haven’t arrived yet and I couldn’t find the one I burnt) and got the installer running. During the partitioning section of the install, I set everything up for an LVM volume group and thought I had everything working. Apparently I didn’t. Silly me for not having a clue how LVM works (always read the directions, kids).

Anyway, my installation was b0rked so I figured I’d just reboot and start from scratch. No. My LVM data was still present every time I tried to install Ubuntu. I would try to remove the volume groups and it would fail, reporting the drives were still in use. I was getting manifest errors up the wazoo. So I thought, ‘OK, I just need to wipe the drives with something else and I’ll be fine.’ So I tried booting off an XP CD into rescue mode and formatting the drives there. No dice. I downloaded a few CD-based disk formatting tools that said they cleared things out but apparently they didn’t. Google searches were returning a whole bunch of information about how to remove volume groups, but nothing about how to forcefully wipe LVM volumes. Funny… most people that use LVM and software RAID are concerned about keeping their data safe. Whatever.

Finally, I came across this forum post, which has the necesarry command. In retrospect it makes sense - just write zeroes to the first part of the disk. But I would have never figured it out. For posterity, here’s the command you need to run on a device to remove all previous LVM info:

dd if=/dev/zero of=/dev/sda bs=1k count=10

Then of course, I had to figure out how the Ubuntu installer was mounting all my drives… but that’s another story. And by the way… after all of this, MythTV just wasn’t liking my remote, and I was suffering PVR withdrawal pretty bad, so I’m back to MCE2005. Looks like I’ll have to keep fast-forwarding through the commercials manually. Such is life.