Posts

Use Relative Path in Free-form Netbeans Projects

For free-form projects, Netbeans uses absolute path for project directory in project.xml : <properties> <property name="project.dir">/Users/yili/Work/homecamera/WowzaStreaming</property> <property name="ant.script">${project.dir}/build.xml</property> <properties> All paths in project.xml are relative to the project folder, which is the folder that contains the nbproject folder. Thus changing the above to the following makes my project works on all platforms regardless where the project is located: <properties> <property name="project.dir">../../../WowzaStreaming</property> <property name="ant.script">${project.dir}/build.xml</property> <properties>

The Best Farewell

It has always been my ambition to die in harness with my head face down on a keyboard and my nose caught between two of the keys -- Isaac Asimov

Setup Audio for Windows 7 on MacBook Pro 13"

My brand new MacBook Pro 13" dual-boots on Snow Leopard and Windows 7. I used the official Snow Leopard DVD to install device drivers for Windows 7. Everything worked fine except for audio, which had a very low volume for both playback and recording. Here's how I fixed it. Run registry editor as administrator and go to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentVersionSet\Control\Class\ {4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\cs420x Make sure the following entries are present: Name Type Value ------------------------------------------------------ n0DInAmpCaps REG_DWORD 0x00270301 n02OutAmpCaps REG_DWORD 0x80017f73 n03OutAmpCaps REG_DWORD 0x80017f73 n04OutAmpCaps REG_DWORD 0x80017f73

OpenSSL and Windows Socket

A program I'm working on gives many compilation errors like this: c:\Program Files\...\PlatformSDK\Include\WinSock2.h(108) : error C20011: 'fd_set' : 'struct' type redefinition c:\Program Files\...\PlatformSDK\Include\WinSock.h(54) : see declaration of 'fd_set' This occurs when both WinSock.h and WinSock2.h are included and WinSock.h is included before WinSock2.h . Since WinSock2.h guards against WinSock.h by defining _WINSOCKAPI_ , including WinSock2.h before WinSock.h is not a problem. windows.h also includes WinSock.h , thus windows.h must come after WinSock2.h . In my code, all the platform dependent stuff goes into platform.h , in which WinSock2.h is included before windows.h , so what is the problem? It turns out that my code uses OpenSSL and openssl/rand.h includes windows.h . Putting platform.h in front of openssl/rand.h solves the problem.

喵喵埋伏在袋子里

Image

The Mysterious Autoconnect

I recently noticed something mysterious about my N73. Whenever there was an active voice call, whether incoming or outgoing, a data connection was established at the same time. Hang up the voice call, the data connection also went away. A natural initial diagnosis was that some virus or Trojan horse or spyware or malware was trying to phone home. But Connection Manager showed that the connection was completely idle without any data traffic at all. Tasky shows that whenever a voice call is made, a new sipprofilesrv.exe is also created. So it seems to be related to SIP . Indeed, I have a unregistered SIP profile with a valid access point under my SIP settings. Deleting the profile solves the problem.

Catch me if you can ...

Image