Wednesday, August 31, 2016

Man who dedicated himself to doing everything right

"Brandon did everything the right way to such an extreme that within the Arkansas football program, fanatical devotion to the correct course of action became known as doing things "the Burls Way.""

"Almost Perfect ARKANSAS LINEMAN BRANDON BURLSWORTH DEDICATED HIMSELF TO DOING EVERYTHING FLAWLESSLY. WHEN SOMETHING FINALLY WENT WRONG, IT COST HIM A BRIGHT NFL FUTURE--AND HIS LIFE"

I thought this was an interesting and tragic story.


http://www.campusrush.com/brandon-burlsworth-movie-greater-arkansas-football-1987980608.html


http://www.si.com/vault/1999/06/28/8108380/almost-perfect-arkansas-lineman-brandon-burlsworth-dedicated-himself-to-doing-everything-flawlessly-when-something-finally-went-wrong-it-cost-him-a-bright-nfl-futureand-his-life

Tuesday, August 30, 2016

Running over pedestrians in China

I could not believe this when I read it.


Driven to Kill
Why drivers in China intentionally kill the pedestrians they hit.
By Geoffrey Sant

http://www.slate.com/articles/news_and_politics/foreigners/2015/09/why_drivers_in_china_intentionally_kill_the_pedestrians_they_hit_china_s.single.html

What's with all of the aggressive driving these days?

I'm really seeing a lot of aggressive driving these days. It seems like when the gas prices go down, everybody wants to get on the road. The traffic lately has been pretty heavy.

Yesterday, I saw the aftermath of a bad accident when I came off the freeway. Police cars everywhere blocking the intersection and ambulances taking people away.

I also witnessed an accident that same day where this car ran a red light and clipped another car that was going through. Thankfully, it wasn't a major crash, but it was totally avoidable.

Totally avoidable. It's not like this is a complicated equation: slow down and drive with safety in mind. So you gain a few seconds but you put everybody at risk.

Everybody's really sorry after they wipe somebody out. But it didn't have to happen in the first place.

I remember getting rear ended while waiting for a left turn arrow. Why? Because the lady was speeding and was out of control. She had just totaled my car and she has the gall to say "Oh it was already like that!" And thanks for the massive whiplash. So I have to pay the price for someone else's recklessness. Just because they "were in a hurry."

Sunday, August 28, 2016

Maxitronix 500-in-1

My new toy, a maxitronix 500-in-1. I was most interested in how the little cpu works, and how you program it with the keyboard and lcd.

The mpu has:

64 memory (I'm going to assume they mean bytes)
one (1) accumulator
five (5) registers
four (4) input ports
eight (8) output ports (data 8-bit)
26 instructions available.



http://www.elenco.com/search/searchdetails/500-in-1_electronic_project_lab=Mjg3

Wednesday, August 24, 2016

i810 video and 1680x1050 monitor

I've got this old dell system with i810 video and it works great with a dell 2007FP with its 1600x1200 video, but a dell e228wfp just doesn't want to go higher than 1280x1024 under windows 2000.

The native resolution of the e228wfp is 1680x1050.

Apparently, the video bios was written long before (circa 2002) there were any widescreen resolutions like 1680x1050.

I guess I could get it working if I run with linux, a very clever person figured out how to "patch the video bios".


http://www.melvilletheatre.com/articles/intel-widescreen/


I'm going to boot it up with knoppix and see if it can handle the full resolution.

edit: yes, knoppix works with the full 1680x1050 resolution.


This isn't the first time I've found an old video card driver that doesn't like high resolutions, a matrox g200 under win95 positively hates my full hd 1920x1080 monitor and won't boot up properly, instead going to something like 640x400x8 and squawking that it can't find a good resolution. If I boot up with the monitor switched to another system (with my KVM switch), it will boot up just fine. I think it just doesn't handle all of the resolutions that it gets from the EDID.

Saturday, August 20, 2016

Gimp keeps cropping my perspective rotations

I'll admit that I'm kind of gimp newbie. I want to crop an image, do some perspective transformations and then have the resulting image not cropped.

But gimp keeps cropping it. I've figured out a workaround though: just promote what is called a "floating selection" to a new layer.

Here's my original pic:



I crop it:



Now I do a Tools/Transform Tools/Perspective:



And after I get it to correct the perspective into straight lines:



And then I click on transform:



But you see that the floating selection is outside the original rectangle of the crop. So we right click and Image/Fit canvas to image:





and now the canvas has expanded:



but we're still not done. We need to promote the floating selection to a layer. Right click on the floating selection and choose To New Layer:





Now you want to right click and go to Image/Merge Visible Layers and choose expanded as necessary:





And now it's all back to a single image.

Before merging visible layers:



After merging visible layers:



Thursday, August 18, 2016

Using VLC to play analog tv card

One of the things that I like about knoppix is that it includes tvtime. If you've got a standard analog tv card (bt848 based) it should work out of the box.

Sure, analog TV is a dinosaur, but I can still get analog cable TV from the digital-analog converters from the cable company.

All you have to do is to tune channel 3 on the analog and use the remote for the converter box.


I recently figured out that VLC will also play the TV card quite well, just point it to /dev/video0 or /dev/video1 (or whichever /dev/video is the proper number) and it works quite well.

One of the problems is that VLC doesn't seem to have any support for changing the channels on the tuner. TVtime has this built-in.

(Not that you really need to change the channel, but I wanted to know how to do it).


"v4l2-ctl --help-tuner" gives you
Tuner/Modulator options:
-F, --get-freq query the frequency [VIDIOC_G_FREQUENCY]
-f, --set-freq=
set the frequency to MHz [VIDIOC_S_FREQUENCY]
-T, --get-tuner query the tuner settings [VIDIOC_G_TUNER]
-t, --set-tuner=
set the audio mode of the tuner [VIDIOC_S_TUNER]
Possible values: mono, stereo, lang2, lang1, bilingual
--tuner-index= Use idx as tuner idx for tuner/modulator commands
--list-freq-bands display all frequency bands for the tuner/modulator
[VIDIOC_ENUM_FREQ_BANDS]
--get-modulator query the modulator settings [VIDIOC_G_MODULATOR]


You can use "v4l2-ctl -d /dev/video0 -f 61.25" from the command line to set the frequency to change the channel to 3.
You can use "v4l2-ctl -d /dev/video0 -f 67.25" from the command line to set the frequency to change the channel to 4.

http://osdir.com/ml/video4linux-list/2009-06/msg00098.html


https://en.wikipedia.org/wiki/North_American_television_frequencies

Also make sure that you show the "additional options" in the play capture card dialog and set the caching to 0ms, otherwise your audio will be out of sync since it will wait for the caching delay before it shows the video.


Wednesday, August 17, 2016

P-Touch PT-330 won't print anything

I have a PT-330 that won't print anything. It sounds just like this problem asked over at Justanswers.


http://www.justanswer.com/printers/2ktvg-older-p-touch-label-maker-pt-330-when-print.html

"Customer Question
I have an older P-Touch label maker (PT-330). When I print, the label comes out but it is blank. I have tried several different size tapes to see if it is a tape problem, but they all are the same. Is it a goner? "

Everything seems to work, it just doesn't print anything on the tape.






I inspected it very carefully and the problem is that the roller isn't being pressed tightly against the printhead. The plastic in the mechanism has gotten brittle and a piece has cracked so it no longer works properly.

If you look carefully at the picture you can see the gap. There isn't supposed to be any gap when the lever is pushed all the way down.





It's interesting to look at the system board. Click on the pic for a full size view.




There's a Mitsubishi M37702S1AFP M37702 cpu in spot #5.



There's a ROM chip, a Samsung KM23C4100CG-12 in spot #4.



There's a RAM chip, an NEC D43257BGU-85LL in spot #2.



There's a Gate Array, an NEC D65612GF053 in spot #3.



There's an LCD driver NJU6450AF from JRC (new japan radio company njr.com) in spot #6.




I haven't figured out where spot #1 is. Perhaps it's the LCD on the other side of the board.


There's a motor to drive the gears and roller that pulls the tape through, a Mabuchi EG-530AD-9B 2400RPM 9V motor CCW.




In the upper left, there's a pad for a connector called XT1 P5. I wonder if that's for some kind of external connector, like a serial port possibly.

Maybe the XT1 is the marking for a crystal oscillator, the one marked 16000NMF?

The F is the Fujitsu logo, and it looks like a piezoelectric resonator, so it must be a Fujitsu resonator.





Judging from all of the 97s I see on the system board, I would estimate it to be built in 1997.


It'd sure be interesting to dump the rom from this board, wish I had an EPROM programmer.


Here's the other side of the system board, with all of the keyboard pads and the LCD.



And the back of the keyboard.




firefox downloads often don't let me change the name

So I click on a link and it gives me two options: open with some application or to save file.

The problem is, it wants to save it as some longwinded file name, when I'd rather have something else.

Like for instance, I've got a picture on facebook, I click on options, download then it gives me some filename like 234395827323.jpg when I'd like to change it to something more readable.

Instead, I have to wait until the download is complete, find the file, then rename it.

Isn't it much easier to give me the option to "Save file as..." in the first place?



Chromecast and resizing the Chromium window in realtime

I'm running Chromium under knoppix 7.7 and using the chromecast chrome extension to send a tab to the TV.

What's cool is that you can resize the browser window and it resizes the contents of what it's sending to the TV.

So if you want to zoom in on something, just resize the browser window so that it "frames" it better.

Tuesday, August 16, 2016

Dell 2007FP monitor startup

I thought the monitor startup on the dell 2007FP was kind of cool.

When you first plug it in, the dell logo shows up one letter at a time.

First the D, then the E, then the two Ls.




I like little touches like that. Reminds me of what cars do today where they sweep their gauges.


BattleTech Center

I remember years ago reading about the Battletech Centers, where you'd fight other people in simulated giant mech battle, and based on Amigas.

.Info magazine had a writeup in issue 35 in 1990.

https://archive.org/stream/info_Issue_35_1990-12.info_Publications_US/info_Issue_35_1990-12.info_Publications_US_djvu.txt


"The BattleTech Center

by Jeff Lowenthal


Join Jeff as he tries out the BattleTech Center's high-tech Amiga driven battle simulators. "


"It's unlikely to be limited by the hard-
ware, which includes 16 networked Amiga
500 boards, one for each cockpit, plus two
more computers per pod. The 50Os run most
of the game code and the secondary display
screens. Custom graphics cards, 68020
accelerator boards, and a variety of other
hardware, combined with a library of 19.000
3D graphic images, provide the power to
make this ihing real. The main display even
varies as a unit moves away, duplicating the
fogginess you see at long distance in real
life."

It looks pretty primitive by today's standards, but that was the kind of thing that I dreamed about back in the day.





This training video with Joan Severance is pretty funny.


Sony all in one LV series

I got this neat Sony VAIO LV series all-in-one circa 2008. I can get it to boot into knoppix 7.7 and it works pretty well. Interestingly, it uses a slightly different method to set the brightness of the screen.

xbacklight doesn't work telling me that "No outputs have backlight property."

xrandr --output LVDS-1 --brightness 0.85

allows me to set the brightness.


http://askubuntu.com/questions/62249/how-do-you-change-brightness-color-and-sharpness-from-command-line


This Sony is pretty cool, it has a useful feature where the monitor can function as a regular monitor, taking an HDMI input that will drive the screen. I can put the computer in standby with "sudo pm-suspend" and press the HDMI select button on the side to use it as just a monitor.

It's got awesome speakers, probably the best I've heard on a computer.

The 24" 16:10 monitor is pretty good with 1920x1200 resolution. The all-in-one is just a bit on the heavy side at 30+ lbs.

Form Factor
all-in-one
Weight
35.27 lbs


xrandr --verbose
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
LVDS-1 connected 1920x1200+0+0 (0x63) normal (normal left inverted right x axis y axis) 0mm x 0mm
Identifier: 0x61
Timestamp: 6678072
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 0.50
Clones:
CRTC: 0
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
dithering depth: 6 bpc
supported: auto, 6 bpc, 8 bpc
dithering mode: off
supported: auto, off, static 2x2, dynamic 2x2
scaling mode: None
supported: None, Full, Center, Full aspect
color vibrance: 150
range: (0, 200)
vibrant hue: 90
range: (0, 180)
1920x1200 (0x63) 154.640MHz -HSync -VSync *current +preferred
h: width 1920 start 1946 end 1998 total 2106 skew 0 clock 73.43KHz
v: height 1200 start 1205 end 1216 total 1225 clock 59.94Hz
1920x1080 (0x64) 173.000MHz -HSync +VSync
h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.16KHz
v: height 1080 start 1083 end 1088 total 1120 clock 59.96Hz
...

I wonder what all of this dithering stuff means...is it an 18-bit panel?

Sunday, August 14, 2016

iceweasel/firefox weird middle click behavior - loads page sometimes


I keep having this weird thing happen: sometimes I'll accidentally hit the middle button while scrolling, and suddenly an older page loads.

It doesn't happen all the time, or every time but it's one of those things that makes you wonder what the heck is happening.

I can get it to happen with a middle double click.

Sometimes if I click on the back button then do a middle click-drag to the right in a empty spot on the page, it will load a previous page.

I don't get it...it's super irritating to have your browser do things you don't expect. Where did that come from?


I'll see if changing some of the about:config settings will fix it.

middlemouse.contentLoadURL false
middlemouse.paste false


http://askubuntu.com/questions/4507/how-do-i-disable-middle-mouse-button-click-paste

Adding text to cell formats

I like my units to show in my spreadsheets, so for the miles per gallon column, I set the format to

0.0 "mpg"

and for the distance between fillups the format is

0 "miles"

Saturday, August 13, 2016

Calculating miles per gallon between fulls

I wanted to calculate the miles per gallon between full tanks, so I wrote a crap macro to do it. You use the macro by putting the macro in a Module and then calling the function with a formula


=calc_mpg_between_fulls(I45) passing it the cell where you're at (in this case column I, row 45) as a Range, so it knows where to access the cells in the sheet.

Basically it looks for the first row that has the string "to full" in column 7 (column G) and then calculates the mileage driven and gas used starting from that row.

Function calc_mpg_between_fulls(thiscell As Range) As Double  
orig_row = thiscell.Row
orig_col = thiscell.Column
'MsgBox Str$(orig_row) + " " + Str$(orig_col)
odometer_col = 1
gas_col = 2
full_col = 7
row_to = orig_row
While Cells(row_to, full_col) <> "to full": row_to = row_to - 1: Wend
row_from = row_to - 1
While Cells(row_from, full_col) <> "to full": row_from = row_from - 1: Wend
'MsgBox "  row_from" + Str$(row_from) + "  row_to:" + Str$(row_to)
milesdriven = Cells(row_to, odometer_col) - Cells(row_from, odometer_col)
For i = (row_from + 1) To row_to: gasused = gasused + Cells(i, gas_col): Next i
calc_mpg_between_fulls = milesdriven / gasused
'MsgBox " miles: " + Str$(milesdriven) + " gas used:" + Str$(gasused) + "   " + Str$(milesdriven / gasused)
End Function


The only thing is that it will only calculate the formula once due to the way Excel recalculates things. So if you want it to recalc, just fill copy the formula over the same cell again and it will recalculate it.

edit:

so I was thinking about recalculation, why not pass a dummy range as well so that it will recalculate if anything in that range is changed.

Function calc_mpg_between_fulls(thiscell As Range, dummyrange As Range) As Double 

and make the formula =calc_mpg_between_fulls(I45,A40:G45)

Gas tracking spreadsheet

I like to track my gas mileage so I made up a spreadsheet to do it. Sure, there's a website at gasbuddy or fuelly but where's the fun in that?




column A is odometer
column B is gallons (to the third digit after the decimal e.g. 11.384 gallons)
column C is gas price per gallon
column D is total price: formula column B * (C +0.009) since the price is actually plus 9/10 of a cent
=B2*(C2+0.009)
column E is date
column F is gas station name and location
column G is to full: either the words "to full" or blank to indicate not filling up to full
column H is miles traveled: formula column A - last row's column A
=A2-A1
column I is mileage: formula miles traveled (column H divided by column B)
=H2/B2

and for another row, just use fill copy to copy the formulas down the page


I've been tracking my gas mileage for over 10 years, saving each receipt, writing the odometer down and then entering it into the spreadsheet when I get a chance.

If I don't put the receipt into my wallet immediately after getting it, I tend to lose the receipts.

I fill it to full each time, otherwise the simple calculation gives kind of wild results.

Once you have a year's worth of data, then you can make interesting charts. I like to make charts of odometer vs date and putting in linear regression lines and showing the regression formula.





so according to the linear regression formula y=11.825x - 370507 I've driven on average 11.825 miles per day or 11.825 * 365 = 4316 miles per year.

Gas tracking spreadsheet

I like to track my gas mileage so I made up a spreadsheet to do it. Sure, there's a website at gasbuddy or fuelly but where's the fun in that?

column A is odometer
column B is gallons (to the third digit after the decimal e.g. 11.384 gallons)
column C is gas price per gallon
column D is total price: formula column B * (C +0.009) since the price is actually plus 9/10 of a cent
=B2*(C2+0.009)
column E is date
column F is gas station name and location
column G is to full: either the words "to full" or blank to indicate not filling up to full
column H is miles traveled: formula column A - last row's column A
=A2-A1
column I is mileage: formula miles traveled (column H divided by column B)
=H2/B2

and for another row, just use fill copy to copy the formulas down the page


I've been tracking my gas mileage for over 10 years, saving each receipt, writing the odometer down and then entering it into the spreadsheet when I get a chance.

If I don't put the receipt into my wallet immediately after getting it, I tend to lose the receipts.

I fill it to full each time, otherwise the simple calculation gives kind of wild results.

Once you have a year's worth of data, then you can make interesting charts. I like to make charts of odometer vs date and putting in linear regression lines and showing the regression formula.





so according to the linear regression formula y=11.825x - 370507 I've driven on average 11.825 miles per day or 11.825 * 365 = 4316 miles per year.

Friday, August 12, 2016

HP Omni All in one computer and knoppix 7.7

So I got this HP Omni all in one computer. I wanted it to boot from knoppix 7.7 installed to a flash drive and it wouldn't boot from the boot menu unless I chose the flash drive under the "Legacy boot" section, not the "UEFI boot section".

It's an all in one, so it's like a laptop with an integrated screen and speakers. If you're used to regular monitors, there's no buttons to adjust the brightness and contrast.

So it's xbacklight and xgamma to the rescue.


xbacklight -set 50

xgamma -gamma 0.7


xbacklight -inc 10

to make it a little brighter

xbacklight -dec 10

to make it a little darker

So far it seems to run pretty sweetly under knoppix 7.7. Even the built-in webcam works under /dev/video0 and can be viewed with VLC.


The only thing I don't like is that there isn't a built-in VGA/DVI/HDMI for an external monitor. What if the monitor goes bad?


eDP1 = embedded displayport

xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1080 59.99*+ 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1280x1024 60.02
1440x900 59.89
1280x960 60.00
1360x768 59.80 59.96
1152x864 60.00
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)



xrandr can set the gamma as well, for example:

xrandr --output eDP1 --gamma 1.0:1.0:1.0


If you ask xrandr for verbose you get a lot of info:

xrandr --verbose
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (0x4a) normal (normal left inverted right x axis y axis) 0mm x 0mm
Identifier: 0x42
Timestamp: 34664178
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
BACKLIGHT: 4
range: (0, 10)
Backlight: 4
range: (0, 10)
scaling mode: Full aspect
supported: None, Full, Center, Full aspect
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
1920x1080 (0x4a) 143.600MHz -HSync -VSync *current +preferred
h: width 1920 start 2016 end 2080 total 2176 skew 0 clock 65.99KHz
v: height 1080 start 1088 end 1092 total 1100 clock 59.99Hz

...

hmmmm I wonder if I can adjust the scaling mode, looks interesting.


xrandr --output eDP1 --set "scaling mode" "Full"
xrandr --output eDP1 --set "scaling mode" "Center"
xrandr --output eDP1 --set "scaling mode" "Full aspect"

Cool! It works!

Thursday, August 11, 2016

wdtv live hdmi to a regular dvi monitor

Just for fun, I thought I'd hook up a wdtv live plus hd to a dvi monitor Dell 2007FP to see what'd happen.

DVI is basically HDMI (without sound) so it should work in theory. All you really need is an HDMI to DVI cable. (or is that DVI to HDMI cable)

I plug it in and turn it on and I get a funny looking screen that's got a pink shade, but if I go into settings and force a 720p 60hz mode everything looks proper. The Dell 2007FP can't do 1920x1080p since it tops out at 1600x1200 but 1280x720p looks pretty good.

Now to find some speakers to hook up to the wdtv.