Wednesday, October 10, 2012

NotePad++ Regex

Regex with Notepad++

I found this blog entry by detailing some of the Regex rules for Notepad++. I created a simple cheat sheet from his blog.

Friday, July 20, 2012

Inkscape Cheat Sheet

I couldn't find a cheat sheet for Inkscape so I created my own. The cheat sheet contains the commands from the Inkspace Basic Tutorial.

You can get it here.

Monday, May 21, 2012

Gemini Database Permission using Windows Authentication


This is just a reminder for myself on how to get the Gemini Issue Tracker up and running.
  1. Install the database using Windows Authentication
  2. Add [MachineName]\ASPNET as user on the created database
  3. Select db_owner under both Schemas owned by this user and Database role membership
  4. Edit the Gemini website web.config file.
  5. Set the connection string to
    <add name="Gemini" connectionString="Data Source=[ServerName];Initial Catalog=[DatabaseName];Integrated Security=SSPI;"/>
    (Note: This connection string is for SQL 2008)
The website should open now.

Thursday, May 17, 2012

Use VBA to open a file

'Use Windows Explorer to launch the file.
VBA.Shell "Explorer.exe " & Chr(34) & strFilePath & Chr(34), vbNormalFocus 


'Use command to launch the file
VBA.Shell "cmd /c """ & GetItemFolder & strFileName & """"

Wednesday, May 16, 2012

Adding "All" to combobox

Table/Query
If the Row Source Type property is Table/Query then create a union query. If the first field in the is a primary key you can't use Null as the value of the field. Use a numeric value (-1 or 0 as an example)

With primary id field
SELECT DISTINCT [CategoryID], [Description] FROM [Categories] UNION SELECT Null as AllID, "(All)" AS AllField FROM [Categories] ORDER BY [Description]

Without primary id field
SELECT DISTINCT [CategoryID], [Description] FROM [Categories] UNION SELECT -1 as AllID, "(All)" AS AllField FROM [Categories] ORDER BY [Description]

Take note of the where the ORDER BY clause has been moved.

Value List
 If the Row Source Type property is Value List then just add (All) to the list.

Example
"(All)";"Hello"; "World"