Monday 23 January 2012

Counting lines of code

Not that it means a great deal every now and then you get asked for the number of lines of code in a project. Greg D answered a question on StackOverflow about this using PowerShell. I liked his answer a lot because it’s so simple. Here’s his line of PowerShell code:

(dir -include *.cs,*.xaml -recurse | select-string .).Count

Thursday 12 January 2012

Unable to update Subversion source using TortoiseSVN

I tried to update source code coming from Subversion using TortoiseSVN but got an error. I had tried to update from a folder below the root (the “Implementation” folder in this case).

Error  Working copy ‘C:\source\<project name>\Implementation’ locked.
Error  'C:\source\<project name>' is already locked.

 

Untitled


Trying the TortoiseSVN > Release Lock... command did nothing in this case because I had not taken a lock out on any file. The solution was to use TortoiseSVN > Cleanup... from the root folder (‘C:\source\<project name>’ in this case.

Untitled3

Wednesday 11 January 2012

APSDaemon.exe – Apple’s machine killer

I have 2 iPod Nanos that I use all the time and as such have to use iTunes. I’m a Windows user and I have to say that iTunes on Windows sucks. It wouldn’t be so bad if all you got was iTunes but you don’t; you also get a bunch of other services that drag your machine to its knees. In my case they are services I just don’t want, don’t need and wish would go away.

Anyway, APSDaemon.exe is one such piece of nonsense that is officially known as Apple Push. In my case it takes up so much CPU time my machine becomes totally unusable. It’s not the newest machine but it does have an AMD Athlon 64 3500+ processor. APSDaemon.exe will happily sit there chewing on 50% of my CPU. I have also noticed that when APSDaemon.exe is working hard so is Kaspersky Internet Security. Between the 2 of them 100% CPU is utilised. If I kill APSDaemon.exe Kaspersky also settles back down.

APSDaemon.exe seems to be invoked under 2 conditions, both of which must be addressed to stop the thing from starting:

  1. At system startup.
  2. When iTunes is started.

How to stop APSDaemon.exe from starting

  1. Pop open the task manager, find APSDaemon.exe and kill it.
  2. Go to Start > Run and type msconfig.
  3. Go to the Startup tab and find ASPDaemon.exe. Uncheck it. This will stop the application from starting when your system does.
  4. Go to C:\Program Files\Common Files\Apple\Apple Application Support and rename ASPDaemon.exe to something else (e.g. ASPDaemon.I_dont_want_this_to_run). This will stop iTunes from being able to start it.

iTunes will still start and run normally but ASPDaemon.exe will not. Result.