Codxplore.com

Latest news:

Sahih al-Bukhari (সহীহ বুখারী) is a free Hadith application for android. This application is advertisement free. Download now https://play.google.com/store/apps/details?id=com.akramhossin.bukharisharif

967
Views
Fuzzy rank based relevant search in PostgreSQL.

Fuzzy rank based relevant search in PostgreSQL.

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
896
Views
TypeORM: How to bind parameters in where clause for SelectQueryBuilder

TypeORM: How to bind parameters in where clause for SelectQueryBuilder

Parameters used for As placeholders for the dynamic values in the query To prevent SQL injection Example let businessArtists: Artists[] = await getRepository(Artists)                 .createQueryBuilder('artists')                 .leftJoin(LocationArtists, 'location_artists', 'artists.artist_id = location_artists.artist_id')                 .where("artists.busi
947
Views
How to use getManyAndCount function in SelectQueryBuilder

How to use getManyAndCount function in SelectQueryBuilder

TypeScript code snippets using typeorm.SelectQueryBuilder.getManyAndCount const [models, pageCount] = await getRepository(Businesses)             .createQueryBuilder('businesses')             .leftJoinAndSelect("businesses.locations", "locations")             .where("is_active = 1")             .andWhere("is_deleted = 0")             .skip(offset)        
669
Views
implement hesabe payment gateway in Nodejs using Typescript

implement hesabe payment gateway in Nodejs using Typescript

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
1108
Views
Hacker Rank: Day 6: Let's Review

Hacker Rank: Day 6: Let's Review

Hacker Rank: Day 6: Let's Review Task Given a string,S, of length N that is indexed from 0 to N-1, print its even-indexed and odd-indexed characters as 2 space-separated strings on a single line (see the Sample below for more detail).Note: 0 is considered to be an even index.   Example s = abdecf Print abc def Input Format The first line contains an integer, T(the number of test cases).
1115
Views
Nodejs send sms using SMSBOX api

Nodejs send sms using SMSBOX api

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
1692
Views
Nodejs resize s3 image using Sharp image processing library

Nodejs resize s3 image using Sharp image processing library

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. Installation Any systems running Node.js v10+ do not need any additional install or runtime dependencies. to install
883
Views
Upload and Delete File into AWS S3 using Node.js

Upload and Delete File into AWS S3 using Node.js

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
484
Views
Install Node.js on Ubuntu 20.04

Install Node.js on Ubuntu 20.04

Initiation  Node.js is an open-source, cross-platform, back-end JavaScript runtime environment  that runs on the V8 engine and executes javaScript code outside a web browser 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
2642
Views
Typeorm findAndCount relational table filter

Typeorm findAndCount relational table filter

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
5967
Views
Generates models for TypeORM from existing databases

Generates models for TypeORM from existing databases

Typeorm is an ORM Which run in NodeJS, PhoneGap, Cordova, Ionic, Browser, NativeScript, Expo, React Native and Electron platforms.  We can use TypeORM with TypeScript and JavaScript (ES5, ES6, ES7, ES8). 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

Subscribe Us


Follow Us