This file contains hidden or 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
| #Configure here general information about the environment, such as SonarQube server connection details for example | |
| #No information about specific project should appear here | |
| #----- Default SonarQube server | |
| sonar.host.url=http://localhost:9000 | |
| #----- Default source code encoding | |
| sonar.sourceEncoding=UTF-8 | |
| #----- Default projectKey |
This file contains hidden or 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
| addHighlightText:function(component, event, helper, str){ | |
| var className = "highlightText" | |
| /*if(str){ | |
| var regex = str.split(' '); | |
| regex = regex.filter(function(char){ | |
| return char !== ''; | |
| }); | |
| regex = regex.join('|'); | |
| regex = regex.replace(/[-[\]{}()*+?.,\\^$]/g, "\\$&"); | |
| var matcher = new RegExp(regex, 'gi'); |
This file contains hidden or 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, { Component } from 'react'; | |
| import * as ROUTES from '../../../constants/routes'; | |
| const INITIAL_STATE = { | |
| height: '', | |
| width: '', | |
| depth: '', | |
| noOfShelf:'', | |
| contact:'', |
This file contains hidden or 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 createArrFunction(){ | |
| const arr=[] | |
| for(var i=0;i<5;i++){ | |
| arr.push( | |
| (function(){ | |
| return function(){ | |
| console.log(i) | |
| } | |
| })(i))} | |
| return arr |
This file contains hidden or 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 createArrFunction(){ | |
| const arr=[] | |
| for(let i=0;i<5;i++){ | |
| arr.push(function(){ console.log(i)}) | |
| } | |
| return arr | |
| } | |
| const getArrFunction = createArrFunction() | |
| getArrFunction[0]() // return 0 |
This file contains hidden or 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 createArrFunction(){ | |
| const arr=[] | |
| for(var i=0;i<5;i++){ | |
| arr.push(function(){ console.log(i)}) | |
| } | |
| return arr | |
| } | |
| const getArrFunction = createArrFunction() | |
| getArrFunction[0]() // return 5 |
This file contains hidden or 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
| const obj4 ={ | |
| firstName:'nikhil', | |
| lastName:'karkra', | |
| isTeaching: true, | |
| greet:function(){ | |
| console.log("hi") | |
| }, | |
| address:{ | |
| city:'Melbourne' | |
| } |
This file contains hidden or 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
| ------Nested level Object --- | |
| const obj4 ={ | |
| firstName:'nikhil', | |
| lastName:'karkra', | |
| isTeaching: true, | |
| greet:function(){ | |
| console.log("hi") | |
| }, | |
| address:{ |
This file contains hidden or 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
| const obj4 ={ | |
| firstName:'nikhil', | |
| lastName:'karkra', | |
| isTeaching: true, | |
| greet:function(){ | |
| console.log("hi") | |
| } | |
| } |
This file contains hidden or 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 deepCopy(obj){ | |
| const keys = Object.keys(obj) | |
| const newObject={} | |
| for(let i=0;i<keys.length;i++){ | |
| const key = keys[i] | |
| if((!!obj[key]) && (obj[key].constructor === Object)){ | |
| newObject[key] = deepCopy(obj[key]) | |
| } else { | |
| newObject[key] = obj[key] | |
| } |