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
//problem is from the useReducer making two changes to say. | |
const newState = JSON.parse(JSON.stringify(state)) as AppState | |
newState.lists[targetLaneIndex].tasks.push({ | |
id: uuidv4(), | |
text: action.payload.text | |
}) | |
return newState |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >= 0.4.22 <0.9.0; | |
library console { | |
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); | |
function _sendLogPayload(bytes memory payload) private view { | |
uint256 payloadLength = payload.length; | |
address consoleAddress = CONSOLE_ADDRESS; | |
assembly { |
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
.sr-only{ | |
clip: rect(0 0 0 0); | |
clip-path: inset(100%); | |
height: 1px; | |
overflow: hidden; | |
position: absolute; | |
white-space: nowrap; | |
width: 1px; | |
} |
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
.element{ | |
position: absolute; | |
opacity: 0; | |
width:; | |
height:; | |
top:; | |
left: | |
} |
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 { useState } from "react"; | |
import { toppings } from "./utils/toppings"; | |
import "./styles.css"; | |
const getFormattedPrice = (price) => `$${price.toFixed(2)}`; | |
export default function App() { | |
const [checkedState, setCheckedState] = useState( | |
new Array(toppings.length).fill(false) | |
); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>freeCodeCamp</title> | |
<style> |
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
{ | |
"name": "name-of-project", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"install-client":"yarn --cwd client install", | |
"install-server":"yarn --cwd server install", | |
"server": "yarn --cwd server run watch", | |
"client": "yarn --cwd client start", |
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
#get process ID | |
sudo lsof -i :port | |
#where port is the port you want to kill | |
#kill process ID | |
kill -9 PID |
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
//Given a form, | |
<form onSubmit={props.submitLaunch}> | |
<label htmlFor="launch-day">Launch Date</label> | |
<input type="date" id="launch-day" name="launch-day" min={today} max="2040-12-31" defaultValue={today} /> | |
<label htmlFor="mission-name">Mission Name</label> | |
<input type="text" id="mission-name" name="mission-name" /> | |
<label htmlFor="rocket-name">Rocket Type</label> | |
<input type="text" id="rocket-name" name="rocket-name" defaultValue="Explorer IS1" /> | |
<label htmlFor="planets-selector">Destination Exoplanet</label> |
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 reverseString(input){ | |
if(input == ""){ | |
return '' | |
} | |
return reverseString(input.substring(1)) + input.charAt(0) | |
} | |
reverseString("Kehinde") |