Posts

Showing posts from June, 2022

Converting ids into order id in join statement.

Image
  convering id into order_id from mysql in join     I faced a task to show orderId from normal primary key id in mysql DB. I am working on Node js on backend the orderId is the one I need  to send to frontend to display in alphanumeric type. ( eg : SPK00020, SPK00023) 20 and 23 being the primary key of the table in mysql. Approach :            I researched about the ways to generate random number and concat it with the id and lot of ways to do in backend itself but that didn't turn out to be a optimal approach.      After lot of reasearch I finally found a way to generate order id from mysql itself in the same statement I need to use the join statement itself.  LPAD method :  syntax :  LPAD(str,len,padstr); SELECT LPAD(7, 3, 0); +---------------+ | LPAD(7, 3, 0) | +---------------+  | 007 | we can use non-zero values also in this method. SELECT LPAD(7, 10, '.');     +------------------+ | LPAD(7, 10, '.') | +------------------+ | .........7 | +------

how to run laravel project on localhost

Image
  Here today I give you some tips about how to set up a Laravel project on local using XAMPP or WAMP server. Windows Users: Download  XAMPP   or  WAMP   server XAMPP download link :    https://www.apachefriends.org/download.html WAMPP download link :   http://www.wampserver.com/en/#download-wrapper Download  Composer,  for Laravel package control, you can download from the below link, Composer download link:  https://getcomposer.org/download/ When you completed the installation of the composer you can check from your windows CMD , Write  composer hit ENTER  on your cmd which looks like this, Next, Download Git Bash from a given link for running composer,  Git:  https://git-scm.com/downloads Run the  XAMPP  or any server on your system, open  PHPMYADMIN   or database, create the database named with  homestead  type utf8_general_ci. Pull or download the Laravel project from Git. On the Laravel project package, you can see the .enc.example file which is inside your root directory. Rename 

Integerating live streaming in wordpress plugin

Image
  pre- requisite: We have to create a page or create a space where we want to live stream the events.   wordpress plugin: wpStream → First we have to register and sign in using our credentials. We can have 2 options while creating channels for streaming. 1) free live streaming 2) pay per view channels from the channel option from channel option in WP stream. then after editing the page, we can add Wp player in the page and then adding the product key while adding it (Product key is created while registering with wp stream) Then we can use either external broadcaster or go live from browser. External broadcaster: OBC streaming – free open source broadcasting software that we can include in our wordpress page. We have to add server and stream key from wp stream to OBC streaming software, once it is done we can stream from the OBC streaming.

Launching AWS hosting services.

Image
Hoisting SAAS code from AWS single cloud storage for multiple users     Steps to upload source codes to aws :   We have to choose the required container for our application based on the use cases to upload the source codes. Then we have to make that source code public to all the other applications that are running on our AWS account within the same region. This S3 bucket can be used for more static sides of the application we are launching( images, blogs, videos) which we can be rendered fast from these buckets. Steps to start a instance using AWS:   Instances are nothing but virtual servers that we can use to run our application. These servers are configurable based on our needs. Scalable, Reliable and cost effective as we only have to pay as we use. We can setup the server with the required configurations for CPUs and storage needs from AWS EC2. We have to create instances in the same region as the codes are stored in a bucket. While creating an instance, we will have