teleren/devto huggingface dataset:
Day-49 Training At Ryaz
Tags: javascript, webdev, beginners, tutorial
Published: 2022-03-23 18:02:14

- Date:23/03/2022
- Day:Wednesday

Today, I started at about 10:30 am as I was done with both user part and cources part soothe thing left was to do that host would create the course so, firstly I started with this so, I saw the source but it was not explained well so, i decided to have a meet with my mentor so, i had a call with the mentor so, he basically explained me that we have i.e host would pass the parameters like name, price,category etc of the course created and in end the api which would hit post would pass the host id with the course created by the host so, we would be able to identify that the list of cources that we are available is created with the host with the specific id so, now thing is that student need to buy course so, this is done by passing id of student to the course so, I passed the student id in the course so, this way my day ended up and I basically completed all basics of crud app that were initiated now the working is to improve the placements of files and refining them.
Truthy - Falsy Values in JavaScript
Tags: javascript, webdev, beginners, programming
Published: 2022-03-23 17:58:42

## Truthy and Falsy Values

Anything in JavaScript is either True or False.

There are different values to denote whether something is True or False.

---

### Falsy Values

- false
- 0
- null
- Undefined
- NaN
- Empty String

### Truthy Values

- Anything that isn't Falsy.
- Empty arrays and objects are Truthy.

> Hope you learned something useful today! Peace Out ✌️
Github Copilot, voe no código com o seu copiloto
Tags: javascript, programming, github, githubcopilot
Published: 2022-03-23 17:57:17

Acabei de ser aceito na white list do Github Copilot e nada mais justo do que escrever um artigo sobre essa IA incrível para digitar código.

## Descrição:
O [Github Copilot](https://copilot.github.com/) é uma ferramenta de inteligência artificial desenvolvida pelo GitHub e OpenAI para auxiliar os usuários de IDEs Visual Studio Code, Visual Studio, Neovim e JetBrains por autocompletar código. Foi anunciado pela primeira vez pelo GitHub em 29 de junho de 2021. [Wikipedia(Inglês)](https://en.wikipedia.org/wiki/GitHub_Copilot)

## Funcionamento
O Copilot utiliza de um grande código Open Source para dar a suas sugestões, utilizando os padrões de milhares de repositórios pelo Github, então ele basicamente ver o que você está digitando, tentando criar e ai te sugere algumas linhas de código para te auxiliar. Como por exemplo ao criar um componente Header para a minha página:

![Imagedescription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg5ffemqinpivqchn81q.png)

Ele deu toda a estrutura do componente após eu ter escrito somente uma linha de código, ao apertar a tecla tab, tudo vira código como a seguir:

![Imagedescription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7k6s8z8ir30c236z5cdp.png)

Ao lhe auxiliar com o código, o Copilot te poupa bastante tempo enquanto você está trabalhando em seu projeto, é claro que algumas vezes as sugestões não irão fazer sentido com o que você deseja, mas basta apenas ignora-las e continuar a escrever seu código.

## Minha impressão
O Github Copilot com certeza é uma ótima IA para te auxiliar com projetos grandes, onde boa parte do código é reutilizada, pois ele consegue dar umas sugestões muito boas para te adiantar um bom tempo de código, mas enquanto o projeto é pequeno, algumas das sugestões vão ajudar sim, porém outras serão de se ignorar.

Ao meu ver vale muito a pena está com seu Github Copilot ativado para digitar seus códigos, pois com certeza você terá uma ótima experiência utilizando a IA. Além do fato de que se uma sugestão não faz sentido para a sua aplicação, basta ignora-la e continuar de onde parou, com o tempo a IA tende a se adaptar melhor e contribuir ainda mais com suas sugestões.

Por fim, vamos voar com nosso copiloto e nos adaptar as novas tecnologias que estão surgindo, quem sabe ela não vira uma aliada poderosa na hora de codar?
#Day 4 of Solving 450 questions[15/450]
Published: 2022-03-23 17:55:46

📅Day 4 : March 23,2022
Problems solved today :
[Best Time To Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/submissions/)
[Maximum Subarray](https://leetcode.com/problems/maximum-subarray/submissions/)
[Median](uhttps://practice.geeksforgeeks.org/problems/find-the-median0527/1)

Things I learned Today:
1. Min Max function may be very useful but when you have less variable to compare try to avoid it , the performance improved by 30%

2.Beautiful solution
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2xqys01x74wwkxg001g.png)
3.statistics module is very useful. As you can see too much speed
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i13x3hdfoqinlf2bpq8m.png)
Protect your Amazon CloudFront content — Authorization@Edge using cookies
Tags: aws, serverless, cloud, security
Published: 2022-03-23 17:42:18

Customers who host private web apps on Amazon CloudFront may struggle with a challenge: how to prevent unauthenticated users from downloading the web app’s source code.
This is an interesting solution, but if you don't request public and private content, it's overkill and can become really complex quickly.
Authorization@Edge - How to Use Lambda@Edge and JSON Web Tokens to Enhance Web Application Security…
Authorization, the function of specifying access rights to resources is often required to help protect restricted…
aws.amazon.com

If you simply have a CloudFront distribution you wish a user to auth first with Cognito before viewing this is probably a great option.
Authorization@Edge using cookies: Protect your Amazon CloudFront content from being downloaded by…
Enterprise customers who host private web apps on Amazon CloudFront may struggle with a challenge: how to prevent…
aws.amazon.com

You can deploy this solution from the AWS Serverless Application Repository. It's easiest to just leave everything as default so you can successfully deploy it and have something working to look at and maybe modify for your own specific needs.
Solution Flow
Part 1 — Sign in attempt

aws.amazon.com
Part 2 — Authentication and verification

aws.amazon.com
Part 3 — Redirect and access

aws.amazon.com
Recognition
The earlier AWS blog that investigated wiring up Cognito authentication with Lambda@Edge: https://aws.amazon.com/blogs/networking-and-content-delivery/authorizationedge-how-to-use-lambdaedge-and-json-web-tokens-to-enhance-web-application-security/
A gist that shows how to add Basic Authentication using Lambda@Edge: https://gist.github.com/lmakarov/e5984ec16a76548ff2b278c06027f1a4
An open-source project that uses a similar approach to secure CloudFront distributions, but does not yet support Cognito (at the time of this writing): https://github.com/Widen/cloudfront-auth
Additional resources
Check out the code on GitHub to see how the sample solution is built. You can deploy and run the code yourself: https://github.com/aws-samples/cloudfront-authorization-at-edge.
You can deploy the Amazon Cognito resources from the sample solution directly from the AWS Serverless Application Repository.
10
What is Fiverr, All About Fiverr
Published: 2022-03-23 17:37:53

## Overview
Fiverr is a platform where you can do freelancing. Many people come to Fiverr and post their work, they get freelance work on their basis. You can set your own money for your work, according to your working hours and days. Many people come to Fiverr, who have to get their work done, those people post their work requests, and you have to bid on their work request to get the work, You can also work on Fiverr and you can also give your work to the people.

## How does Fiverr Work
There are some steps, by which you can work on Fiverr and get the work done. Charges depend on freelancers and how much they will charge.

### If Your are a freelancer

1. Create your Fiverr account.
2. Make your Fiverr GIG from where people get to know about you and your work.
3. Explore Fiverr and bid on requests posted by buyers.
4. Chat with buyers about how they want their work to be done.
5. Do their work and get paid by buyers.

### If you are a buyer

1. Create your Fiverr account.
2. Open buyer's account in Fiverr.
3. Post a request explaining your required work and charges.
4. Select a freelancer that bids on your request or from GIGs.
5. Chat with that freelancer to explain your work.
6. Pay the amount to the freelancer after your work is done.

## FOR MORE VISIT [CodeWithNg](https://codewithng.blogspot.com) NOW
You ARE a css Master
Tags: css, design, ux, ui
Published: 2022-03-23 17:29:01

---
title: You ARE a css Master
published: true
description: everybody is css
tags: #css #design #ux #ui
//cover_image: https://direct_url_to_image.jpg
---
![css eye](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0li1o2o8ie5ki465665e.png)
 
## yes, you read correctly; read on...

### every day you wake-up; brain slowly kicks into gear, and before you know it...

What am I going to wear today? (in *every* sense of the word) from:
<br>
#### head
- hair
-- washed, combed, styled, highlights, cut, shaved
- face
-- steamed, foundation, eyebrows shaped, make-up etc
- facial hair
-- too much to mention!
- Protection
-- mask, spectacles, ear defenders, hat etc
- Piercings 
-- whatever you wish

<br>
#### body
- Under garments
-- socks, vest, underwear, bra, tights, stockings
- Over garments
-- t-shirt, blouse, shirt, pants, trousers, leggings, trackies etc
- Protective garments
-- sneakers, shoes, jacket, coat, gloves, hat, scarf, mask etc
- Piercings 
-- wherever you wish

you look yourself up-n-down in the mirror...
- umm, maybe just change...
- a myriad of thoughts come rushing in
- after multiple changes, you're happy

and go on your merry way, only to be greeted by...

a variety of different **looks** & *stares*

some pleasing, whilst others confusing!
<br>
#### you style yourself in different layers everyday, just like in css
- you consider the purpose and functionality of what you wear, and the reasons why?
- you practice on a daily basis, with somedays feeling really good, whilst other days "D'Oh!" 
- some are **brave** to have a permanent style, in the form of a tattoo

you are on your way to becoming a css sensei 😀
What is the difference using Twitter API on localhost vs server?
Published: 2022-03-23 16:06:18

I am following the article/example – artisansweb . net/tweet-twitter-php – to send Tweets via the Twitter API. The code below, or slight variations of it, is what I’m using. This all works very well in localhost. However, when transferred to my hosting site, InfinityFree . net, I get a fatal error in the authentication. I’ve double and triple checked that the reference files, .env keys/tokens & vender/abraham/twitterouath/twitteroauth are there in the same configuration as in my LAMP server. I use the .env file for other APIs without a problem. Transferring to my hosting site infinityfree . net I get this error shown in the image.

![Fatal Error using Twitter API on hosting site.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijg6rzmxz580vxwvo974.png)

`<?php
require_once "vendor/autoload.php";
include('loadenv.php');
 
use Abraham\TwitterOAuth\TwitterOAuth;
 
define('CONSUMER_KEY', $_ENV['OAUTH_CONSUMER_KEY']);
define('CONSUMER_SECRET', $_ENV['OAUTH_CONSUMER_KEY_SECRET']);
define('ACCESS_TOKEN', $_ENV['OAUTH_ACCESS_TOKEN']);
define('ACCESS_TOKEN_SECRET', $_ENV['OAUTH_ACCESS_TOKEN_SECRET']);
 
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);

$status = 'Check out The Gifted: A Positive Tale of Mutation. ';
$post_tweets = $connection->post("statuses/update", ["status" => $status]);

echo 'Tweet Program Ended';`
AWS VPC with AWS VPN Client vs. OpenVPN Access Server
Tags: aws, awscommunity, security, remote
Published: 2022-03-23 17:13:45

Using a VPN is the best solution to provide encrypted traffic between a remote client and a remote workload, systems, and data.
You have several choices:
AWS Client to VPN — This provides the flexibility of connecting from anywhere in the world, the infrastructure will be managed by AWS. In the event of an AZ failure, you can migrate to another AZ easily.
EC2 VPN (such as OpenVPN) — Provides additional feature ranges, however, you are entirely responsible for scaling and managing the instance and any other failures.
I would opt for the AWS-managed solution primarily because it mitigates the risk of AZ failures removing your access to the cluster. You can reduce your costs of using this option by scripting to shut down client VPN connections out of hours.
Exploring Computer Vision at the Edge with Amazon Panorama
Tags: aws, podcast, cloudfix
Published: 2022-03-23 17:13:38

## Podcast
* [Episode URL](https://aws-insiders.simplecast.com/episodes/exploring-computer-vision-at-the-edge-with-amazon-panorama)
* Subscribe on [Apple Podcasts](https://podcasts.apple.com/us/podcast/aws-insiders/id1608453414), 
 [Spotify](https://open.spotify.com/show/0sH9zDLABk6FoLM0cpZHu1) or [RSS] (https://feeds.simplecast.com/4vl2TtzP)


## EPISODE NOTES
On this episode, Omar Zarka, GM of Amazon Panorama, dives deep into the structure of Amazon Panorama, a machine learning appliance and software development kit that brings computer vision to on-premises internet protocol cameras. Omar discusses how Amazon Panorama can make accurate predictions, how to reduce operational overhead, and how to improve the experience for customers.

> "One thing that customers love a lot about the Panorama experience is the ease to set up the device. When you buy a device, in five minutes you have your device set up on your network. And not only is the device software stack secured top to bottom but it's connected to our service and you have a reliable connection." Omar Zarka, GM of Amazon Panorama

## Time Stamps

* (02:02) How Omar got started with Amazon Panorama 
* (03:05) The genesis of Panorama as a service
* (06:02) Edge computing compared to cloud computing
* (10:24) Installation of Hardware with Amazon Panorama
* (14:17) How customers capture data from multiple accounts
* (20:14) Omar’s favorite use cases of Amazon Panorama
* (25:13) Three best practices when using Amazon Panorama
* (28:29) Best cost related practices when using Amazon Panorama
8 Addictive Games Built Only with HTML, CSS, and JS 🎮✨
Tags: gamedev, games, frontend, inspiration
Published: 2022-03-23 17:06:29

---
title: 8 Addictive Games Built Only with HTML, CSS, and JS 🎮✨
published: true
description: 
tags: gamedev, games, frontend, inspiration
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3txt9nqnx977ngejs54q.png
canonical_url: https://madza.hashnode.dev/8-addictive-games-built-only-with-html-css-and-js
---
Games are among the coolest projects you can create because they are fun and can be addictive for the end-users. In this article I have compiled some of my favorites, so you can get some inspiration for your future creations. 

Creative game projects are usually valued higher by recruiters too since they demonstrate your proficiency with HTML for the structure, CSS for the design, and JS for the functionality.

For each project, I will provide a direct link, an interactive preview so you can get an initial impression on the fly as well as the author links, so you can explore more of their work, too.

### 1. [Keyboard Hero](https://codepen.io/evilpaper/pen/dyyZjLQ)
By: [evilpaper](https://codepen.io/evilpaper)

{% codepen https://codepen.io/evilpaper/pen/dyyZjLQ %}

### 2. [Menja](https://codepen.io/MillerTime/pen/BexBbE)
By: [Caleb Miller](https://codepen.io/MillerTime)

{% codepen https://codepen.io/MillerTime/pen/BexBbE %}

### 3. [AI Chess](https://codepen.io/jakealbaugh/pen/JjRGQPY)
By: [Jake Albaugh](https://codepen.io/jakealbaugh)

{% codepen https://codepen.io/jakealbaugh/pen/JjRGQPY %}

### 4. [Tilting Maze](https://codepen.io/HunorMarton/pen/VwKwgxX)
By: [Hunor Marton Borbely](https://codepen.io/HunorMarton)

{% codepen https://codepen.io/HunorMarton/pen/VwKwgxX %}

### 5. [The Cube](https://codepen.io/bsehovac/pen/EMyWVv)
[Boris Šehovac](https://codepen.io/bsehovac)

{% codepen https://codepen.io/bsehovac/pen/EMyWVv %}

### 6. [Coloron](https://codepen.io/gregh/pen/yVLOyO)
By: [Greg Hovanesyan](https://codepen.io/gregh)

{% codepen https://codepen.io/gregh/pen/yVLOyO %}

### 7. [Valorous Rabbit](https://codepen.io/Yakudoo/pen/YGxYej)
By: [Karim Maaloul](https://codepen.io/Yakudoo)

{% codepen https://codepen.io/Yakudoo/pen/YGxYej %}

### 8. [CSS Crossword](https://codepen.io/adrianroworth/pen/OpeyZq)
By: [Adrian Roworth](https://codepen.io/adrianroworth)

{% codepen https://codepen.io/adrianroworth/pen/OpeyZq %}

<hr>

Writing has always been my passion and it gives me pleasure to help and inspire people. If you have any questions, feel free to reach out!

If you found these useful, connect me on [Twitter](https://twitter.com/madzadev), [LinkedIn](https://www.linkedin.com/in/madzadev/) and [GitHub](https://github.com/madzadev)!

Visit my [Blog](https://madza.dev/blog) for more articles like this.
Conditional Statements
Tags: javascript, webdev, beginners, programming
Published: 2022-03-23 16:47:29

## Conditional statements

Conditional Statements, as the name suggests, only execute a statement, or a bunch of statements only if a condition is true.

Before learning about the different types of Conditional statements, let's have a look at some, not so frequently used, terms.

- Condition: An expression whose value is considered as a condition.
- ExprIfTrue: An expression that is executed if the condition is 
Truthy.
- ExprIfFalse: An expression that is executed if the condition is 
Falsy

_Posts on Truth and Falsy values coming soon~_

---

## Ways to implement Conditional Statements in JavaScript

To make use of Conditional statements, we need to use the [operators](https://dev.to/hardikmirg/functions-in-javascript-17b1) provided in JavaScript, or, if we don't use any operator but just a variable, The condition will be considered true if the variable provided is anything accepted being a falsy value.

### If statements

"If statements" are the most frequently used Conditional statements in JavaScript.
It has a very simple, elegant, function-like, and self-explanatory syntax. We just need to use the "if" keyword instead of "function".

```JavaScript
let hour = 5

if (hour < 12) {
    console.log("It's not afternoon yet.")
}
```
**What if we have more than 1 condition?**

>For that we have:

### If-else statements

They are very similar to if statements and in fact can only be used once a statement is started.

We use the "else" keyword to provide another "if" condition or we can simply use the "else" keyword to provide a statement that will only execute if none of the provided statements were true.

Let's learn to write "If-else" Statements by writing a program to determine whether a number is odd or even. 

```JavaScript
let num = 5

if (num % 2 === 0){
    console. log(`${num} is even`)
}
else console. log(`${num} is odd`)
```

Here we used the modulus operator than returns the remainder when the first operand is divided by the second, in this case, the remainder when 5 is divided by 2 is not 0, so it moves to the next else statement and prints that it's odd.

### Switch Case Statements

```JavaScript
switch(expression) {

 case x:
   // some code
 break;
   // some code
 case y:
   // some code
 break;
 default:
   // some code
} 

```

- The switch expression is evaluated once.
- The value of the expression is compared with the values of each case.
- If there is a match, the associated block of code is executed.
- If there is no match, the default code block is Executed

### Ternary Operator

The Ternary Operator can be considered a short-hand method to writing if statements, it's used in the following way:

```JavaScript
condition? ExprIfTrue: ExprIfFalse
```

> Hope you learned something useful today! Peace Out ✌️
Which is best Database for web applications In 2022?
Tags: database, mongodb
Published: 2022-03-23 16:45:06

Let's have a look at the [best database for web applications](https://appinventiv.com/) in 2022.

## 1. The Oracle

Oracle is the most widely used commercial relational database management system, built-in assembly languages such as C, C++, and Java. This database’s most recent version, 21c, contains a slew of new features.

Oracle is the database management system that stands above the others. Overall, it is the most extensively used RDBMS. It takes up less space and processes data faster, and it includes several new useful features such as JSON from SQL.

## 2. MySQL

MySQL is one of the most popular databases to use in 2022 in the computer world, especially in web application development. The main focus of this database is on stability, robustness, and maturity. The most popular application of this database is for web development solutions.

MySQL is written in C and C++ and uses a structured query language. MySQL 8.0 is the most recent version of this database, and it includes a better recovery option. The best SQL database comes in a variety of editions, each with its own set of features.

If you want to create an app for your business, get in touch with a [mobile application development services](https://appinventiv.com/) company.

## 3. MS SQL Server

Microsoft provides great toolset support for one of this best database software, both on-premise and in the cloud. It’s attuned well with Linux and Windows systems. MS SQL is a multi-model database that supports Structured Data (SQL), Semi-Structured Data(JSON), and Spatial Data.

It is not as inventive or advanced as other modern list of popular databases, but it has undergone considerable improvements and overhauls over the years.

## 4. PostgreSQL

POSTGRES was the initial name of the database. Michael was also honored with the Turing Award for his contributions to PostgreSQL.

PostgreSQL is a database management system written in C and used by businesses that deal with huge amounts of data. This database management software is used by several gaming apps, database automation tools, and domain registrations.

## 5. MongoDB

When it comes to most popular databases to use in 2022 through a NoSQL database, there are a few things to consider. MongoDB is the first Document Database management software that was released in 2009. It is challenging to load and access data into RDBMS using object-oriented programming languages which also require additional application-level mapping. Thus, to overcome this problem, Mongo was developed to handle Document Data.