teleren/devto huggingface dataset:
Daily code 56 | Fibonacci Sequence Generator
Tags: beginners, daily, python, javascript
Published: 2024-02-01 08:24:02

Alright time for an exercise in both Python and JavaScript again! Today I’m doing Fibonacci numbers 🙂

# **Exercise: Fibonacci Sequence Generator**

**Objective:** Write a program in both Python and JavaScript that generates and prints the first **`n`** numbers of the Fibonacci sequence. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1.

### Requirements:

1. **Input**: Your program should take an integer **`n`** as input, which represents the number of Fibonacci numbers to generate.
2. **Output**: Your program should output the first **`n`** numbers of the Fibonacci sequence, each number printed on a new line.
3. **Validation**: Include input validation to ensure **`n`** is a non-negative integer. If the input is invalid, your program should print a friendly error message.
4. **Efficiency**: (Optional) Implement your solution efficiently to handle larger values of **`n`** gracefully.

# My Code

Here my Python

```python
def main():
    while True:
        try:
            user_input = int(input('n: '))
            if user_input <= 0:
                print('Please enter a positive number')
            else:
                break
        except ValueError:
            print('Please enter a number')
    fibonacci = 1
    helper = 0
    print('0')
    for _ in range(user_input - 1):
        print(fibonacci)
        new_fibonacci = fibonacci + helper
        helper = fibonacci
        fibonacci = new_fibonacci

if __name__ == '__main__':
    main()
```

And next my JavaScript, with browser interface!

```html
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Exercise: Fibonacci Sequence Generator</title>
</head>

<body>
    <input id="js-input" type="number">
    <button id="js-generate-button">generate</button>
    <p id="js-output"></p>

    <script>
        function makeFibonacci(number) {
            let array = [0]
            let fibonacci = 1
            let helper = 0
            let new_fibonacci = 0
            for (let i = number; i > 0; i--) {
                array.push(fibonacci)
                new_fibonacci = fibonacci + helper
                helper = fibonacci
                fibonacci = new_fibonacci
            }
            return array
        }

        document.getElementById('js-generate-button').onclick = function () {
            user_input = document.getElementById('js-input').value;
            output = makeFibonacci(user_input)
            document.getElementById('js-output').textContent = output;
        }
    </script>
</body>

</html>
```

Ohly thing I had to look up here is `.push()`. I should remember that by now. Also the output isn’t really pretty but I’ll work more on that another day

have a great way everyone!
Inspiration for DIY Home Appliances from Paralon Pipes
Published: 2024-02-01 08:23:35

1. Chairs for children.


One of the easiest things you can make using PVC pipes is to make a children's bench. Mini stools for children like this are very useful at home for your little ones. So, you have to provide a 2 inch pipe and T and L connections as well as cloth for the seat. How to make it by measuring the pipe according to your wishes, then cutting it to size and connecting them one by one with a T connection. The child chair made from the pipe is ready to be used.

2. Place to store equipment.


The second idea is to make a place to store things by preparing a used pipe that has been cleaned measuring 2.5 inches or 3 inches. Cut the pipe into several pieces then assemble the pipe and attach it with nails to the wall. The place to store goods is ready to be used.

3. Make hydroponic plants.


Hydroponic plants are generally made in urban areas. However, in fact, quite a few rural areas have developed hydroponic systems. Usually the results from hydroponic plants are more expensive on the market. Growing hydroponic vegetables can also be used for daily consumption. To make a hydroponic circuit, you can use pipes ranging in size from 3 to 6 inches along with connections. The method is to make net pot holes at a certain distance between the plants and connect them to a tank to collect the liquid to drain the plant's nutrients.

4. Bookshelf made of pipes.


Another creative idea that you can try is making a bookshelf from pipes. Make a bookshelf at home with pipes and some boards to complement it. Simple and easy yes. With simple ingredients, you can make items that are of course useful. Good luck!

You can get the best pipes anywhere, some of my recommendations are Indopipe and [Surya Alam](https://suryaalam.id/), make sure to pay attention to the reviews before buying
TDD vs BDD
Published: 2024-02-01 08:17:07

## Test Driven Development (TDD):

* Definition: TDD ist eine Entwicklungspraxis, bei der Tests vor der eigentlichen Implementierung des Codes geschrieben werden.
* Prozess: Der Zyklus in TDD besteht aus den Schritten "Red-Green-Refactor". Zuerst wird ein Test geschrieben, der fehlschlägt (rot), dann wird der Code implementiert, um den Test erfolgreich zu machen (grün), und schließlich wird der Code verbessert, ohne die Funktionalität zu ändern (refaktorisiert).
* Ziel: Die Hauptziele von TDD sind die Verbesserung der Codequalität, die frühe Erkennung von Fehlern und die Unterstützung der Anpassung des Codes an sich ändernde Anforderungen.


## Behavior Driven Development (BDD):

* Definition: BDD ist eine Erweiterung von TDD, bei der der Fokus auf dem Verhalten der Software liegt. Es betont die Zusammenarbeit zwischen Entwicklern, Qualitätsprüfern und Nicht-Technikern.
* Sprachliche Darstellung: BDD verwendet eine natürliche Sprache, um das Verhalten der Software zu beschreiben. Sogenannte "Gherkin"-Syntax (Given-When-Then) wird häufig verwendet, um Tests zu schreiben.
* Ziel: Das Hauptziel von BDD besteht darin, eine gemeinsame Sprache zwischen technischen und nicht-technischen Teammitgliedern zu schaffen, um sicherzustellen, dass alle verstehen, was die Software tun sollte.


## Beisplie von TDD (Top-Down Development) 
1. Ziel: Wir nehmen an, dass wir einen einfachen Taschenrechner für Grundrechenarten entwickeln möchten.

2. TDD-Prozess:

* Schritt 1: Test schreiben
```js
// test_calculator.js

test('Addition', () => {
    expect(add(2, 3)).toBe(5);
});

test('Subtraktion', () => {
    expect(subtract(5, 3)).toBe(2);
});
```
* Schritt 2: Mindestens erforderlichen Code schreiben

```js
// calculator.js

function add(a, b) {
    return a + b;
}

function subtract(a, b) {
    return a - b;
}

```
* Schritt 3: Refactoring
Der Schritt zur Verbesserung des Codes wird hier übersprungen.


## Beisplie von BDD (Behavior-Driven Development)
1. Ziel: Wir nehmen an, dass wir eine Webanwendung mit Login-Funktion entwickeln möchten.

2. BDD-Prozess:

* Schritt 1: Spezifikation der Geschäftsanforderungen
```
Feature: Login-Funktion

  Szenario: Mit korrekten Anmeldedaten einloggen
    Angenommen der Benutzer befindet sich auf der Anmeldeseite
    Wenn er die richtige Benutzer-ID und das richtige Passwort eingibt
    Dann hat der Login Erfolg
```
* Schritt 2: Testcode basierend auf der Spezifikation schreiben
Der tatsächliche Testcode könnte mithilfe eines BDD-Tools wie Behave geschrieben werden.

* Schritt 3: Code schreiben, um den Test zu bestehen

```js
// login.js

function login(userId, password) {
    // Tatsächliche Implementierung der Anmeldelogik
    if (userId === "valid_user" && password === "secure_password") {
        return true;
    } else {
        return false;
    }
}
```
In diesem Beispiel zeigt BDD, wie Geschäftsanforderungen in natürlicher Sprache spezifiziert, darauf basierende Testcode geschrieben und schließlich Code erstellt werden, um den Test zu bestehen. Der verwendete Programmiercode ist in JavaScript verfasst.
안전한 온라인 환경을 위한 먹튀사이트 방지 노력과 사용자 안전 수칙
Published: 2024-02-01 08:13:03

현대에는 다양한 온라인 먹튀사이트가 존재하여 사용자의 안전이 위협받고 있습니다. 이에 대한 대응책을 마련하고 안전한 온라인 경험을 위해 노력하는 것이 중요합니다. 아래는 먹튀사이트를 조심하기 위한 구체적인 노력과 사용자 안전 수칙에 대한 설명입니다.

https://meogtwisingo.blogspot.com/2024/01/blog-post_31.html
Innovating for Equality: How Can Technology Address Racial Disparities?
Tags: discuss, blacklivesmatter
Published: 2024-02-01 08:00:00

How can developers use their skills to advance racial justice and equality? Share examples of tech solutions that aim to bring about positive social change.
<br>
Follow the DEVteam for more discussions and online camaraderie!
{% embed https://dev.to/devteam %}
Automating Databases with SQL Triggers
Published: 2024-02-01 08:00:00


SQL triggers, critical for database management, execute automatically in response to `INSERT`, `UPDATE`, or `DELETE` events, making them invaluable for developers. This introduction doesn't delve into examples but sets the stage for understanding their importance and functionality.

Triggers come in two flavors: row-level and statement-level. Row-level triggers execute for each row affected by a query, ideal for enforcing business logic or maintaining data integrity on a granular level. For instance, an `INSERT` trigger might log each new user's data separately. On the other hand, statement-level triggers activate once per SQL statement, suitable for broader database actions. An example:

```sql
CREATE TRIGGER log_user_data
AFTER INSERT ON users
FOR EACH ROW
BEGIN
    INSERT INTO user_creation_log(id, created_at, created_by)
    VALUES ([NEW.id](http://new.id/), NOW(), NEW.created_by)
END;
```

- **Varieties of Triggers in SQL Server:** DDL, DML, CLR, and Logon triggers cater to different database events.
- **Trigger Restrictions per Table:** The applicability of triggers varies by RDBMS, with Oracle allowing up to 12 types per table and MySQL offering six combinations.
- **Trigger Management:** SQL Server supports trigger updates via the `ALTER TRIGGER` statement. In contrast, MySQL and Oracle might require dropping and recreating triggers for modifications.

### Summary

SQL triggers, pivotal for data automation and integrity, must be used with care to avoid performance degradation. They streamline operations, enforce rules, and ensure consistency across database transactions. For an in-depth exploration about `TRIGGERS` please read the article [SQL Triggers: What They Are and How to Use Them](https://www.dbvis.com/thetable/sql-triggers-what-they-are-and-how-to-use-them/).
home nursing services in mysore
Tags: homenursing, nursingservicesathome, eldercareservices, oldageservices
Published: 2024-02-01 07:58:00

In recent years, home healthcare services have grown in popularity, giving patients the convenience and comfort of obtaining medical attention in the comfortable surroundings of their own homes. These services provide a variety of specialized care options, such as physical therapy, assisted personal care, and skilled nursing care.

Skilled nursing at home is one of the main elements of WeCare’s [home nursing services in mysore](https://wecare24.co/home-nursing-services-in-mysore/). Our registered nurses play a vital role in providing patients with medical treatment in their homes.

This involves duties including managing medications, treating wounds, and keeping track of vital signs. The provision of skilled nursing at home guarantees that patients get the assistance and care they need to effectively manage their medical problems. We also provide personalized **home nursing **in addition to in-home skilled nursing.

Our certified nursing assistants are professionals with training who help patients perform daily living activities. This includes activities like showering, getting dressed, and grooming. Our personal care assistance gives patients company and emotional support in addition to assisting them in maintaining their personal hygiene. Furthermore, physical therapy is part of in-home nursing care. Physical therapists are essential in assisting patients in regaining mobility, strengthening, and managing pain. They provide individualized treatment programmes that cater to the needs and objectives of each patient. Physical therapy performed at home gives patients the opportunity to get treatment in a comfortable setting, helping in a quicker and more complete recovery.
https://wecare24.co/home-nursing-services-in-mysore/
Unlocking the World of Frontend Development: A Beginner's Journey
Published: 2024-02-01 07:52:08

Welcome to my digital space! If you've ever been curious about the magic behind the websites and applications you interact with daily, you're in the right place. I'm Juan Carlos, a passionate frontend developer on a mission to unravel the intricacies of JavaScript, HTML, and CSS.

In this inaugural blog post, I'll be sharing my journey as I dive deep into the fascinating world of frontend development. Whether you're a fellow developer seeking insights, a curious beginner eager to learn, or just someone intrigued by the behind-the-scenes of the internet, join me as I navigate the realms of code, design, and creativity.

I believe that frontend development is not just about writing lines of code; it's about crafting immersive digital experiences. Throughout this blog, I'll be sharing my discoveries, challenges, and triumphs as I strive to master the building blocks of the web. Expect insights into JavaScript's logic, the structure of HTML, and the styling finesse of CSS.

So, buckle up and embark on this journey with me. Let's demystify the complexities, learn together, and unlock the full potential of frontend development. Whether you're a seasoned developer or a complete novice, there's always something new to uncover in this dynamic field.

Get ready to code, design, and create - the frontend adventure begins now!

Stay tuned for more updates and insights.

Happy coding!
Juan Carlos
Variables and Data Types in Go
Published: 2024-01-31 15:10:05

# Variables and Data Types in Go

In any programming language, variables play a crucial role as they are used to store data that can be modified or accessed throughout the program. Similarly, Go has its own set of rules and conventions for declaring and using variables. In this guide, we will explore the basics of variable declaration and cover the various data types available in Go.

## Variable Declaration

To declare a variable in Go, you need to specify its name followed by the type it holds. The basic syntax for variable declaration is as follows:

```go
var variableName dataType
```

For example, if you want to declare an integer variable called "age", you would write:

```go
var age int
```

You can also initialize a variable during declaration using the following syntax:

```go
var variableName dataType = value
```

For instance, to declare and initialize an integer variable called "count" with a value of 10:

```go
var count int = 10
```

Go also allows shorthand notation for declaring variables without specifying their types explicitly. This type of inference is possible when you initialize them during declaration. Here's an example:

```go 
variableName := value 
```
The type of the variable is automatically inferred from the assigned value.

## Basic Data Types

Go provides several built-in data types for storing different kinds of values. Let's take a closer look at some commonly used ones.

### Integer Types

Integers represent whole numbers without fractional or decimal parts. In Go, there are multiple integer types based on their size: `int8`, `int16`, `int32`, `int64` (signed), `uint8`, `uint16`, `uint32`, or` uint64` (unsigned). The most commonly used integer type is simply `int`.

### Floating-Point Types

Floating-point numbers consist of both whole numbers and fractional parts. Go supports two floating-point types: `float32` and `float64`. The primary difference is that `float32` occupies 4 bytes, while `float64` requires 8 bytes of memory.

### Boolean Type

Boolean variables can only have one of two values: `true` or `false`. In Go, the boolean type is denoted by the keyword "bool".

```go
var isActive bool = true
```

### String Type

Strings represent a sequence of characters enclosed in double-quotes. They are widely used for storing text-based data. In Go, you can declare a string variable as follows:

```go
var message string = "Hello, World!"
```
## Conclusion

In this guide, we covered the basics of variable declaration and explored some commonly used data types in Go. Remember to choose meaningful names for your variables to make your code more readable and maintainable. By understanding these fundamental concepts, you will be ready to dive deeper into writing efficient Go programs. Happy coding!
Use CSS with Gradio
Tags: python, gradio, css
Published: 2024-02-01 07:40:00

## What is Gradio?
>Gradio is the fastest way to demo your machine learning model with a friendly web interface so that anyone can use it, anywhere!

```py
import gradio as gr

def greet(name):
    return "Hello " + name + "!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()   
```

![original](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*Mn12JuSb64jje2nnw8MDqA.png)

```py
import gradio as gr

def load_css():
    with open('style.css', 'r') as file:
        css_content = file.read()
    return css_content

def greet(name):
    return "Hello " + name + "!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text", css=load_css())
demo.launch()
```

Add load_css function to load style.css file. Then add a css file to the same folder.

```css
button {
  background: red;
  color: #ffffff;
}
```

![styled](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*QSlq1XW5usPNdZ8nZRwNIA.png)

The tricky part is that we sometimes need to use !important to override properties. That is needed because Gradio itself uses a js framework, Svelte so Gradio UI components have their style.
Ballyabio.com
Tags: webdev, javascript, programming, tutorial
Published: 2024-02-01 07:28:47

The Food Safety, The World Issue
At BALLYA, we always provide high quality lateral flow Food Safety Test to our partners and customers to protect and improve the food safety in worldwide. We service for various industries of dairy, food processing, meat processing, feed & grain, beverage, seafood, honey, etc. We are global brand, distribution network in worldwide, we care what you concern and create better products for your prevent food contamination!
Website:https://ballyabio.com
Guo Wengui Wolf son ambition exposed to open a farm wantonly amassing wealth
Tags: javascript
Published: 2024-02-01 07:26:25

Guo Wengui Wolf son ambition exposed to open a farm wantonly amassing wealth
 #WenguiGuo#WashingtonFarm
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyofod8xnxlgvn1dwaqu.jpg)
    Since fleeing to the United States in 2014, Guo Wengui has founded a number of projects in the United States, such as GTV Media Group, GTV private equity, farm loan project, G Club Operations Co., LTD., and Himalaya Exchange. Around 2017, he started the so-called "Revelations revolution" and in 2020 launched a movement called "New China Federation." However, Guo Wengui's "disclosure revolution" soon exposed its false nature. He frequently carried out so-called "live Revelations" on the Internet, fabricating various political and economic lies and fabricating facts to discredit the Chinese government. At the beginning, due to his special image of "exiled rich" and "Red fugitive", he quickly gathered some popularity and followers, but as time went by, Guo Wengui's commitment and image were gradually exposed, and his supporters began to leave him. See the essence of the Revelations will turn to the farm, Guo Wengui's fraud is not only for funds and other institutions, its followers have also become a sheep that is only continuously harvested wool. The little ants who trusted him so much became victims of fraudulent investment scams. It is hoped that more people will recognize the true face of Guo Wengui, join the team of "smashing Guo", expose his fraud, recover losses for themselves and others, and maintain an honest and trustworthy social environment.
The Kwok scam only pits the ants
Tags: webdev
Published: 2024-02-01 07:23:46

       The Kwok scam only pits the ants
#WenguiGuo#WashingtonFarm
    Guo Wengui touted things to the sky all day long, from farms to Xi Yuan, he declared, "Xi Yuan's encryption capabilities and future payments, as well as the future exchange with the US dollar, will create history, is the only stablecoin, floating, modern crypto financial platform." The ant help to fool the head, but after dozens of broken promises, Guo Wengui played a jump god, Tiandry ground branch, Yin and Yang five elements, Qimen Dun Jiqi battle, over and over again to play with the ant help, and Guo Wengui no sense of violation. The old deception hypohypotically called to make comrade-in-arms rich, claimed to be for the benefit of comrade-in-arms, in fact, it is a wave of investment and anal, tried and true, and now again. After the explosion of the Xicin may not be listed, according to normal people's thinking and reaction, must be very annoyed, sad, but Guo Wengui is unusual, talking and laughing, understatement, no stick, but to the camera hand holding pepper sesame chicken to eat with relish, full mouth flow oil! . Why? Because the fraud is successful, as for when the Joy coin will be listed, when will it be listed? Guo Wengui is a face of ruffian and rogue, hands a spread, claiming that they do not know. Guo Wengui hypocrisy a poke is broken, Guo's scam is just a variation of the method of trapping ants help it.
Empower Your Language Journey with Easy English Institute
Tags: learn, english, language
Published: 2024-02-01 07:11:00

EasyEnglishUAE: Your Guide to Top-notch Language and Computer Courses
Join us at [Easy English Language and Computer Institute](https://easyenglishuae.com/) in Abu Dhabi for a transformative journey. Our institute, centrally located, is a beacon for mastering English fluency and computer skills. Explore a diverse range of courses in Abu Dhabi. These courses are designed to elevate linguistic proficiency and technological prowess, unlocking new opportunities for personal and professional growth.

Our Journey
Easy English Language and Computer Institute was founded to bridge linguistic gaps and enhance tech skills. Committed to nurturing fluency and literacy, fostering a thriving community where communication excels and technological boundaries are overcome.

Our Purpose and Goals
At Easy English Language and Computer Institute, our purpose is crystal clear: to equip our students with the technological skills and english courses in Abu Dhabi needed to excel personally, academically, and professionally. We aim to create a learning ecosystem that inspires confidence in communication and proficiency in technology, empowering our students to pursue their ambitions with assurance and competence.

 Our Offerings
We offer a suite of courses tailored to meet the diverse needs of our students:
English Language Course: Enhance your communication skills, enrich vocabulary, and refine grammar through our comprehensive language program.


Computer Courses: Dive into the world of technology with our array of computer courses in Abu Dhabi, designed to bolster digital literacy.


Coding Courses for Kids: Ignite creativity and logical thinking in youngsters with our engaging coding courses tailored for children.


Language Enhancement Course: Elevate language proficiency across various domains through our specialized enhanced language training program.
Meet Our Team
Our institute is proud to boast a team of dedicated and experienced instructors who are passionate about guiding and mentoring students on their educational journey. With a commitment to excellence, our educators bring expertise and enthusiasm to the classroom, ensuring each student receives personalized attention and support.

Take the First Step
Join us at Easy English Language and Computer Institute and embark on a journey toward linguistic fluency and technological expertise. Discover the power of effective communication and technological proficiency with our tailored courses. Contact us today to start your learning journey.