Skip to content


Develop websites for use with iPhone

There is a cool library available on Google Code which makes developing websites for the iPhone a breeze.
It’s called IUI and was developed by Joe Hewitt.

BPlayer is a perfect example of such an iPhone app developed with IUI.
It features all Belgian radio stations that can be streamed in the browser. The advantage of streaming a chosen radio station inside a browser is that you can do multi-tasking with your iPhone, at least as of OS 3.0

Using this method, you can listen to your favourite radio station and still use your iPhone to send text/sms messages, browse pictures, check your stocks, …

Posted in Websites, iphone.

asynchronous pluggable protocol handler does not like its default security zone

Normally you can define the security zone for an asynchronous pluggable protocol handler on following location in the registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults

You define a new DWORD value for your protocol.

If you test your protocol and it doesn’t seem to work, check out if it is not overrulled by a policy.

With Microsoft’s Group Policy Editor, you can define a group of settings to be applied to all computers in an AD domain.
If this is the case, you need to overrule the security zone setting on a different location:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\protocolDefaults

Of course, you need to make this change with the Group Policy Editor, so it is persistent if you reboot or reconnect.

Posted in C++. Tagged with , , .

IE8 displays the Close button next to any third-party toolbar add-on that is installed and enabled

In Internet explorer 8, a close button is displayed next to a third-party (custom) toolbar.

This is some new behaviour of Internet Explorer and was driven by the fact that users indicated the need for easy hiding and disabling of toolbar add-ons.

You can read more about this on the IE 8 Readiness Toolit webpages.

Posted in Websites. Tagged with , .

Error: The Side-by-Side configuration information for “YOUR.DLL” contains errors.

After migrating your ATL project to Visual Studio 2005, you suddenly receive following error when distributing your application to other computers:

LoadLibrary("yourdll") failed: This application has failed to start because
the application configuration is incorrect.
Reinstalling the application may fix the problem.

Bummer.

Opening up the dll with Dependency Walker gives following error message:

Error: The Side-by-Side configuration information for "YOUR.DLL" contains errors.
This application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix this problem (14001).

The problem lies in the fact that Visual Studio ships with ATL 8.0 dll, and this requires a manifest to be delivered together with the ATL80.dll.
A simple solution was to include both ATL80.dll and Microsoft.VC80.ATL.manifest into the installer, and copy it into the same installation directory as YOUR.DLL.
Both files can be found on following location on a standard Visual C++ installation:
C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.ATL

Posted in C++. Tagged with , , , .

HOWTO: Ms Dos ask for a parameter on command prompt

You can use the set command to ask for a parameter on the dos command prompt.
Assign it to a variable which can be used later.

set /p VAL=Please provide a value for this parameter: 
echo %VAL%

Posted in Scripting. Tagged with , .

Oracle VPD: Check what columns security is defined on

Let’s say you have defined a policy on a table, and you are making use of Oracle 10g functionality to restrict it to certain columns:

begin
 DBMS_RLS.ADD_POLICY (
   'MYSCHEMA',
   'MYTABLE',
   'MY_POLICY_NAME',
   'MYSCHEMA',
   'MY_POLICY_FUNCTION',
   'SELECT',
   SEC_RELEVANT_COLS     => 'COL1, COL2',
   sec_relevant_cols_opt => dbms_rls.ALL_ROWS
  );
end;

Normally you would query the dba_policies data dictionary view in order to see what policies are defined, but this data dictionary view does not include the relevant columns for the policy.
In order to see what columns are impacted by a certain policy, you need to query the dba_sec_relevant_cols data dictionary view.

SQL> SELECT object_owner, object_name, sec_rel_column 
      FROM DBA_SEC_RELEVANT_COLS;
OBJECT_OWNER             OBJECT_NAME              SEC_REL_COLUMN
------------------------ ------------------ ------------------------
MYSCHEMA                 MYTABLE            COL1
MYSCHEMA                 MYTABLE            COL2

Posted in Oracle, Security. Tagged with , , , .

mysql socket error when installing frogcms

You are trying to install frogcms on your webserver, but during table creation you get following error message:

SQLSTATE[HY000] [2002]
Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2)

The solution is to change the hostname in the mysql connect information screen into 127.0.0.1 instead of localhost.
If the port number mysql is running on is different than the default, mysql ignores it when you do not specify 127.0.0.1.

More information can be found here: http://forum.madebyfrog.com/topic/483

Posted in Mysql, Websites. Tagged with , .

HOWTO: Find the first and last used row and column in an Excel spreadsheet

If you want to know how many rows and / or columns there are in an excel sheet, you can use the UsedRange object.
This is a much better solution than looping over all rows and columns looking for the boundaries.

Private Sub cmdLoad_Click()
Dim excel_app As Object
Dim excel_sheet As Object
Dim new_value As String
Dim first_row As Integer
Dim first_col As Integer
Dim num_rows As Integer
Dim num_cols As Integer
 
    ' Create the Excel application.
    Set excel_app = CreateObject("Excel.Application")
 
    ' Uncomment this line to make Excel visible.
'    excel_app.Visible = True
 
    ' Open the Excel spreadsheet.
    excel_app.Workbooks.Open FileName:=txtExcelFile.Text
 
    ' Check for later versions.
    If Val(excel_app.Application.Version) >= 8 Then
        Set excel_sheet = excel_app.ActiveSheet
    Else
        Set excel_sheet = excel_app
    End If
 
    ' Get and display the bounds.
    first_row = excel_sheet.UsedRange.Row
    first_col = excel_sheet.UsedRange.Column
    num_rows = excel_sheet.UsedRange.Rows.Count
    num_cols = excel_sheet.UsedRange.Columns.Count
 
    MsgBox "Rows: " & Format$(first_row) & _
        " - " & Format$(first_row + num_rows - 1) & vbCrLf _
            & _
        "Cols: " & Format$(first_col) & _
        " - " & Format$(first_col + num_cols - 1)
 
    ' Comment the rest of the lines to keep
    ' Excel running so you can see it.
 
    ' Close the workbook without saving.
    excel_app.ActiveWorkbook.Close False
 
    ' Close Excel.
    excel_app.Quit
    Set excel_sheet = Nothing
    Set excel_app = Nothing
End Sub

Posted in Performance, VBA. Tagged with , .

HOWTO: Determine if Linux is 32-bit or 64-bit

If you need to check if a Linux installation is running on a 32-bit or a 64-bit processes, you can use the uname command for that:

$ uname -i
i386

i386 is a 32-bit machine, while x86_64 or ia64 are 64-bit cpu’s

You can check /proc/cpuinfo for more information about the number and types of cpu on a system.

If you want to check the version of an executable file on Linux, you can do so with the readelf command

readelf -h oracle
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x829934c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          84699856 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         31
  Section header string table index: 28

Posted in Linux, Oracle. Tagged with , .

You can also use your iPhone

One of the cool features of Wordpress is that it allows to create new messages from your iPhone as this demonstration shows.
Just download the Wordpress application from appstore and setup your blog.

Don’t forget to enable the XML-RPC setting in the Settings/Writing menu of your Wordpress admin console.

If you get the error could not find the XML-RPC service for this blog, check out following link:
http://iphone.wordpress.org/faq/

Posted in Uncategorized. Tagged with .