Programmers with a good sense of humor

Two funny things I have discovered today.

First is an easter-egg in a trace route, from people at BeagleNetworks.net that have inserted the plot of Star Wars Episode IV in their internal routes. Just traceroot 216.81.59.173 to see what happens. Here is the listing:

[...]>tracert -h 60 216.81.59.173

Tracing route to read.more.at.beaglenetworks.net [216.81.59.173] over a maximum of 60 hops:
 [...]
 10   129 ms   133 ms   129 ms  216.66.0.26
 11   169 ms   168 ms   171 ms  10.26.26.102
 12   166 ms   172 ms   172 ms  Episode.IV [206.214.251.1]
 13   168 ms   173 ms   167 ms  A.NEW.HOPE [206.214.251.6]
 14   172 ms   170 ms   172 ms  It.is.a.period.of.civil.war [206.214.251.9]
 15   169 ms   172 ms   171 ms  Rebel.spaceships [206.214.251.14]
 16   170 ms   166 ms   172 ms  striking.from.a.hidden.base [206.214.251.17]
 17   171 ms   172 ms   171 ms  have.won.their.first.victory [206.214.251.22]
 18   169 ms   173 ms   172 ms  against.the.evil.Galactic.Empire [206.214.251.25]
 19   173 ms   174 ms   169 ms  During.the.battle [206.214.251.30]
 20   172 ms   172 ms   172 ms  Rebel.spies.managed [206.214.251.33]
 21   171 ms   172 ms   172 ms  to.steal.secret.plans [206.214.251.38]
 22   170 ms   172 ms   172 ms  to.the.Empires.ultimate.weapon [206.214.251.41]
 23   169 ms   172 ms   173 ms  the.DEATH.STAR [206.214.251.46]
 24   170 ms   171 ms   171 ms  an.armored.space.station [206.214.251.49]
 25   169 ms   175 ms   172 ms  with.enough.power.to [206.214.251.54]
 26   169 ms   173 ms   171 ms  destroy.an.entire.planet [206.214.251.57]
 27   172 ms   175 ms   168 ms  Pursued.by.the.Empires [206.214.251.62]
 28   172 ms   172 ms   171 ms  sinister.agents [206.214.251.65]
 29   171 ms   171 ms   172 ms  Princess.Leia.races.home [206.214.251.70]
 30   171 ms   172 ms   172 ms  aboard.her.starship [206.214.251.73]
 31   170 ms   190 ms   175 ms  custodian.of.the.stolen.plans [206.214.251.78]
 32   169 ms   172 ms   173 ms  that.can.save.her [206.214.251.81]
 33   174 ms   172 ms   173 ms  people.and.restore [206.214.251.86]
 34   170 ms   173 ms   173 ms  freedom.to.the.galaxy [206.214.251.89]
 35   172 ms   172 ms   173 ms  0-----I-------I-----0 [206.214.251.94]
 36   172 ms   172 ms   171 ms  0------------------0 [206.214.251.97]
 37   171 ms   173 ms   173 ms  0-----------------0 [206.214.251.102]
 38   172 ms   172 ms   173 ms  0----------------0 [206.214.251.105]
 39   171 ms   173 ms   174 ms  0---------------0 [206.214.251.110]
 40   172 ms   171 ms   172 ms  0--------------0 [206.214.251.113]
 41   171 ms   172 ms   171 ms  0-------------0 [206.214.251.118]
 42   172 ms   172 ms   172 ms  0------------0 [206.214.251.121]
 43   171 ms   171 ms   172 ms  0-----------0 [206.214.251.126]
 44   169 ms   173 ms   172 ms  0----------0 [206.214.251.129]
 45   171 ms   172 ms   175 ms  0---------0 [206.214.251.134]
 46   173 ms   173 ms   173 ms  0--------0 [206.214.251.137]
 47   171 ms   174 ms   172 ms  0-------0 [206.214.251.142]
 48   171 ms   173 ms   174 ms  0------0 [206.214.251.145]
 49   174 ms   173 ms   173 ms  0-----0 [206.214.251.150]
 50   174 ms   173 ms   173 ms  0----0 [206.214.251.153]
 51   171 ms   173 ms   174 ms  0---0 [206.214.251.158]
 52   176 ms   181 ms   172 ms  0--0 [206.214.251.161]
 53   172 ms   173 ms   172 ms  0-0 [206.214.251.166]
 54   176 ms   228 ms   171 ms  00 [206.214.251.169]
 55   175 ms   171 ms   172 ms  I [206.214.251.174]
 56   172 ms   173 ms   175 ms  By.Ryan.Werber [206.214.251.177]
 57   175 ms   171 ms   172 ms  Blizzards.Breed.CCIE.Creativity [206.214.251.182]
 58   175 ms   177 ms   177 ms  Please.Try.Again.Tracerote.to.obiwan.scrye.net [206.214.251.185]
 59   173 ms   176 ms   176 ms  read.more.at.beaglenetworks.net [216.81.59.173]

The second is a funny error message when an error occurred while trying to unsubscribe from youtube. The message reads “A team of highly trained monkeys has been dispatched to deal with the situation.”
trainedmonkeys

2 thoughts on “Programmers with a good sense of humor”

  1. Va salut,

    Cautam o solutie pentru o problema pe care o am cu un tabcontrol pe o fereastra WPF (in C#) si am dat peste site-ul dvs.

    Nu am gasit unde sa pun intrebarea asta asa ca o postez aici.

    Deci, pe o fereastra WPF am asta (o lista de nume cu tab-uri pentru fiecare litera)

    Codul C#:

    private void tabControlPatients_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
    if (e.OriginalSource is TabControl)
    {
    foreach (TabItem elementoTab in tabControlPazienti.Items)
    {
    //aici se blocheaza cu eroarea: “Cannot change cell selection when the SelectionUnit is FullRow” daca schimb in xaml SelectionUnit=”FullRow” in loc de SelectionUnit=”CellOrRowHeader”; adica daca schimb in FullRow merge
    elementoTab.Content = null;
    }

    ArrayList filtro = new ArrayList();
    filtro.Insert(0, ((TabItem)tabControlPatients.SelectedItem).Header.ToString());

    ((TabItem)tabControlPatients.SelectedItem).Content = loadPatReturn(userData, idCompany, filter);
    }

    }

    public DataGrid loadPatReturn(Person userData, int idCompany, ArrayList filter)
    {
    DbDataAdapter da = personDao.List(idCompany, filter);
    DataSet dataset = new DataSet();

    dataGridPatients.AutoGenerateColumns = false;
    dataGridPatients.IsReadOnly = true;

    da.Fill(dataset);
    dataGridPatients.ItemsSource = dataset.Tables[0].DefaultView;

    return dataGridPatients;
    }

    private void dataGridPatients_MouseDoubleClick(object sender, MouseButtonEventArgs e)
    {
    int idPat = 0;
    DataRow datarow = null;
    DataRowView patSel = null;
    Person pat = null;

    if (dataGridPatients.SelectedItem == null)
    {
    return null;
    }

    patSel = (DataRowView) dataGridPatients.SelectedItem;

    try
    {
    datarow = patSel.Row;
    idPat = Convert.ToInt16(datarow[“id”].ToString());

    pat = new Person();
    pat.Id = idPat;
    }
    catch (Exception ex)
    {

    }

    return pat;
    }

    public void loadPat(Person userData, int idCompany, ArrayList filter)
    {
    DbDataAdapter da = personDao.List(idCompany, filter);
    DataSet dataset = new DataSet();

    dataGridPatients.AutoGenerateColumns = false;
    dataGridPatients.IsReadOnly = true;

    da.Fill(dataset);
    dataGridPatients.ItemsSource = dataset.Tables[0].DefaultView;

    }

    Functionare:
    -cand se deschide fereastra WPF cu codul xaml de mai sus este selectionat item-ul cu litera A care contine un datagrid cu date incarcate cu metoda “loadPat”;
    -daca fac click pe o litera (un tab-item) setez valoarea “null” pentru continutul tuturor celorlate tab-item-uri iar pentru tab-itemul selectionat setez continutul la valoarea datagrid restituita de metoda “loadPatReturn”, adica datagrid-ul este acelasi pentru toate tab-item-urile.
    -daca fac dublu-clik pe o linie din datagrid se deschide o alta fereastra cu detaliile despre recordul selectionat (metoda dataGridPatients_MouseDoubleClick).

    PROBLEMA:
    cand fac dublu-click pe o linie in datagrid, metoda “dataGridPatients_MouseDoubleClick” imi restituie practic mereu “null”; daca fac dublu-click inca o data intr-o alta celula (pe aceeasi linie) atunci merge;
    Am schimbat “SelectionUnit” din “CellOrRowHeader” in “FullRow” si merge numai ca daca fac din nou clik pe un tab-item sus programul se blocheaza la linia in care setez continutul la valoarea “null” (vezi codul mai sus, metoda “tabControlPatients_SelectionChanged”) cu eroarea “Cannot change cell selection when the SelectionUnit is FullRow”).

    Va multumesc si va salut cu respect,
    Adrian

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.