Tag: javascript
Internationalization And Localization In Your React Native App
If you’ve been keeping up with my blog and tutorials, you’ll know that I’ve done quite a few posts on Ionic Framework. I’ve been hearing a lot about React Native lately so I figured it is time to give it a shot.
There are 6,500 languages and roughly seven billion people in the world. Chances are your native language is only known by a small piece of the global population. You can boost downloads of your application and overall App Store Optimization (ASO) by accommodating a larger variety of languages.
Last year, I did a tutorial regarding localization (l10n) and internationalization (i18n) in an Ionic Framework Android and iOS application. This time I’m going to go over the same, but in a React Native application for iOS.
Read MoreMonitor Device Battery Status Using Ionic Framework
So you’re making a mobile app using Ionic Framework and you care about the experience your users receive? Maybe you want to control the functionality of certain features based on how much battery the users device has left.
An example of this is, maybe you have your application pulling remote data while the application is open. Maybe you’ve decided that if your users battery is less than 30% you want the user to have to pull-to-refresh in order to preserve battery life.
This kind of battery monitoring can be performed through the cordova-plugin-battery-status plugin by Apache Cordova.
Read MoreUse RegEx To Analyze Credit Card Numbers In JavaScript
RegEx is a powerful beast. Previously I wrote how to test password strength using JavaScript and regular expressions. This time we’ll take a look at how to check credit card providers based on the credit card number entered. No, this won’t test if a credit card number is legitimate, but it will test if it was entered correctly.
Read MoreHighlight Text In A String Using JavaScript And AngularJS
Have you ever wanted to highlight text in a string on a web page using AngularJS? If your answer was no, don’t disregard, because you may one day need to. The good thing is this is not very hard to accomplish.
There are many ways to do this using JavaScript, but we’re only going to examine one of those methods.
Using AngularJS and a few regular expressions (RegEx) with JavaScript, you can find text in a string and then apply your own customizations.
Read MoreGet Remote HTML Data And Parse It In Express For Node.js
Have you ever wanted to fetch remote HTML data in a similar fashion to cURL or Wget using some backend web service and parse it? If you said no, don’t worry, I said the exact thing until I was challenged to do so. For the challenge, I chose to use Express as my framework and a few libraries to assist in the process of fetching and parsing.
I chose to use the HTTP and HTTPS libraries for fetching the data and the htmlparser2 for parsing the HTML data. These are of course only a few of many alternatives to choose from for such a task.
Read MoreUse RegEx To Test Password Strength In JavaScript
Recently one of my Twitter followers asked me how they might validate password strength using regular expressions (RegEx) in their code.
Regular expressions via Wikipedia:
A sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching.
RegEx is nice because you can accomplish a whole lot with very little. In this case we are going to check various aspects of a string and see if it meets our requirements, being a strong or medium strength password.
Read MoreDetermine If A Number Is Prime Using JavaScript
Continuing on the topic of interview questions for programming and software engineering type positions, I thought I’d brush up on a popular one.
Although I have never personally been asked about this, other people have told me that they’ve been asked to determine if a number is prime or to print out all prime numbers up to a certain number.
Read MoreSearch
Recent Posts
- Test Password Strength and Password History with TypeScript and MongoDB
- Extract Text from Your PDF and Image Files with Apache Tika
- How to Install MongoDB on Ubuntu: A Step-by-Step Guide for Beginners
- Running MongoDB in Docker - A Complete Guide with Examples
- How to Design Nested Documents for a Blogging App