Jest is a framework to test JavaScript and Node.js code. It smoothly works with JavaScript programs and quickly executes unit tests. Command to install Jest: npm install –save-dev jest Modify package.json: {“scripts”: {“test”: “jest”}} Testing if an array contains specific desired values:// initializing an array with specific valuesconst premiumUsers = [ ‘Sachin’, ‘Rahul’, ‘Shoaib’];// test()Continue reading “Unit Testing JavaScript Code using Jest”
Author Archives: Farial Mahmod Tishan
Custom Alert Dialog Box for iOS Apps
Background Story: iOS apps typically use an in-built .alert function (found in SwiftUI framework by default). It is quick to implement but difficult to modify if a client demands a specific design. Example Use Case: If a design requires to implement an alert dialog box that has multiple buttons or different customized colors for eachContinue reading “Custom Alert Dialog Box for iOS Apps”
Check If String Is a Prefix of Array
Introduction: The task is to test if a given string (s) can be a prefix of a given array (words). It is a String challenge usually asked at programming contests and coding rounds during the job interviews. Description: A string s is a prefix string of words if s can be made by concatenating theContinue reading “Check If String Is a Prefix of Array”
Optimizing the Two Sum Solution
Two Sum Leetcode in Swift by Farial Mahmod
Tower of Hanoi Solution in Swift
The “Tower of Hanoi” is a well known puzzle. There are 3 pegs with numbers 1, 2 and 3. N disks of different diameters are set on the first peg in the following order:The lower disk is set, the larger diameter it has. Your aim is to move all disks onto the second peg usingContinue reading “Tower of Hanoi Solution in Swift”
iOS App Life Cycle
A state determines what an app can do and what it can not. So, it is essential to understand an app’s life cycle to assign right tasks at the right time. App States: 1. Not Running/Unattached: During this state, an app does not consume any resource as the app has not been clicked to openContinue reading “iOS App Life Cycle”
Sort The People (Leetcode)
Leetcode challenge solution using Swift.
Can my word be a Palindrome?
A palindrome is a number, sentence or word that reads the same forward and backward. Even a DNA structure can be a palindrome. It has significance in various branches of higher research. Word examples: madam, bobNumerical examples: 101, 191Date & Time examples: 12:21, 11/11/1111, 12/12/2121Sentence example: Rats live on no evil star Although mostly numbersContinue reading “Can my word be a Palindrome?”
Euler’s Number e : A Dart (Flutter) Implementation
Dart (Flutter) program to calculate the Euler’s Number, ‘e’
Flutter’s Concurrency: Isolate & Async-Await in Dart
Asynchronous Flutter : Concurrency in Flutter
Optimize Flutter Apps: Fast Flutter App Performance
Flutter is performant by default . Developers behind Flutter and Dart have spent an enormous amount of time to make their performance near-native . However, as we have recently developed & released the Rokomari app , Bangladesh’s largest online bookseller app using Flutter (Dart) – I have found several peak-points that require optimization . Flutter,Continue reading “Optimize Flutter Apps: Fast Flutter App Performance”
Provider: State Management in Flutter
What is State Management?The state of an app is any data that exists in the memory when the app is running . This state is crucial to rebuild the UI . It may range from assets to variables whose change of value may affect the UI . What does Provider do?Provider is Google’s recommended wayContinue reading “Provider: State Management in Flutter”
Palindrome Number in Swift
A Palindrome number is a special type of number that reads the same if read in reverse . Problems relating to Palindrome are common in both programming and mathematics . We shall implement a program to implement Palindrome number in Swift language . A short note on Swift: Swift is an open-source programming language developedContinue reading “Palindrome Number in Swift”
Dart and Flutter for Multi-Platform Apps
Dart programming language has a rich set of features ( i.e. Hot Reload, Null Safety, AOT+JIT ) powering Google’s Flutter SDK to build Android, iOS, Web, Linux, Windows & Embedded System apps from a single codebase. You may try here: Learn Flutter: https://flutter.dev/Learn Dart: https://dart.dev/Practise Dart: https://dartpad.dev/ #flutter #dart #android #ios #windows #linux #embedded #desktop
WebView Mobile App
WebView Mobile App
