teleren/devto huggingface dataset:
Markdown: A simple guide
Tags: markdown, tutorial, beginners
Published: 2023-04-18 17:11:12

Markdown is a lightweight markup language that allows you to create formatted documents using a simple syntax. It was created by John Gruber in 2004, and has since become a popular choice for writing documentation, README files, and even blog posts. In this blog post, we'll explore the basics of Markdown and how you can use it to format your own documents.

## Basic Syntax
The basic syntax of Markdown is designed to be as simple and intuitive as possible. Here are some of the most commonly used elements:

# Headings
You can create headings by using one to six hash (#) symbols at the beginning of a line, followed by a space and the heading text. The number of hash symbols indicates the level of the heading, with one hash symbol indicating a top-level heading and six hash symbols indicating a subheading.

**For example:**

```
# This is a top-level heading
## This is a subheading
### This is a sub-subheading
```

# Text Styling
You can style your text in various ways using Markdown:

**Bold**: To make text bold, surround it with two asterisks (**).
Italic: To make text italic, surround it with one asterisk (*).
Strikethrough: To add a strikethrough to text, surround it with two tildes (~~).

**For example:**

```
This text is **bold**.
This text is *italic*.
This text is ~~strikethrough~~.
```
# Lists
You can create both ordered and unordered lists using Markdown. To create an unordered list, simply start each item with a hyphen (-), plus sign (+), or asterisk (*). To create an ordered list, start each item with a number followed by a period (1., 2., 3., etc.).

**For example:**
```
- Item 1
- Item 2
- Item 3

1. First item
2. Second item
3. Third item
```
# Links and Images
You can add links and images to your Markdown documents using the following syntax:

**Links**: To create a link, surround the link text with square brackets (
) and the URL with parentheses (
).
**Images**: To add an image, use the same syntax as links, but add an exclamation mark (!) before the square brackets.
**For example:**

```
[Click here to visit Google](https://www.google.com)

![Alt text](https://www.example.com/image.jpg)
```
# Conclusion
Markdown is a simple yet powerful way to format text. It allows you to create documents quickly and easily, without having to worry about complicated formatting or styling. With just a few basic syntax elements, you can create professional-looking documents that are easy to read and understand. So the next time you need to create a document, give Markdown a try!
Secure WordPress Database from Malicious Attacks
Tags: beginners, programming, database, security
Published: 2023-04-18 17:00:00

WordPress is one of the internet’s most popular Content Management Systems (CMS). With its popularity, WordPress sites are also targeted by malicious attacks. The WordPress database contains sensitive information such as user credentials, website settings, and other data. Therefore, it is important to secure your WordPress database from malicious attacks.

Here are some tips to help you secure your WordPress database:

**USE A UNIQUE DATABASE PREFIX**
During the WordPress installation, you are given the option to choose a prefix for your database tables. By default, the prefix is set to ‘wp_’. Hackers know this, and they use it to their advantage. Changing your database prefix to something unique will make it harder for attackers to guess your table names.

To change your database prefix, modify the $table_prefix value in the wp-config.php file:

> $table_prefix = 'wp_'; // Replace 'wp_' with your preferred prefix

**LIMIT DATABASE ACCESS**
By default, WordPress uses the same credentials for the database user and the WordPress admin user. This means that if an attacker gains access to your WordPress admin panel, they also gain access to your database. To prevent this, you should create a separate database user with restricted privileges.

To create a new database user, you can use the following SQL command:

> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
// Replace ‘username’ and ‘password’ with your preferred values.

Next, you need to grant privileges to the new user for your WordPress database. You can use the following SQL command:

> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.* TO 'username'@'localhost';
// Replace ‘databasename’ with your WordPress database name, and ‘username’ with the new user you created.

**KEEP YOUR WORDPRESS SOFTWARE UP TO DATE**
WordPress releases security updates regularly. By keeping software up to date, you can stay protected against the latest security vulnerabilities.

To update your WordPress software, log in to your WordPress admin panel. Then, navigate to Dashboard > Updates. From here, you can see if there are any updates available for WordPress.

**USE A SECURITY PLUGIN**
There are several security plugins available for WordPress that can help you secure your database. Some popular security plugins include Sucuri Security, Wordfence Security, and iThemes Security. These plugins can help you detect and prevent malicious attacks, as well as provide additional security features such as two-factor authentication and IP blocking.

In conclusion, securing your WordPress database is essential to prevent data breaches and protect your website. By following these tips, you can make your WordPress database more secure and reduce the risk of malicious attacks.

https://user-meta.com/blog/secure-wordpress-database-malicious-attacks/
"Undefined" in javascript: Amazing Cases.
Tags: webdev, javascript, beginners, programming
Published: 2023-04-18 16:49:52

📗 **𝐓𝐡𝐞 𝐂𝐮𝐫𝐢𝐨𝐮𝐬 𝐂𝐚𝐬𝐞 𝐨𝐟 "𝐔𝐧𝐝𝐞𝐟𝐢𝐧𝐞𝐝" 𝐢𝐧 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭**

👉 In JavaScript, "undefined" is a primitive data type that represents a value that is not assigned to a variable or a property. "undefined" is a property of the global object. That is, it is a variable in global scope.

JavaScript uses the undefined value in the following situations.

✅ **1) 𝐀𝐜𝐜𝐞𝐬𝐬𝐢𝐧𝐠 𝐚𝐧 𝐮𝐧𝐢𝐧𝐢𝐭𝐢𝐚𝐥𝐢𝐳𝐞𝐝 𝐯𝐚𝐫𝐢𝐚𝐛𝐥𝐞**
When we declare a variable and don’t initialize it to a value, the variable will have a value of ''undefined''.
For example:

```
let x;
console.log(x); // Output: undefined
```


✅ **2) 𝐀𝐜𝐜𝐞𝐬𝐬𝐢𝐧𝐠 𝐚 𝐧𝐨𝐧-𝐞𝐱𝐢𝐬𝐭𝐢𝐧𝐠 𝐩𝐫𝐨𝐩𝐞𝐫𝐭𝐲 𝐨𝐟 𝐚𝐧 𝐨𝐛𝐣𝐞𝐜𝐭**
If we access a non-existing property of an object, we’ll get undefined.
For example:

```
let person = {
name: "Sachin",
};
console.log(person.age); // undefined
```

In this example, the person object has one property "name". Accessing the "age" property that doesn’t exist on the "person" object returns undefined.

✅ **3) 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧 𝐩𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬**
when we call the function and don’t pass all the arguments, the parameters inside the function become undefined.
For example:

```
const calculation = (a, b ) => {
  return b === 7 ? ${ a } : ${ a} ${ b };
}
calculation(3); // 3 undefined
```

✅ **4) 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐬 𝐫𝐞𝐭𝐮𝐫𝐧 𝐚 𝐯𝐚𝐥𝐮𝐞**
A function that doesn’t have a return statement implicitly returns undefined.
For example:

```
function myFunc() {
// Do something but don't return a value
}
console.log(myFunc()); // Output: undefined
```

✅ **5) 𝐀𝐜𝐜𝐞𝐬𝐬𝐢𝐧𝐠 𝐨𝐮𝐭-𝐨𝐟-𝐛𝐨𝐮𝐧𝐝𝐬 𝐚𝐫𝐫𝐚𝐲 𝐞𝐥𝐞𝐦𝐞𝐧𝐭𝐬**
When we access an array element that is out-of-bounds, we'll get the undefined value.
For example:

```
const colors = ['red', 'green', 'blue'];
console.log(colors[3]); // undefined`
```

👉 **𝐒𝐮𝐦𝐦𝐚𝐫𝐲**
✅ The undefined is a primitive type that has a single value undefined.
✅ Accessing an uninitialized variable returns undefined.
✅ Accessing a non-existing property of an object returns undefined.
✅ Accessing an out-of-bounds array element returns undefined.
✅ A function without a return statement or with a return statement but without an expression returns undefined.

That's all for today 🙂

Thanks for reading it 😊. I hope it was insightful and that we got to learn something new today. If you liked the post, please post likes 👍 and share 🤝 it in your circles. Share your feedback and comment away.

Let's connect on [LinkedIn](https://www.linkedin.com/in/sachin-kumar007/). I'd love to connect :)
Video of a conference talk about the most useful SQL queries to investigate high CPU utilization, delivered at Citus Con 2023
Tags: database, devops, postgres
Published: 2023-04-18 16:36:55

Video of a conference talk about the most useful SQL queries that can be run on PostgreSQL to investigate high CPU utilization, delivered at Citus Con: An Event for Postgres 2023 by Dmitry Romanoff. Checking CPU utilization allows you to understand if your PostgreSQL database is experiencing performance issues like inefficient SQL queries, lack of indexes, and contention. After seeing a high CPU of the PostgreSQL DB instance, it’s essential to find the root cause of the issue. Queries can be poorly written, too frequent, or heavy. This talk will also help you understand what’s running in the database instance that impacts CPU usage. 

https://www.youtube.com/watch?v=GXvX_PclthI
API 101 WITH POSTMAN
Tags: postmanapi, postmanstudent
Published: 2023-04-18 16:34:20



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4j7ofexdnbov3v68hgj9.jpg)
I recently attended an IEEE Sahrdaya SB and ACES workshop focusing on API development using Postman. The workshop was led by Joel Jason, an excellent speaker who provided a wealth of information on the subject. During the workshop, we learned the basics of API development and how to make GET and POST requests using Postman.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9m8rdq9xkjy6bg22biws.jpg) We were given real examples and invited to experiment with Mail to see how requests work in practice. I found Joel's step-by-step approach to the course particularly helpful. Each concept was clearly explained, practiced, given time to practice and moved on to the next topic. I was able to follow and absorb the information more easily.

Due to the hands-on approach of the workshop, I also learned by doing. Being able to write code and test it in real time helped me understand the material better.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqsv24j8kxim0iprpc5a.jpg)

Overall, I found the workshop to be a great learning experience. Joel Jason was an outstanding speaker who made the content interesting and easy to understand. I've learned a lot about API development and Postman, and I can't wait to put what I've learned into practice. Thanks to IEEE Sahrdaya SB and ACES for organizing this event.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s424c80j3g6z3meiu7cc.jpg)
My first experiment with API
Tags: postmanstudent
Published: 2023-04-18 16:21:04

As an engineering student, I recently attended a class on APIs and Postman, conducted by my friend Mr. Joel Jason. The program was held in the evening in our computer lab and lasted until 4:30. Through practical sections and well-designed presentations, my friend did a fantastic job of introducing us to the world of APIs and how to use Postman for API testing.

APIs, or Application Programming Interfaces, are an essential part of software development. They allow different applications to communicate with each other and exchange data. For example, when you use a weather app, it is likely getting its data from an API that provides weather information.

During the class, we learned about the different types of APIs, which are widely used in web development. We also learned how to use Postman, a powerful app that allows developers to test APIs without having to write code.

Postman makes it easy to send requests to APIs and see the responses. You can test different endpoints and methods and view the data that is returned.

The class also included practical exercises where we had hands-on experience with creating and testing APIs using Postman. We worked on real-world scenarios where we had to create API requests, handle responses, and troubleshoot issues using Postman. These practical sessions were engaging and allowed us to apply the concepts we learned in a real-world context, which helped solidify our understanding of APIs and Postman.

Overall, the class was an excellent introduction to APIs and Postman. I now have a better understanding of how APIs work and how to use Postman for API testing. I highly recommend this class to anyone interested in software development, whether you are a beginner or an experienced developer.
[end Kernel panic - not syncing: Attemted to kill the idle task] VirtualBox
Tags: virtualbox, virtualmachine
Published: 2023-04-18 16:20:40

I want to install Debian and Ubuntu in VirtualBox and have this error.

![end Kernel panic - not syncing: Attemted to kill the idle task](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8um6lxtei6libwwfwrc.jpg)

I solved it by adding more core CPU resources in the Virtual Machine from 1 to 2.

![Add More CPU](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tumkffg1cbuzagqmw8g3.png)

And then the problem will solved.

![Problem Solved](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2ggsy2linss3udh7xja.png)

---

### Reference
- Friends
Spring Boot
Published: 2023-04-18 16:13:25

Spring Boot
... 
Automatic Controller Mappings for MVC based Applications
few annotations 
Auto Config 
- application Context (inversion of Control container (bean factory) ) -> opinionated configarations

start Project with spring initializer
start.spring.io 
-maven oder gradle
java (kotlin, groovy) 
package as jar
java 17? welche version? 
add dependencies ... 
spring web ... 
(ID-Plugin possible) 
copy files in personal directory (-rekursivly) 

main Method -> @SpringBootApplication / use that as base for component scanning & auto-config
ressources -> static/ template ( because of webpackage) 
application.properties -> control context

libary-> configured, embedded tomcat 

Inversion of Control
Container -> Objects injected at runtime/ starttime (added to BeanFactory)
IoC & Dependency Injection -> objects dont create dependend objects, but container manages them and injects them as needed

IoC Container -> triggered from main class 
IoC Container build Objects wich are referenced in Main, pointers in classes,
pointers in classes & IoC Container injects them + manage LifeCycle

Spring IoC -Bean Factory is IoC Container
Hooks //

Application Context to interact <- Spring Boot application, that conext is started for us, and autoconfig 
Application Context is wrapper around bean factory

Spring Beans 
Spring-> handles Object initilazation, instatiation 
Beanfacotry -> beans instatioated in right order 

annotations 
metadata for code - often use for compiler or runtime instruction (@test) 

spring benutzt sie als hebelpunkte für code. add functionality, with proxies 

beans in beanfactory are proxied, annotations drive proxies

annotations drive behavior and component scanning as part of the application context
-> scope for calling methods -> calling order matters

Spring Data
provides a commen set of interfaces based on JPA
interface for JDBC, easier 
repository pattern nativly 
key benefits of key data 
swap datasources is easy
SPring data repository provides the methods needed to access the data
interface leverage proxies that builds the actual CRUD methods
Entity Objects 
Data Sourced autoconfigured by Spring Boot

embedded Database 

tomcat on 8080
Client-Side vs Server-Side Form Input Validation
Tags: javascript, opensource, react
Published: 2023-04-18 16:11:58

Tired of dealing with invalid data submitted by users in your web forms? Then it's time for you to introduce input validation into your form creation workflow. In this article, we will explore pros and cons of client- and server-side validation features that SurveyJS has to offer, so that you can decide which one to use in your project.

[Read the full article](https://surveyjs.io/stay-updated/blog/client-server-data-validation) on SurveyJS blog.
Unlock Cloud Savings: 3 Powerful Strategies to Drastically Cut Your Costs up to 92%
Tags: beginners, cloud, career, writing
Published: 2023-04-18 16:01:47

💸 Tired of sky-high cloud bills? Uncover the secrets to slashing your costs by a whopping 92% with three simple methods:
• Right-Sizing
• Stopping Servers
• Committed Use Discount

---

## 🚀 Right Sizing:

When using physical servers, you usually allocate enough headroom for the expected demand.

With the cloud, you can scale based on actual demand.

This allows you to choose a machine size that matches your requirements, resulting in an average savings of 30-50%.

## ⏲️ Stopping the Servers:
Virtual machines in the cloud don't need to run 24/7.

This allows you to stop them when they're not in use and restart them when needed.

You only pay for the time spent running, leading to a reduction of about 76% for an 8/5 schedule.

## 💰 Committed Use Discount:
You can commit to a specific usage level and receive a substantial discount on your hourly rate.

You can save up to 46% with Google Cloud by committing to usage.

This is an excellent option for production loads that have consistent requirements.

## 📈 Example:
$10k/month system
• Use right-sizing, save 40% ($6k).
• Stop servers during off-hours, save 76% ($1.44k).
• Commit to usage, save 46% ($778).
• New monthly cost: $778, a 92% reduction!

## 🔍 Summary:
Here are the methods we covered to reduce your cloud bill:
• Right Sizing: Reducing the base cost of your virtual machines
• Stopping Servers: Reducing the number of billable hours
• Committed Use Discount: Reducing the cost per billable hour

---

Beyond cost savings, the cloud offers many other benefits, such as faster innovation and increased productivity.

If you want to learn more about navigating the cloud and overcoming #CloudConfusion, follow me for daily insights and tips into cloud computing
List your S3 bucket objects easily with S3 Directory Listing
Tags: opensource, webdev, tutorial, aws
Published: 2023-04-18 15:45:27

Are you tired of the boring, plain S3 bucket directory listing? Do you wish there was a way to make it more user-friendly and appealing? Well, look no further! Introducing S3-Directory-Listing, a simple and easy-to-use JS script and HTML combo that will turn your S3 bucket directory listing into a fancy, modern-looking file and folder listing with a nice UI and search functionality.

First things first, let’s talk about usage. To use S3-Directory-Listing, all you need to do is clone the repository or copy the contents of dark-mode.css, s3.js and index.html to your S3 bucket. Then, update the bucketName variable in app.js with your bucket’s name, and configure your S3 bucket settings. Access the index.html file in your browser, and voilà! You now have a fancy S3 directory listing. It’s that simple!

But what about S3 bucket settings? To make this magic work, you need to configure your S3 bucket settings properly. First, make sure your S3 bucket is publicly accessible or at least accessible to the users you want to share the directory listing with. Next, set the bucket policy to allow public read access to your objects. Use the policy, replacing <your-bucket-name> with your actual bucket name.

Finally, enable static website hosting for your bucket, and note down the bucket’s static website endpoint (e.g., http://<your-bucket-name>.s3-website-<your-region>.amazonaws.com/index.html or https://<your-bucket-name>.s3.amazonaws.com/index.html for secure connection).

Now that your S3 bucket settings are configured, you can enjoy your brand new, fancy-pants S3 directory listing! But wait, there’s more. You can customize the number of items shown per page by modifying the itemsPerPage variable in s3.js.

S3-Directory-Listing is not only easy to use, but it’s also highly customizable. You can tweak the script and HTML to fit your specific needs and preferences. And if you run into any issues or have any questions, you can head over to the GitHub repo and let the creators know. They’d love to hear from you!

In conclusion, S3-Directory-Listing is a game-changer for anyone who wants to fancy up their S3 bucket directory listing. It’s easy to use, highly customizable, and best of all, it’s free! So why settle for a boring, plain S3 directory listing when you can have a modern, user-friendly one? Give S3-Directory-Listing a try today and see for yourself how much of a difference it can make.

You can check Github Repository https://github.com/flightlesstux/S3-Directory-Listing for README and S3 Bucket Policy examples.

You can also use in Dark Mode! Here is the demo: https://s3-directory-listing.s3.amazonaws.com/index.html

Happy listing!
Challenge: Counting Numbers with 7s
Tags: challenge
Published: 2023-04-18 15:41:00

## Prompt

Write a program to calculate the percentage of numbers in a given range that contain the digit 7. Your program should be able to calculate the percentages for the following ranges:

* 0-99
* 0-999
* 0-9999
* 0-99999
* etc.

The program should take a single integer input n that represents the maximum range (exclusive), i.e., the program will calculate the percentage of numbers containing a 7 in the range from 0 to n-1.

You may use any programming language of your choice.  Extra imaginary bonus points for a performant approach that can handle larger and larger ranges efficiently.

## Examples

**Input => Output**
```
10 => 10.00%
100 => 19.00%
```

In the first example, 1/10 numbers (10%) contain a 7 (just the number 7).

In the second example, 19/100 numbers (19%) contain a 7 (10 numbers from 70 to 79, plus 7, 17, 27, 37, 47, 57, 67, ~~77~~, 87, 97). Thus, the output is "19.00%".

Have fun!

7️⃣ 7️⃣ 7️⃣

_[Cover image via Unsplash.](https://unsplash.com/photos/SS7DP_65N4g)_
Lus: Last Unit Standing Trailer
Tags: indiegame, indiegamedev, news, programming
Published: 2023-04-18 15:33:37

Hello everyone! My team and I are starting to develop our first video game project. We'd like to share you our trailer looking forward to your feedback! ❤️ Trailer: https://youtu.be/0CsNhHkUSt0
It's a 2.5D platform game made with Unreal Engine 5.1 , having traditional 2D animations in a photorealistic 3D environment.

If you enjoy our project , you can follow us on social media or in the  project's website: https://lus.ctrlcode.net/
Learning resources - Microsoft Semantic Kernel
Published: 2023-04-18 15:32:02

We are currently in the era of AI, where the Microsoft Semantic Kernel is playing a significant role!

- [Semantic Kernel documentation](https://learn.microsoft.com/en-us/semantic-kernel)

- [Introducing Semantic Kernel: Building AI-Based Apps](https://www.linkedin.com/learning/introducing-semantic-kernel-building-ai-based-apps/)

- [Building Skills with Semantic Kernel](https://www.linkedin.com/learning/building-skills-with-semantic-kernel)
Ethical Considerations in Data Analysis: Avoiding Bias and Discrimination
Published: 2023-04-18 15:21:44

Data analysis is a powerful tool that can uncover important insights and help make data-driven decisions. However, it's essential to consider ethical considerations when conducting data analysis to avoid bias and discrimination.

Bias occurs when a data analyst favours or discriminates against certain groups or individuals. Some ways in which bias can creep into data analysis include sampling bias, confirmation bias, and selection bias.

- Sampling bias occurs when the sample used for analysis is not representative of the larger population. This can lead to inaccurate conclusions about the population as a whole.

- Confirmation bias occurs when a data analyst looks for data that confirms their pre-existing beliefs or assumptions. This can lead to a skewed analysis that ignores important data that contradicts their beliefs.

- Selection bias occurs when the selection of data is biased towards a certain group or individual, leading to inaccurate analysis.

I stumbled upon this not too long ago; It was very enlightening to see how these biases play out when conducting data analysis and how to avoid it. I wrote more about it on my blog [here](https://www.thedejijoseph.com/blog/post/ethics-in-data-analysis-avoiding-bias-discrimination).