teleren/devto huggingface dataset:
Continue
Tags: java, continue
Published: 2024-07-16 17:12:49

**Use continue**

- A instrução continue permite forçar a próxima iteração de um laço, ignorando o código restante dentro do bloco do laço.

- Ela é usada para antecipar uma iteração sem executar o código restante dentro do laço.

- continue é o complemento de break, que permite sair prematuramente de um laço.

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

- Este programa usa continue para exibir apenas os números pares entre 0 e 100.

- No programa, apenas números pares são exibidos devido ao uso de continue.

- Um número ímpar faria com que o laço iterasse prematuramente, ignorando a chamada para println().

- Em laços while e do-while, continue faz o controle ir diretamente para a expressão condicional e continua a execução do laço.

- No caso de for, a expressão de iteração do laço é avaliada após o continue, a expressão condicional é verificada, e o laço continua.

- Assim como break, continue pode especificar um rótulo para indicar qual laço externo deve continuar a execução.

Exemplo programa que usa continue com um rótulo:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nlhns0o8pnbijjmu7ok1.png)

Saída:
 Outer loop pass 1, Inner loop: 1234
 Outer loop pass 2, Inner loop: 1234
 Outer loop pass 3, Inner loop: 1234
 Outer loop pass 4, Inner loop: 1234
 Outer loop pass 5, Inner loop: 1234
 Outer loop pass 6, Inner loop: 1234
 Outer loop pass 7, Inner loop: 1234
 Outer loop pass 8, Inner loop: 1234
 Outer loop pass 9, Inner loop: 1234

- Quando continue é executado, o controle passa para o laço externo, ignorando o restante do laço interno.

- Bons usos para continue são raros devido à ampla variedade de instruções de laço que Java oferece, que geralmente atendem às necessidades de iteração.

- No entanto, para situações específicas que requerem iteração antecipada, continue oferece uma forma estruturada de alcançar esse comportamento.
Tente Isto 3-3: Termine o sistema de ajuda Java
Tags: java
Published: 2024-07-16 17:25:59

Essa versão adiciona a sintaxe de break e continue. 
Também permite que o usuário solicite a sintaxe de mais de uma instrução. Ela faz isso adicionando um laço externo que é executado até o usuário inserir q como seleção no menu.

1. Copie Help2.java em um novo arquivo chamado Help3.java

2. Inclua todo o código do programa em um laço for infinito. Saia desse laço, usando break, quando uma letra q for inserida. Já que o laço engloba todo o código do programa, sair dele faz o programa terminar.

3. Altere o laço do menu como mostrado aqui:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qk8mnvbuuljx0mwbtyjw.png)

Observe que agora esse laço inclui as instruções break e continue. Ele também aceita a letra q como opção válida.

4. Expanda a instrução switch para incluir as instruções break e continue, como mostrado abaixo:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zrkyooa2ub7yesey1ytb.png)
Odoo : Patch a Javascript class
Tags: odoo
Published: 2024-07-16 14:08:19

**Enhancing Calendar Filters in Odoo with Custom Patching**
In the realm of enterprise resource planning (ERP) systems, Odoo stands out with its robust and flexible framework. One of its key strengths is the ability to extend and customize its modules. This article delves into a practical example of customizing the Calendar model in Odoo's JavaScript framework by patching it to introduce enhanced filter functionalities.

**Overview**
The provided code showcases how to patch the CalendarModel in Odoo to add custom filtering capabilities. This customization is achieved by leveraging Odoo's patch utility, which allows developers to augment existing functionalities without altering the core code.

**The Patch Implementation**
The patch extends the loadFilterSection method of the CalendarModel class. This method is responsible for loading filter sections in the calendar view. Let's break down the key components of this patch.

**Importing Necessary Modules**

```
import { CalendarModel } from "@web/views/calendar/calendar_model";
import { patch } from 'web.utils';
import { _t } from 'web.core';

```
Here, we import the CalendarModel class, the patch utility, and the translation function _t from Odoo's core modules. These imports are essential for extending the model and ensuring the patch integrates seamlessly with the existing framework.

**Extending the loadFilterSection Method**
The core of the patch lies in the extension of the loadFilterSection method:

```
patch(CalendarModel.prototype, 'custom_module_calendar_filters', {
    async loadFilterSection(fieldName, filterInfo, previousSection) {
        // Implementation details...
    }
});

```
This snippet uses the patch function to modify the prototype of CalendarModel, effectively injecting our custom logic into the loadFilterSection method.

**Conclusion**
By patching the CalendarModel in Odoo, developers can introduce custom filtering logic that enhances the user experience and meets specific business requirements. This approach exemplifies the flexibility and extensibility of Odoo's framework, enabling tailored solutions without modifying core components.
Laços aninhados
Tags: java, loop
Published: 2024-07-16 17:29:53

**Laços aninhados**

- Os laços aninhados são comuns em programação para resolver uma variedade de problemas.

- São uma parte essencial da programação, permitindo lidar com estruturas complexas de repetição.

Exemplo para encontrar os fatores dos números de 2 a 100:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpdsxm4aahryynlapssm.png)

Saída:
 Factors of 2:
 Factors of 3:
 Factors of 4: 2
 Factors of 5:
 Factors of 6: 2 3
 Factors of 7:
 Factors of 8: 2 4
 Factors of 9: 3
 Factors of 10: 2 5
 Factors of 11:
 Factors of 12: 2 3 4 6
 Factors of 13:
 Factors of 14: 2 7
 Factors of 15: 3 5
 Factors of 16: 2 4 8
 Factors of 17:
 Factors of 18: 2 3 6 9
 Factors of 19:
 Factors of 20: 2 4 5 10

-  O laço interno testa sucessivamente todos os números de 2 a i, exibindo aqueles cuja divisão por i é exata.
How to build a full stack blog application using NodeJS MongoDB ExpressJS
Tags: node, mongodb, webdev, tutorial
Published: 2024-07-16 14:09:46

{% youtube hogRfOa4yg8 %}

Welcome to our comprehensive tutorial on building a full-featured full-stack Blog application from scratch! In this video, we'll guide you through every step of the process, using a powerful tech stack that includes HTML, CSS, JavaScript, Node.js, MongoDB, and EJS. Whether you're a beginner or an experienced developer looking to expand your skills, this video is for you!

🔧 Technologies Used:
HTML: Structuring the web pages
CSS: Styling the application
JavaScript: Adding dynamic behavior
Node.js: Server-side scripting
Express.js: Building the server and handling routes
MongoDB: Database management
EJS: Templating engine for dynamic content

📁 Resources:
- Starter file: https://drive.google.com/file/d/1co4JNUusDpXVnP7J1TqiCYIY0RROj5EY/view?usp=drive_link
- Source code: https://www.patreon.com/posts/inktale-blog-108242178?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link
- NodeJS: https://nodejs.org/en
- ExpressJS: https://expressjs.com/
- MongoDB: https://www.mongodb.com/
- EJS: https://ejs.co/

🔗 Chapters:
0:00 - Intro
2:48 - Project overview
16:45 - Project initial
20:44 - Register
2:09:48 - Login
2:24:28 - Setup user session
2:32:31 - Home
3:25:42 - Create blog
4:24:17 - Cloudinary setup
4:30:41 - Create blog
4:49:00 - Render blog in home
5:38:33 - Blog detail
6:12:41 - Render content in markdown
6:18:10 - Code hightlighter
6:20:30 - Blog detail
6:38:00 - Implement blog reaction
7:04:54 - Implement add to reading list
7:37:05 - Reading list
7:46:15 - Update blog
8:16:41 - Profile
8:38:14 - 404 page
8:43:29 - Dashboard
9:15:16 - Delete blog
9:34:39 - Blog visit count
9:46:05 - Settings / Update user info
11:18:01 - Responsive
11:36:23 - Test all features
What is file-level restore (FLR)? | Understanding File-Level Restore (FLR): Simple Explanation by Examples | Backup Tips
Tags: flr, backup, restore
Published: 2024-07-16 14:13:44


File-Level Restore (FLR) is a feature that lets you restore specific files or folders from a backup without having to restore the entire system. This can save a lot of time and make the recovery process much easier.

## What is File-Level Restore (FLR)?

FLR allows you to recover just the files you need, like a single document or folder, instead of restoring everything from a backup. It's a bit like having a magic rewind button for your files.

### Why is FLR Important?

- **Precision**: Only recover the files you need.
- **Speed**: Quickly get back important files without waiting for a full system restore.
- **Convenience**: Restore files to their original location or somewhere else if needed.
- **Control**: Recover older versions of files that might have been changed or deleted.

## Simple Examples of FLR

### Example 1: Accidental Deletion

**Scenario**: You accidentally delete a report you’ve been working on.

**Solution**: Using FLR, you can go into your backup, find the report, and restore just that file back to your computer.

### Example 2: File Corruption

**Scenario**: A project file gets corrupted and won’t open.

**Solution**: With FLR, you can find an uncorrupted version of the file from your backup and restore it, so you can continue working without losing time.

### Example 3: Ransomware Attack

**Scenario**: A virus encrypts your files, making them unusable.

**Solution**: FLR allows you to restore only the files affected by the virus from a backup taken before the attack, so you don't have to restore everything.

### Example 4: Recovering Older Versions

**Scenario**: You save an important document by mistake.

**Solution**: FLR lets you go back to a previous version of the document from your backup and restore it, so you can recover the information you lost.

## HYCU’s Support for File-Level Restore

HYCU, a company that provides backup and recovery solutions, supports File-Level Restore. This means with HYCU, you can easily restore specific files or folders from your backups.

### Want to Know More?

To learn more about how HYCU can help with your data recovery needs, visit the [HYCU Contact Page](https://www.hycu.com/contact/) and talk to their experts. They can help you set up a backup and recovery system that works for your business.

---

Best,
Kemal Cholovich
Teste do Capítulo 3
Tags: java, testecap3
Published: 2024-07-16 17:30:08

(respostas na página 607 - 627 do pdf)

1. Escreva um programa que leia caracteres do teclado até um ponto ser recebido. Faça-o contar o número de espaços. Relate o total no fim do programa.

2. Mostre a forma geral da escada if-else-if.

3.  Dado o código abaixo,  a que if o último else está associado?
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7f1oo94av4tk0xvqkzke.png)

4. Mostre a instrução for de um laço que conte de 1000 a 0 em intervalos de -2.

5. O fragmento a seguir é válido?
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t82rqox5qq6w5ar1vq5w.png)

6. Explique o que break faz. Certifique-se de explicar suas duas formas.

7. No fragmento a seguir, após a instrução break ser executada, o que é exibido?

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

8- O que o fragmento abaixo exibe?
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnl4pp9e0iwshmzutcsk.png)

9- Nem sempre a expressão de iteração de um laço for necessita alterar a variável de controle de laço segundo um valor fixo. Em vez disso, a variável de controle pode mudar de alguma maneira arbitrária. Usando esse conceito, escreva um programa que use um laço for para gerar e exibir a progressão 1, 2, 4, 8, 16, 32, 
e assim por diante.

10- As letras minúsculas ASCII ficam separadas das maiúsculas por um intervalo igual a 32. Logo, para converter uma letra minúscula em maiúscula, temos de subtrair 32 dela. Use essa informação para escrever um programa que leia caracteres do teclado. Ele deve converter todas as letras minúsculas em maiúsculas e todas as letras maiúsculas em minúsculas, exibindo o resultado. Não faça 
alterações em nenhum outro caractere. O programa será encerrado quando o usuário inserir um ponto. No fim, ele deve exibir quantas alterações ocorreram na caixa das letras.

11- O que é um laço infinito?

12- No uso de break com um rótulo, este deve estar em um bloco que contenha break?
IUC TECH
Published: 2024-07-16 14:18:12

[IUC TECH](https://www.google.com/url?q=https://www.iuctech.com/)
[WEBSITE DESIGN](https://www.google.com/url?q=https://www.iuctech.com/service.php)
[DOMAIN MAINTENANCE](https://www.google.com/url?q=https://www.iuctech.com/service.php).
[SOFTWARE APPLICATION](https://www.google.com/url?q=https://www.iuctech.com/service.php).
[IUC Technology](https://www.google.com/url?q=https://www.iuctech.com/) revolutionizes the way we interact with data, offering seamless integration, unparalleled security, and unparalleled performance, empowering businesses to thrive in the digital age."
Clean Up Your node_modules with npKill 🧹✨
Tags: webdev, javascript, tutorial, productivity
Published: 2024-07-16 14:22:45

**What is npKill?** 🚀
npKill is a fantastic tool designed to help you find and remove old and heavy node_modules folders from your system. If you're like most developers, your projects can accumulate a lot of unnecessary files, and npKill can help you declutter and free up valuable space.


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


**Why Use npKill?** 🤔
As developers, we often jump between various projects, and each one has its own node_modules folder. Over time, these can take up significant space on your hard drive. Here’s how npKill can make your life easier:

- Clear Space: Easily identify and remove old node_modules directories that are no longer needed.
- Workspace Usage: Check when you last modified files in a workspace with the last_mod column.
- Fast Performance: Written in TypeScript with low-level searches for optimal performance.
- User-Friendly: No complicated commands—just list your node_modules and press Del to remove them.
- Minimal Dependencies: Lightweight and efficient.

**Features at a Glance** 🌟
- Easily Clear Space: Remove those bulky node_modules folders with a simple command.
- Last Workspace Usage: See the last time you modified a file in each workspace.
- High Speed: Enjoy quick searches and deletions, thanks to low-level performance optimizations.
- Ease of Use: Navigate and delete folders with simple key commands.
- Minimal Dependencies: Keep your system lean with a lightweight tool.

**How to Install npKill** 📦
You don’t need to install npKill to use it! Simply run:

```
bash
Copy code
$ npx npkill
```

But if you prefer to install it globally:

```
bash
Copy code
$ npm i -g npkill
# Unix users may need to run the command with sudo.
```

_Note: NPKILL does not support node versions less than 14. For older versions, use npkill@0.8.3._

**How to Use npKill** 🛠️
Using npKill is straightforward:

```
bash
Copy code
$ npx npkill
# Or just npkill if installed globally
```

By default, npKill will start scanning for node_modules directories from the path where the command is executed. You can navigate the list with the ↓ and ↑ keys, and delete a folder by pressing Space or Del. Open the directory with o, and exit with Q or Ctrl + c.

**Important Reminder** ⚠️
Some applications require their node_modules directory to function correctly. npKill will highlight these with a ⚠️ symbol to remind you to proceed with caution.

**Conclusion** 🎉
npKill is an indispensable tool for any developer looking to maintain a clean and efficient workspace. Give it a try and see how much space you can reclaim!

Happy coding! 👨‍💻👩‍💻

For more details, visit the [npKill page on npm](https://www.npmjs.com/package/npkill).
Let's make a Calculator using Py.
Tags: programming, python, calculator
Published: 2024-07-16 14:48:42

Before we actually make a calculator, let's first see some basic mathematical expressions...

**_1. Add_**

```
num1 = 2
num2 = 3
print(num1+num2) 

5

```

**_2. Subtract_**

```
num1 = 7
num2 = 5
print(num1-num2)

2

```

**_3. Multiply_**

```
num1 = 5
num2 = 5
print(num1*num2)

25

```

**_4. Divide_**

```
num1 = 100
num2 = 5
print(num1/num2)

20

```

**_5. Modulus_** (nothing but remainder)

```
quotient = 5//2
remainder = 5 % 2
print(quotient , "," ,remainder)

2 , 1

```

**_6.Exponentiate_** (powers)

For ex; a power b in python written as a**b 

```
num1 = 3
num2 = 3
print(num1**num2)

27

```

---


**_Input Datatype and Typecasting_**

```
# Addition

num1 = int(input("Enter Number 1 : "))
num2 = int(input("Enter Number 2 : "))

result = num1+num2
print("Result is : ", result)

Enter Number 1 : 1
Enter Number 2 : 4
Result is :  5

```
Here it appears as steps but I'm unable to present it.
You can just do it and see.

```
# to make it possible in decimals too we use float

num1 = float(input("Enter Number 1 : "))
num2 = float(input("Enter Number 2 : "))

result = num1+num2
print("Result is : ", result) 

Enter Number 1 : 1.5
Enter Number 2 : 2.5
Result is :  4.0

```

Similarly, we do for other operations.

Now, with this knowledge we gonna create a simple calculator by using the following code;

```
print("Simple Calculator")
print("Select Operation : ")
print("1. Add")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
print("5. Modulus")
print("6. Exponentiate")

choice = input("Enter choice (1/2/3/4/5/6) : ")
num1 = float(input("Enter first  Number : "))
num2 = float(input("Enter second Number : "))

if choice == "1" :
   result = num1 + num2
   print(result)
elif choice == "2" :
   result = num1 - num2
   print(result)
elif choice == "3" :
   result = num1 * num2
   print(result)
elif choice == "4" :
   result = num1 / num2
   print(result)
elif choice == "5" :
   result = num1 % num2
   print(result)
elif choice == "6" :
   result = num1 ** num2
   print(result)
else :
   print("option not available")

```

So, that's what I learned under this topic.
You can use the same code above and chk whether it works for you too..


Platforms I use to try these codes : 

- W3 Schools Tryit Editor
- Google Colaboratory
- Visual Studio Code


.....
Manifest.json
Tags: javascript, webdev, pwa, beginners
Published: 2024-07-16 14:23:40

Manifest.json is necessary for Progressive Web Applications.

```
{
    "background_color": "#fff",
    "display": "standalone",
    "description": "Awesome application portal to Healing Services",
    "icons": [
        { "src": "192.png", "sizes": "192x192", "type": "image/png" },
        { "src": "512.png", "sizes": "512x512", "type": "image/png" }
    ],
    "name": "Holy Spirit Healing Services",
    "short_name": "The Holy Spirit",
    "start_url": "./healingservices.html"
}
```
Plang programming language Basic understanding and code example
Tags: learning, beginners, tutorial
Published: 2024-07-16 14:25:47

> This article explores Plang, an intent-based programming language designed to interpret natural language. For more information, visit [plang.is](https://plang.is)

I have added some simple Plang lessons to get you started and to give you an understanding of Plang:

- [Lesson 1: What is Plang & Setting Up Your Environment](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%201.md)
- [Lesson 2: Basic Concepts in Plang](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%202.md)
- [Lesson 3: Let's Create an App](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%203.md)
- [Lesson 4: How Does The Builder Work?](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%204.md)
- [Lesson 5: Errors, Retry, Caching and Events](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%205.md)
- [Next Steps](https://github.com/PLangHQ/plang/blob/main/Documentation/blogs/Lesson%206.md)

What do you think? What can be improved? What is missing?

Come to the [Plang Discord channel](https://discord.gg/A8kYUymsDD) for discussion or to the [Github discussion forum](https://github.com/orgs/PLangHQ/discussions/43). I am there waiting for you.
Creation of the main page for the educational institution
Tags: css, webdev, html, beginners
Published: 2024-07-16 14:25:50

Hello everybody! I am developing a website for an educational institution. I was very inspired by this ![design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nv0w7b7p2uz90jh1uauh.png) and want to reproduce it completely for educational purposes. I faced the problem of how to correctly add images, so that the page was responsive and the images were always linked to the text.
You can see what I got ![(my design)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apketdy9c9kcylx0speb.png)
But as you can see it is not ideal and this design has many problems with adaptation and correct placement of images.
I really hope that you can help me provide optimal solutions not only for my problem, but also for the existing code.
Link to the github repository: https://github.com/libertasss9/design
My opinion about backend.
Tags: backend, backenddevelopment, javascript, fullstack
Published: 2024-07-16 14:41:46

It is very often to use langauges like ruby, python or javascript for the backend in opensource projects which I don't understaund. As these langauges are limited the more features you need to implement and the more users you have the harder it gets. This is why for most commercial backend services you will use things like go, java, rust or php ( this is moslty to mantain existing projects ).
It might seem tempting to firstly implement it the easier way, but if you do this in go which is a very easy langauge with the power of C and a garbage collector it will make your life easier.