teleren/devto huggingface dataset:
Demystifying JavaScript Type Casting and Structured Data Handling
Tags: javascript, beginners
Published: 2024-02-13 18:14:26

JavaScript, with its dynamic and loosely typed nature, provides developers with powerful tools for handling data and manipulating types. In this article, we'll unravel the concepts of type casting, explicit and implicit type conversion, and dive into the realm of structured data handling with various data structures like arrays, maps, sets, and JSON.

**JavaScript Type Casting**

Type casting in JavaScript refers to the process of converting a value from one data type to another. It can be categorized into two types:

1. **Explicit Type Casting**: Also known as type conversion, explicit type casting involves explicitly converting a value from one type to another using built-in functions or operators like Number(), String(), Boolean(), etc.
2. **Implicit Type Casting**: Implicit type casting, also known as type coercion, occurs automatically by the JavaScript engine when performing operations between different data types. This can sometimes lead to unexpected behavior if not handled carefully.

**Structured Data Handling**

JavaScript provides several built-in data structures for organizing and manipulating structured data:

1. **Arrays**: Arrays are indexed collections of elements, where each element is identified by an index. They offer efficient ways to store and access multiple values.
2. **Typed Arrays**: Typed arrays provide a way to work with binary data in a structured manner, allowing efficient manipulation of raw binary data.
3. **Keyed Collections**: Keyed collections like Map and Set provide data structures for storing key-value pairs and unique values, respectively. Map allows any type of key, while Set stores only unique values.
4. **JSON (JavaScript Object Notation)**: JSON is a lightweight data interchange format that is widely used for representing structured data. It is easy to read and write for humans and easy to parse and generate for machines.

Understanding type casting and structured data handling is crucial for building robust and efficient JavaScript applications. By mastering these concepts, developers can write cleaner, more maintainable code and handle complex data structures with ease.

In conclusion, JavaScript's flexible type system and rich set of data structures provide developers with the tools they need to handle diverse data types and structures effectively. Whether you're a beginner or an experienced developer, a solid understanding of type casting and structured data handling will elevate your JavaScript skills and enable you to build more sophisticated applications.
Mastering JavaScript Data Types and Prototypal Inheritance
Tags: javascript, beginners, programming
Published: 2024-02-13 18:13:54

JavaScript, with its dynamic and flexible nature, offers a rich set of data types and powerful inheritance mechanisms. In this article, we'll delve into JavaScript's core data types, explore the typeof operator, understand built-in objects, and unravel the mysteries of prototypal inheritance and the object prototype.

**JavaScript Data Types**

JavaScript has primitive and reference data types. The primitive data types include:
- **string**: Represents textual data enclosed within single or double quotes.
- **undefined**: Represents an uninitialized variable or a function without a return value.
- **number**: Represents numeric data, including integers and floating-point numbers.
- **bigint**: Represents arbitrarily large integers.
- **boolean**: Represents true or false values.
- **null**: Represents the absence of any value.
- **Symbol**: Represents unique identifiers.

Additionally, JavaScript has a single reference data type:
- **Object**: Represents complex data structures and is used to store collections of data.

**The typeof Operator**

The typeof operator is used to determine the data type of a variable or an expression in JavaScript. It returns a string indicating the type of the operand. For example:
- typeof "hello" returns "string".
- typeof 42 returns "number".
- typeof true returns "boolean".
- typeof {} returns "object".

**Built-in Objects**

JavaScript provides several built-in objects that extend its capabilities. These include Math, Date, RegExp, Array, and Function, among others. These objects come with predefined properties and methods that can be used to perform various operations.

**Prototypal Inheritance**

JavaScript uses prototypal inheritance, where objects can inherit properties and methods from other objects. Each object in JavaScript has an internal link to another object called its prototype. When a property or method is accessed on an object, JavaScript first looks for it on the object itself. If it's not found, it looks up the prototype chain until it finds the property or method or reaches the end of the chain.

**Object Prototype**

The Object prototype is the base prototype for all objects in JavaScript. It contains common methods and properties that are inherited by all objects. When a new object is created using object literal notation or the new keyword, it inherits from the Object prototype by default.

Understanding JavaScript's data types and inheritance mechanisms is essential for mastering the language and building robust applications. By leveraging the typeof operator, built-in objects, and prototypal inheritance, developers can create efficient, scalable, and maintainable JavaScript code. Whether you're a beginner or an experienced developer, a solid understanding of these concepts will take your JavaScript skills to new heights.
Sharing Recommended VSCode Settings in Your Project Repository
Tags: vscode, tutorial, productivity
Published: 2024-02-13 18:03:28

Maintaining a consistent development environment in team projects, such as sharing recommended VSCode settings, can significantly improve developer experience.

Recent experience has shown me that committing a `settings.json` file directly may clash with personal preferences. Providing a `settings.json.sample` file, on the other hand, allows team members to quickly adopt project standards while retaining the freedom to customize their environment.

## Step-by-Step Guide

### 1. Create Your Sample Settings File

First, create a `settings.json.sample` file in your project's `.vscode` directory. It serves as a template for the recommended VSCode settings specific to your project and should contain all the recommended settings that you believe will benefit your team. For example:

```json
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }
}
```

> Note to self (author): In the future I qant to add a link to an article explaining my full recommended VSCode `settings.json` for javascript projects, which I plan to publish in the series "My default project setup".

### 2. Add Instructions to Your Documentation

In your `README.md` or contributing guidelines, include a section on setting up the development environment. Here, mention the `settings.json.sample` file and provide instructions for using it:

```markdown
### Copy Recommended VSCode Settings

To align your VSCode settings with the project's recommended configuration:

1. Navigate to the `.vscode` directory at the root of the project.
2. Copy the `settings.json.sample` file and rename the copy to `settings.json`.
3. If desired, customize the `settings.json` with your personal preferences.
```

### 3. Update Your `.gitignore`

To prevent the actual `settings.json` from being committed to the repository, ensure your `.gitignore` file includes the following line:

```
.vscode/*
!.vscode/settings.json.sample
```

This step is crucial to keeping personal or sensitive settings out of the repository.

## Best Practices

- **Commenting**: Include comments in your `settings.json.sample` to explain the purpose and benefit of each setting. This will help team members understand why certain settings are recommended.
- **Regular Updates**: Periodically review and update the sample file to reflect any changes in your development environment or new best practices.
- **Encourage Feedback**: Invite your team to suggest additions or changes to the `settings.json.sample` file. This collaborative approach ensures that the file remains relevant and beneficial to everyone.

## Conclusion

Sharing a `settings.json.sample` file is less intrusive approach to share recommended VSCode settings. But it might be a bit more work to maintain the file compared to just committing `.vscode/settings.json` (What I still prefer for a personal project)

Happy coding!
Processo de Boot no Linux
Tags: linux
Published: 2024-02-13 17:29:54

Compreender os sistemas operacionais com os quais trabalhamos é sempre importante, pois nos capacita a identificar problemas caso ocorram. O Linux não é exceção, e hoje gostaria de explicar em detalhes o processo de boot do Linux. Vamos explorar cada etapa!

1. **Power (Energia)**: Nesta fase, os componentes do sistema recebem energia elétrica para serem alimentados, garantindo o fornecimento necessário para o funcionamento adequado.

2. **Pré-POST e POST**: Durante essa etapa, os componentes de hardware passam por testes para garantir seu correto funcionamento. É fundamental verificar se não há danos no hardware antes de iniciar o sistema operacional, assegurando um ambiente estável.

3. **BIOS**: Após a conclusão dos testes de hardware, o firmware da placa-mãe, conhecido como BIOS (Basic Input/Output System), é iniciado. Ele é armazenado na CMOS (Complementary Metal-Oxide-Semiconductor), que é mantida pela bateria da placa-mãe. A BIOS fornece instruções básicas para o sistema operacional e permite a configuração dos dispositivos.

4. **MBR e UEFI**: Dependendo do método de instalação do sistema, uma ação específica será adotada. O UEFI (Unified Extensible Firmware Interface) é o método mais recente e amplamente utilizado para inicializar o sistema, substituindo o MBR (Master Boot Record). O MBR é a primeira área de 512 bytes do disco rígido, onde o bootloader (como Grub, LILO, SysLinux, etc.) é gravado. O UEFI, por sua vez, não possui limite de tamanho, suporta múltiplos bootloaders e utiliza arquivos no formato .efi.

5. **Grub**: Independentemente da opção escolhida anteriormente, o Grub 2, um bootloader renomado, é carregado. Ele é responsável por carregar o Kernel do Linux posteriormente, permitindo que o sistema operacional seja iniciado com sucesso.

6. **Kernel**: O Kernel é o núcleo do sistema operacional Linux. Nessa fase, ele é carregado na memória, desempenhando um papel crucial para o funcionamento do sistema. Durante esse processo, o Initrd (Initial RAM Disk) é usado como uma ajuda temporária, fornecendo drivers adicionais necessários para a inicialização adequada do sistema.

7. **Initrd**: O Initrd é um sistema de arquivos temporário carregado na memória durante o boot do sistema. Ele contém drivers e módulos essenciais para que o sistema operacional seja inicializado corretamente, fornecendo suporte adicional para o Kernel.

8. **Init**: Por fim, o primeiro processo do sistema, geralmente com PID (Identificador de Processo) 1, é iniciado. O processo de inicialização pode variar entre o init (tradicionalmente utilizado) e o systemd (um init system moderno amplamente adotado). É por meio desse processo que todos os outros processos do sistema são iniciados, estabelecendo as bases para o pleno funcionamento do sistema operacional.

Compreender cada uma dessas etapas do processo de boot do Linux nos permite ter um conhecimento mais aprofundado do sistema operacional e nos capacita a identificar e solucionar possíveis problemas durante a inicialização.
Why Wells Fargo is Good? In 2024
Tags: wells, fargo, bank, financenotify
Published: 2024-02-13 17:28:54

Wells Fargo is a good bank because this bank provides very good digital banking to its customers. And at the same time, you can also waive service charges on almost all accounts.

how to waive monthly charges?

If you make a direct deposit of $500 when you open an account with Wells Fargo, you will not be charged any monthly fee for one month. Read more to Visit Our Official Site - [Finance Updates](www.financenotify.com)
Unlock the power of shared financial success
Published: 2024-02-13 17:22:15

Unlock the power of shared financial success with Visiting Hub Join a community dedicated to building wealth collaboratively, sharing insights, and achieving financial goals as a dynamic duo. Explore strategies, tools, and resources to elevate your net worth alongside like-minded individuals. Together, we navigate the path to financial prosperity. Start your journey with [Visiting Hub](https://visitinghub.com) today.
Hbase backup
Tags: hbase, backup, hbasebackup
Published: 2024-02-13 17:03:36

I have the following issue: I have an hbase database and I want to keep a backup, the entire database each time.
I did it with Export/Import but it burdens the cluster a lot. In the end I used Snapshots but in these I cannot understand which of the two files under /hbase/.hbase-snapshot are the actual data. It takes only seconds to create and restore
Thank you in advance
Web Application Development In 2024 With TechnBrains
Published: 2024-02-13 16:52:37

Explore the latest in [web application development in 2024](https://www.technbrains.com/blog/web-application-development-guide/) with TechnBrains. Gain insights, learn techniques, and find inspiration from the best web application examples to kickstart your journey into building your own web app masterpiece.
Python Decorators
Tags: python, programming, tutorial
Published: 2024-02-13 16:51:35

## What are Python decorators

Python decorators is the text prefixed with a "@" above a function definition.

## What does it look like in code

``` python
@calc_exec_time <-----
def sorting_algorithm():
    return [array.sort()][0]
```

This Python Decorator will time how long it will take to execute the function called `sorting_algorithm()`

## Creating a new decorator

Here is the base layout of a decorator:

``` python
def my_decorator(func):
    def wrapper():
        # decorator functionality goes here

    return wrapper
```

<!-- ### decorator-function

You will need to create a "decorator-function", here called `my_decorator`. This is what you will write above a function definition prefixed with an "@". So in this case: `@my_decorator`.

The decorator function takes a function as a parameter, here `func`. When you add a decorator above a function, Python will automatically use that function for the parameter.

### wrapper-function

Inside of the "decorator-function" you will need a wrapper-function, that will contain the decorators functionality. -->

## Example decorator to calculate execution time

Here you will find a decorator function that will calculate execution time of a function

### Decorator

``` python

import time

def calc_exec_time(func):
    """
    Calculates execution time of a function, by starting a counter before executing the function, and then stopping it after it has finished
    """
    
    def wrapper():
        t1 = time.time()
        func()
        t2 = time.time()
        duration = round(t2 - t1, 5)

        print(f'{func.__name__} took {duration} seconds')

    return wrapper
```

## Usage

``` python
@calc_exec_time
def sorting_algorithm():
    return [array.sort()][0]
```

> Of course your function may be longer than this one, but this is just an example.

## Output

``` bash
sorting_algorithm took 0.21101 seconds
```
Social Media Set up Tables
Published: 2024-02-13 16:51:34

1.users 
-id
-email
-password
-username
-name
-website_url
-avatar_image_url
-bio
-private
-liked_count

2.follow_requests
-id
-created_at
-updated_at
-sender_id (users)
-recipient_id (users)
-status (accepted, rejected, pending) 

 3.posts/photo
-id 
-created_at
-updated_at
-user_id 
-image_url
-caption
-like_count(automatically incs or decs with CRUD)

4.likes-join table (the like to the user)  
-id
-post_id 
-user_id 

5.comments - join table (the comment to the user) 
-id
-created_at
-updated_at
-description
-post_id 
-user_id
Free Books for Flutter Developers
Tags: flutter, book, free
Published: 2024-02-13 16:45:34

---
title: Free Books for Flutter Developers
published: true
description: Some free books for starting learning flutter
tags: flutter, book, free
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-13 16:18 +0000
---

This is a list of books to learn flutter for free: 

###Flutter Succinctly

![Flutter Succinctly](https://i0.wp.com/mteheran.dev/wp-content/uploads/2024/01/image-63.png?w=250&ssl=1)

Flutter is an open-source mobile application development SDK developed by Google with support for both Android and iOS using the same codebase. Written in C, C++, and Dart, and using the Skia Graphics Engine, Flutter also offers a rich set of fully customizable widgets for building native interfaces, including the Material Design library and Cupertino (iOS-flavored) widgets, rich motion APIs, and hot reload. In Flutter Succinctly, Ed Freitas will take you through creating a fully functional app to help you assess whether Flutter is the right choice for your mobile development needs

https://www.syncfusion.com/succinctly-free-ebooks/flutter-succinctly

###Flutter UI Succinctly

![Flutter UI Succinctly](https://i0.wp.com/mteheran.dev/wp-content/uploads/2024/01/image-64.png?w=250&ssl=1)

Flutter made quite the impact when it landed in the cross-platform mobile framework landscape. Developed by Google, open source, targeting iOS and Android, smooth animations and motion, platform awareness, hot reload—the list of highlights goes on and on, demonstrating why Flutter is a worth any mobile developer’s attention. In Flutter UI Succinctly, Ed Freitas explores the essentials of constructing user interfaces with Flutter, showing off how a handful of Flutter’s built-in widgets and tools can serve as a springboard to creating apps with impressive interfaces.

https://www.syncfusion.com/succinctly-free-ebooks/flutter-ui-succinctly

###Flutter Tutorials

![Flutter Tutorials](https://i0.wp.com/mteheran.dev/wp-content/uploads/2024/01/image-65.png)

This tutorial walks through the basics of Flutter framework, installation of Flutter SDK, 
setting up Android Studio to develop Flutter based application, architecture of Flutter
framework and developing all type of mobile applications using Flutter framework.

https://www.tutorialspoint.com/flutter/flutter_tutorial.pdf

###Flutter Libraries We Love

![Flutter Libraries We Love](https://i0.wp.com/mteheran.dev/wp-content/uploads/2024/01/image-66.png)

We focused on 11 different Flutter library categories. After selecting the categories, 
we made a list of libraries under each category and chose the libraries we wanted to 
highlight the most.

https://blog.codemagic.io/flutter-libraries-ebook-by-codemagic/ebook-flutter-libraries-we-love-by-codemagic.pdf
Заказать шары
Published: 2024-02-13 16:35:46

Пришло время праздновать? Закажите шары в нашем интернет-магазине Shariki.shop и создайте невероятно красивый декор! У нас вы найдете шары разных форм и размеров, которые подойдут для любого мероприятия. Мы предлагаем огромный выбор воздушных шаров разных форм и цветов, которые обязательно подчеркнут тематику вашего мероприятия. Доставка по Москве и Московской области позволит вам заказать шары без утомительных поисков. Вы можете [заказать шары](https://shariki.shop/ ) у нас и украсить праздник в своем стиле!
Заказать шары
Published: 2024-02-13 16:34:48

Пришло время праздновать? Закажите шары в нашем интернет-магазине Shariki.shop и создайте невероятно красивый декор! У нас вы найдете шары разных форм и размеров, которые подойдут для любого мероприятия. Мы предлагаем огромный выбор воздушных шаров разных форм и цветов, которые обязательно подчеркнут тематику вашего мероприятия. Доставка по Москве и Московской области позволит вам заказать шары без утомительных поисков. Вы можете [заказать шары](https://shariki.shop/ ) у нас и украсить праздник в своем стиле!
Voting Age Program in Java
Tags: beginners, dsa, java, problemsolviing
Published: 2024-02-13 16:17:22

Basic problem solving using functions/methods in Java. Tried to call a method for reusability and it will enrich the skill of using methods in java.

## **Problem Statement**
So I have to take an age value from user. And check the age value, if the age is greater than or equal to 18 then he is a voter and give his vote. If his age is less than 18, then he is not a voter and can not provide his vote.

## **Solving Approach**
We are going to take an integer input from the user and store it to age variable and pass it to a method. In the method we compare the value with 18. If (age >= 18) then he is a voter. If (0 <= age <18) then he is not a voter.

## **Code
**

```
package FunctionsOrMethods;

import java.util.Scanner;

public class VoterOrNot {
    public static void main(String[] args) {
        System.out.println("Please Enter your age");
        Scanner input = new Scanner(System.in);
        int age = input.nextInt();
        Voter(age);
    }

    private static void Voter(int age) {
        if (age >= 18){
            System.out.println("Cngratualtion you are a voter");
        }
        else {
            System.out.println("Your are not old enough to give vote,.. wait little more");
        }
    }
}
```

## **Output:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aybxaifaao13etji9f2u.png)
Share your dev wishes 👍
Tags: database, development, azure
Published: 2024-02-13 16:04:51

🚨 🚨 🚨 CALLING ALL DEVELOPERS!!! 🚨 🚨 🚨

Are you building applications with Databases? 👍 Help us understand how we can make the Azure SQL Database the best place for your developers 👨‍💻 👩‍💻 to be productive, guaranteeing scalability 📈, performance 🚀 and security 🔒, so that you can grow with peace of mind 😃. Fill out this form here and help to shape the future of Azure SQL as you would like it to be!

https://aka.ms/datadevlist

Thanks to your feedback in the last years we added quite a lot of new stuff the developers *loved*. From the ability to call a REST API right from Azure SQL with the [sp_invoke_external_rest_endpoint](https://learn.microsoft.com/sql/relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint-transact-sql) stored procedure to [Data API builder](https://aka.ms/dab) that takes your database and turn it into a stateless, scalable, REST and GraphQL API, through [JSON improvements](https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2022?view=sql-server-ver16&preserve-view=true#language), [optimized locking](https://learn.microsoft.com/en-us/sql/relational-databases/performance/optimized-locking?view=azuresqldb-current) and more to come this year...so don't miss your chance to shape the future so that it will be as you want it to be!

PS
And of course I could I not mention also the Azure SQL database *[free tier](https://learn.microsoft.com/en-us/azure/azure-sql/database/free-offer?view=azuresql)*? (And free in the sense of totally, completely free, with no time-limits!)