I hereby claim:
- I am develohpanda on github.
- I am ohpanda (https://keybase.io/ohpanda) on keybase.
- I have a public key ASDZd5ZUSTt-dEnpHZxxxWwhncl2htpgKO4q9V82M7-9MAo
To claim this, I am signing this object:
DateTime.From(Number.Round((Number.From([Time]) * 24 * 3600)/RoundToNearestXSecond, 0)*RoundToNearestXSecond/(24*3600)) |
public static class AsyncHelpers | |
{ | |
/// <summary> | |
/// Execute an async method which has a void return value synchronously | |
/// </summary> | |
/// <param name="method">Task<T/> method to execute</param> | |
public static void RunSync(Func<Task> method) | |
{ | |
Argument.CheckIfNull(method, nameof(method)); |
UPDATE STATISTICS sys.syscolpars | |
UPDATE STATISTICS sys.sysschobjs | |
UPDATE STATISTICS sys.syssingleobjrefs | |
UPDATE STATISTICS sys.sysiscols | |
GO |
function Run-SqlCommand($serverName, $databaseName, $command, $timeoutSeconds = 30) { | |
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection | |
$SqlConnection.ConnectionString = "Server=$serverName;Database=$databaseName;Integrated Security=True" | |
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand | |
$SqlCmd.CommandText = $command | |
$SqlCmd.Connection = $SqlConnection | |
$SqlCmd.CommandTimeout = $timeoutSeconds | |
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter | |
$SqlAdapter.SelectCommand = $SqlCmd | |
$DataSet = New-Object System.Data.DataSet |
update ft | |
set ft.description = 'test' | |
from firstTable ft | |
inner join secondTable st on | |
ft.id = st.id |
DROP TABLE IF EXISTS #toDelete | |
SELECT bmi.* INTO #toDelete | |
FROM [dbo].[BCS_Main_Input_With_absence_Holiday_And_Wage_Elements] bmi | |
INNER JOIN @fiscalWeeksForRelease fw | |
on | |
fw.FISCAL_YEAR = bmi.Fiscal_Year | |
AND fw.FISCAL_WEEK = bmi.Fiscal_Week | |
INNER JOIN @StoresInRelease s | |
on | |
s.Store_Id = bmi.Store_ID |
I hereby claim:
To claim this, I am signing this object:
/* variation on https://medium.com/@DanHomola/react-higher-order-components-in-typescript-made-simple-6f9b55691af1 */ | |
import * as React from 'react' | |
import { wrapDisplayName } from 'recompose' | |
// Props you want the resulting component to take (besides the props of the wrapped component) | |
interface ExternalProps {} | |
// Props the HOC adds to the wrapped component | |
export interface InjectedProps {} |
/// <summary> | |
/// Selects a random element from input list using the allocations remaining to sway selection | |
/// T must have AllocationRemaining, Weight and Id properties on it. | |
/// </summary> | |
public T SelectRandom<T>(List<T> objects) | |
{ | |
int totalWeight = 0; | |
T selected = default(T); | |
foreach (T obj in objects) | |
{ |
/// <summary> | |
/// Selects a random element from input list using the weights on T to sway selection. | |
/// T must have a Weight property on it. | |
/// </summary> | |
public T SelectRandom<T>(List<T> objects) | |
{ | |
int totalWeight = 0; | |
T selected = default(T); | |
foreach (T obj in objects) | |
{ |