Author Archives: daniel

Enable Stereo Mix on Windows 7 under BootCamp

After rebuilding my Mac Pro with Windows 7 on an SSD (more about this later), Stereo Mix went missing.

To re-enable it, I ended up changing the audio driver to the Microsoft High-Definition Audio drivers, then back to the Realtek drivers:

  • Control Panel / Device Manager
  • Browse to Sound Video and Game Controllers
  • Choose Realtek High Definition Audio / Change (you’ll need an admin password at this point)
  • Update driver / Browse / Let me pick, and choose High Definition Audio Device.
  • Let it finish, then go back in again but at the last step choose Realtek High Definition Audio. This time I found it needed a reboot.

I assume this updates you to the drivers that came with Windows, rather than those that came with Boot Camp.

After the reboot, Stereo Mix is available. You just need to enable it under Control Panel / Sound / Recording devices, right-click, Show disabled devices, then enable it. You can set it as the default so you can record things in Audacity etc.

Comment spammers try to get clever

On my personal blog, on a post about the Melbourne public transport smartcard Myki, this comment popped into the moderation queue:

I found another very uefsul behaviour this morning.I don’t touch off when I get home at night. While, this seems weird how do they know I got off in Zone 1 (for which I have a pass) and didn’t travel into Zone 2 (for which I should be charged Money)? But, the fare manual says that if you have a MyKi Pass and you touch on in a zone for which that pass is valid (Parliament in my case) then there is no default fair.So, every morning when I touch on, it tells me deducting fare for previous trip . Which is $0.00. Cool.This morning I forgot to touch on some power issues on our line, got to chatting with the Station Hosts, just forgot. When I got to Parliament, I fully expected the gates to deny me egress and I’d have to do the silly thing where you act exasperated and they just wave you through the end gate even though you’re holding nothing but a wallet in your hand (MyKi works while in the wallet).BUT, it let me through. Seems that it’s happy enough that I started a trip (at Parliament) last night, spent 16 hours travelling and ended my trip back where I started. So it let me out basically a touch off of the trip home last night.Bizarre. But uefsul.

At first glance, it looked on-topic. But I was suspicious because the user link was to facebook.com/profile.php?id=XYZ (I’ve removed the ID) — and it came in the middle of a bunch of other (less-relevant) comments linking to similar URLs.

Googling around for key words in the comment, I found that it’s a copy of a comment from a completely different blog, with various misspellings inserted, and paragraph breaks removed. The original:

I found another very useful behaviour this morning.

I don’t touch off when I get home at night. While, this seems weird – how do they know I got off in Zone 1 (for which I have a pass) and didn’t travel into Zone 2 (for which I should be charged Money)? But, the fare manual says that if you have a MyKi Pass and you touch on in a zone for which that pass is valid (Parliament in my case) then there is no default fair.

So, every morning when I touch on, it tells me “deducting fare for previous trip”. Which is $0.00. Cool.

This morning I forgot to touch on – some power issues on our line, got to chatting with the Station Hosts, just forgot. When I got to Parliament, I fully expected the gates to deny me egress and I’d have to do the silly thing where you act exasperated and they just wave you through the end gate even though you’re holding nothing but a wallet in your hand (MyKi works while in the wallet).

BUT, it let me through. Seems that it’s happy enough that I started a trip (at Parliament) last night, spent 16 hours travelling and ended my trip back where I started. So it let me out – basically a touch off of the trip home last night.

Bizarre. But useful.

It seems the spammers are trying to get a bit more clever at sneaking their comment posts past moderators.

I still don’t know why, given WordPress has used NoFollow on their comment links for about ten years now.

Spam from Cotap

Subject line: “You’ve been added as a contact on Cotap”

Email text: “Cotap is a secure texting app for teams. View the [company name] directory. [link]

“Are you using WhatsApp, GroupMe, or iMessage to text your coworkers? See why Cotap is better for work.”

Yeah, no, this is spam, and it sounds like quite a few people are getting them.

Cotap was formed by former Yammer people… there’s speculation that when they left Yammer, they took a copy of the Yammer email list with them.

In any case, don’t fall for their trap. Don’t do business with spammers.

In fact, why on earth would you trust your business messaging to spammers?

Panasonic DMR-PWT520 disc tray won’t open/eject

This model seems to have an issue whereby the disc tray won’t open, even if the front panel flap is correctly open. You press the Open button and nothing happens, though on the screen it’ll say Open.

Some recommend putting it into Standby mode (off) then holding down Stop and Channel Up. That didn’t work for me.

Putting it in Standby and holding down Open did work… it first started up, then after about 10 seconds, the disc tray opened.

(Possibly it needs a firmware upgrade… I’ll check that out eventually, though it’s not my unit.)

Flickr’s new HTML code embedding – how to remove the header and footer

Flickr has altered its default embed HTML to include a header and footer, which includes Flickr branding and the title of the picture.

PT in the Sense8 titles 01

Sometimes I suppose this is okay, but sometimes I just want the picture.

Fortunately it seems to be relatively easy to get rid of. In the example above:

<a data-flickr-embed="true" data-header="true" data-footer="true" href="https://www.flickr.com/photos/danielbowen/19038778583/in/dateposted/" title="PT in the Sense8 titles 01"><img src="https://farm1.staticflickr.com/313/19038778583_3149e7e01a.jpg" width="500" height="282" alt="PT in the Sense8 titles 01"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>

…remove the data-flickr-embed, data-header, and data-footer attributes of the a href, and remove the script tags, like this:

<a href="https://www.flickr.com/photos/danielbowen/19038778583/in/dateposted/" title="PT in the Sense8 titles 01"><img src="https://farm1.staticflickr.com/313/19038778583_3149e7e01a.jpg" width="500" height="282" alt="PT in the Sense8 titles 01"></a>

The result should be just the photo, with the usual linking back to Flickr.

PT in the Sense8 titles 01

It’d be nice if they made this a built-in option when generating the HTML code.

Of course, it also makes me ponder if I should be finding another photo host.

Update 2015-07-20: They seem to have modified their default embedding code a bit so the branding and picture details now only appear over the photo when you mouse over it. Not so objectionable.

PT in the Sense8 titles 01

Flickr’s modified code now excludes data-header="true" data-footer="true" which presumably added the header and footer.

The old PC made new again: trying out Linux

My old hand-me-down laptop is getting too slow under Windows.

I tried reinstalling, and it’s still slow. Perhaps it’s the patch upon patch upon patch that needs to be applied to make it safe that explains why Windows installations always slow down over time — and why reinstalling didn’t solve the problem.

So I went looking around for lightweight Windows-like Linux distros… and ended up with LXLE.

The steps were pretty simple.

  1. Windows Disk Management to shrink the main partition enough so there was space for Linux.
  2. Download LXLE (silly me, I could have chosen 64 bit, but went with 32 because Windows was 32… the specs say it’s actually 64-bit… though with only 2Gb of memory, 32 might be better, as it is with Windows?)
  3. Used UNetbootin to create a bootable USB drive
  4. Boot onto the USB and follow the steps. Easy.
  5. Two things I’ve done apart from installing the default OS: install Chrome so I could sync my bookmarks, passwords etc
  6. And install gpointing-device-settings via Synaptic, to turn off the annoying touchpad click (which I keep firing accidentally)

The laptop seems rejuvenated. The speed is nice. I mostly use it for web and a little word processing (which Libre Office, installed with the distro, should cover).

The interface is similar enough to Windows that I’ll get by fine with it. (And unlike trying to move to OSX, no annoying differences in keyboard shortcuts.)

And if I desperately want something in Windows, I can still boot it up if I need to.

Still to investigate:

  • Compatibility with VPN for work
  • RDP for work and other uses
  • See if GIMP will cover the same stuff I use Paint.Net for, or if I need to find something else

But…problems…

It has had some problems with waking up after sleep, and forgetting the touchpad No Click setting when rebooting.

And now, after a week…

Linux boot problem

Now it won’t boot.

The whizzes on Twitter suggest it might be a hard disk corruption… which it might be, though Windows is still booting fine.

Or it might be that grub needs reinstalling. I’m not even sure how or why I’d do that.

The other suggestion people have is to try a different (more stable?) distro, such as Lubuntu. Might be worth a look, though I’m wondering how much better it would be.

As I get time I’ll keep testing.

Update: It may have been to the partition running out of disk space. Yeah, seems like an odd way of dealing with it.

COM+ calling multiple .Net versions risks blowing the memory limit

From the Things I’ve Found That Might Affect Other People But There’s Not Much Detail In Google About It department

Not that I have much to add to the sum total of published knowledge on this, but our situation is we have a COM object (legacy code) calling .Net 2 objects (not-quite-as-old legacy code).

We’re upgrading it all to .Net 4.5, but the .Net stuff is an easier change, so we’ve been doing that first, naturally in a carefully planned, staged manner.

It turns out that COM+ objects have a 1 Gb memory limit.

And it appears that when you have them calling a mix of .Net 2 and .Net 4 objects, the overhead of being able to call two different .Net Framework versions becomes an issue.

At least that’s our theory based on what we’re seeing — looking at ProcessExplorer showed about a dozen assemblies loaded for each version of .Net.

One blog post I read suggested a 600-800 Mb overhead for each .Net version. I can’t confirm that, but certainly we’ve had more Out Of Memory exceptions than we expected.

We’ve resolved it by going back to our .Net 2 code (so only one version is held within the COM+ process at once), and we’ll do the big switch all at once. Hopefully that’ll resolve it.

The COM object will also be switched too of course, and once that’s done, running everything in .Net 4, plus a move from 32-bit to 64-bit machines, apparently will lift that 1 Gb limit to 8 Tb!

Cool!

SQL Server paranoia mode

This post is for Tony!

Worried about accidentally overwriting critical data with a typo in your database commands?

SQL Server Management Studio has an option for that: SET IMPLICIT TRANSACTIONS, which you’ll find (in 2008 / 2008 R2 at least) under Tools / Options / Query Execution / SQL Server / ANSI.

SQL Server implicit transactions option

Anything you do (from the next query window you open) will automatically be in a transaction, so you can ROLLBACK if you realise you’ve done the wrong thing.

Be warned, you’ll need to get into the habit of manually COMMITting everything. Don’t be tempted to just add the COMMIT at the bottom of your query… that would defeat the purpose.

It’ll prompt you do to so if you close a query window without having done a ROLLBACK or COMMIT. It can get a little irritating, but knowing you can’t accidentally trash all your data may give you piece of mind in return.

FOP and ZXing compatibility

From the I’ve been trying to get this to work — this tip may save you some time department:

Apache FOP is for doing graphics with XML and XSLT.

FOP version 0.95 came out in August 2008. 1.0 in July 2010. 1.1 in October 2012.

ZXing is for doing QR codes.

ZXing 0.1.2 was released in March 2012, and seems to no longer be in active development.

The important bit: As far as I can see, ZXing works fine with FOP 0.95 (which was current when it was released), but not with later versions.

I kept getting these errors:

SEVERE: Image not available. URI: (instream-object). Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for null (No context info available)
org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for null

With any amount of fiddling, I couldn’t get it to work on Windows and Java 1.7. Nobody online appears to have noted this issue. You might have more luck…

Or maybe there is no solution to it. If so, I hope this saves you some time.

(Barcode4J, which we also use, seems to work with all currently available versions of FOP. It also has QR functionality, provided via ZXing, but this is only available in the unreleased code, which presumably has alpha status, and you have to build yourself. Barcode4J also hasn’t been updated in some years, last released in December 2010.)