I hereby claim:
- I am jonasraoni on github.
- I am jonasraoni (https://keybase.io/jonasraoni) on keybase.
- I have a public key whose fingerprint is C6B8 2A63 2F58 4784 159E 802F 5ECC 07E6 0269 4752
To claim this, I am signing this object:
//+ Jonas Raoni Soares Silva | |
//@ http://raoni.org | |
const signalR = require('@aspnet/signalR'); | |
export default class Hub { | |
constructor (url, autoReloadTimeout = 1000) { | |
Object.assign(this, { | |
url, | |
autoReloadTimeout, |
//+ Jonas Raoni Soares Silva | |
//@ http://raoni.org | |
export default class ServerTime { | |
constructor ({http = new Error('http parameter is required'), url = new Error('url is required'), thresholdDelay = 300, autoSynchronizeProbes = 0}) { | |
Object.assign(this, { | |
http, | |
url, | |
thresholdDelay, | |
best: null |
//+ Jonas Raoni Soares Silva | |
//@ http://raoni.org | |
export default function debounce (action, delay) { | |
let handle; | |
return function (...args) { | |
if (handle) { | |
clearTimeout(handle); | |
handle = null; | |
} |
//+ Jonas Raoni Soares Silva | |
//@ http://raoni.org | |
export default (...values) => Math.max(...values.map(value => | |
(value = (value + '').split(/[.,]/)).length > 1 && value.pop().length | |
)); |
function numberToOrdinal(n) { | |
const | |
number = Math.abs(n) || 0, | |
units = number % 10, | |
tens = ~~(number % 100 / 10), | |
suffix = new Map([ | |
[1, 'st'], | |
[2, 'nd'], | |
[3, 'rd'] | |
]); |
/* | |
There is a table in database. This table contains unduplicated natural numbers. There may be gaps in the sequence of natural numbers in the table. You need to output missing numbers. | |
Table of natural numbers: declare @values as table ([number] int not null). | |
Test data: insert into @values([number]) values (1), (2), (3), (5), (9). | |
Result: declare @missing as table ([left] int not null, [right] int not null). | |
*/ | |
DECLARE @values AS TABLE ([number] INT NOT NULL); | |
INSERT INTO @values([number]) VALUES (1), (2), (3), (5), (9); | |
DECLARE @missing AS TABLE ([left] INT NOT NULL, [right] INT NOT NULL) |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Extends the Array with the Flatten method | |
/// </summary> | |
public static class Flattener { | |
/// <summary> | |
/// Given a N-dimensional array, flattens it into a new one-dimensional array without modifying the elements' order |
{"lastUpload":"2021-11-02T08:34:50.367Z","extensionVersion":"v3.4.3"} |
EXEC sp_addlinkedserver @server='SERVER_ADDRESS'; | |
EXEC sp_addlinkedsrvlogin @rmtsrvname='SERVER_ADDRESS',@useself=false, @rmtuser='USER', @rmtpassword='PASSWORD'; | |
-------------- | |
INSERT INTO LOCAL_TABLE | |
SELECT * | |
FROM | |
[SERVER_ADDRESS].DATABASE.dbo.REMOTE_TABLE |
I hereby claim:
To claim this, I am signing this object: