BEEPS AND BLIPS FROM OUTERSPACE
WIN32 API: SET WINDOW TO FOREGROUND

It can be tricky setting your window as the top z-order window.  It's not just a simple call to SetForegroundWindow.

 

Here's how to do it:

AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(), NULL),
                  GetCurrentThreadId(), TRUE);

BringWindowToTop(hwnd);
SetForegroundWindow(hwnd);
SetFocus(hwnd);

AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(),NULL),
                  GetCurrentThreadId(),FALSE);

This solution is from Nish Sivakumar's code project article and KevinSW's comment.

POSTED 2014-03-19 07:38:39 CATEGORY ENGINEERING TAGS WIN32 WINDOW IMPATIENT GUIDE FOCUS
MAPS OF THE US TO FIND NICE/PROBLEM COUNTIES

Here are a series of maps of US counties showing various statistics (Religion, Mental Illness, Education, Income, etc...):

If I had the time and the data, I'd throw together a US county filter/screen app so people can browse and search the relative desirability of each county (like a stock filter).

imgur link

POSTED 2014-01-25 20:50:15 CATEGORY ECONOMY TAGS COUNTY STATISTICS USA GEOGRAPHY
FRONT LINES OF WWII'S EUROPEAN THEATER

POSTED 2013-10-08 21:23:10 CATEGORY MEDIA TAGS EUROPE WW2
WINDOWS: YEN SYMBOL FOR BACKSLASH

First off, the term backslash for \ doesn't sit well.  It would be best described as downslash since that is the direction the pen travels as it is written.  But, for consistency, let's call it a backslash.

 Maybe you have tried installing a Japanese keyboard and IME in Windows 7 and decided to uninstall it.  You may notice after uninstalling everything (and doing the requisite restart) a yen symbols still replaces the backslash when typing the key.

In a command prompt (console), paths will look like:

C:¥Windows¥System32>

To fix the problem, go to:

Settings (Control Panel) -> Region and Languages -> Administrative -> Language for non-Unicode programs -> Change system locale

You may have noticed that the setting was still set to Japanese.  Make sure it is set back to English, whichever flavor that is.

POSTED 2013-10-04 23:38:28 CATEGORY ENGINEERING TAGS IMPATIENT GUIDE HOW TO
SPARKLE: WHERE ARE UPDATE CHECKS SAVED

Sparkle is an OSX framework used for automating software.  Once integrated into an application it will pull an appcast to see if it a newer version is available.  If a newer version exists, it will download and install it.  This framework frees developers from having to roll out their own update mechanism that lives outside the App Store.

Built into Sparkle are little crumbs that make sure the update isn't performed too often since it will degrade the host application's performance.  These preferences are saved in the host application's OSX preference/properties location.

When developing it is useful to be able to do an update check on every launch, which means clearing the crumbs Sparkle left behind.  To do this use the "defaults" commandline tool:

$ defaults delete com.yourappdomainbundlename SUEnableAutomaticUpdates
$ defaults delete com.yourappdomainbundlename SULastCheckTime

If you want to see what else Sparkle puts in your application preferences, just read them:

$ defaults read com.yourappdomainbundlename
POSTED 2013-10-02 21:31:28 CATEGORY ENGINEERING TAGS SPARKLE OSX
XCODE: VIEWING MEMORY

Xcode makes easy tasks hard.  Want to view memory at a specific address?  Well, don't look in the View menu, where most of the IDE panes are.  Go to Product -> Debug -> View Memory.

Everyday using Xcode is like a scavenger hunt in Hades where the reward is absent and you can only ask yourself why you continue.

POSTED 2013-10-02 20:57:29 CATEGORY ENGINEERING TAGS XCODE
XCODE: HOW TO SET ENVIRONMENT VARIABLE FOR DEBUGGING

Say you have an application that makes a simple getenv() call to check an environment variable and you want to test it during runtime in the Xcode IDE debugger.  How do you tell Xcode 4.6 to supply the environment variable?

It's hidden away in the schema.  So, edit your schema and choose the "Run YourApp" item on the left panel.  Then add an environment variable in the table to the right.

~

Working on any mildly complex project is a nightmare.  Sure, Apple is all about minimalism, but those headers are descriptive and are useful when trying to describe solutions to project configurations.  Scanning StackOverflow's Xcode questions reveal a funny but sad mix of "the left panel" or "the second-to-left panel."

The Xcode IDE is a dirty joke that makes the life of a developer worse.  The time spent in Xcode config land versus actually being productive creating something is obscene.

POSTED 2013-10-02 19:34:40 CATEGORY ENGINEERING TAGS RANT XCODE
UNRESPONSIVE KEYBOARD ON SAMSUNG 700Z LAPTOP IN WINDOWS 7


After trying unsuccessfully to get a Japanese USB keyboard working on Windows 7, I found my Samsung Laptop keyboard and touchpad disabled.  It appears Samsung uses special scan codes to enable/disable the touchpad and keyboard.  The Japanese keyboard just happened to be able to issue one of those scan codes.

So, I inadvertently hit one of the keys and a "Hold: ON" message flashed on the screen.  I didn't think anything of it until trying to type and move the cursor.  Damn!  I was stuck with the external keyboard and mouse until everything was backed out and fixed.

Restarting the laptop did nothing.  Although the keyboard worked fine during bios/TrueCrypt authentication, it would revert back to being broken after booting the OS.

The Device Manager displayed for the Standard PS/2 Keyboard and the ELAN PS/2 Port Smart-Pad an error similar to the following:

Windows a driver for this device has been disabled.  An alternate driver may be providing this functionality.

Uninstalling the keyboard driver and reinstalling it didn't seem to fix it, nor did powering everything down and using a paperclip to disconnect the battery.

What did work was disabling the keyboard and touchpad and re-enabling them.  After a reboot, they were once again functioning.

POSTED 2013-09-27 02:43:03 CATEGORY ENGINEERING TAGS BROKEN LAPTOP SAMSUNG KEYBOARD
CHRISTINA'S WORLD BY ANDREW WYETH

Christina's World by Andrew Wyeth

POSTED 2013-09-23 19:15:24 CATEGORY ART TAGS PAINTING
GIFS FROM THE BOTTOM OF JACOBS LADDER

These gifs are partly glitches and partly intentional image manipulation.  The result is something that "will make you question your sanity."

via jwz.org

POSTED 2013-09-05 01:33:59 CATEGORY MEDIA TAGS GIF WTF
prev page
• • •
next page