Posts

Showing posts from 2008

How to fix Check Junk Failed error message in Evolution

Evolution Mail - Check Junk Failed - error message. Fix by marking an email as junk, then go to the junk folder and mark as not junk.

Mattys Movember

Image
http://au.movember.com/mospace/1856566

Adding a button to Outlook Addon

Private Sub AddToolbar() Try Dim objBar As Office.CommandBar OL = Me.Application objBar = OL.ActiveExplorer.CommandBars.Item("Standard") objButton = objBar.Controls.Add(, , , 1, True) With objButton .Picture = getImage() .Mask = getImage() .TooltipText = "eConfirm" .Caption = "eConfirm" .Style = msoButtonIconAndCaption ' msoButtonIcon End With Catch ex As System.Exception MsgBox("Failed to add button" & ex.ToString()) End Try End Sub Private Sub objButton_Click(ByVal Ctrl As Office.CommandBarButton, _ ByRef CancelDefault As Boolean) Handles objButton.Click MsgBox("Hello World") End Sub

Editing webserver files in Ubuntu (LAMP)

Quick post as this was a great tip to avoid using SUDO constantly. If you change the owner of the files in the webserver path to be the current user then you don't need to do SUDO gedit filename everytime you want to edit a file! :)

Creating Outlook Addon not easy due to security model!

11-June-2008 10am Wow, who would have thought it would be so hard to write an add on to outlook. (And the code I want to write is only about 10 lines!!!!) But deploying this so it will run without the Windows security model getting in the way has taken many hours of my time already! If only I could get on with writing code. (frustrated). But, as of writing this, Microsoft has made it so hard to deploy an outlook addon that I've almost given up. A brief glance though Part 1 and Part 2 of these documents will give you an idea about why deploying an outlook addon is difficult for Outlook 2003. But, get a load of this next document for deploying addons for Outlook 2007. The screen shots and file locations are different than my standard install of VS2008, and searching for the sample files mentioned in the document bring up no results. Well back to it, if I can get this done in under a day I'll be happy, but I'm dubious. 1:45pm Kevin Farley puts it well: "... the myster...

How to get a unix timestamp timezone adjusted from VBScript clientside

Hi All, As usual timezones are the bane of my life, here is another few hours that I'll never get back. --- How to get a Unix timestamp timezone adjusted from VBScript (clientside, not ASP) So you are using VBScript (again, not ASP, i.e. there is no IIS web server) and you want to pass a timezone adjusted unix timestamp to a server side script such as PHP. You can not use Session.LCID because you are not using ASP, so you need to look at the local PC to determine the timezone. First step is to retrieve timezone from the registry of the local machine. Now of course this assumes that the local machine has the correct time and timezone information, but then you are writing a client side script so that's a problem for your client, right? function UDate(oldDate) Dim od Dim atb Dim oShell Dim offsetMin Dim nd od = oldDate set oShell = CreateObject("WScript.Shell") atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\" &_ "Control\TimeZoneInfo...

PHP timezones explained

--------------------- PHP timezones example written by Simon Hutchison - http://www.econfirm.com.au/ --------------------- date_default_timezone_set("Australia/Sydney") Sun, 02 Mar 2008 14:57:11 +1100 date_default_timezone_set("Australia/Perth") Sun, 02 Mar 2008 12:57:11 +0900 --------------------- The comments in this example assumes server is Sydney time. --------------------- Demonstrating that timezone is not important for mktime(), date("U") and time(). Get GMT 0. Uses the server time to adjust to GMT 0 so need to ensure server time is correct for these functions to be accurate. date_default_timezone_set("Australia/Perth") mktime() : 1204430231 date("u") : 1204430231 time() : 1204430231 date_default_timezone_set("Australia/Sydney") mktime() : 1204430231 date("u") : 1204430231 time() : 1204430231 --------------------- Now that we know this we can use these functions to compare to other GMT 0 adjuste...