SambucaJS – jQuery plugin
Small jquery plugin that adds some functionality to jquery, eg: Check if an item is empty Check whether an item exists Take a parameter in the querystring of the current Web page. /*! * jQuery…
Small jquery plugin that adds some functionality to jquery, eg: Check if an item is empty Check whether an item exists Take a parameter in the querystring of the current Web page. /*! * jQuery…
function NOW() { var date = new Date(); var aaaa = date.getFullYear(); var gg = date.getDate(); var mm = (date.getMonth() + 1); if (gg < 10) gg = “0” + gg; if (mm < 10)…
Supported by all modern browser and IE9+. var callback = function() { // Handler when the DOM is fully loaded }; if (document.readyState === “complete” || (document.readyState !== “loading” && !document.documentElement.doScroll) ) { callback(); }…
Here’s a little script in T-SQL to find queries running in our SQL SERVER database: SELECT sqltext.TEXT, res.session_id, res.status, res.command, res.cpu_time, res.total_elapsed_time FROM sys.dm_exec_requests res CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext This script is also useful…
String myHtmlString = “html string”; WebView webview = (WebView)this.findViewById(R.id.WebView1); webview.getSettings().setJavaScriptEnabled(false); webview.loadDataWithBaseURL(“”, myHtmlString, “text/html”, “UTF-8”, “”);
CREATE FUNCTION dbo.MyFunction (@input VARCHAR(200)) RETURNS VARCHAR(200) AS BEGIN DECLARE @WebSite VARCHAR(250) SET @WebSite = @Input SET @WebSite = REPLACE(@WebSite , ‘https://’, ”) SET @WebSite = REPLACE(@WebSite , ‘http://’, ”) SET @WebSite = REPLACE(@WebSite ,…
Implement a functionality for a textbox to allow only numbers in jQuery: $(‘.only-digits’).on(‘keypress’, function (e) { if ((e.keyCode < 48) || (e.keyCode > 57)) { return false; } }); Remains the problem that you can…
Do not take lightly the choice of passwords for your online services. Every day thousands of accounts are violated because of the easy password. Generate the password with our tool: .Maui Password Generator It’s free,…
How remove whitespace from both sides of a string (trim function): Pure Javascript var mystring = ” dotmaui.com “; mystring.trim(); For browsers that do not support the trim() method: String.prototype.trim = function() {…
Dim result = From c In db.Contest Group c By Key = c.UserId Into Group Select userid = Key, conteggio = Group.Count() For Each r In result Console.WriteLine(r.userid) Next