Annoying search engine abroad question

Google Chrome asks you if you would like to use another omnibox search engine when you move from one country to another. When you move across the border a lot, then this becomes quite an annoying message:

"Would you like to search with google.country1 instead of google.country2?"

If you always want to use e.g. google.nl, then make the following change:
  • Wrench -> Options -> Basics -> Manage search engines
  • Scroll to the bottom and fill in the columns:
  • In the first column: GoogleNEW
  • In the second: Google
  • In the third: http://google.nl/search?{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:searchFieldtrialParameter}{google:instantFieldTrialGroupParameter}sourceid=chrome&ie={inputEncoding}&q=%s
  • Hit Enter/Return, else the results will no be saved
  • Hover over the third column and click "make default"

Quipu connections

Several ways to create a database connection in the open source data warehouse generator Quipu.

SQL Express
  • SQL Server configuration manager -> 
    • Protocols for SQLExpress -> TCP/IP: enabled
    • TCP/IP -> IP Adresses -> IP All -> TCP Dynamic Ports: empty
    • TCP/IP -> IP Adresses -> IP All -> TCP Port: 666
  • SQL Server management studio -> SQL Express server properties -> Security -> Server Authentication: SQL Server and Windows Authentication mode
  • Create a SQL Server authentication login on the database server and assign it to the database that will be used by the connection, e.g. login: quipu, password: quipu
  • If the database runs on the same machine as Quipu, use "localhost" as the host name. Otherwise use the remote host name
Note:
  • Do not use the instance name, e.g. using "AdventureWorks;instance=sqlexpress" as database works, but will, depending on the SQL Server version, result in an "unable to get information" error.

Live calendar displays incorrectly in Chrome

At last the Windows Live calendar displays appointments correctly again in the latest Google Chrome beta release, 14.0.835.2. They fixed the improper displaying of events.

Up until now you had to use a workaround to have the bars visible in the month view:

Working with dates in OBIEE

Here are several options to set date formats in OBIEE. Option #1 is the best way to work with dates and comparison of dates to strings containing dates in a particular format.

See also: http://gerardnico.com/wiki/dat/obiee/cast_as_date

The most important settings (with example values) are:
  • DATE_DISPLAY_FORMAT parameter in nqsconfig.ini: YYYY/MM/DD
  • DATESHORTFORMAT parameter in localedefinitions.xml (based on the locale set in nqsconfig.ini): M/D/YYYY
  • NLS_DATE_FORMAT parameter of the session (or database default): DD-MON-RR
Do not confuse these with parameters in dbfeatures.ini. There this format is the default for almost all database platforms in parameter DATE_FORMAT parameter.

Method 1 is used for implicit casting only if physical -> Database -> Features: CAST_SUPPORTED is available and enabled. Otherwise the settings described in method 4 (nqsconfig.ini) are used.

1) Tell Oracle how to interpret the casting of a string to date or vice versa (preferred method)

Explicitly set the Oracle NLS property for this to work unambiguously. This property can be set on a database level, affecting all connections made to the database. Alternatively, the property can also be set on the OBI connection in the physical layer of the Admin tool to only affect the current session:
  • Double-click "Connection pool" for the Oracle connection
  • Select "Connection Scripts" tab
  • Add "Execute on Connect" script and type:
    ALTER SESSION SET NLS_DATE_FORMAT='YYYYMMDD'
Then, use the following function in Answers formulae:

CAST('20110215' TO DATE)

Note: to check the value of the NLS_DATE_FORMAT parameter at the database level, e.g. from SQL Developer, execute the following statement:

SELECT * FROM (
SELECT 'instance' as domain, parameter, value FROM NLS_INSTANCE_PARAMETERS UNION
SELECT 'database' as domain, parameter, value FROM NLS_DATABASE_PARAMETERS UNION
SELECT 'session' as domain, parameter, value FROM NLS_SESSION_PARAMETERS
) x WHERE PARAMETER ='NLS_DATE_FORMAT'

2) Convert a date to string or vice versa using an Oracle database function

Use the OBIEE function EVALUATE to make use of an Oracle database function. In this case, TO_DATE:

Convert string to date:
EVALUATE('TO_DATE(%1,%2)' AS DATE,'20111231','YYYYMMDD')

Examples of what doesn't work:
EVALUATE('TO_DATE(%1)' AS DATE,'20100101')
--> does not work, unless the date happens to be in the nls parameter format

CAST('20110215' TO DATE) 
--> does not work, unless the string happens to be in the nls parameter format

Convert date to string:
EVALUATE('TO_CHAR(%1,%2)' AS CHAR,DIM_DATE.TODAY,'YYYYMMDD')

EVALUATE('TO_CHAR(%1,''YYYYMMDD'')' AS CHAR,DIM_DATE.TODAY)

Examples of what doesn't work:
Conversions may fail with "date format not recognized" or "datetime value does not match the specified format".

EVALUATE('TO_CHAR(%1,%2)',DIM_DATE.TODAY,'YYYYMMDD')
--> does not work, because the result needs to be explicitly cast to a text datatype

EVALUATE('TO_CHAR(%1)',DIM_DATE.TODAY)
--> does not work, unless the date happens to be in the nls parameter format

3) Convert a date to string using different OBIEE functions

An alternative method is to convert the date to a string in stead of converting a testing string to a date. The difference is this:

DATE = ConvertToDate(STRING) 
vs 
ConvertToString(DATE) = STRING

Convert date to number:
year(FACT_ORDERLINE.DATE) * 10000 + month(FACT_ORDERLINE.DATE) * 100 + dayofmonth(FACT_ORDERLINE.DATE) = 20110231

Note: here the lefthand and righthand side are numbers, not strings, but the idea is the same.

4) Convert a string to date using the OBIEE function "DATE"

In OBIEE, an equivalent of the Oracle function TO_DATE is the DATE function which has a fixed syntax:

YYYY-MM-DD. 

For example:

DATE '2011-01-15'

Note:
  • This syntax cannot be configured and does not depend on locale or nls settings
  • The function cannot be found in the list of functions when adding a formula in Answers. 
  • It does not use ( or ) signs, but only single-quotes
5*) Set uniform datatypes in the Physical Layer

Set the datatype property in the physical layer on the fields/attributes. Allowed date/time datatypes are:
  • DATE
  • TIMESTAMP
Try to use one, e.g. DATE, as the default to achieve a more universal way of working with dates. TIMESTAMP is required when there is an essential time part. If it is always "00:00:00", then use DATE.

6*) Locale definitions in configuration files
  • [bipath]\web\config\localedefinitions.xml
    -- displays possible formats to choose from
    -- locale "us-en" is based on locale: us
    -- locale "us" contains all possible attributes to choose from, so is independend of the regional settings
    -- of the Windows server
    locale: us-en
  • [bipath]\server\config\nqsconfig.ini
    -- for displaying messages
    -- this maps to "us-en" in localedefinitions.xml
    LOCALE = "English-usa";
    -- for input and output of dates
    DATE_TIME_DISPLAY_FORMAT = "yyyy/mm/dd hh:mi:ss";
    DATE_DISPLAY_FORMAT = "yyyy/mm/dd";
    TIME_DISPLAY_FORMAT = "hh:mi:ss";
    -- when on, obi does not guess what a string containing a date means
    STRONG_DATETIME_TYPE_CHECKING = ON;
7*) Locale definitions in Answers webinterface

Set the locale, e.g. "English - United states" on the connection window or in your account settings: Settings -> Account

8*) Save display format

The default display format of a date is set in dbfeatures.ini (?)

It can be overriden for all date datatypes or specific attributes in Answers:
Criteria -> Column properties -> Save -> As the system-wide...

Test casting of date to string

Example: database or session NLS parameter = 'YYYYMMDD'

CAST(DIM_DATE.TODAY AS CHAR)
CAST('20110211' AS DATE)
CAST('01-FEB-11' AS DATE) --> will fail if nls parameter is set to YYYYMMDD

Notes:
  • Column properties -> date format (i.e.date or text) is set automatically after the result of a conversion. It does not steer, in any way, the input of functions.

No login prompt for Exchange

It is possible to suppress the login prompt that appears in Outlook, when trying to connect to an Exchange server via Outlook Web Access.

This prompt can be skipped:
  • Close Outlook
  • Get the Exchange server name: Control Panel -> Mail (32 bit) -> Email accounts... -> View or change existing e-mail accounts -> Double click the "Exchange" account
    • The microsoft exchange server name, e.g. exmbx01.acmexchange.com, becomes the exchange server name: *.acmexchange.com
  • Get the webserver name: -> More settings -> Connection -> Exchange proxy settings
    • The connection settings URL, e.g. webmail.acmeweb.com, becomes the webserver name: *.acmeweb.com
    • Set proxy authentication settings: NTLM authentication
  • Start the Credential Manager: Control Panel -> Credential Manager
  • Add a windows credential, e.g. for jim@acme.com
    a. internet or network address: *.acmeweb.com
    b. username: jim@acme.com
    c. password: pwd
  • Add another windows credential
    a. internet or network address: *.acmexchange.com
    b. username: jim@acme.com
    c. password: pwd
Start Outlook and send/receive. The login popup should be gone.

Keywords: microsoft exchange, outlook 2003, outlook web access, repeating login prompt

SkyDrive photos in Flipboard

Flipboard is a great app for the iPad. It displays a collections of RSS feeds as a magazine. The latest version (1.1.1) offers the ability to add a Google Reader account, which can contain a multitude of feeds. These feeds can even be categorized. Flipboard can easily display all feeds, the feeds in a category or individual feeds.

It has the ability to add a Flickr account to show the photos in that account. Unfortunately, Flickr is rather limited in its features: no more than 300MB per month upload.

There are alternatives for Flickr, like Google Picasa, Mediafire or Microsoft Live SkyDrive. Picasa has a storage limit of 1GB, which is even worse than Flickr. SkyDrive has a storage limit of 25GB, but no monthly upload quotum. The best thing about SkyDrive is that it has a RSS feed capability, so you can add it to your Google Reader account and have a magazine of photos. Mediafire has no upload or storage limitations, but no RSS feed capability, which is too bad, otherwise it would be the perfect photo-in-flipboard solution.

Because there is no dedicated Microsoft Live SkyDrive iPad app, this is a nice alternative.

Unfortunately, the RSS XML that SkyDrive returns is not interpreted by flipboard, like it is interpreted by, say, Google Reader, where the photos are displayed directly in the feed. Flipboard displays an empty article, with a link, that, when clicked, redirects to the photo. This is not useful. It turns out that the <link> element is the culprit.

Workaround
  • Optionally, create a SkyDrive account. Create a Windows Live / SkyDrive account and create a new folder. Set it as a "photo" folder. Upload some photos to this account. Make a note of the "cid-" code in the URL (or on the SkyDrive webpage). It is the unique identifier for that account. Also make a note of the folder name.

  • Create a conversion script that corrects the XML supplied by SkyDrive. Flipboard only displays the photos in the feed items, when the combination of the <link> tags of the <channel> and <item> tags form a valid URL. SkyDrive supplies the complete URL in the <link> tag of each item, so the <link> tag of the <channel> should be empty or not present at all.

  • Host the script online. I have created a PHP script called default.php and am hosting it on freehostingnoads.net. An account can be freely created and their PHP configuration support the functionality needed to get HTML code from another website, in this case, SkyDrive. The complete URL to the website is:
    http://www.livestreem.freehostingnoads.net/default.php

  • Optionally, make the script dynamic. I added the posibility to supply a SkyDrive account id (CID) and folder to the script. Example for CID "cid-dba80f3be68c2301" and folder "genericweb" :
    http://www.livestreem.freehostingnoads.net/default.php?cid=dba80f3be68c2301&folder=genericweb

  • Add script URL to the Google Reader: add the URL of the conversion script to the Google Reader account. Use the complete URL, including the PHP script name.
    So:
    http://www.livestreem.freehostingnoads.net/default.php?cid=dba80f3be68c2301&folder=genericweb
    and not:
    http://www.livestreem.freehostingnoads.net/?cid=dba80f3be68c2301&folder=genericweb

  • Optionally, test the feed. Google Reader updates the results from feeds at set intervals, that cannot be controlled. Pressing the "refresh" button is only useful after this interval has passed and Google has updated the feed internally. I use Chrome and, to test the feed realtime, I use the extention/add-on "Slick RSS"

  • Add a Google Reader section to Flipboard: login with your username and password. This only needs to be done once. The domain name part of the link tag is used by Flipboard to prefix the text of an item with a bold text containing this text and a small icon. If there is no text, just a photo, it does not do this.
Some downsides:
  • History explosion. Google stores the history of a feed. This can be annoying when testing a script with a lot of photos, because they get added again and again. Even worse, after deleting the subscription and adding it later, Google restores the full history! Google remembers the URL's and content of feeds that were added in the past.
  • Low resolution. There is no easy way to get the full resolution photo from SkyDrive. It supplies a encoded path to a preview version - most of the time 600x400 pixels - and, when clicked from within the SkyDrive website, redirects to another encoded path for the full resolution.
  • Photos are public. The photos need to be in a publicly available SkyDrive folder, unlike Flickr. With the Flickr photostream of Flipboard it is possible to login in with a username and password to a private folder.
SkyDrive ASPX pages

A list of .Net scripts to access SkyDrive:
  • self.aspx: returns SkyDrive page for the specified document/photo
  • embedphoto.aspx: returns a downsized version of the photo
  • embedalbum.aspx
  • feed.aspx: returns a XML document describing the RSS feed
  • browse.aspx
Update 20110727:

Skydrive has been redesigned. The current feed works correctly with Flipboard, so the workaround above is no longer needed!

Combine two DVD's into one

When you want to combine two DVD's onto one disc, but keep the chapters, then try the following steps. I assume the video_ts folders of both DVD's are already available on your harddrive.

In most cases there is no vob file per chapter, but each vob file is filled to its maximum (1GB) and then a new one is created. Sometimes, however, there is a vob file per chapter. In this case, you only need to follow the steps following DVDStyler:
  • Download and install DVDShrink (freeware)
  • Start DVDShrink and click "Reauthor"
  • In the right pane under "dvd browser", navigate to the video_ts folder of the first DVD
  • Drag the desired chapters to the left
  • In the right pane under "dvd browser", navigate to the video_ts folder of the second DVD
  • Drag the desired chapters to the left
  • Under File, click "Backup" and save to folder c:\shrink. This set automagically creates a vob file per chapter!
  • Download and install DVDStyler (freeware)
  • Start DVDStyler and add all .vob files from c:\shrink to the current project. The DVD main- and chapter menu's are created automatically 
  • Optionally: add the names of the chapters to the chapter menus
  • Burn the project to an iso file or directly to disc
Ofcourse, you can only do this with homemade DVD's or to DVD's you own legally and when local law permits it.