SetPixel vista bug

March 7th, 2012

I was running one of my screen savers and came across a funny bug in vista’s version of SetPixel. When Aero is not used as a appearance setting. SetPixel can only draw on certain areas of the screen. Here is an example with the appearance setting set to Vista Basic:

This program gets a pixel from the current desktop, converts it to black and white then sets it at the same location.

Here is a screen shot running with Vista Aero as the appearance setting:

The black band on the right is now gone! Does Windows have different implementations of SetPixel?

Here is an example program that demonstrates this behavior.

More information on this bug can be found here.


Dinosaur Jr. “The Wagon” tab

February 15th, 2012

Dinosaur jr, The Wagon

I found this great time machine on ebay that only travels to the 90s and well anyway…


Rage

July 20th, 2011

I have been playing around with processing lately.

To increase Arnold’s rage press “+”, “-” decreases it and “r” is to reset.


google-define.el and gdef.sh updates

May 27th, 2011

Google changed the way the define: query works so I had to update my scripts:


goto 10

March 3rd, 2011

I came across this website last night. The attached lectures bring up lots of interesting topics about this concise c64 program. Here are my ports to javacript and Go.

Original Basic:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

Javascript:

for(i=0;i<20480;)document.write(i++%80?String.fromCharCode(9585.5 + Math.random()):'\n');

You can run a version of the javascript program here.

Go:

package main
import "fmt"
import "rand"
func main(){p:=fmt.Print;i:=0;A:if i%0x50==0{p("\n")}else{p(string(int(9585.5+rand.Float32())))};i++;goto A;}

My code ends up with more statements in both languages mainly because of handling text wrapping. You get that for free on the C64. Also, in this modern era of name spaces you have the added verbosity of the object names.

More discussion of the C64 version can be found at lemon64.


The Plugz Reel Ten

November 21st, 2010

Repo man was on the TV the other night. Time to get out your delay pedals.


Python script to change windows wallpaper

November 18th, 2010

Here is a little python script that will change your windows background image.

randDesktopBG.py

How it works
It will go through all of the pictures in the c:\wallpaper\ directory and picks the next one in the list. It writes the name of the picture to the \HKEY_CURRENT_USER\Control Panel\Desktop but this will not change the picture until a reboot takes place. We want it to change immediately so a call to SystemParametersInfoA is also needed.

I’m using pycron to call the script every hour.


Dirty Old Town CAGED arpeggios

July 27th, 2010

Dirty Old Town CAGED arpeggios

This tab picks out the melody of the song by using arpeggios from CAGED chord shapes.


Play Guitar with the Ventures

April 29th, 2010

Julie and me like to spend Saturday mornings at Flea Markets and Garage Sales. Found this one for $1.50.

Play Guitar With The Ventures Front Cover

Side One
Side two
Booklet


Well Read… Round One

April 26th, 2010

Kafka vs Orwell:

Practically Orwellian

Practically Kafkaesque

Orwell WINS