Skip to main content

Posts

Showing posts from March, 2021

How to import and use web-svg, local stored - Image & SVG into your Reactjs App?

import React from 'react'; import car from "../image/path/here.png";  import web from "../src/images/img2.svg"; import { ReactComponent as Mysvg } from "../image/path/here.svg"; const App = () => {     return(                    <>         <div>                 <img src={car} alt="this is car image" /> <Mysvg />                  <img src={web} className="" alt="home"></img>         </div>                    </>        ); }     export default App;

Squirrel & Spring ~ Nikon D3500 | Nikkor 70-300mm non ED VR

 

Errors while creating full-stack web application with Python - flask, NPM, Webpack and React

Important NOTE:  Q: Do I've to use virtul environment to run flask-react app? Solution :  No you don't have to. You can use pipenv if you want. virtualenv is like creating a world in which you install all the dependencies you need for your app. This is great because virtualenv avoids the need to install Python packages globally. When a virtualenv is active, pip will install packages within the environment, which does not affect the base Python installation in any way. 1.    65% building modules 460/461 modules 1 active ...fullstack\static\css\fullstack.css(node:18056) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead. (Use `node --trace-deprecation ...` to show where the warning was created) Hash: 393431d1931506f5755a Version: webpack 3.12.0    Time: 6025ms ====> latest version is webpack 5.24 update webpack:   npm install webpack@latest ref:  NPM Error - Miss...

SQL interview questions

 Add a column with a default value to an existing table in SQL Server ALTER TABLE {TABLENAME}  ADD {COLUMNNAME} {TYPE} {NULL|NOT NULL}  CONSTRAINT {CONSTRAINT_NAME} DEFAULT {DEFAULT_VALUE} WITH VALUES --------------------- How to return only the Date from a SQL Server DateTime datatype SELECT CONVERT(date, getdate()) --------------------- How to check if a column exists in a SQL Server table? IF EXISTS(SELECT 1 FROM sys.columns            WHERE Name = N'columnName'           AND Object_ID = Object_ID(N'schemaName.tableName')) BEGIN     -- Column Exists END Martin Smith's version is shorter: IF COL_LENGTH('schemaName.tableName', 'columnName') IS NOT NULL BEGIN     -- Column Exists END --------------------- Insert results of a stored procedure into a temporary table  stackoverflow You can use OPENROWSET for this. Have a look. I've also included the sp_configure code to enable Ad Hoc Distributed ...

DBMS ACID Properties

 1. Atomicity states that database modifications must follow an all or nothing rule 2. Consistency states that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database's consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.  3. Isolation requires that multiple transactions occurring at the same time not impact each other's execution. For example, if Joe issues a transaction against a database at the same time that Mary issues a different transaction, both transactions should operate on the database in an isolated manner. The database should either perform Joe's entire transaction before executing Mary's or vice-versa. 4.  Durability ensures that any transaction committed to the database will not be lost. Durability is ensured through the use of database backups and transaction logs that facilitate the restoration of committe...

SQL JOINS

Left Outer Join: select column from table1 a left join table2 b on  a = b Right Outer Join : select column from table1 a right join table2 b on  a = b Left Excluding Join: Select column from table1 a left join table2 b on  a = b where b is null Right Excluding Join : Select column from table1 a right join table2 b on  a = b where  a is null Inner Join : Select column from table1 a inner join table2 b on  a = b Outer Join or full outer Join or full join: select column from table1 a full outer join table2 b on  a = b Outer Excluding Join: select column from table1 a full outer join table2 b on  a = b where  a is null or b is null