Archive for October, 2005

my first AJAX type thing

Tuesday, October 18th, 2005

This code is very very very stolen from Wikipedia.

I don’t know why it doesn’t work here, but it works on my journal

<script>
// Wikipedia JavaScript support functions

function showTocToggle() {
  if (document.createTextNode) {
    // Uses DOM calls to avoid document.write + XHTML issues

    var linkHolder = document.getElementById('toctitle')
    if (!linkHolder) return;

    var outerSpan = document.createElement('span');
    outerSpan.className = 'toctoggle';

    var toggleLink = document.createElement('a');
    toggleLink.id = 'togglelink';
    toggleLink.className = 'internal';
    toggleLink.href = 'javascript:toggleToc()';
    toggleLink.appendChild(document.createTextNode(tocHideText));

    outerSpan.appendChild(toggleLink);

    linkHolder.appendChild(document.createTextNode(' '));
    linkHolder.appendChild(outerSpan);

     toggleToc();
  }
}

 function changeText(el, newText) {
   // Safari work around
   if (el.innerText)
     el.innerText = newText;
   else if (el.firstChild && el.firstChild.nodeValue)
     el.firstChild.nodeValue = newText;
 }

function toggleToc() {
  var img = document.getElementById('toc').getElementsByTagName('img')[0];
  var toggleLink = document.getElementById('togglelink')

 	if(img && toggleLink && img.style.display == 'block') {
	    changeText(toggleLink, tocShowText);
		img.style.display = 'none';
	} else {
	     changeText(toggleLink, tocHideText);
 		img.style.display = 'block';
	}
}
</script>

<table>
<tr>
<td id='toc'>
<div id='toctitle'>
</div>

<img src='/images/travel/Pb/49th_May-Aug_2005/diving_in_acapulco/diving_in_acapulco-Thumbnails/3.jpg' />
</td>
</tr>
</table>
<p><script type='text/javascript'>
 if (window.showTocToggle) { var tocShowText = 'show'; var tocHideText = 'hide'; showTocToggle(); }
</script></p>

The Carpet Problem

Monday, October 17th, 2005

Starting with a rectangular carpet measuring 9 by 12 units, we need to carpet a square room 10 by 10 units and a rectangular hallway 1 by 8 units.

The carpet may be cut into exactly three (3) pieces. One piece measuring 1 by 8. The other two (2) pieces must fit together to make a square 10 by 10.

This problem was presented to us when I was in trigonometry in high school. My instructor said he would give an A for the semester to anyone who could solve it. I knew a good deal when I saw it. I spent three days on the problem, solved it and coasted through the rest of the semester. He made good on his promise, but said he would never make such an offer again.

(thanks to Dude for correcting the original problem. Not 12 x 8…. 12 x 9!!)

Math/Logic Riddle

Monday, October 17th, 2005

Slashdot Math/Logic Riddles

The riddle about sorting coins without being able to see them seems impossible to me… I will ponder it.

Plasma pencil kills germs

Monday, October 17th, 2005

Plasma pencil kills germs

This seems pretty cool. In a way, it’s like the first example of something cool that I’d never even considered possible; I thought plasma was necessarily gajillions of degrees. But now it’s available in a handheld little thing… And sounds like it could become commonplace.

“Yeah, my pocketknife has a corkscrew, screw driver, plasma beam, and a knife!”

long jokes

Sunday, October 16th, 2005

These are the long jokes I know. They are more like stories with
silly punchlines. I wrote the one about the kid who loves to do
dishes.

  1. How to catch a pink elephant
  2. Moe and Joe
  3. Kid who loved green golf balls
  4. Kid who loved clowns
  5. Magician and the captain’s parrot
  6. Kid who loved to do dishes
  7. Ten little piggies
  8. Man in the black hat, white gloves, red cape, who killed my mom, my dad, seven brothers and seven sisters
  9. The perfect koosh
  10. Shaggy dog
  11. Woman who had a recurring dream

General relativity versus Newton

Friday, October 14th, 2005

CERN Courier - General relativity versus Newtonian phsyics

No more need for pesky undetectable dark matter!

What I can’t understand is why they used Newtonian physics to confirm Einstein’s theories!

My brother explained thusly:

I actually have no idea about this dark matter stuff, and don’t know much about relativity and quantum physics, but I can mention two things:

1, Newtonian physics isn’t actually wrong in relativistic conditions. It just isn’t as explicit (and therefore isn’t as useful) as the versions with the relativistic terms when you’re talking about stuff that’s going very fast or is very very massive. In particular, Newton did NOT write F=ma, which is what people usually refer to as Newton’s First Law. What he wrote was F=d(mv)/dt, which does NOT assume that mass is constant. He was far too cautious a man for that. So using Newtonian physics to confirm relativity isn’t completely wack.

2, the big String theory debate goes like this:
proponent: "Hey, look, string theory can express all things simultaneously!"

skeptic: "Hmm, very promising!  Let’s see how well it works.  If I set up this experiment, what does String theory say will happen?"

proponent: "Uh, string theory doesn’t make predictions."

skeptic: "????  So there’s no way for me to test to see if it’s right?"
proponent: "No."

skeptic: "Then what good is it?  You’re not talking physics any more, you’re talking philosophy."

purist: "If you can’t apply the scientific method, then it’s not a science.  Go away, fanatic, and take your representations with you.  I don’t care if they do combine all the forces of nature into one neat form."

proponent: "Well, maybe we’ll figure out a way to do predictions one day."

3. When I think of quantum physics, I think of Dave Hamm, our high school physics teacher: "You can’t just throw a basketball up to any old height.  You can only throw it so high."  He had other gems like, "Friction is a big, hairy monster that lives on surfaces, gobbles up kinetic energy, and spits it back out as heat."  Crazy as it’s phrased, send that to your college physics prof–he’ll have to agree.  I also think of those little ketchup packages you get from fast food places.  Why are they so small?  Everyone needs more than one, and they don’t even make a good quantum.

(Fred’s pretty smart.)

Kung Pow: Enter the Fist

Friday, October 14th, 2005

Kung Pow: Enter The Fist

This is a really silly movie that has us almost continuously in stitches. So many mixed up movie references, plus hilarious dialogue in itself.

We weren’t laughing as much at the very end, but it’s a funny movie.

The website includes a [Dub Your Own Flick] link in the top center. I assume a *lot* of time could be spent there!!!

Jerusalem

Sunday, October 9th, 2005

I’m in Jerusalem!

I haven’t really seen anything undeniably inappropriate, but there is definitely a distinction between areas for Palestinians and areas for Israelis, and definitely some weird stuff going on.

For the past two days, I’ve been staying in Faisal Hostel, basically across the street from Damascus Gate, a portal between the Old City of Jerusalem, and the rest of Jerusalem. The Old City is where a lot of biblical stories took place, including where Jesus was tortured and paraded through town, if I understand correctly.

Twice I’ve wandered around the Old City, which seems a lot like the world’s original shopping mall, but with churches and people with machine guns keeping us in line.

Once I wandered around a market in an Israeli area of town, where I was surprised to see a significant number of civilians with guns tucked into their belts. What type of bizarro world have I reached??

This month the muslims are celebrating Ramadan, and last night the Israeli soldiers were 2500 strong around the Old City, controlling entrance where people were trying to go pray. At one point the soldiers launched sound bombs to disperse the crowd that had collected near Damascus Gate. The Palestinians hadn’t been doing anything violent. I had just been out there getting some food.

Today my friend Niveen (from Peace Boat) came to visit, and gave me her old cell phone! She took me to get a simcard and then to the Palestinian Vision office where I met Ramy, the Middle East Coordinator for Peace Boat! He speaks 100 miles per hour and invited me to come by anytime I’d like to help with writing or editing. Fantastic numbers of doors are opening for me.

I’ll stick with my original plan for now; I’m going to be trained tomorrow and the next day by people from ISM before participating in the olive harvest. Ramy assured me that 1 month is far too long for me to pick olives every day, and said I’d be welcome back whenever I was done picking olives.

So so much to learn; so many people I’ll be meeting tomorrow!

Peace and Love
- Rob

Unveiling the high energy Milky Way reveals ‘dark accelerators’

Saturday, October 8th, 2005

Unveiling the high energy Milky Way reveals ‘dark accelerators’

In general, this article tells me we know *nothing* about the universe.

Even so, I like how they’re using the atmosphere to detect the gamma rays via Cherenkov light. wow.

automatic image categorisation

Tuesday, October 4th, 2005

automatic image categorisation

This seems pretty sweet. Google could use this technology to further optimize its image search. I could use this technology to get the pictures on my website arranged!

Amazing to imagine that we are now living in a time that computers *don’t* recognize what’s in photographs. Seriously.