free hit counter

Friday, February 24, 2006

Excel- howto turn of fake SDI mode

either go with a more bonafide SDI interface like Word (which is still a bit of a hybrid...), or keep a real MDI interface. Don't half ass it.

So frustrating that I can't put a spreadhseet in my main monitor and another spreadsheet on my secondary monitor. But at least I can keep the number of entries when alt-tabbing down by killing the fake SDI mode:

Tools | Options | View |

uncheck "Windows in Taskbar"

Wednesday, February 22, 2006

Model Driven Architecture Tools

Though it seems the MDA tools are really setup for enterprise software I still think its an interesting concept.

Best of the MDA tools looks to be androMDA, and also heard several recommendations for MagicDraw.

AndroMDA Model Driven Architecture Framework - AndroMDA - What is it?

MagicDraw will take twice as long as you plan

It won't be as bad as you fear or as good as you hope, but it will take twice as long as you plan.


Tuesday, February 21, 2006

your typical sensor interface GUI

It's definitly a difficult task to handle the input of so much data, but there's got to be a better way...

Sensor Synergy - Screen Images for Data Loggers and Configuration Console

IEEE Smart Sensors

Monday, February 20, 2006

awk: max error

here's a humdinger of my own devising which prints out the max absolute difference between host and target calculations on a math engine calculation I think may be out of spec:

TestFirEngine.h:667: Trace: "input: 0.0005 host: 0.0223607 target: 0.041757"
$ nmake run | awk '/input:/ {x=$4; hY=$6; tY=$8; l= sqrt((tY-hY)*(tY-hY)); if (l>maxDelta) {maxDelta=l; maxX=x;}} END {print maxX, maxDelta}'

more awk examples

Friday, February 17, 2006

good value for PI

#define PI (4*atan(1))
#define deg2rad(d) ((d)*PI/180)
#define rad2deg(r) ((r)*180/PI)


Wednesday, February 15, 2006

Programmable Hall Sensor Interface | Manufactured by Melexis

Here's a competitor to Sensor platforms, but while their sensor interface ICs only works with voltage or current based sensors, Sensor Platforms' work with inductive/capacitive sensors as well.
Programmable Sensor Interface | Manufactured by Melexis

Tuesday, February 07, 2006

FIR filters: usage and implementation

MSDN C runtime lib Alphabetical Function Reference

Oh so usefull, and hidden in the morass of all the managed C++ libraries, win CE, Visual Basic, etc.

Alphabetical Function Reference (CRT)

Friday, February 03, 2006

listening for device removal / insertion

It's not necessarily a SetupDixxx function as I had thought.

RegisterDeviceNotification is the magic word.

class WinDeviceInsertionListeningApp : public QApplication
const int DEVICE_NOTIFY_WINDOW_HANDLE = 0x00000000;

WinDeviceInsertionListeningApp( int & argc, char ** argv )
: QApplication (argc, argv)

void registerDeviceNotification(QWidget* mainWindow)
{ 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } };


ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE;

HANDLE result= RegisterDeviceNotification(mainWindow->winId(),

if (result == NULL)
cout << "Can't register for notification!" << endl;


bool winEventFilter(MSG * msg, long * result )
bool functionResult= false;

static int i=0;

if (msg->message == WM_DEVICECHANGE ) //
if (msg->wParam == DBT_DEVICEARRIVAL)
cout << endl << "device insert!" << endl;

cout << endl << "device removal!" << endl;
if ((i %100) == 0)
cout << "." << endl;


return functionResult;

This is a great usenet posting:
Google Groups :

And a fun artical about interfacing to a temp sensor by using the generic HID driver (includes usage of device notifications:

CruiseControl - continuous automated builds

It would be great to use this sort of thing with C++. Perhaps this would work with enought tweaking...

CruiseControl Home

Thursday, February 02, 2006

Breaking News: Java doesn't have it all figured out

So, I could live with the frustrating fact that JComboBox and JList don't have consistant interfaces, but then I see that the SelectionChanged event gets fired twice when a user selects a new item in a list view. Why? What's the point? There should be two events, like mouse up and mouse down.

Code to get around this:

public void valueChanged(ListSelectionEvent e)
System.out.print( "list select: index: " + list.getSelectedIndex() );
System.out.print( ", value: " + list.getSelectedValue() );

// below indicates how to differentiate mouse-down from mouse-up

if (list.getSelectedIndex() != selected_index)
System.out.println( " -- mouse down" );
selected_index = list.getSelectedIndex(); // reset
else {
System.out.println( " -- mouse up" );
System.out.println( "-----------------------------------" );

Components Examples: "twice"

MSVC++ application distribution

In the MSFT jargon I guess this is called deployment. I just can't figure out why it's such a PITA to make your software run on all versions of Windows.

The one true link to deploying the latest CRT dlls in your VC++ app installation:

But you don't get this file when you download VC++ Express. So instead you can cook up this MSI install file from the merge files.
Or can goole for a reputable, but non microsoft source.

But it gets even better- you can't run this vcredist_x86.exe without first upgrading to MSI installer 3.1 if you're on an older Win2k machine

descriptive chaff:
Forum post describing a homebrew method for redisributing the
Choosing a Deployment Method
Concepts of Isolated Applications and Side-by-side Assemblies
Redistributing Using Merge Modules
Building C/C Isolated Applications and Side-by-side Assemblies
Redistributing Visual C Files
Deployment (C )
ClickOnce Deployment for Visual C Applications

Setting the Remote Desktop resolution

To make your RDP session look nicer on your target monitor you can set the resolution once you click the Options button. Also has other options like remembering the password.

HOW TO: Connect to Terminal Services with Color Resolution That Is Greater Than 256 in Windows XP

Wednesday, February 01, 2006

staticl linking VC++ libraries

ahh, the old /MT flag. Hopefully it will allow me to run stuff compiled with MSVC-8 on old Win2k boxes that don't support SxS assembiles.

A good resource on side by side assemblies:

SxS side by side assemblies don't work in Win2k

I don't know why it's so difficult to make a staticly linked, dll free program with MSVC tools.

MSVC 8 is great, but it really wants to make SxS side by side dll assembiles. WinXp only support isn't going to fly for me.