Posts

Git command

SSH ket set up Using GitBash  1. git config --list 2. git config --global user.name "John Doe" 3. git config --global user.email johndoe@example.com 4. ssh-keygen -t ed25519 -C "your_email@example.com" 5. clip < ~/.ssh/id_ed25519.pub 6. enterpassword for ubantu --  the private key identities to the authentication agent like so: ssh-add Then you can  ssh  into your server. in addition, you can see the list of fingerprints of all identities currently added by: ssh-add -l after that set SSH key git lab-> profile ->setting ->> ssh key-key-> paste key Now open git bash and clone the repository and enter password The complete guide to SSH keys in GitLab - Spectral (spectralops.io) Clone a branch git clone -b <branchname> <remote-repo-url> Git global setup git config --global user.name "G Gurmangat" git config --global user.email "" Create a new repository git clone git@gitlab. cd rihms touch README.md gi...

POSTGRE SQL

Transaction and Exception handling do $$   declare  id numeric := 0; begin Query1 ;   Query2;    id:=1;   exception           when others then                 raise notice 'ERROR % %' ,sqlstate, id;       rollBACK; COMMIT; end; $$  language 'plpgsql'; Use JSON Data as parameter  and get using table "Role" table has two columns ---  -- FUNCTION: public."Get_JSON_TO_TABLE"(json) --select * from "Get_JSON_TO_TABLE"('{"RoleName":"Test","Description":"test desc"}') -- DROP FUNCTION public."Get_JSON_TO_TABLE"(json); /* select * from "Get_JSON_TO_TABLE"('{"RoleName":"Test","Description":"test desc"}') */ CREATE OR REPLACE FUNCTION public."Get_JSON_TO_TABLE"( jsondata json)     RETURNS Table("RoleNam" character varying,"Descripti" character varying)     LANGUAGE 'plpgsql'     AS $BODY$       ...

Node js Host on IIS and Email setup

React js Host ON IIS-- https://dev.to/sumitkharche/how-to-deploy-react-application-on-iis-server-1ied 1. Installed IIS Node -https://github.com/azure/iisnode/wiki/iisnode-releases https://github.com/tjanczuk/iisnode/releases iisnode-core-v0.2.21-x64 https://sourceforge.net/projects/iisnode.mirror/ 2. Install URL Rewrite --https://www.iis.net/downloads/microsoft/url-rewrite 3. Install Application Request Routing extension. https://www.iis.net/downloads/microsoft/application-request-routing 4, add web.config https://stackoverflow.com/questions/36351431/iisnode-on-windows-7-iis-7-5-throwing-500-19-error https://harveywilliams.net/blog/installing-iisnode For More information:https://dev.to/petereysermans/hosting-a-node-js-application-on-windows-with-iis-as-reverse-proxy-397b ...

React JS

react Route https://www.digitalocean.com/community/tutorials/how-to-handle-routing-in-react-apps-with-react-router Create React app command: npm init react-app react-redux-app npx create-react-app my-app //install latest node version sudo n stable To solve the issue unable to get local issuer certificate npm config set strict-ssl=false Redux : https://medium.com/@bretcameron/a-beginners-guide-to-redux-with-react-50309ae09a14 https://medium.com/swlh/what-is-redux-b16b42b33820 https://www.edureka.co/blog/react-redux-tutorial/ Custom table with colspan and rowspan                  <table    >                    <tr   >   <th   rowspan = "2" > Activity </th><th   rowspan = "2" > Code </th>   <th   colspan = "2" > 2021 </th>   ...

PHP-Symfony

https://bytenota.com/symfony-4-creating-a-simple-hello-world-step-by-step/ Install composer.json  dependency using command- composer install composer update Run the application - php bin/console server:run
Server.js-file /**  * Module dependencies.  */ 'use strict'; var express = require('express'); var http = require('http'); var path = require('path'); var app = express(); var routes = require('./config/routeConfig'); var sql = require('./config/connectionConfig'); var sqlTableType = require('./config/sqlTableTypeConfig'); var utils = require('./public/App/utils'); var sqlUtils = require('./public/App/sqlUtils'); // cross domain setup const cors = require('cors'); const corsOptions = {     origin: '*' } app.use(cors(corsOptions)); // all environments app.set('port', process.env.PORT || 3000); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(express.favicon()); app.use(express.logger('dev')); app.use(express.json()); app.use(express.urlencoded()); app.use(express.methodOverrid...

InterView Question

Type Script: Note : need to assign value to variable var/let before use.other wise it will give compile time error 1. What is difference between Let and Var. Var variable have globaly scope. example: var x:string="global"; { var x:string="local"; } console.log(x); output: local now var variable have latest assigned value (either local or global block). Let variable have scope according to block. let x:string="global"; { var x:string="local"; } console.log(x); output: global Now let variable 's local block's value does not change the global value but in var  variable 's local block's value is change the global value. We can not redeclare the let varibale again in same block but var can be declare many times. the  let  variable will not be added to the global window object. if let is decalre inside a block , we can not acces outside that block. it will give undefined compile time error. but var ca...