diff --git a/challenge 1/index.html b/challenge 1/index.html new file mode 100644 index 0000000..5eed337 --- /dev/null +++ b/challenge 1/index.html @@ -0,0 +1,95 @@ + + + + + + Approximate Search - Challenge 1 + + + +

Approximate Search - Challenge 1

+ + + + + + diff --git a/challenge 1/wordList.txt b/challenge 1/wordList.txt new file mode 100644 index 0000000..1783b0f --- /dev/null +++ b/challenge 1/wordList.txt @@ -0,0 +1 @@ +absolutely active activity activist accurate abstract accessible achievable action adapt adore agile align alien amplify ambition anecdote komal \ No newline at end of file diff --git a/challenge 2/index.html b/challenge 2/index.html new file mode 100644 index 0000000..b452949 --- /dev/null +++ b/challenge 2/index.html @@ -0,0 +1,81 @@ + + + + + + Arithmetic Expression Solver - Challenge 2 + + +

Arithmetic Expression Solver - Challenge 2

+ + + + + + + diff --git a/challenge 2/input.txt b/challenge 2/input.txt new file mode 100644 index 0000000..48d0d62 --- /dev/null +++ b/challenge 2/input.txt @@ -0,0 +1,3 @@ +10 – 2 = +100 * ( 2 + 12 ) = +(10 + 5^2) ( (5*-2) + 9 - 3^3) / 2 = diff --git a/challenge 3/README.md b/challenge 3/README.md new file mode 100644 index 0000000..b15d7d2 --- /dev/null +++ b/challenge 3/README.md @@ -0,0 +1,5 @@ +# Start Guide + +Initialize npm and Install Dependencies: +Run npm init -y to initialize a new npm project with default settings. +Install nodemailer by running npm install nodemailer. \ No newline at end of file diff --git a/challenge 3/komal_kafaltiya.png b/challenge 3/komal_kafaltiya.png new file mode 100644 index 0000000..8bf28ec Binary files /dev/null and b/challenge 3/komal_kafaltiya.png differ diff --git a/challenge 3/sendEmail.js b/challenge 3/sendEmail.js new file mode 100644 index 0000000..67aeb10 --- /dev/null +++ b/challenge 3/sendEmail.js @@ -0,0 +1,63 @@ +const nodemailer = require('nodemailer'); +const fs = require('fs'); +const path = require('path'); + +// Sender and receiver information +const senderEmail = 'komalkafaltiya2555@gmail.com'; +const senderPassword = 'password'; // due to security reaosn i am not putting my email address here +const receiverEmail = 'hr@ignitershub.com'; + +// Email content +const subject = 'Challenge 3 Completed'; +const body = ` +Name: Komal Kafaltiya +Semester: 4 +Branch: CS-IT +Roll Number: 21256342 +`; + +const imagePath = './komal_kafaltiya.png'; +const validImageTypes = ['.png', '.jpg', '.jpeg']; +const imageExtension = path.extname(imagePath).toLowerCase(); + +if (!fs.existsSync(imagePath)) { + console.error('Image file not found at the specified path.'); + process.exit(1); +} + +if (!validImageTypes.includes(imageExtension)) { + console.error('Invalid image type. Only PNG, JPG, JPEG are allowed.'); + process.exit(1); +} + +const transporter = nodemailer.createTransport({ + service: 'gmail', + auth: { + user: senderEmail, + pass: senderPassword, + }, +}); + +const mailOptions = { + from: senderEmail, + to: receiverEmail, + subject: subject, + text: body, + attachments: [ + { + filename: path.basename(imagePath), + path: imagePath, + }, + ], +}; + +// Send mail with defined transport object +transporter.sendMail(mailOptions, (error, info) => { + if (error) { + return console.error('An error occurred while sending the email:', error); + } + console.log('Email sent successfully! Message ID:', info.messageId); +}); + + + diff --git a/challenge 4/index.html b/challenge 4/index.html new file mode 100644 index 0000000..c42777c --- /dev/null +++ b/challenge 4/index.html @@ -0,0 +1,52 @@ + + + + + + + Palindrome Checker - Challenge 4 + + + + +

Palindrome Checker - Challenge 4

+ +

+ + + + + \ No newline at end of file