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
// filter() creates a new array from an existing array with all elements that have passed a test/condition given. | |
// syntax for .filte() | |
// let newArray = oldArray.filter() | |
// example 1 | |
const countries = ['kenya', 'uganda', 'tanzania', 'somalia', 'burundi', 'rwanda', 'egypt'] | |
let newCountries = countries.filter(country => country.length > 6) | |
console.log(newCountries) // will create a new array of countries whose name have a length of 7 chracters and above |
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
const students = [ | |
{ name: "Irene", yearStarted: 2015, yearCompleted: 2019 }, | |
{ name: "Jamila", yearStarted: 2019, yearCompleted: 2020 }, | |
{ name: "Swabra", yearStarted: 2018, yearCompleted: 2022 }, | |
{ name: "Ali", yearStarted: 2000, yearCompleted: 2007 }, | |
{ name: "Chris", yearStarted: 2001, yearCompleted: 2006 }, | |
{ name: "Ken", yearStarted: 2020, yearCompleted: 2024 }, | |
{ name: "Shantel", yearStarted: 2015, yearCompleted: 2021 }, | |
{ name: "Martin", yearStarted: 2018, yearCompleted: 2020 }, | |
{ name: "Salma", yearStarted: 2015, yearCompleted: 2019 }, |
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
<div class="cd-background-wrapper"> | |
<figure class="cd-floating-background"> | |
<img src="https://codyhouse.co/demo/parallax-hero-image/img/cd-img-1.jpg" alt="image-1"> | |
<img src="https://codyhouse.co/demo/parallax-hero-image/img/cd-img-2.png" alt="image-2"> | |
<img src="https://codyhouse.co/demo/parallax-hero-image/img/cd-img-3.png" alt="image-3"> | |
</figure> | |
</div> |
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
# Created by https://www.toptal.com/developers/gitignore/api/django | |
# Edit at https://www.toptal.com/developers/gitignore?templates=django | |
### Django ### | |
*.log | |
*.pot | |
*.pyc | |
__pycache__/ | |
local_settings.py |
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
const students = [ | |
{ name: "Irene", yearStarted: 2015, yearCompleted: 2019 }, | |
{ name: "Jamila", yearStarted: 2019, yearCompleted: 2020 }, | |
{ name: "Swabra", yearStarted: 2018, yearCompleted: 2022 }, | |
{ name: "Ali", yearStarted: 2000, yearCompleted: 2007 }, | |
{ name: "Chris", yearStarted: 2001, yearCompleted: 2006 }, | |
{ name: "Ken", yearStarted: 2020, yearCompleted: 2024 }, | |
{ name: "Shantel", yearStarted: 2015, yearCompleted: 2021 }, | |
{ name: "Martin", yearStarted: 2018, yearCompleted: 2020 }, | |
{ name: "Salma", yearStarted: 2015, yearCompleted: 2019 }, |
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 Head from 'next/head' | |
import Script from 'next/script' | |
const index = () => { | |
return ( | |
<Head> | |
<link | |
rel='stylesheet' | |
href='https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css' | |
referrerPolicy='no-referrer' |
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
<?php | |
// some code above | |
// ** Database settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define( 'DB_NAME', 'hashnode' ); | |
/** Database username */ | |
define( 'DB_USER', 'root' ); |
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 Head from 'next/head' | |
import Image from 'next/image' | |
export default function Home() { | |
const image_list = [ | |
{ | |
id: 989, | |
name: 'piano with brand text', | |
url: 'https://res.cloudinary.com/demo/image/upload/piano.jpg', | |
}, |
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
const image_list = [ | |
{ | |
id: 989, | |
name: 'piano with brand text', | |
url: 'https://res.cloudinary.com/demo/image/upload/piano.jpg', | |
}, | |
{ | |
id: 990, | |
name: 'piano with blurred brand text', | |
url: 'https://res.cloudinary.com/demo/image/upload/e_pixelate_region:20,g_ocr_text/piano.jpg', |
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
<iframe | |
width={425} | |
height={350} | |
frameBorder={0} | |
scrolling='no' | |
marginHeight={0} | |
marginWidth={0} | |
src='https://www.openstreetmap.org/export/embed.html?bbox=39.65978622436524%2C-4.026432632626822%2C39.72553253173829%2C-3.976686573946468&layer=mapnik' | |
style={{ border: '1px solid black' }} | |
/> |