Fuzzy rank based relevant search in PostgreSQL.
In this article, I'll share how I've improved a search feature by ranking fuzzy string matches by applying
to_tsvector, phraseto_tsquery, ts_rank, similarity to the searched term.
let's say we need to search list of labs which name contains the character combination of 'medwhite'.
I'm saying contains since there might be names that are not an
Date: August 14, 2023, 9:54 am Author: Akram Hossain
Parameters used for
As placeholders for the dynamic values in the query
To prevent SQL injection
let businessArtists: Artists = await getRepository(Artists)
.leftJoin(LocationArtists, 'location_artists', 'artists.artist_id = location_artists.artist_id')
Date: June 7, 2023, 10:44 am Author: Akram Hossain
implement hesabe payment gateway in Nodejs using Typescript
in this blog post i will try explain how to implement hesabe payment gatway in Nodejs using Typescript.
At first we will install two npm package hesabe-crypt-ts and aes-js.
to install this two packages run the following command
npm i -S hesabe-crypt-ts then
npm i aes-js
we have to import this two package on our typescript file as be
Date: June 20, 2022, 1:38 pm Author: Akram Hossain
In this blog post i will try to describe how to implement SMSBOX sms gateway in Nodejs application. to implement SMSBOX into any Nodejs application you
will need a SMSBOX account, you can register for new account at https://www.smsbox.com/
which is not free.Upon registration SMSBOX will provide you username and password to login to SMSBOX control panel.
After login to SMSBOX dashboard, Under le
Date: September 6, 2021, 5:45 pm Author: Akram Hossain
Sharp High performance Node.js image processing library.
It is 4x to 5x faster then ImageMagick and GraphicsMagick.
We can convert any larger image to any common format such as png, gif, jpeg, webp.
Also we can modify image dimension on the go without modifying actual image.
Any systems running Node.js v10+ do not need any additional install or runtime dependencies.
Date: July 10, 2021, 5:35 pm Author: Akram Hossain
In this blog post i will explain how to upload and delete file in AWS S3 using aws-sdk.
To getting started we need to install aws-sdk npm package to our Node.js application. To install aws-sdk in any Node.js project
run the following command in your terminal
$ npm install aws-sdk
After successful installation of aws-sdk package. You need to provide credentials to AWS so that only your account
Date: June 21, 2021, 5:16 pm Author: Akram Hossain
Smart app banner is an important element which is used to motivate user to download mobile application instead of using the website. The usage of a smart banner is only to promote app.To implement smart banner in Yii2 web application we need to do the following
Put smart app bann
any code that touches outside of the boundaries of a component should exist in a service
this includes inter-component communication,
unless there's a parent-child relationship and API calls of any kind and any code that cache or retrieve
data from a cookie or the browser's localStorage. This is a critical architectural pattern that keeps your
application maintainable in
Date: November 16, 2020, 5:15 pm Author: Akram Hossain
Prerequisites for installing Node.js
If you are using Ubuntu 20.04. Before we start, we should have an user account with sudo privileges set up on the system.
We will learn how to do this by following these steps for Ub
Date: October 11, 2020, 11:16 pm Author: Akram Hossain
To filter relational table in TypeORM using findAndCount there is a workaround. To filtering based on relation fields for findAndCount.
We need to use ObjectLiteral-style where using this style conditions are works perfectly.
Assume that we have Three entities – products,attributeSet and woodType. products belongs to one attributeSet and one woodType,
attributeSet and woodType has many prod
Date: July 17, 2020, 10:46 am Author: Akram Hossain
Typeorm is an ORM Which run in NodeJS, PhoneGap, Cordova, Ionic, Browser, NativeScript, Expo, React Native and Electron platforms.
TypeORM is highly influenced by other ORMs such as Entity Framework, Hibernate, Doctrine.
To generate model using TypeORM from existing database we need to install typeorm-model-generator. To
Date: July 16, 2020, 5:58 pm Author: Akram Hossain