SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Politics : PRESIDENT GEORGE W. BUSH

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: TimbaBear who wrote (125387)2/4/2001 10:13:37 PM
From: Thomas A Watson   of 769670
 
dear dear dear TimbaBear, I saw no disagreement with my viewpoint in your post. I saw faulty logic in the misinterpretation of what I stated as to what was implied.

If someone reads the simple and doesn't get it then the simple term that describe the condition is stupid. Folks with very high IQ many time read complexity into the simple and rationalize the truly stupid.

In the world of engineering the process of creating real solutions provides clear feedback that assists one in seeing the faults in ones own logic. This humbling feedback is a valuable asset in not making similar mistakes in the present.

Having authored many complex solutions to solve original problems and to remedy the tragic mistakes of faulty solutions leads one to use brutal truth with black and white descriptive words. One mans mistake is anothers challenge.
watman.com

Tom Watson tosiwmee

TimbaBear, maybe you can help me. I've been working on this code and their is a sneak path of indirection in the logic. take a look and see if you can see the error.

#! /bin/tcsh
# make3ana.html write html for a thumb to full size and table to mini sizes
# create 3 accross format.
echo make3ana.com Usage: make3ana.html \[number accross 1..9\] \[1..4\] \[make no reduced\]
echo Argument 1 is the number of images across 3 is the default
echo Argument 2 is the style of thumbnails g16mvc is the default
echo 1 g16mvc
echo 2 g12mvc
echo 3 gmvc
echo 4 lmvc
echo
echo Argument 3 is reduced size pointer flag. default is do pointers.
echo If set no reduced pointer are made. ie 640x480 and 320x240

echo " "
set c=1
set ten=10
set hun=100
set port = 768
set port1 = 480
set land = 1024
set land1 = 640
set THIS_PATH = `pwd`
ls anaglyph |grep mvca >listraw
set list = `cat listraw |grep mvca`
set HOST_NAME = `echo $HOST | grep square | awk -F. '{print $1}'`
set THIS_PATH = `pwd`
set date = `date`

if ( $1 == "" ) then
set NUMBER_ACCROSS = 3
else
set NUMBER_ACCROSS = $1
endif
set OUT_FILE_NAME = `echo "make"$NUMBER_ACCROSS"wide_ana.html"`

if ( $2 == "" ) then
set THUMB_STYLE = g16
else if ( $2 == 1 ) then
set THUMB_STYLE = g16
else if ( $2 == 2 ) then
set THUMB_STYLE = g12
else if ( $2 == 3 ) then
set THUMB_STYLE = g
else if ( $2 == 4 ) then
set THUMB_STYLE = l
endif

if ( $3 == "" ) then
set MAKE_MINI = 1
else
set MAKE_MINI = 0
endif

echo Building $OUT_FILE_NAME with $NUMBER_ACCROSS thumbnails across.
echo Writing html headers

echo \<html\> >$OUT_FILE_NAME
echo \<BODY TEXT=\#FFFFFF LINK=\#aFaFFF VLINK=\#FF00FF ALINK=\#00FF00 BGCOLOR=\#000000\> >>$OUT_FILE_NAME
echo \<HEAD\>\<TITLE\> $HOST_NAME":"$THIS_PATH"/"$OUT_FILE_NAME" "$date\<\/\TITLE\>\<\/HEAD\> >>$OUT_FILE_NAME

echo \<center\> >>$OUT_FILE_NAME
echo \<br\> >>$OUT_FILE_NAME

# ACCROSS is used to set the number of images in a row.
@ ACCROSS = 1
@ ROW_NUMBER = 1

rm 640x480/*
rm 640x480/*
rm 320x240/*
echo heressss

foreach i ($list)
echo doing $i

@ SANA_NUMBER = `echo $i |awk -Fa '{print $2}'|awk -F. '{print $1}' |awk -Fx '{print $1}' `
@ SANA_UP = $SANA_NUMBER + 1

if ($SANA_NUMBER < $ten ) then
set ANA_NUMBER = `echo "00"$SANA_NUMBER`
set ANA_UP = `echo "00"$SANA_UP`
else if ($SANA_NUMBER < $hun) then
set ANA_NUMBER = `echo "-0"$SANA_NUMBER`
set ANA_UP = `echo "0"$SANA_UP`
else
set ANA_NUMBER = `echo $SANA_NUMBER`
set ANA_UP = `echo $SANA_UP`
endif

echo $ANA_NUMBER
set RIGHT_MVC = `ls anaglyph/*$ANA_NUMBER*`
echo $RIGHT_MVC RIGHT_MVC
set LEFT_MVC = `ls anaglyph/*$ANA_UP*`
echo $LEFT_MVC LEFT_MVC
set PAIR_MVC = `ls PAIR/*$ANA_NUMBER*`
set XPAIR_MVC = `ls XPAIR/*$ANA_NUMBER*`
set IMAGE_SIZE = `/usr/bin/identify -ping anaglyph/$i|awk '{print $2}'`
set IMAGE_X_TYPE = `echo $IMAGE_SIZE |awk -Fx '{print $1}'`
set IMAGE_Y_TYPE = `echo $IMAGE_SIZE |awk -Fx '{print $2}'`

# set IMAGE_X_TYPE = `/usr/bin/identify -ping $i|awk '{print $2}'|awk -Fx '{print $1}'`
if ($IMAGE_X_TYPE == $land ) then
@ XGA = 1
@ LAND = 1
else if ($IMAGE_X_TYPE == $port ) then
@ XGA = 1
@ LAND = 0
else if ($IMAGE_X_TYPE == $land1 ) then
@ XGA = 0
@ LAND = 1
else if ($IMAGE_X_TYPE == $port1 ) then
@ XGA = 0
@ LAND = 0
else
@ XGA = 2
@ LAND = 0
endif
set ROOT_IMAGE_NAME = `echo $i |awk -F. '{print $1}'`

convert -quality 100 anaglyph/$i anaglyph/$RIGHT_MVC

if ( $ACCROSS == 1 ) then
echo Writing Row $ROW_NUMBER of $NUMBER_ACCROSS images across.
echo \<table align=center\> >>$OUT_FILE_NAME
echo \<tr valign\=\"bottom\"\> >>$OUT_FILE_NAME
endif

echo \<td align=center\> >>$OUT_FILE_NAME
echo $ROOT_IMAGE_NAME \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"anaglyph\/$RIGHT_MVC\"\>\<IMG SRC=\"thumbs\/$THUMB_STYLE$RIGHT_MVC\" border=0 \>\<\/A\> \<br\> >>$OUT_FILE_NAME

if ( $MAKE_MINI ) then
if ( $XGA ) then
#have to make anaglyph 640x480
if ( $LAND ) then
convert -quality 100 -geom 640x480 anaglyph/$i 640x480/$RIGHT_MVC
convert -quality 100 -geom 320x240 anaglyph/$i 320x240/$RIGHT_MVC
else
convert -quality 100 -geom 480x640 anaglyph/$i 640x480/$RIGHT_MVC
convert -quality 100 -geom 240x320 anaglyph/$i 320x240/$RIGHT_MVC
endif
endif

if ( $XGA == 1 ) then
echo \<A HREF=\"anaglyph\/$RIGHT_MVC\"\>$IMAGE_SIZE.\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"640x480\/$RIGHT_MVC\"\>640x480\<\/\A\> \<br\> >> $OUT_FILE_NAME
else if ( $XGA == 2 ) then
echo \<A HREF=\"anaglyph\/$RIGHT_MVC\"\>"$IMAGE_SIZE"\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"640x480\/$RIGHT_MVC\"\>640x480\<\/\A\> \<br\> >> $OUT_FILE_NAME
else if ( $XGA == 0 ) then
echo \<A HREF=\"anaglyph\/$RIGHT_MVC\"\>$IMAGE_SIZE.\<\/\A\> \<br\> >> $OUT_FILE_NAME
endif

echo \<A HREF=\"320x240\/$RIGHT_MVC\"\> 320x240\<\/\A\> \<br\> >> $OUT_FILE_NAME
#echo \<A HREF=\"160x120\/$i\"\> 160x120\<\/\A\> \<br\> >> $OUT_FILE_NAME
endif
echo \<p\> >> $OUT_FILE_NAME
echo \<A HREF=\"$PAIR_MVC\"\> PARALLEL PAIR\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"$XPAIR_MVC\"\> CROSSED PAIR\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<p\> >> $OUT_FILE_NAME
@ MAKE_DATA = 1
if ( $MAKE_DATA ) then
echo \<A HREF=\"crops\/$LEFT_MVC\"\> LEFT CROPPED\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"crops\/$RIGHT_MVC\"\> RIGHT CROPPED\<\/\A\> \<br\> >> $OUT_FILE_NAME

echo \<p\> >> $OUT_FILE_NAME
echo \<A HREF=\"$LEFT_MVC\"\> LEFT ORIG\<\/\A\> \<br\> >> $OUT_FILE_NAME
echo \<A HREF=\"$RIGHT_MVC\"\> RIGHT ORIG\<\/\A\> \<br\> >> $OUT_FILE_NAME

endif
echo \<\/td\> >> $OUT_FILE_NAME

if ( $ACCROSS == $NUMBER_ACCROSS ) then
echo \<\/tr\> >> $OUT_FILE_NAME
echo \<\/table\> >>$OUT_FILE_NAME
echo \<p\> >>$OUT_FILE_NAME
endif

@ ACCROSS++
if ( $ACCROSS > $NUMBER_ACCROSS ) then
@ ACCROSS = 1
@ ROW_NUMBER++
endif
end

if ( $ACCROSS != 1 ) then
echo \<\/tr\> \<\/table\> \<p\> >>$OUT_FILE_NAME
endif
echo Writing html closing tags.

echo \<\/center\> >>$OUT_FILE_NAME
echo \<\/html\> >>$OUT_FILE_NAME
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext