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
<!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>Document</title> | |
<link rel="stylesheet" href="main.css"> | |
<script src="script.js" defer></script> | |
<link rel="preconnect" href="https://fonts.gstatic.com"> |
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
*{margin: 0; padding: 0;font-family: 'Old Standard TT', serif;} | |
.container{ | |
display: grid; | |
justify-content: center; | |
align-content: center; | |
min-height: 100vh; | |
grid-template-columns: 30vw; | |
grid-template-rows: repeat(3,10vh) 5vh repeat(2,10vh); | |
grid-gap: 10px; | |
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 Calculate(){ | |
var height = document.getElementById("h-input").value; | |
var weight = document.getElementById("w-input").value; | |
var result = parseFloat(weight) /(parseFloat(height)/100)**2; | |
if(!isNaN(result)){ | |
document.getElementById("bmi-output").innerHTML = result; | |
if(result < 18.5){ | |
document.getElementById("bmi-status").innerHTML = "Underweight"; |
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 sys | |
def find_index(arr, n): | |
maximum_element = max(arr) #3 | |
global prime | |
#prime = [i for i in range(maximum_element + 1)] | |
if len(prime) < maximum_element+1: #2>4 | |
difference = (maximum_element +1) - len(prime) #4-2 = 2 | |
prime += [True] * difference | |
p = (maximum_element +1) - len(prime) | |
#prime[0] = False |
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' | |
// importing aos | |
import AOS from 'aos'; | |
import 'aos/dist/aos.css'; | |
export default class MyClassComponent extends Component { | |
componentDidMount() { | |
AOS.init(); | |
} | |
render() { |
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,{useEffect} from "react"; | |
// importing aos | |
import AOS from 'aos'; | |
import 'aos/dist/aos.css'; | |
export default function MyFunctionalComponent() { | |
useEffect(() => { | |
AOS.init(); | |
}, []) | |
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
const express = require('express'); | |
const app = express(); | |
const port = 3001; | |
require('dotenv').config(); | |
app.use(express.json()); | |
app.post('/email',(req, res)=>{ | |
}) |
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 express = require('express'); | |
const nodemailer = require('nodemailer'); | |
const Mailgen = require('mailgen'); | |
require('dotenv').config(); | |
const app = express(); | |
const port = 3001; | |
app.use(express.json()); | |
app.post('/email',(req, res)=>{ |
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
// Creating an endpoint for sending customized emails | |
app.post('/customized-email',(req, res)=>{ | |
let config = { | |
service: 'gmail', | |
auth: { | |
user: process.env.NODEJS_GMAIL_APP_USER, | |
pass: process.env.NODEJS_GMAIL_APP_PASSWORD | |
} | |
} | |
let transporter = nodemailer.createTransport(config); |
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
'use client'; // Disable server-side rendering with this statement in the component file | |
import React from 'react' | |
import TimeCard from './TimeCard' | |
import axios from 'axios'; | |
import { useState, useEffect } from 'react' | |
export default function CSR() { | |
const [dateTime, setDateTime] = useState(''); | |
useEffect(() => { | |
axios | |
.get('https://worldtimeapi.org/api/ip') // Make a request for take the date and time from the API |
OlderNewer