Messages - allen [ switch to compact view ]

Pages: prev1 ... 191 192 193 194 195 [196] 197 198 199 200 201 ... 229next
976
Living Room / Re: New Gmail vulnerability
« on: March 02, 2006, 08:05 PM »
I can't reproduce it . . . I'm guessing it's either fixed or depends on browser.  He didn't say what he was using . . .

977
Living Room / Re: Chocolate Milk: The New Sports Drink?
« on: March 02, 2006, 06:40 PM »
One thing not being taken into account here, and something any Cross Country runner can tell you -- you don't want dairy on your stomach before, during or immediately after a hard run.  It coagulates in there, makes you feel terrible, and then comes forth violently.

While, scientifically, it might look like a good option . . . it's not a particularly good one for an athlete -- unless they do something silly like curling. :)

My favorite was always cranberry juice to cool off, then earl grey tea.

978
General Software Discussion / Re: Clipboard manager
« on: March 02, 2006, 06:27 AM »
I'll bring myself up to date on the thread.

AceText itself . . . think of it as a simple notepad where multiple items are saved in it, organized in a tree base list -- and it reads directly from the clipboard.

979
Great fun! I love South Park.

980
Developer's Corner / Highlighting Changes in Files
« on: March 01, 2006, 10:10 PM »
It's taken a bit, but I've finally managed to implement a change highlighter in my wiki script.  The final approach is actually quite a bit simpler than my previous attempts and the result is much more accurate.  I'm exceptionally excited about it simply because it was such a nuissance to implement   :-[

The only "problem" I have is when a file contains identical lines -- it doesn't detect adding/removing identical lines.  Addressing this would, i think, be rather difficult and not particularly useful.

For the curious--
function compFiles($file1,$file2) {
  $array1 = file($file1);
  $array2 = file($file2);
  $same = array_intersect($array1,$array2);
  $same2 = array_intersect($array2,$array1);
 
  $removed = $array1;
  foreach($same as $num => $val ) {
    unset($removed[$num]);
  }
  $added = $array2;
  foreach($same2 as $num => $val) {
    unset($added[$num]);
  }
 
  function compCol($value,$action) {
    if ($action == 'add') $color = '#efe';
    elseif ($action == 'rem') $color = '#fee';
    else $color = '#fff';
    $value = '<div style="background:'.$color.';">'.$value.'</div>';
    return $value;
  }
  $same = array_intersect($array2,$same);
  $added = array_intersect($array2,$added);
  $counter = 0;
  foreach ( $same as $num => $val ) {
    array_splice($array2,$num,1,compCol($val,'sam'));
  }
  foreach ( $added as $num => $val ) {
    array_splice($array2,$num,1,compCol($val,'add'));
  }
  foreach ( $removed as $num => $val ) {
    array_splice($array2,$num+$counter,0,compCol($val,'rem'));
    $counter++;
  }
  return(implode('',$array2));
}

Pages: prev1 ... 191 192 193 194 195 [196] 197 198 199 200 201 ... 229next
Go to full version