Compress Word, Excel and PowerPoint Office Documents

Do you have a Microsoft Word file with large images that can’t be sent via email because its file is too big? You can compress Word files with a new online file compression service that is 100% free and very easy to use! It supports compression of Microsft Word (.doc, .docx), Excel (.xls, .xlsx), PowerPoint […]

Download OpenVPN 2.4.7 and TAP-Windows

From here you can download latest OpenVPN version: https://openvpn.net/community-downloads/ And from here you can download all latest stable versions: https://build.openvpn.net/downloads/releases/latest/ It includes also TAP-Windows versions.

api-ms-win-crt-runtime-l1-1-0.dll is missing

Can’t run a program because api-ms-win-crt-runtime-l1-1-0.dll is missing? If you are using Windows 7 64-bit, install this update: Windows6.1-KB2999226-x64.msu If you are using Windows 7 32-bit, install this update: Windows6.1-KB2999226-x86.msu Then run again your program, it should work.

jQuery Get File Extension Before Uploading File

A jQuery example of how to get file size before uploading: $(‘input[type=file]’).change(function(e){   var ext = e.target.files[0].name.replace(/^.*\./, ”).toLowerCase();   alert("File Extension: " + ext);   … });$(‘input[type=file]’).change(function(e){ var ext = e.target.files[0].name.replace(/^.*\./, ”).toLowerCase(); alert("File Extension: " + ext); … });

How to Configure OVH Email POP3 with Thunderbird

When adding a new email address (OVH hosted) on Thunderbird: The red-removed part should be your website. Reference (Italian): https://docs.ovh.com/it/emails/email_condivisa_guida_alla_configurazione_di_thundebird/

Simple jQuery File Upload SimpleUpload.js

Today I found this awesome jQuery file upload plugin: http://simpleupload.michaelcbrook.com/ The official simpleUpload.js jQuery plugin page on Github is this: https://github.com/michaelcbrook/simpleUpload.js The plugin is hosted by Content Delivery Network (CDN) JsDelivr: https://www.jsdelivr.com/package/npm/jquery-simple-upload Below there is an example to use the jQuery plugin showing a progress bar. The JavaScript section looks like this: $(document).ready(function(){   $(‘input[type=file]’).change(function(){ […]

Repeat AJAX GET Until a Specific Response is Met in jQuery

Here is how to repeat an AJAX GET call until a specific response is met: function repeated_ajax_check(url) { $.ajax ({ type: ‘GET’, url: url, dataType: ‘json’, success: function(result) { if(result.success) { console.log("We finally met our response!"); console.log(result); //Do something other here, for example: //$(‘.result-message’).html(‘RESPONSE MET!’); //$(‘.result-message’).show(); }else{ console.log("Response not yet met."); console.log(result); wait(1000); repeated_ajax_check(url); } […]

Calculate Elapsed Time of a Function in jQuery

Here is how to calculate elapsed time of a function in jQuery: function secondsTimeSpanToHMS(s){ var h = Math.floor(s/3600); s -= h*3600; var m = Math.floor(s/60); s -= m*60; return h+":"+(m < 10 ? ‘0’+m : m)+":"+(s < 10 ? ‘0’+s : s); }   var seconds = 1;   $(‘#elapsed-time’).html(‘Elapsed time: ‘ + secondsTimeSpanToHMS(seconds)).show();   […]

Convert Seconds to H:M:S in jQuery

Simple function to convert seconds in H:M:S in jQuery: function secondsTimeSpanToHMS(s){ var h = Math.floor(s/3600); s -= h*3600; var m = Math.floor(s/60); s -= m*60; return h+":"+(m < 10 ? ‘0’+m : m)+":"+(s < 10 ? ‘0’+s : s); }function secondsTimeSpanToHMS(s){ var h = Math.floor(s/3600); s -= h*3600; var m = Math.floor(s/60); s -= m*60; […]

Truncate a String by Custom Length in jQuery

Simple function to truncate a string in jQuery: function truncateString(input, max){ if (input.length > max) return input.substring(0, max) + ‘…’; else return input; };function truncateString(input, max){ if (input.length > max) return input.substring(0, max) + ‘…’; else return input; }; Here is an example usage: $(‘#filename’).html("File: " + truncateString(file.name, 50));$(‘#filename’).html("File: " + truncateString(file.name, 50));