Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rajatk16's full-sized avatar
🏠
Working from home

geekrajat rajatk16

🏠
Working from home
View GitHub Profile
:root {
--toggler-width: 120px;
--toggler-height: 40px;
--toggler-bg-color: #da110a;
--toggler-active-bg-color: #08853c;
--menu-starting-top: 0px;
--menu-ending-top: 45px;
--menu-width: 200px;
--menu-max-height: 200px;
--menu-bg-color: #188ddb;
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import cx from 'classnames';
import './index.css';
class App extends Component {
state = {
display: false,
};
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Understanding JavaScript Objects and Functions</title>
</head>
<body>
<script src="script.js"></script>
</body>
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "icon1.png",
"sizes": "120x120",
"type": "image/png"
import React, {Component} from 'react';
import {connect} from 'react-redux';
import _ from 'lodash';
import * as actions from '../actions';
import ListItem from './ListItem';
class List extends Component {
state = {
showForm: false,
formValue: ""
import React from 'react';
import ReactDOM from 'react-dom';
import HideOrShow from './App';
function Display() {
return (
<HideOrShow>
{
({isVisible, hide, show}) => (
<div>
import React, {Component} from 'react';
import PropTypes from 'prop-types'
import {defaultTo} from 'lodash';
class HideOrShow extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: defaultTo(props.initialState, false),
};
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href='./style.css'>
</head>
<body>
<nav id="main">
<ul>
quickSort = (array) => {
if (array.length < 2) {
return array
}
const chosenIndex = array.length - 1
const chosen = array[chosenIndex]
const a = []
const b = []
for (let i = 0; i < chosenIndex; i++) {
const temp = array[i]
divide = (array) => {
if (array.length < 2) {
return array
}
const mid = Math.floor(array.length/2)
const smallOne = array.slice(0, mid)
const smallTwo = array.slice(mid)
return sort(divide(smallOne), divide(smallTwo))
}