PRO Android Tip

If you get this in Windows when running the android emulator:

invalid command-line parameter: Files.
Hint: use ‘@foo’ to launch a virtual device named ‘foo’.
please use -help for more information

It could be because you installed the Android SDK in a folder with a space. I.E. “Program Files”

Introducing GPlus Tweet

Update: Version 0.2 release to match the latest G+ layout

GPlus Tweet

I decided that this weekend I needed to learn Javascript and G+Tweet was born :)

GPlus Tweet is a browser extension for Google Chrome that allows you to push status updates from Google Plus to Twitter. I am a big fan of G+ and wanted to post status updates to both twitter and G+ at the same time.

You can skip to the chase and just DOWNLOAD IT HERE

The source code is available on my GitHub here: https://github.com/jkells/gplus_tweet

Installation

1. From Chrome click the download link above. The following message will appear in your browser tray in the bottom left hand corner.

2. Click the continue button.

3. A little icon will appear next to your URL bar. Click the icon to begin the Twitter authentication process.

4. Twitter will issue you with a PIN number. Copy it to your clipboard or write it down.

5. Click the little bird icon and enter your pin number.

6. The application is now authorized to post to twitter.

Usage

Just start sharing from within Google Plus. An extra option (Post to Twitter) will appear above your share box. If this option is selected the status update will be published to Twitter when you press share. The number indicates how many characters you have remaining before you hit the 140 character limit for tweets.

Have Fun!

Using expressions to parse paramater names.

Here is an example of using an expression in C# so we can determine the name of the variable passed into our function.
https://gist.github.com/672409

Best Steak

The trick to the perfect steak is to let it rest before serving. I could never cook a steak right.

Normally it was dry and overdone on the outside and bleeding out the middle.

I was overcooking it but it was still bloody in the middle. It was like I had a well done steak with a thin strip of blood in the middle.

Instead cook it a bit rare then let it rest for 10 minutes, it will slowly cook through while it rests and the bloody juice in the middle will spread out making it a nice consistent pink all the way through.

On my BBQ on the hottest heat I grill 6 mins per side then rest on a plate for 10 mins under aluminium foil for a perfect medium.

SC_Listener

Looks like some people are using frequency detection fork of sc_listener for the iPhone :)

http://vis.berkeley.edu/courses/cs160-sp10/wiki/index.php/InteractivePrototype-Group:GroupJForNow

Exchange 2010 Catch All Mailbox

Even though you will get a lot of spam many companies want someone to look through every email that comes in just incase someone misspells an email address.
There is a native way to do this in exchange 2010 but you have to specify every legitimate email address in a transport rule.


If you are running a single exchange server in a small company without seperate edge transport servers this method doesn’t work. :(


I found this freeware recipient filter which worked great for me on Exchange 2010.



http://ebsfaq.com/Exchange2007/Edge/CatchallTransportAgent/tabid/1208/language/en-US/Default.aspx

Exchange 2003 to 2010 Transition

This two part guide by Jaap Wesselius is fantastic. This is essentially the steps I took to upgrade exchange 2003 to 2010. I wish I found this guide before I started instead of at the very end!

http://www.simple-talk.com/sysadmin/exchange/upgrade-exchange-2003-to-exchange-2010/

http://www.simple-talk.com/sysadmin/exchange/upgrade-exchange-2003-to-exchange-2010-–-part-ii/

Windows Server Backup – Failed Creation of shared protection point.

I have been struggling to get backups to succeed using Windows Server Backup on Windows Server 2008 R2.

The machine is running HyperV with about 8 running VM’s.

The machine would hang for about 10 minutes before failing to backup. I have included all the symptoms at the bottom of this blog post. I solved my issue by enabling the auto mounter on the host machine.

Perhaps the HyperV VSS writer uses the auto mounter to connect to the shadow copies on the guest VM’s?

Solution

The solution for this is to enable disk auto mounting. Open a command window with elevated privileges and run:

diskpart

Check the status of auto mount by typing automount into the DISKPART window.

Automatic mounting of new volumes disabled.

Enable auto mount by typing automount enable

Type exit

Related Articles

http://blogs.technet.com/filecab/archive/2009/09/16/diagnosing-failures-in-windows-server-backup-part-1-vss-spp-errors.aspx

http://social.technet.microsoft.com/Forums/en-US/winserverfiles/thread/9cf42e8a-2a33-47c5-a797-269330e9ba1a

http://social.technet.microsoft.com/Forums/en/windowsbackup/thread/313b46c6-5581-496f-9937-36e9dc33948d

http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/2c9bbe55-3931-4a54-a4dc-5e15debc4a47

Symptoms

Windows Server Backup fails with the following error message:

Status: Failed Creation of shared protection point timed out.

The following is recorded in the Windows Application log

The backup operation that started at ‘‎2010‎-‎04‎-‎09T00:40:45.524000000Z’ has failed because the Volume Shadow Copy Service operation to create a shadow copy of the volumes being backed up failed with following error code ’2155348129′. Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.

The command vssadmin list writers displays the following error:

Writer name: ‘Microsoft Hyper-V VSS Writer’

Writer Id: {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}

Writer Instance Id: {fe2b0556-d9e8-47e5-9e0f-e6ba44216f3d}

State: [5] Waiting for completion

Last error: Unexpected error

The following warning is recorded in the application log 10 or so minutes after the backup fails.

Volume Shadow Copy Service error: The shadow copy writer could not communicate with the Shadow Copy publisher. The shadow copy publisher (for example the backup application) might have terminated during the shadow copy process. hr = 0x800706ba, The RPC server is unavailable.
.
Operation:
Gathering Writer Data
Context:
Writer Class Id: {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}
Writer Name: Microsoft Hyper-V VSS Writer
Writer Instance ID: {fe2b0556-d9e8-47e5-9e0f-e6ba44216f3d}

Volume Shadow Copy Service error: The shadow copy writer could not communicate with the Shadow Copy publisher. The shadow copy publisher (for example the backup application) might have terminated during the shadow copy process. hr = 0x800706ba, The RPC server is unavailable..
Operation:   Gathering Writer Data
Context:   Writer Class Id: {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}   Writer Name: Microsoft Hyper-V VSS Writer   Writer Instance ID: {fe2b0556-d9e8-47e5-9e0f-e6ba44216f3d}

For each virtual machine an entry is recorded under logs \Microsoft\Windows\HyperV-VMMS

No snapshots to revert were found for virtual machine ‘xxx’. (Virtual machine ID xxxxx )

Windows XP Desktop – Transparent Labels

Just helped someone with a weird little problem. All their desktop icons had ugly looking coloured shadows under them.

The labels also had a coloured box behind the text.

Here is the fix. One of these should fix it!

1.

  • Make sure background is not a PNG! It has to be a BMP of JPEG

2.

  • Display Properties
  • Desktop Tab
  • Customize Desktop
  • Web Tab
  • Untick all web pages.

3.

  • Right click desktop
  • Arrange By
  • Untick Lock Web Icons On Desktop

3.

  • Control Panel
  • System
  • Advanced Tab
  • Performance Settings Button
  • Tick Use frop shadows for icon labels on the desktop



Frequency Detection Using Fourier Transform

I needed to determine the pitch of sound from the iPhone mic for one of my applications. The application is called Tune Kitten and is on the app store here: http://itunes.apple.com/au/app/tune-kitten-free/id357418905

I tried  counting zero crossings of the sound samples and it worked ok for a frequency generator but for any real life sounds it was hopeless. Some research pointed to the fourier transform but there was very little information on how to actually apply it.

Basically when applied to audio samples the fourier transform takes audio samples consisting of amplitude over time and gives you power and phase over frequency. I am not interested in the phase just the power of each frequency.

First you need to get the audio sample data. In my case I set the sample rate to 44,100hz 16bit. Essentially that means for each second of sound you get 44,100 16 bit measurements of the amplitude of the sound wave.

A Fourier Transform takes a set of complex number and returns and equal sized set of complex numbers. To apply a Fourier transform to audio samples create an array of complex numbers and set the real part of the number to the audio sample. Set the imaginary part to zero. ( The library i used has a real only version which is faster but essentially it sets the imaginary part to 0 )

Run the fourier transform and it will give you back another array of complex numbers. Each index in the array is a bin and corresponds to a frequency range. The range of frequency in each bin depends on the sample rate of your input and the amount of data put into the fft.

A large fft will give you very small bins perhaps 0.5hz each so you can more accurately pick up individual frequencies. The downside is that the fft will take longer to run and it is a CPU intensive function. You also need more audio data which may cause a delay in your application.

A smaller fft will run faster and need less audio data but the range in each bin will be larger. Each bin could represent 20hz for example which would be great for an application that displayed a frequency bar graph while music is playing but not very good for tuning a musical instrument.

The size of your fft depends on the application. In my case it needed to be fairly large. I have released the frequency detection code for iphone on github below. You are welcome to use it in your projects. Below is also a link of information I used and a link to KissFFT which is a C library I used for the fft.

The complex number in each “bin” represents both the phase and amplitude of that frequency. If the complex number was represented in polar co-ordinates the phase would be the angle and the amplitude would be the distance from the origin. If you are just interested in the power of each frequency take the square_root(real^2 + imag^2).

Information on the Fourier Transform: http://en.wikipedia.org/wiki/Fourier_transform

Discrete Fourier Transform: http://en.wikipedia.org/wiki/Discrete_Fourier_transform

Free Fourier Transform library: http://kissfft.sourceforge.net/

iPhone Library: http://github.com/jkells/sc_listener

iPhone Library Sample: http://github.com/jkells/sc_listener_sample

Follow

Get every new post delivered to your Inbox.