Chit chat

=======

Highly disappointed to see people take my work especially pictures and use them for their own blog, without any payback.

——————————————

Cartoons:

 

But where do you connect the wires?

 

 

 

—————————————–

Make up a to do list of your days activities. If that is easy for you then, you might be a programmer.

Path to programming.

    • Know a subject that gives you reason to program
    • Learn logic
    • Learn the syntax of a possible language that looks interesting
    • Apply practical examples till you feel comfortable.
    • Learn to debug.
    • Work as a maintenance programmer.
    • Develop a plan for the program you want to write

and describe in detail  what is to be done (see below),

  • Code in manageble segments via modules.
  • Test and redo the program as needed.

Pseudo coding makes life easier.

Dump web page as ascii (text) to disk file.
Read disk file one line at a time in, but ignore all lines till you get what is needed.
Now continue reading one line at a time, but ignore certain lines
With the line you read in output what is needed, while editing out unwanted characters.
Stop output when you get to a point nothing else is needed.
Finnish reading file one line at a time.
End.

—————————————–

Giving out the super secret code for doing the Kitt light show on the X86. Do not have a guitar anymore, but that was me playing the guitar.

http://www.youtube.com/watch?v=BlCHGiG_CQM

Think this is the secret code in freebasic for lighting the leds.

 dim duration as double

dim tim as double
tim = TIMER
duration = .3
out 888, 0

for y = 1 to 20
‘rem up
for x = 0 to 6
out 888, 2^x
r= inp(888)
out 888, (2^(x+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next x

‘rem down
for b = 1 to 7
z = 7 – b
out 888, 2^z
r= inp(888)
out 888, (2^(z+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next b
next y
‘rem end of sequence
out 888,0

rnd.bas

randomize  88888888
dim duration as double
dim tim as double
tim = TIMER
duration = .1
out 888, 0
for y = 1 to 100
out 888, 2^(abs((rnd(1)*8)))
tim = Timer
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next y

Circuit

 —————————————————————-

Decided to take my score scraping script and apply it to other media. Per se maybe we just want the headlines of CNN.com. Used essentially the same set of instructions on a local news site with results. You will want to use the same rough logic or pseudocode:

Dump web page as ascii (text) to disk file.

Read disk file one line at a time in, but ignore all lines till you get what is needed.

Now continue reading one line at a time, but ignore certain lines

With the line you read in output what is needed, while editing out unwanted characters.

Stop output when you get to a point nothing else is needed.

Finnish reading file one line at a time.

End.

You might get results like this ignoring equals signs.

=========

THE LATEST

* Source: Joan Rivers’ doc took selfie

* Freak accident kills hero bus

driver

* IOS 8 is live: How to get it

* Five iOS 8 features you’ll love

* NEW Billionaire tells Apple: Innovate

* Obama stands firm: No ground troops

* Kerry heckled during testimony

* NEW Stocks hit record; thank Yellen

* NEW Panthers star takes leave

* Vikings: Peterson must stay away

* NEW Virus coming to a state near you

* Dowd inspires edible-pot campaign

* Wrongly convicted man gets a statue

* China blacks out CNN’s report

* He mistakenly calls 911, then …

* Surprise! Mendes, Gosling have baby

OPINION

===============

Then we can we can add it to our report.sh homemade newspaper. For details see:

http://computoman.blogspot.com/2013/12/create-your-own-newspages.html

#——————————————————–

# cnn

echo “<h3>CNN Headines</h3>” >> report.html

echo “<pre>” >> report.html

# creates cnn.txt

./cnn.sh > cnn.txt

echo “<pre>” >> report.html

cat cnn.txt >> report.html

echo “</pre>” >> report.html


####################################

# Cnn Headline  Grabber

#

#===============================

# Assignments

# --------------------------------

datafile="rawcnn.txt"

let "flag = 0"

# end assignments

#=================================

#

# Get data file

#---------------------------------

elinks -dump "www.cnn.com"  > $datafile

#=================================

#

# Extract and display data

#---------------------------------

while read line

do fdata[$a]=$line

    echo $line | grep -q "THE LATEST"

    if  [ $? -eq 0 ]; then

        # header

        clear

        let "flag = 1"

    fi

    if [ $flag -eq 1 ]; then

        echo $line | grep -q "Weather"

            if [ $? -eq 0 ]; then

            let "flag = 0"

        else

            echo $line | grep -q "IMG"          

            if [ $? -eq 0 ]; then

                let "response = donothing"

            else

                echo $line | sed 's/\[.*\]//'

            fi

        fi

    fi

let "a += 1"

done < $datafile

# footer

echo ---------------------------------------------

echo

#===================================

# End.

####################################

Advertisements