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
# install java 17 | |
# check java location: which java ( use this location as JAVA_HOME below) | |
# verify java version: /usr/bin/java -version | |
# install spark | |
# install scala 2.13 | |
export SPARK_HOME=/Users/jatin/Documents/open-source/spark-3.5.3-bin-hadoop3-scala2.13 |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) | |
func main() { |
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 { Trie, TrieNode } from './trie'; | |
import { assert } from 'chai'; | |
describe('Trie', () => { | |
describe('with a single word', () => { | |
let trie: Trie; | |
beforeEach(() => { | |
trie = new Trie(); | |
trie.insertWord('hey'); |
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 from 'react'; | |
export default function LazyLoadedComponent() { | |
return <h2>Lazy loaded component</h2>; | |
} |
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 from "react"; | |
import { BrowserRouter, Routes, Route, NavLink } from "react-router-dom"; | |
import Home from "./components/Home"; | |
import About from "./components/About"; | |
import Contact from "./components/Contact"; | |
function App() { | |
return ( | |
<> |
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 { useEffect, useState } from 'react'; | |
export default function StopWatch() { | |
const [counter, setCounter] = useState(0); | |
const [running, setRunning] = useState(true); | |
useEffect(() => { | |
if (running) { | |
const intervalId = setInterval(() => { | |
setCounter(counter + 1); |