This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
/* | |
Author: Eitan Blumin | https://www.eitanblumin.com | |
Create Date: 2020-03-18 | |
Last Update: 2020-06-22 | |
Description: | |
This script will detect currently running sessions in your database which are running DBCC SHRINK commands. | |
It will also output the name of any tables and indexes the session is currently locking. | |
Use this query to find out what causes a SHRINK to run for too long. | |
You may need to run it multiple times to "catch" the relevant info. |
/* | |
---------------------------------------------------------------------------- | |
Shrink a Database File in Specified Increments | |
---------------------------------------------------------------------------- | |
Author: Eitan Blumin (t: @EitanBlumin | b: eitanblumin.com) | |
Creation Date: 2020-01-05 | |
Last Update: 2020-08-23 | |
---------------------------------------------------------------------------- | |
Description: | |
This script uses small intervals to shrink a file (in the current database) |
/* Modules/Common/Helpers/J.HelpPopover.ts */ | |
//=================================================== | |
// Copyright @ 2020 | |
// Author : Hung Vo ([email protected]) | |
// Time : 2020, August 06 | |
// Description : HelpPopover | |
//=================================================== | |
namespace J { |
static ushort GetShardId(string key) | |
{ | |
using var md5 = MD5.Create(); | |
{ | |
var hash = md5.ComputeHash(Encoding.UTF8.GetBytes(key)); | |
var integer = BigInteger.Abs(new BigInteger(hash)); | |
return (ushort)(integer % ushort.MaxValue); | |
} | |
} |
This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
constructor() { | |
super(); | |
this.form.MyOption.change(e => { | |
let currentValue = Serenity.EditorUtils.getValue(this.form.MyOption); | |
//let currentText = Serenity.EnumFormatter.format(MyEnum, Q.toId(currentValue)); | |
//Q.notifySuccess(`You selected ${currentText}, lookup items will be reloaded`); | |
// clear old value |
namespace [YOUR_NAME_SPACE].Common { | |
export class MySliderRevealOptions { | |
initDialog: () => Serenity.EntityDialog<any, any>; | |
onDataChangeCallback?: () => void; | |
sliderWidth?: any; | |
entityOrId?: any; | |
// if we want to show next/previous buttons on slider | |
// then we also need to include grid data |
.s-Form label.caption { | |
margin-bottom: 2px; | |
text-align: left; | |
flex-basis: 100%; | |
} | |
.flex-layout .field { | |
flex-wrap: wrap; | |
} |
namespace YOUR_NAMESPACE.Common { | |
export class MySlilerRevealOptions { | |
target: JQuery; | |
initDialog: () => Serenity.EntityDialog<any, any>; | |
onDataChangeCallback?: () => void; | |
sliderWidth?: any; | |
entityOrId: any; | |
} |