Generate Random String
Generate random strings up to 64 characters
Clean, quick and easy way to generate random strings with characters filtering options.
Dynamically load JS and CSS files in JavaScript
From time to time, during your website development, you stumble upon this need, of loading JavaScript files or CSS files during runtime of a website.
I will share with you, not only the way of loading the script, but also make it complaint with the async-await methodology (using Promises).
Epic Regular Expressions For Validating Numbers To Be Better Professional
Many are asking me about this matter of how to properly validate numbers using Regular Expression, so I decided to write this post to share with you from my experience and research. And most important thing that really bothers me, is that the internet is full of examples and solutions for exactly this task, but unfortunately most of them are incorrect or incomplete.
Download Last and Final Version of Google’s Picasa Photo Organizer 3.9 Build 141.259
Sadly, Google stopped supporting this amazing software. Although it is still being able to install and use Picasa, Google decided to remove the download link. I have re-uploaded this installation file and made it available again. It is now available to download for Windows from the following link: Download Picasa Photo Organizer 3.9 Build 141.259 Enjoy!
Detect Whether it’s Internet Explorer using JavaScript
I decided to share a useful one-row snippet for web developers, which can save time and complexity using JavaScript that checks whether the browser that runs the code is MSIE
(Internet Explorer) and determine its version.
Convert Base 10 to Base 64 and vise versa using JavaScript
This is the way to convert base 10 (a decimal number) into a base 64 string and base 64 into a base 10, while the order of that base is as following: Base 10 to Base 64 Base 64 to Base 10 Live Test Base 10: Base 64: Good luck!
An Efficient Way to Create GUID/UUID in JavaScript
I have cerated this GUID/UUID generator, which is short, simple and efficient. This post includes explanations of the algorithm below. The function is as simple as this: To test the performance, you can run this code: I’m sure most of you will understand what I did there, but maybe there is at least one person that will need an explanation: The algorithm: The Math.random() function returns a decimal number between 0 and 1 with 16 digits after the decimal fraction point (for example 0.4363923368509859). Then we take this number and convert it to a string with base 16 (from the example above we’ll get 0.6fb7687f). Math.random().toString(16). Then we cut off the 0. prefix (0.6fb7687f => 6fb7687f) and get a string with eight hexadecimal characters long. (Math.random().toString(16).substr(2,8). Sometimes the Math.random() function will return shorter number (for example 0.4363), due to zeros at the end (from the example above, actually the number…
Make the radio buttons behave like single-choice checkboxes
If you a web developer, maybe you encountered this annoying thing. Let’s say you need to write a list of choices, i.e. questions – answers. Let’s define that all the questions are optional and you can select just one answer per question. The way you should implement it, is using inputs with radio type, that’s fine and this how it should be.Example code is: But, as I said, the questions are optional. What’s happening now is when I check an option, I cannot uncheck it anymore! A problem. What is favorite time? Morning Noon Evening What is your preferable paying method? Credit Card Check Paypal Cash Here, I will show you how to solve this problem.There are two solutions to solve it, both involves JavaScript (and jQuery to ease the work): Convert all radio buttons to checkboxes: What is favorite time? Morning Noon Evening What is your preferable paying method?…
PhoneGap – Detect if an app runs on a mobile or browser using JavaScript
I spent hours to find out how to do it. And believe me or not, I found nothing on the internet about how to solve it. So I wrote my own solution. It appear that there is a very simple way to achieve this. After the event deviceready has been triggered (as described on the PhoneGap’s API Docs), all you have to do is: When the deviceready event is being triggered, it tell us that all native components are loaded and are ready to use. Which means, that there is no way to determine whether the page was loaded from PhoneGap or not, using the PhoneGap plugin itself. You can always test against browser’s User Agent, but it isn’t a good verification, because it is always possible to open this same page through mobile’s browser, that have the same User Agent as the one that has been loaded from PhoneGap.…
Synergy – Same Keyboard and Mouse on 2 Computers
As you know or don’t know, all my work (especially programming) is done from a laptop running Linux OS, or to be more specific, Fedora.
Except from programming, I’m also using Adobe products like Photoshop, Fireworks and more to design and style photos, picture and images.
As I know for now, there is no standard way to run Adobe products from Linux but only from Windows or Mac OS X.
On Linux there is also pretty nice Photoshop-like application called GIMP, but it is not rich with features and user-experience like Photoshop. And what about the rest Adobe products except Photoshop, is there an alternative applications on Linux? I didn’t find any.