This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker | |
- $ docker image ls | |
- $ docker build -t hello-docker . | |
- $ docker run hello-docker | |
- $ docker login -u debabrata100 | |
- $ docker tag hello-docker debabrata100/myfirstapp | |
- $ docker push debabrata100/myfirstapp | |
- $ docker rm [CONTAINER_ID] | |
- $ docker rmi [IMAGE_ID] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bash commands | |
- $ echo | |
- $ say “Hi There” | |
- $ date | |
- $ cal | |
- $ whoami | |
- $ pwd | |
- $ ls-a (List all hidden files) | |
- $ ls -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## React Js Interview Questions | |
1. Explain How react works. | |
2. What makes React different from other libraries> | |
3. What is Reconciliation? | |
4. What are the best practices one should think and follow while designing a component? | |
5. What is a Higher Order Component in react? Explain with code example. | |
6. What are the ways with which you can delay the loading of modules in react? Which one is better over another and why? | |
7. How React handles code splitting? | |
8. What are the ways to reuse a react component state logic ? Which one is better over another and why? | |
9. What are render props ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sortFunc(a, b) { | |
var sortingArr = ["A", "B", "C"]; | |
return sortingArr.indexOf(a.type) - sortingArr.indexOf(b.type); | |
} | |
const itemsArray = [ | |
{ | |
type: "A", | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Fragment, useRef, useState } from 'react'; | |
const previewStyle = { | |
flexFlow: 'row wrap', | |
marginTop: '24px' | |
} | |
const imgStyle = { | |
height: '100px', | |
marginRight: '16px' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import './App.css'; | |
import { IntlProvider, FormattedMessage } from 'react-intl'; | |
const en = require('react-intl/locale-data/en'); | |
const zh = require('react-intl/locale-data/zh'); | |
const ru = require('react-intl/locale-data/ru'); | |
const fr = require('react-intl/locale-data/fr'); | |
const addLocaleData = require('react-intl').addLocaleData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import './App.css'; | |
const defaultLocale = localStorage['locale'] ? localStorage['locale'] : 'en'; // English is default locale if none is set | |
const localeList = [ | |
{ name: 'English', code: 'en', lang: 'English' }, | |
{ name: '中文', code: 'zh', lang: 'Chinese' }, | |
{ name: 'русский', code: 'ru', lang: 'Russian' }, | |
{ name: 'Française', code: 'fr', lang: 'French' } | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getOperatorWeight(op): | |
weights = { | |
'+': 1, | |
'-': 1, | |
'*': 2, | |
'/': 2, | |
'^': 3 | |
} | |
return weights.get(op) | |
def isRightAssociative(op): |
NewerOlder