Nick Kewney

Software Architect & Product Builder

Uncategorized

jQuery Change Persister for DOM text inputs

/* jQuery tbChangePersister v1.0.0 – April 2015 by Nick Kewney */ (function ($) { $.fn.tbChangePersister = function (next, defaultDelay, domStorageSuffix) { return this.each(function () { var timer = 0, that = $(this), delay = defaultDelay || 5000; that.keyup(function () { clearTimeout(timer); var context = that.val(); if (localStorage) { localStorage.setItem(“tbChangePersisterValue-” + domStorageSuffix, context); } timer = …

jQuery Change Persister for DOM text inputs Read More »

Extracting a price from a VARCHAR in T-SQL

CREATE FUNCTION [dbo].[fn_extract_currency_from_string] (@string VARCHAR(1000)) RETURNS VARCHAR(255) AS BEGIN DECLARE @var VARCHAR(1000) = @string DECLARE @len INT = LEN(@var) DECLARE @start_position INT ,@end_position INT DECLARE @temp_string VARCHAR(100) SELECT @start_position = PATINDEX(‘%£%’, @var) SELECT @temp_string = SUBSTRING(@var, @start_position + 1, @len) SELECT @end_position = PATINDEX(‘% %’, @temp_string) — Done RETURN substring(@temp_string, 1, CASE @end_position WHEN 0 …

Extracting a price from a VARCHAR in T-SQL Read More »

Web Application Security Testing Tools

Port Scanners Nmap – general port scanner  Vulnerability Scanners Nikto and Wikto – web server vulnerability checkers Nessus – general purpose vulnerability checker WebInspect – web application vulnerability scanner Absinthe – SQL injection testing tool Information Gathering Tools SpiderFoot – footprinting tool wget – site duplication tool Offline Explorer – site duplication tool WinHTTrack – …

Web Application Security Testing Tools Read More »

The number of records in the table exceeds the maximum number of 5000 – Dynamics

When attempting to export records via Microsoft Dynamics and the number of records is greater than 5,000, you may receive this error. The number of records in the table exceeds the maximum number of 5000. Set a filter to decrease the number of records in the table. Exporting too many records at once can affect …

The number of records in the table exceeds the maximum number of 5000 – Dynamics Read More »

Self-Executing Functions in JavaScript

I’ve been steadily migrating my JavaScript assets to use self executing functions (and more recently literals) as they are a good way to enforce scope on variables and make your JavaScript more readable. The examples below show the difference between implementing a self-executing function and using literals. I have found that on most browsers (except Safari), …

Self-Executing Functions in JavaScript Read More »