This file contains 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
-- Get owners of schema | |
SELECT | |
nsp.nspname AS the_schema, | |
rol.rolname AS the_owner | |
FROM | |
pg_namespace nsp | |
JOIN pg_roles rol ON rol.oid = nsp.nspowner | |
WHERE | |
nsp.nspname = 'public'; |
This file contains 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 enum_range(NULL::enum_name) |
This file contains 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 | |
U.rolname | |
,D.datname | |
FROM | |
pg_roles AS U JOIN pg_database AS D ON (D.datdba = U.oid) | |
WHERE | |
D.datname = current_database() | |
; |
This file contains 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 class CalendarInfo | |
{ | |
public string DateFromString { get; } | |
public int MonthsTillDateFrom { get; } | |
public string DateUntilString { get; } | |
public int MonthsTillUntilDate { get; } | |
public DateTime DateFromDateTime { get; } | |
public DateTime DateUntilDateTime { get; } | |
This file contains 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
Object.defineProperty(Array.prototype, 'sortByOrder', { | |
value: function(property, valuesInOrder) { | |
const map = new Map( | |
valuesInOrder.map(value => [value, valuesInOrder.indexOf(value)]) | |
); | |
return this.sort((a, b) => { | |
return map.get(a[property]) - map.get(b[property]); | |
}); | |
} | |
}); |
This file contains 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
export const blobToDataUrl = blob => { | |
const reader = new FileReader(); | |
reader.readAsDataURL(blob); | |
reader.onloadend = () => { | |
const base64Data = reader.result; | |
return base64Data; | |
}; | |
}; |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using Microsoft.VisualStudio.TestTools.LoadTesting; | |
namespace Tests | |
{ | |
public class CustomLoadProfile : ILoadTestPlugin | |
{ | |
// The initialize method is called just before the load test starts running |
This file contains 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.Net.Configuration; | |
using System.Reflection; | |
using Microsoft.VisualStudio.TestTools.LoadTesting; | |
namespace Tests | |
{ | |
public class HMTLParsingPlugin : ILoadTestPlugin | |
{ | |
public void Initialize(LoadTest loadTest) |