Reseed to next Id available in SQL Server
DECLARE @MaxId INT SELECT @MaxId = max([Id]) FROM [MyTable] if @MaxId IS NULL SET @MaxId = 0 DBCC CHECKIDENT (‘[MyTable]’, RESEED, @MaxId)
DECLARE @MaxId INT SELECT @MaxId = max([Id]) FROM [MyTable] if @MaxId IS NULL SET @MaxId = 0 DBCC CHECKIDENT (‘[MyTable]’, RESEED, @MaxId)
From DateTimeOffset to DateOnly: var myDateOnly = DateOnly.FromDateTime(myDate.Date); From DateOnly to DateTimeOffset: var myDto = new(myDateOnly.Year, myDateOnly.Month, myDateOnly.Day, 0, 0, 0, TimeSpan.FromHours(10));
We have included in our free, public CDN five libraries that you asked for: chosen 1.8.7 tarekraafat-autocomplete.js 10.2.7 hover.css 2.3.1 js-sha256 0.9.0 jquery-creditcardvalidator 1.2.0 Report other libraries for us to add or add your own…
var mySelect = document.querySelector(“#mySelect”); mySelect.value = “newvalue”; mySelect.dispatchEvent(new Event(‘change’, { ‘bubbles’: true }));
SELECT TOP 100 QueryState.execution_count, OBJECT_NAME(objectid), query_text = SUBSTRING( qt.text, QueryState.statement_start_offset / 2, ( CASE WHEN QueryState.statement_end_offset = -1 THEN len(convert(nvarchar(max), qt.text)) * 2 ELSE QueryState.statement_end_offset END – QueryState.statement_start_offset ) / 2 ), qt.dbid, dbname =…
Introduction: In today’s digital age, having a fast and reliable website is crucial for businesses and individuals alike. One of the key factors that contribute to a website’s performance is the use of a Content…
Formatting dates in PHP is an essential task for any web developer. It is important to display dates in a format that is easy to read and understand for users. In this article, we will…
Check if HTML element exists // jQuery if($(“#myElm”).length > 0) { console.log(“Element exists”); } // Pure javascript var my_elm = document.getElementById(“myElm”); if(typeof(my_elm) != ‘undefined’ && my_elm != null){ console.log(“Element exists”); }
Simple copy-and-paste example: DECLARE @timestamp BIGINT = 1661881445; SELECT DATEADD(S, @timestamp, ‘1970-01-01’) Or for values greater than 2147483647 DECLARE @t AS BIGINT = 4956739375 DECLARE @oneyear AS INT = 31622400 SELECT DATEADD(SECOND, @t % @oneyear,…
/** * Remove substring from string * * Here is an inline example: * <code> * <?php * echo rmv(‘mxaxuxix’, ‘x’); // return ‘maui’; * * ?> * </code> * @param string $subject * @param…