teleren/devto huggingface dataset:
Fibonacci Day!
Tags: python, java, javascript
Published: 2022-11-23 13:52:25

Fibonacci Day is celebrated today, on November 23, because the date formation of today is 11/23 (1, 1, 2, 3), which represents the Fibonacci sequence!

Here are some simple scripts to print the Fibonacci sequence in python, java and javascript.

Python:
```py
nterms = int(input("Enter the value of n: "))

n1, n2 = 0, 1
count = 0

if nterms <= 0:
   print("Please enter a positive integer")
elif nterms == 1:
   print("Fibonacci sequence upto",nterms,":")
   print(n1)
else:
   print("Fibonacci sequence:")
   while count < nterms:
       print(n1)
       nth = n1 + n2
       # update values
       n1 = n2
       n2 = nth
       count += 1
```

Java: 
```java
import java.util.Scanner;

public class FibonacciSeries {
   public static void main(String[] args) {
       Scanner s = new Scanner(System.in);
       System.out.print("Enter the value of n: ");
       int n = s.nextInt();
       fibonacci(n);
   }
   public static void fibonacci(int n) {
       System.out.print("Fibonacci sequence:");
       if (n == 0) {
           System.out.println("0");
       } else if (n == 1) {
           System.out.println("0 1");
       } else {
           System.out.print("0 1 ");
           int a = 0;
           int b = 1;
           for (int i = 1; i < n; i++) {
               int nextNumber = a + b;
               System.out.print(nextNumber + " ");
               a = b;
               b = nextNumber;
           }
       }
   }
}
```

Javascript:

```js
const number = parseInt(prompt('Enter the value of n: '));
let n1 = 0, n2 = 1, nextTerm;

console.log('Fibonacci sequence:');

for (let i = 1; i <= number; i++) {
    console.log(n1);
    nextTerm = n1 + n2;
    n1 = n2;
    n2 = nextTerm;
}
```
Next.js Blog Starter + Headless CMS
Tags: nextjs, react, jamstack, seo
Published: 2022-11-23 13:32:35

If you're looking to set up a modern and convenient blog for content writers to use, this is a good combo of Next.js + [Suncel CMS](https://suncel.io). 

Next.js allows many very useful optimizations to have a powerful site with very good scores on Core Web Vitals.

And Suncel CMS allows content writers, to integrate content very quickly and publish it instantly. 

The blog template is open source, feel free to contribute if you have improvements and leave a star on the github :)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rr61t8awxlivm6yua3nm.png)

**The following is available in the template :**

- Article page template with dynamic related articles
- Category page with dynamic related articles
- Dynamic home page that render last articles and all categories (without manual update)
- An admin with Suncel CMS to create pages, folders, manage assets, categories and a SEO module on each page

Tech stack : 
- Next.js
- React
- Typescript
- TailwindCSS




**For the installation**, you can take a look at the [Github Readme](https://github.com/suncel-io/nextjs-blog-starter).

As well as our two tutorial videos: 

- Nico explains how this blog was built
{% embed https://www.youtube.com/embed/d7ELyCNg6y0 %}

- David explains how to install it in a few minutes
{% embed https://www.youtube.com/embed/zfYwq16Omiw %}
Collect emoji feedback on your blog or website
Tags: webdev, javascript, tutorial, webcomponents
Published: 2022-11-23 13:22:27

Hey Dev community,
in this post I want to show you, how you can embed a simple emoji feedback component to your website or blog with the help of [Instant Emoji Feedback](https//emoji.instant-feedback.click/?ref=dev.to). This allows you to easily collect feedback and encourage your readers to interact with your content.

## Step 1 - Login
You first need to login to [Instant Emoji Feedback] with your GitHub account. But no worries, you don‘t need to pay anything.

To do so, open [this link](http://emoji.instant-feedback.click/?ref=dev.to).


![login instructions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zn6nxawkjm27ft2gfky.gif)

## Step 2 - Add the script and our Web Component to your website
As you can already see on the website, you now need to add two little things to your HTML.

First of all insert the following script tag to your `<head>`, to download download the component:
```html
<head>
…
<script src="https://get-emoji.instant-feedback.click"></script>
…
</head>
```

After that you just need to insert the web component wherever you want the feedback form to be and you‘re good to go.
> Please note that the component contains a personal **id** parameter. You can find yours in the install instructions on the website ([shortcut](https://emoji.instant-feedback.click/profile?ref=dev.to)).

```html
<body>
…
<emoji-feedback id="YOUR_PERSONAL_ID" templates="👋,👍,👎"></emoji-feedback>
…
</body>
```

## Bonus
You may noticed the *templates* parameter in the previous code snippet. You can use this one to define some default reactions, so your users don‘t have to spend time searching them.

By the way, mine are the following:

![My templates](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cq1tv520ht5izs8lbb7.jpeg)

## Final words
Thanks for reading til the end. I hope you will find Instant Emoji Feedback useful. I would love to hear from you, what your opinion on this project is.

*And at the end I would also like to mention the pro version:*

It allows you to moderate and analyze the given feedback all in one place and helps me keeping up with the bills 🙃.


![pro version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39c96xm6t4j7ga5hvy10.jpeg)

Enjoy your day ☺️.
How to prepare for UPSC CAPF Exam 2023- Best CAPF Preparation Strategy
Tags: capfpreparationstrategy, capfexam2023, upsc, capf
Published: 2022-11-23 13:18:55


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywl908jrv23yaj6gn7o1.png)CAPF Preparation Strategy 2023
Do you want to serve your country in uniform? Then, stay focused to pass the UPSC CAPF exam with best CAPF Preparation strategy on your first try because an increasing number of students have been registering for this national-level exam each year. 

The competition is fierce, and there are only a few spots available. But if you want to know how to prepare for UPSC CAPF Exam 2023, keep reading. This blog post will highlight several important techniques and show you **how to prepare for UPSC CAPF Exam 2023.** [Read More](https://giceacademy.com/upsc-capf-exam-2023-capf-preparation-strategy/)
Wheatcha - IT videos catalogue. New update: The library grows!
Tags: tutorial, programming, beginners, computerscience
Published: 2022-11-23 13:17:25

[Wheatcha](https://wheatcha.com/) is a new platform I'm building. It's an online catalogue of tech and programming videos on YouTube. The plan is to make it easier to find something like '_The best step-by-step tutorials of developing a backend with TypeScript and Prisma of 2022_'.

In this update I wanted to announce that a lot of videos were added to the library. Right now it contains about 40 channels and almost 500 videos. And don't forget dozens of tags that have been assigned to these videos. It's still only a fraction of all the free content you can see on YouTube and the plan is to add more and more every day. 

If you think a platform like this is interesting, you can always help as well. Let me know about your favorite creator or a video in the comments, and I'll add it right away. And, of course, if it's already on [Wheatcha](https://wheatcha.com/), you can already rate it to help the algorithm. I would greatly appreciate it.
History of Sariska National Park
Tags: sariska, tiger, reserve
Published: 2022-11-23 13:00:31

Would you like to know more about Sariska National Park's history? The Sariska Tiger Reserve is located in the Alwar district of Rajasthan. Everyone knows this fact. Sariska covers approximately 881 square kilometers, and Delhi and Jaipur are nearby cities. I would like to warn you not to go near scrub thorn arid forests, dry deciduous forests, grassland, or rocky hills due to the presence of sharp thorns.

Tigers are the main attraction of Sariska National Park. The environment has improved, and there are other wild species like chinkaras, sambhars, nilgais, golden jackals, striped hyenas, leopards, etc. Sariska has a significant population of animals other than tigers as well. Woodpeckers, Bush Quail, Grey Eagles, Great Indian Horned Owls, and Gray Partridges are some of the most spectacular bird species.

Before 1955, Sariska National Park was a remarkable hunting preserve. First tiger reserve in India to successfully relocate and rehabilitate tigers. While Project Tiger was in progress in 1978, it was designated a tiger reserve. 

Talk about Project Tiger in detail Here: [History of Sariska National Park](https://www.snaptours.in/blog/history-of-sariska-national-park/)

**Contact us:**
Email: [info@snaptours.in](mailto:info@snaptours.in)
Phone: [+91-9910511523](tel:+91-9910511523)
Cleaning Up The Program.cs File In ASP.NET 6 (API,MVC)
Published: 2022-11-23 13:00:31

We know that there are differences in ASP.NET 6 from the previous ones, and among these differences is that they merged the two files (Startup.cs - Program.cs) and put them in the Program.cs file. In this article, I will talk about how to improve the Program.cs file in a nice way and clear for programmers. 
First, here is an example of the program.cs file in ASP.NET 6:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xaeqc68h6hnywbj8x40m.png)

The (WebApplicationBuilder) class is used for register/configure the services or dependencies. As Extension methods are static methods, All we need to do is create a folder and we call for example (Installer), and create two files in it The first file we call it for example (RegisterDependentServices) And move the dependency registration code from Program.cs and bring it here. as follows:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnxwukrfbf618s8joygz.png)

The second file we call it for example (SetupMiddlewarePipeline) And move the middleware registration code from Program.cs as follows:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/156bh8y1ve44vr7kb24r.png)

After that update the Program.cs and use these extension methods (RegisterServices and SetupMiddleware) So the Program.cs file becomes as follows: 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upxu0q3ey1rx5tmom2nd.png)

Now the code look readable, manageable and nice.
Thank you for reading the article and I’m waiting for your comments
How to Center a Div in Flexbox
Tags: css, webdev, beginners, tutorial
Published: 2022-11-23 13:00:00

**How to Center a Div in Flexbox**

There are many ways to center things in CSS, but **CSS Flexbox** is one of the simplest. CSS Flexbox is a layout model that aids in the alignment of one-directional items. In this short post, we’ll look at how to center items both horizontally and vertically.

## To center the Div element

- We use the property of display set to flex – display: flex;
- Align items to center using – align-items: center;
- The last step is to set justify-content to center – justify-content: center;

## Main Axis and Cross Axis

- All flex boxes have a direction, in this case it’s horizontal starting from the left side to the right
- The main axis goes from **left** to **right**
- The cross axis is **top** to **bottom**


![Main Axis and Cross Axis of Flexbox](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05nmmv50fag0pgo595an.jpg)

To center our box we use the `align-items` property to align our item on the cross axis, which in this case is the block axis running vertically. We use `justify-content` to align the item on the main axis, which in this case is the inline axis running horizontally.

It is also important to add a **height** to the container of your div. For example height: `100vh`. `vh` unit stands for viewport height. Specifying **100vh** is equivalent to occupying 100% of entire visible screen height.

## Code

```html
<div class="box">
  <div></div>
</div>
```

```css
.box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.box div {
  width: 200px;
  height: 200px;
  border: 2px solid #0b2535;
  border-radius: 5px;
  background-color: #e2ecee;
}
```

## output


![Centered Div Element](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/arh3xkxqvh8z9wxaqd37.jpg)

## Conclusion

The properties we have covered in this guide are as follows:

- **display: flex** – This defines a flex container; inline or block depending on the given value. It enables a flex context for all its direct children.
- **align-items** – controls alignment of all items on the cross axis.
- **justify-content** – controls alignment of all items on the main axis.

See also
[How do you use Cascading Style Sheets (CSS)?](https://maxlockwood.dev/cascading-style-sheets-css-are-used-in-what-ways/)
[What are the 4 properties in a CSS Box Model?](https://maxlockwood.dev/what-are-the-4-properties-in-a-css-box-model/)
[What are CSS Rules and Selectors?](https://maxlockwood.dev/what-are-css-rules-and-selectors/)

If you liked this article, then please share. You can also find me on [Twitter](https://twitter.com/maxlockwood88) for more updates.
Bucket sort
Tags: javascript, webdev, beginners, programming
Published: 2022-11-23 12:56:41

**[Bucket sort](https://en.wikipedia.org/wiki/Bucket_sort)**, or **[bin sort](https://en.wikipedia.org/wiki/Bucket_sort)**, is a sorting algorithm that works by distributing the elements of an array into a number of buckets. Each bucket is then sorted individually, either using a different sorting algorithm, or by recursively applying the bucket sorting algorithm

Sorts an array of numbers, using the bucket sort algorithm.

Use [Math.min()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min), [Math.max()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) and the spread operator (...) to find the minimum and maximum values of the given array.

Use [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) and [Math.floor()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor) to create the appropriate number of buckets (empty arrays).

Use [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) to populate each bucket with the appropriate elements from the array.

Use [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce), the spread operator (...) and [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to sort each bucket and append it to the result.
```javascript
const bucketSort = (arr, size = 5) => {
  const min = Math.min(...arr);
  const max = Math.max(...arr);
  const buckets = Array.from(
    { length: Math.floor((max - min) / size) + 1 },
    () => []
  );
  arr.forEach(val => {
    buckets[Math.floor((val - min) / size)].push(val);
  });
  return buckets.reduce((acc, b) => [...acc, ...b.sort((a, b) => a - b)], []);
};

```

Examples
```javascript
 bucketSort([23,6, 3, 4, 1]); // [1, 3, 4, 6,23]
```

Connect me on [facebook](https://web.facebook.com/profile.php?id=100083195016286)
Wednesday Links - Edition 2022-11-23
Tags: java, jvm, gradle, time
Published: 2022-11-23 12:24:26

35 Misconceptions about date and time (8 min)🕰️
https://www.meziantou.net/misconceptions-about-date-and-time.htm

The leap second’s time is up: world votes to stop pausing clocks (4 min)🌒
https://www.nature.com/articles/d41586-022-03783-5

Included Git repositories plugin for Gradle (3 min)🛏️
https://melix.github.io/includegit-gradle-plugin/latest/index.html

API Mocking: Essential and Redundant (4 min)🏗️
https://foojay.io/today/api-mocking-essential-and-redundant/

Introduction to Fakes (12 min)🎭
https://www.petrikainulainen.net/programming/testing/introduction-to-fakes/

How Object Reuse Can Reduce Latency and Improve Performance (9 min)♻️
https://foojay.io/today/how-object-reuse-can-reduce-latency-and-improve-performance/

Performance of Java application dependence on the underlying OS (1 min)🏛️
https://twitter.com/jholusa/status/1593971831463366656

Use More Named Arguments in Kotlin (3 min)📛
https://jacquessmuts.github.io/post/compile_time_tests2/

Zipping Collections with Groovy (1 min)📇
https://blogs.apache.org/groovy/entry/zipping-collections-with-groovy

Spock with Spring 6 (1 min)🧩
https://mobile.twitter.com/jnabrdalik/status/1594441175448051712

Go Native with Spring Boot 3 and GraalVM (6 min)🏆
https://blogs.oracle.com/java/post/go-native-with-spring-boot-3-and-graalvm

Retrofitting null-safety onto Java at Meta (14 min)☔
https://engineering.fb.com/2022/11/22/developer-tools/meta-java-nullsafe/

Resilience4j v2.0.0 released (2 min)🪶
https://github.com/resilience4j/resilience4j/releases/tag/v2.0.0

The Distributed Computing Manifesto (16 min)📜
https://www.allthingsdistributed.com/2022/11/amazon-1998-distributed-computing-manifesto.html

The architecture of Mastodon (8 min)🏠
https://softwaremill.com/the-architecture-of-mastodon/
Here are the top code contributors to the Bitcoin Ecosystem
Tags: webdev, opensource, github, news
Published: 2022-11-23 11:50:49

We don’t know who Satoshi is, but here are people that have contributed significantly to the bitcoin ecosystem code base. #notallheroeswearcapes

Source: [Data Source](https://tribz.xyz/c/bitcoin)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dki8je1f12q2gc0ezdcw.png)
Introduction to Machine Learning
Tags: machinelearning, datascience, beginners
Published: 2022-11-23 11:49:25

## Introduction
In 1959, Arthur Samuel defined machine learning as follows:

> “Field of study that gives computers the ability to **learn** without being **explicitly programmed**”
> 

"Explicitly programmed" in this case means that we don't have to code everything for our machine to do a task. We will show our machine some examples, and then it will figure things out on its own. 


## Examples

Now we will see some examples of machine learning that we use in our daily life maybe without even knowing it.

### Virtual Assistants

Smartphone assistants like Apple Siri uses **machine learning** to **recognize speech, answer questions** and do other smart things. Assistants like **Siri** and **Google Assistant** are powered by automatic speech recognition and **Natural Language Processing (NLP)**.


![Virtual Assistants use Machine Learning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbragqta3hwmlcvxxcex.png)

### Self Driving Car

One of the most exciting and cutting-edge uses of machine learning algorithms is in autonomous vehicles. Self driving carr can significantly reduce traffics, and most importantly they can reduce road accidents  


![Machine Learning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b5i6wk1do1c1w5lvmv4n.png)


### Spam or Fraud Detection

Machine learning is used in every spam filter, such as in Gmail.


![Machine Learning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gwfqv3fbqb5xxcov9czh.png)



ML systems are also used by credit card companies and banks to automatically detect fraudulent behavior.

## How Machines Learn?

There are basically two types of ways our machine can learn:

### Supervised Learning

- Used most in real-world applications
- Rapid advancement

In this type of learning, we give the machine some input and some labeled output. This input data will help the machine to train itself so that it can predict the outcome as accurately as possible as soon as it gets input. In the Coursera video, we saw an example of **regression** where the task is to predict a number. There is also a second major type of supervised learning which is called **classification**.

### Unsupervised Learning

In this type of learning, we give the machine some data that is not tagged or labeled. The idea is that the computer will be compelled to construct a succinct representation through mimicry, a key way of learning in humans, and then use that for creative output.

## Why Machine Learning?

- It allows for building practical systems for real-world applications that couldn't be solved otherwise.
- Learning is wildly regarded as a key approach to building general-purpose artificial intelligence systems.
- The science and engineering of machine learning offer insights into human intelligence.
How To Lili’s Mexican Street Food – Cooking Recipes
Published: 2022-11-23 11:29:36

If you love Mexican food, then you need to try Lili’s Mexican [Street Food](https://cookingrespi.com/lilis-mexican-street-food/). This restaurant is a hidden gem in the heart of Los Angeles. The food is authentic and the flavors are out of this world. In this blog post, we’re going to show you how to get the most out of your Lili’s Mexican Street Food experience.

We’ll give you tips on how to order, what to order, and how to make the perfect dish. We’ll also tell you a little bit about the history of this restaurant and how it has evolved over the years. So whether you’re a Lili’s Mexican Street Food virgin or a seasoned pro, this blog post is for you.

The Best Way To Lili’s Mexican Street Food
If you’re looking for some of the best Mexican street food in town, look no further than Lili’s Mexican Street Food. This restaurant offers a wide variety of dishes that will tantalize your taste buds. However, to get the most out of your experience, use Google Ads.

Google Ads allows you to control your budget and expand your reach. This means that you can set limits on how much money you want to spend, as well as which demographics you want to target. Additionally, Google Ads provides detailed reporting so that you can track the results of your campaigns and make adjustments as necessary. In just a few weeks’ time, Lili’s Mexican Street Food will see quick and impressive results with Google Ads.

Lili’s Mexican Street Food is situated on a busy street in downtown Vale. The restaurant has a casual atmosphere and the staff is incredibly friendly. You can order your food from the counter or take it to go. There are several seating options available, including outside.

The menu includes tacos, burritos, quesadillas, tamales and more. Many of the dishes are filled with different types of meat and vegetables.**[Click Here](https://cookingrespi.com/lilis-mexican-street-food/)**
My very first post after 2 years
Tags: firstpost, beginners
Published: 2022-11-23 11:26:34


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mg74qtk2ppgob87vc3fh.png)

The image above that you see is when I joined this community back in January of 2020. One of the key areas where I wanted to improve on back then was my communication skills.

I thought that blogging would be a great place to do that but life (and a pandemic) sort of got in the way of focusing on posting here and instead I turned to improving my communication skills in other ways.

I'll detail more about my journey soon but I wanted to post this as a reminder to myself to get this going!
Career — Building a rocket
Tags: performance
Published: 2022-11-23 11:07:27


![NASA SLS ROCKET](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j184efbqsb3r4dymaude.png)


Your professional career can be a rocket ship and take off wherever you want.

You have to pay the price.

Learn English and/or Spanish.

Learn the tools you need to make your work better.

Learn different tools that other professionals are not interested in.

Have differentials.

Improve your curriculum.

Learn to read more.

Learn to write more.

Always invest in your professional growth.

Have proof of work.

Learn how to communicate better.

Learn to sell your profile with better communication.

Get therapy.

Do a physical exercise that you enjoy.

Always focus all results on the long term.