This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ObservableCollectionExt { | |
public static void Populate<T>(this ObservableCollection<T> collection, IEnumerable<T> itemsToAdd) { | |
collection.Clear(); | |
foreach (T item in itemsToAdd) | |
{ | |
collection.Add(item); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Windows.Data; | |
/// <summary> | |
/// Converts a boolean value to a string value. For example, if the paramter passed in is "Elephant,Giraffe" | |
/// then a boolean true would convert to "Elephant" and false to "Giraffe" | |
/// </summary> | |
public class BooleanToStringCustomValueConverter : IValueConverter | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* {Boolean} useLocalStorageIfAvailable - optional, defaults to true. The CacheProvider object will | |
* use the HTML5 localStorage object, if available | |
*/ | |
function CacheProvider(useLocalStorageIfAvailable) { | |
// values will be stored here | |
this._cache = {}; | |
this._useLocalStorage = 'undefined' == typeof(useLocalStorageIfAvailable) ? true : useLocalStorageIfAvailable; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(function(d) { | |
d.getElementsByName('clientstring')[0].value = 'parku'; | |
d.getElementsByName('courseid')[0].value = '2022037'; | |
d.getElementsByName('pagetoload')[0].selectedIndex = 1; | |
d.forms[0].submit(); | |
})(document); | |
/* paste into a bookmarklet javascript: <the code> */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this scripts assumes Ubuntu 14.04 LTS | |
# ensure the following sources are in /etc/apt/sources.list | |
# deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse | |
# deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
summary: | |
fnDbVars returns database variable names and values from a Markit EDM database | |
parameters: | |
- name : variableName | |
type: nvarchar(MAX) | |
description: the name of the database variable you want returned | |
ifNull: the function will return all database variables | |
author: Adam Roderick | |
examples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table cadis_proc.dm_mp7_result_temp | |
drop table cadis_proc.dm_mp7_result_audit_temp | |
drop table cadis_proc.dm_mp7_proposed_temp | |
exec SPDM_CLEARRESULTS @ProcessName = 'TESTER2', @SourceName = 'All', @ResetIds = 1, @PrintOnly = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
PK.CONSTRAINT_NAME, | |
COLS.TABLE_SCHEMA, | |
COLS.TABLE_NAME, | |
COLS.COLUMN_NAME, | |
COLS.DATA_TYPE, | |
COLS.COLUMN_DEFAULT, | |
COLS.CHARACTER_MAXIMUM_LENGTH, | |
COLS.NUMERIC_PRECISION, | |
COLS.IS_NULLABLE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists (select 1 from INFORMATION_SCHEMA.ROUTINES where ROUTINE_SCHEMA = 'dbo' and ROUTINE_NAME = 'spDmRealign') | |
drop procedure dbo.spDmRealign | |
go | |
create procedure dbo.spDmRealign | |
@oldCadisId int, | |
@newCadisId int, /* Set @newCadisId = 0 below to get a *new* CadisID generated and assigned, or alternatively set to an existing target CadisID */ | |
@matcherName nvarchar(100), | |
@sourceName nvarchar(100) | |
as begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DP.NAME, | |
m.c.value('ProcType[1]', 'varchar(max)') AS ProcType, | |
m.c.value('AutoTruncate[1]', 'varchar(max)') AS AutoTruncate, | |
m.c.value('Name[1]', 'varchar(max)') AS [Input Name] | |
FROM [CADIS_SYS].[DP_DATAPORT] DP | |
CROSS APPLY DP.[DEFINITION].nodes('CadisXml/Content/Inputs/list/Item') AS m(c) | |
WHERE m.c.value('AutoTruncate[1]', 'varchar(max)') = 'True' |
OlderNewer