teleren/devto huggingface dataset:
HTML input types
Tags: html, attributes, input
Published: 2024-04-10 13:38:23

The HTML input element is a fundamental building block of web forms, allowing users to input various types of data. Below are the most recent definitive HTML input types, along with detailed descriptions of each:

1 - **Text (type="text"):**

```html
<input type="text">
```
- Used for single-line text input.
- Commonly used for names, addresses, and general text input.

2 - **Password (type="password"):**

```html
<input type="password">
```

- Masks input characters to obscure sensitive information.
- Typically used for passwords and other confidential data.

3 - **Number (type="number"):**

```html
<input type="number">
```
- Accepts numeric input.
- Includes controls for incrementing and decrementing values.
- Useful for fields like age, quantity, or any numerical input.

4 - **Search (type="search"):**

```html
<input type="search">
```

- Optimized for search input fields.
- May include built-in search functionalities depending on the browser.

5 - **URL (type="url"):**

```html
<input type="url">
```

- Validates and restricts input to valid URL formats.
- Useful for collecting website URLs or links.

6 - **Email (type="email"):**

```html
<input type="email">
```

- Validates input to ensure it conforms to the email format.
- Displays a warning if the input does not match the expected email pattern.

7 - **Range (type="range"):**

```html
<input type="range">
```

- Renders a slider control for selecting numeric values within a specified range.
- Useful for selecting values like volume, brightness, or any range-based input.

8 - **Checkbox (type="checkbox"):**

```html
<input type="checkbox">
```

- Allows users to select one or more options from a list of choices.
- Each checkbox operates independently and can be toggled on or off.

9 - **Radio (type="radio"):**

```html
<input type="radio">
```

- Presents a list of mutually exclusive options.
- Users can select only one option from the list.

10 - **Time (type="time"):**

```html
<input type="time">
```

 - Enables users to input a time value.
 - May include controls for selecting hours, minutes, and seconds.

11 - **Month (type="month"):**

```html
<input type="month">
```

 - Accepts input in the format "YYYY-MM" for specifying a month and year.
 - Typically used for selecting dates without specifying a specific day.

12 - **Reset (type="reset"):**

```html
<input type="reset">
```

 - Resets form controls to their default values.
 - Often used in conjunction with a submit button to provide users with the option to clear form data.

13 - **Submit (type="submit"):**

```html
<input type="submit">
```

 - Submits form data to the server for processing.
 - Initiates form submission when clicked by the user.

These HTML input types offer a wide range of functionalities, catering to diverse user input requirements in web forms. By leveraging these input types appropriately, developers can enhance the usability, accessibility, and overall user experience of web applications.
TreatWarningsAsErrors and warnaserror are not the same
Tags: dotnet, msbuild, csharp
Published: 2024-04-10 13:30:00

At work, my team recently developed a [custom MSBuild task](https://github.com/gsoft-inc/wl-openapi-msbuild) designed to extract the OpenAPI specification from an ASP.NET Core application during compilation and validate it against [our API design guidelines](https://github.com/gsoft-inc/wl-api-guidelines) with [Spectral](https://docs.stoplight.io/docs/spectral/).

When a Spectral rule is violated, the MSBuild task generates a warning. To ensure developers fix these issues, we planned for these warnings to be treated as errors in their CI pipeline. To achieve this, we relied on the `TreatWarningsAsErrors` property, which is already widely used in our projects.

Surprisingly, we discovered that the build of some projects did not fail despite the presence of warnings related to non-compliance with the OpenAPI specification. Here are the findings of my investigation.

## `TreatWarningsAsErrors` only impacts the C# compiler

Indeed, the [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#treatwarningsaserrors) is clear on this matter:

> `TreatWarningsAsErrors` only impacts the C# compiler, not any other MSBuild tasks in your csproj file. The `warnaserror` command line switch impacts all tasks.

If you want to ensure that there are absolutely no warnings in your build, you must include the `-warnaserror` argument:

```bash
dotnet build -warnaserror
```

## `-warnaserror` can produce output on errors, `TreatWarningsAsErrors` does not

The same documentation states:

> Secondly, the compiler doesn't produce any output on any warnings when `TreatWarningsAsErrors` is used. The compiler produces output when the `warnaserror` command line switch is used.

If you still wish to produce an assembly, despite there being warnings treated as errors, you can set `TreatWarningsAsErrors` to false and use `-warnaserror` instead.

## References

 - [C# Compiler Options to report errors and warnings](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings)
How to install docker-compose 2 for Debian bookworm
Tags: liinux, debian, docker
Published: 2024-04-10 13:28:03

## Summary

I cannot install docker-compose-v2 via apt command for Debian bookworm.

## Solution

Create the package by myself and install it by using some tools.

## Steps

### Install update-golang

```
mkdir -p /usr/local/src/github.com/udhos/update-golang
cd /usr/local/src/github.com/udhos/update-golang
git clone https://github.com/udhos/update-golang .

# Run with non-root user with "sudo"
# - Error happens otherwise
# - Latest version of Go for Debian bookworm was 1.19,
#   but the further steps required Go 1.22.1(?)
#   so that I installed the latest version
RELEASE=1.22.2 sudo ./update-golang.sh
```

### Install "makdeb" command

```
bash -ci "$(wget -qO - 'https://shlink.makedeb.org/install')"
```

### Create the package docker-compose_2 and install it

```
mkdir /usr/local/src/mpr.makedeb.org/docker-compose
cd /usr/local/src/mpr.makedeb.org/docker-compose
git clone https://mpr.makedeb.org/docker-compose .
```

When I was doing this, it tried to install Go 1.19 and its decencies so that I disabled the line:
```
PKGBUILD
======
# makedepends=('golang-go>=1.17')
```

and I installed only the decencies:
```
sudo apt install libpkgconf3 pkg-config pkgconf pkgconf-bin
```

and then created the package:
```
makedeb -si
```

and then installed the package:
```
sudo dpkg -i docker-compose_2.26.1-1_amd64.deb
```

and then confirm if it is installed by running `docker compose` instead of `docker-compose`:
```
$ docker compose version
Docker Compose version v2.26.1
```

## Reference

- [Can I install docker-compose-v2 for Debian?](https://www.perplexity.ai/search/Can-I-install-q7Gx.nvZRPW5jJQapU4xdg)
Build your face recognition android app with 3D passive liveness detection with MiniAiLive
Tags: webdev, android, androiddev, kotlin
Published: 2024-04-10 13:18:21

MiniAiLive published SOTA face recognition android app with 3D passive liveness detection, iBeta level2 top mobile face recognition engine.

https://github.com/MiniAiLive/MiniAI-Face-Recognition-AndroidSDK
https://miniai.live/
10章１
Published: 2024-04-09 23:01:57

このJavaコードは、配列の初期化と例外処理に関する問題です。問題の指示に従って、コメントアウトを加えたバージョンで説明しましょう。

```java
public class Main {
    public static void main(String[] args) {
        try {
            // 空の整数型配列を宣言しています。
            int[] array = {};
            
            // 配列の0番目の要素に10を代入しようとしますが、
            // 配列は空なので、この行でArrayIndexOutOfBoundsExceptionが発生します。
            array[0] = 10; 
            
            // 上の行で例外が発生したので、この行は実行されません。
            System.out.println("finish");
        } catch (ArrayIndexOutOfBoundsException e) {
            // 配列の範囲外アクセスがあったため、このcatchブロックが実行されます。
            // したがって、コンソールには"error"が出力されます。
            System.out.println("error");
        }
    }
}
```

このコードを実行すると、`array[0] = 10;` の行で `ArrayIndexOutOfBoundsException` が発生します。これは、`array` が空の配列で、インデックス0の要素が存在しないためです。したがって、`System.out.println("finish");` の行はスキップされ、「finish」という文字列は出力されません。

`catch` ブロックは `ArrayIndexOutOfBoundsException` を捕捉するためにあります。この例外が発生すると、`catch` ブロック内のコードが実行され、「error」という文字列がコンソールに出力されます。

この説明に基づいて、選択肢B（[error] と表示される）が正しい答えであることが分かります。プログラムは `try` ブロックで例外をスローし、`catch` ブロックでそれを捕捉して、適切なメッセージを表示します。

## 追記

`ArrayIndexOutOfBoundsException e` というコードの `e` は、発生した `ArrayIndexOutOfBoundsException` オブジェクトのインスタンス変数です。例外が発生すると、その詳細がこの `e` オブジェクトに格納されます。プログラマはこの変数を使用して、例外に関する情報（例えば、エラーメッセージやスタックトレース）にアクセスできます。

例外を捕捉する `catch` ブロックでは、この `e` 変数を利用して、エラーの原因や、エラーが発生した時のコンテキストについての詳細を得ることができます。ただし、この特定のコード例では、`e` は使用されていません。もし例外の詳細が必要な場合、`e.printStackTrace();` のようにメソッドを呼び出して例外のスタックトレースを出力することができます。
Seeking Packaging Solutions? Explore JK Paper's Perfect Packaging Options
Tags: packaging, paper, jkpaper
Published: 2024-04-10 13:14:42

Looking for packaging solutions? Check out JK Paper's comprehensive range of options tailored to suit businesses of all sizes. Whether you're a small startup or a large corporation, JK Paper has the perfect **[packaging solution](https://jkpaper.com/category/packaging-board/
)** for you.

Our packaging options are meticulously designed to accommodate products of any size or shape. Choose from a diverse selection of materials, including sturdy cardboard, versatile paperboard, and resilient corrugated boxes, all available through JK Paper. Not only are our solutions durable and eco-friendly, but they're also fully customisable to align with your branding requirements.

At JK Paper, we understand the importance of cost-effectiveness without compromising on quality. That's why our packaging solutions are not only reliable but also budget-friendly, helping you save money in the long run.

From shipping boxes to retail packaging, JK Paper offers a comprehensive range of options to meet your specific needs. Our team of experienced professionals is dedicated to providing personalised assistance to ensure you find the perfect packaging solution for your products.

Don't hesitate any longer. Elevate your packaging game today by exploring JK Paper's extensive range of options and discover the perfect fit for your business needs.
Please Do GitHub Stars for Sota Face Anti Spoof App
Tags: webdev, programming, ai, android
Published: 2024-04-10 13:13:03

https://github.com/MiniAiLive/MiniAI-Face-Recognition-AndroidSDK


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvtt04wg7lpx91ad465k.png)
3 motivos por los que no consigues el trabajo que deseas.
Tags: job, interview, resume
Published: 2024-04-10 13:10:56

Seguramente estás en esa fase en la que aplicas a diferentes ofertas, haces entrevistas personales o incluso en algunas llegas a la entrevista técnica, pero no consigues el trabajo. ¿Por qué?

![Alt Text](https://media.giphy.com/media/l2JhtKtDWYNKdRpoA/giphy.gif?cid=790b7611pspdbr1zpr5j81zatjgzlzqic2wv0nuegclrly43&ep=v1_gifs_search&rid=giphy.gif&ct=g)



1️⃣ **No tienes un plan establecido**. Seguramente estás entrando en LinkedIn y enviando solicitudes a lo loco en todas las ofertas que encuentras. 

- ¿Sabes dónde buscar las ofertas? 
- ¿Llevas un registro?
- ¿Tienes tu CV optimizado y lo adaptas a cada oferta a la que aplicas?

2️⃣ **No juegas con las mismas reglas que las personas que te entrevistan**. 

- ¿Está optimizado tu perfil de LinkedIn y GitHub?
- ¿Te preparas para responder a las preguntas más comunes en las entrevistas y para hacer las preguntas pertinentes tú mismo?
- ¿Sabes cómo contar tu historia al entrevistador?

3️⃣ **No sabes sacar todo tu potencial**. 

- ¿Te has preparado para afrontar los retos que se te presenten, ya sea en live coding o en una prueba que te manden a hacer en una semana?

- ¿Cuáles son los puntos débiles que tiene la empresa y cómo mostrarás que puedes solucionarlos en tu prueba técnica?

- ¿Has destacado adecuadamente tus puntos fuertes?

¡Recuerda! Puedes seguirme en Instagram 📸 [victoramondev](https://www.instagram.com/victoramondev/), donde comparto consejos diarios para encontrar el trabajo que deseas como desarrollador. ¡Espero verte allí!
Top-Trending LLMs Over the Last Week. Week #15.
Published: 2024-04-09 14:38:29

Excited to share this week's spotlight on [standout LLMs](https://llm.extractum.io/static/blog/?id=top-trending-llms-week-15) within the AI sphere! We've picked these models based on their popularity, evidenced by downloads and likes on Hugging Face and LLM Explorer:

- Leading the pack is C4AI Command R+ by CohereForAI, with nearly 90,000 downloads. It's way ahead of the curve! 🔥

- JetMoE 8B by Jetmoe is next, tempting users with its performance rivaling LLaMA2 for just under $0.1 million. 😄

- Not to be overlooked, Qwen introduces not one but three remarkable LLMs.
Highlighting diversity, we have entries from Turkey 🇹🇷 and Poland 🇵🇱 making waves.

- Google's Gemma 1.1 7B (IT) also makes the list, showcasing Google's continued innovation.

- Additionally, we're spotlighting a new project by Maxime Labonne, a prominent AI and ML researcher and contributor.

For detailed insights and more on these groundbreaking LLMs, head to our [blog](https://llm.extractum.io/static/blog/?id=top-trending-llms-week-15). Stay connected for next week's update! 😉
It's never too late to
Tags: productivity, newbie, tips, discuss
Published: 2024-04-10 13:07:05

1. To figure out who you are 🤔
2. To **Learn**, **Unlearn** and **Relearn** 🔁
3. To set boundaries 🙅‍♂️
4. To change your mind 🏃
5. To be a better **YOU** ❣️
6. To accomplish your goals 🎯
7. To find LOVE 🥰
8. To choose your own path 🛣️



_Thanks for reading :)
Feel free to comment and like the post if you found it helpful
Follow for more 🤝 && Happy Coding 🚀_

If you enjoy my content, support me by following me on my other socials:
https://linktr.ee/tanujav7
Revolutionizing the Retail Industry with Dynamics 365 Retail
Tags: dynamics365retail, d365retail, retailcrmsoftware, crmforretail
Published: 2024-04-10 13:05:36



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckyoz3y4wev4f0s891vd.jpg)
In the ever-evolving landscape of retail, staying ahead requires embracing transformative technologies that redefine traditional approaches. [Microsoft Dynamics 365 for Retail](https://dynamics365retail.com/) stands at the forefront of this revolution, offering a comprehensive solution tailored to meet the unique needs of the industry. 

**1. Unified Retail Management:**
Dynamics 365 for Retail provides a unified platform that integrates key aspects of retail management, including sales, inventory, customer service, and marketing. This consolidation enables retailers to streamline operations, break down silos, and achieve greater efficiency.

**2. Personalized Customer Experiences:**
At the heart of Dynamics 365 for Retail is the ability to deliver personalized customer experiences. By leveraging data from various touchpoints, retailers can gain insights into customer preferences and behavior, allowing them to tailor offerings and promotions to individual needs.

**3. Omnichannel Excellence:**
With Dynamics 365 for Retail, retailers can offer a seamless shopping experience across multiple channels, including online, in-store, and mobile. This omnichannel integration ensures consistency in pricing, promotions, and inventory availability, regardless of the channel.

**4. Advanced Analytics and Insights:**
Dynamics 365 for Retail empowers retailers with advanced analytics and insights, enabling data-driven decision-making. From sales performance to customer behavior, retailers can leverage actionable insights to drive growth and profitability.

**5. Agility and Scalability:**
As businesses evolve, Dynamics 365 for Retail offers agility and scalability to adapt to changing needs. Whether it's expanding into new markets or launching innovative initiatives, Dynamics 365 provides the flexibility to grow and thrive.

**6. Integration with Microsoft Ecosystem:**
As part of the Microsoft ecosystem, Dynamics 365 seamlessly integrates with other Microsoft products such as Office 365 and Power BI. This integration enables retailers to leverage additional functionalities and enhance their capabilities further.

**Conclusion:**

> [Dynamics 365 for Retail ](https://dynamics365retail.com/)is transforming the retail industry by offering a unified platform, personalized customer experiences, omnichannel excellence, advanced analytics, agility, scalability, and seamless integration with the Microsoft ecosystem. Retailers leveraging Dynamics 365 can unlock new growth opportunities, drive innovation, and stay ahead in today's competitive market.
How to fix the dreaded 'package appears to be invalid' error while installing Android APKs
Tags: android, java, kotlin
Published: 2024-04-10 13:04:34

When you try to manually install an Android APK on your phone, you are typically stuck with an error similar to this:

![android package error](https://prahladyeri.github.io/uploads/android-package-error.jpg?t=1)

Stack Overflow is filled with posts like [this](https://stackoverflow.com/q/77749878/849365), [this](https://stackoverflow.com/q/46973058/849365) and [this one](https://stackoverflow.com/q/76145397/849365) but apparently, there seems to be no consensus regarding the cause or even a generally accepted fix for this problem.

The very obvious thing to first do is clean the project and rebuild the APK in Android Studio. Many answers suggest this and if it works for you then well and good. But if rebuilding the APK doesn't resolve this problem, there are three other solutions you can try based on my practical experience with Android development so far:

1. If you are signing the final APK with a key, it could be an issue depending on how you sign. Some older android versions may not support the newer V2 signature format, so it's recommended to sign your APK using [both V1 and V2 formats](https://stackoverflow.com/a/46973194/849365).
2. I found another solution from [this post](https://android.stackexchange.com/q/252577/38760) and it often works in many situations. What values you've set in the `minSdkVersion` and `targetSdkVersion` properties are often the culprit here due to the way android works. Apparently, [some newer versions don't like APKs which support versions lower than 6.0 or M](https://www.xda-developers.com/android-14-block-outdated-apps/)! In my case, I had kept `minSdkVersion` to 4.4 (KitKat) and once I changed it to 6.0 (Marshmallow), this package error mysteriously disappeared! If your user base consists of older android versions, you'll have to release multiple APKs to cater to that segment.
3. Apparently, another way this error goes away is by setting the `exported` attribute for your main Activity in the `AndroidManifest.xml` like below:

```xml
<activity android:name=".LoginActivity"
	android:exported="true"
	>
	<intent-filter>
		<action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.LAUNCHER" />
	</intent-filter>

</activity>
```

Please let me know whether this resolves your APK package error through the linked forums. Also let me know if you know some other way to fix this error.
Ibuprofeno.py💊| #76: Explica este código Python
Tags: python, spanish, programming, beginners
Published: 2024-04-10 13:00:00

## **<center>Explica este código Python</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark></center>

```py
numeros = list(range(2, 16, 3))
del numeros[-1]
numeros.remove(2)
print(numeros)
```

👉 **A.** `[5, 8, 11, 14]`
👉 **B.** `[5, 8, 11]`
👉 **C.** `[2, 5, 8, 11]`
👉 **D.** `[5, 8, 11, 14]`

---

{% details **Respuesta:** %} 

👉 **B.** `[5, 8, 11]`

En Python podemos borrar items de una lista por índice o por valor.
Al hacer `del numeros[-1]` eliminamos por índice el último item de la lista `numeros`.
Al hacer `numeros.remove(2)` eliminamos el item con el valor de `2` de la lista `numeros`; si es que hubiera items repetidos este solo elimina el primero que coincida. 

{% enddetails %}
JS Bites: Chapter 2 - Async Made Easy with Promises
Tags: javascript, webdev, programming, tutorial
Published: 2024-04-10 12:59:00

**Promises**
To overcome the issue of Callback Hell, we use Promises. In Promises, there are two main actors: the "Promise Maker" and the "Promise Receiver."

**Promise Maker**
The Promise Maker is the one who creates and returns the promise. It initiates an action that will eventually complete, either successfully or with an error.

Example:
```js
function makePromise() {
    return new Promise();
}

```

**Promise Receiver**
The Promise Receiver is the one who receives the promise from the Maker and performs actions based on its outcome.

Example:

```js
let promise = makePromise();

```
When a Promise is initially created, it enters the "pending" state. Then, it can either be fulfilled (completed) or rejected (encounters an error).


**Creating and Handling Promises**

```js
function isOdd(number) {
    return new Promise((resolve, reject) => {
        if (number % 2 !== 0) {
            resolve(true);  // Resolve if the number is odd
        } else {
            reject(false);  // Reject if the number is even
        }
    });
}

const promise = isOdd(4)
    .then((result) => console.log(result))  // Handling fulfillment
    .catch((error) => console.log(error));  // Handling rejection

```

**Chaining Promises**
Promises can be chained together, allowing for sequential execution of asynchronous operations. This is achieved by returning a Promise from within a .then() or .catch() block.

Example:

```js
function asyncTask() {
    return new Promise((resolve, reject) => {
        // Asynchronous task
        resolve('Data from async task');
    });
}

asyncTask()
    .then((data) => {
        console.log(data);
        return anotherAsyncTask();  // Return another Promise
    })
    .then((result) => {
        console.log(result);
    })
    .catch((error) => {
        console.error(error);
    });

```

**Reject and .catch()**
These are used to handle errors that occur during the execution of a Promise. If a Promise encounters an error, it gets rejected, and .catch() is used to handle that error.

Example:

```js
const promise = isOdd(4)
    .catch((error) => console.log(error));  // Handling rejection

```

**Finally()**
The finally() method is used to execute code after the Promise is settled, regardless of whether it was fulfilled or rejected. It's commonly used for cleanup tasks.

```js
const promise = isOdd(4)
    .then((result) => console.log(result))
    .catch((error) => console.log(error))
    .finally(() => console.log("Promise execution completed"));  // Executes regardless of fulfillment or rejection

```


See you in the next chapter...
DevSecOps
Tags: devsecops, security
Published: 2024-04-10 12:48:56

**What is?** 

DevSecOps is a practice with a focus on automation, testing, and security verifications within the DevOps flow. It's a methodology comprising methods, techniques, and processes to connect development, security, and operations throughout all stages of DevOps: Plan, Code, Build, Test, Release, Deploy, Operate, and Monitor.

---

**Where to learn!**
[TryHackMe :: Intro to Pipeline Automation](https://tryhackme.com/room/introtopipelineautomation)

---


**Usefull links**

- [Github :: Ultimate DevSecOps Library by sottlmarek](https://github.com/sottlmarek/DevSecOps)
- [Github :: DevSecOps Roadmap by hahwul](https://github.com/hahwul/DevSecOps)