teleren/devto huggingface dataset:
Path parameters in node.js
Tags: typescript, http, javascript, node
Published: 2023-11-24 19:38:21

Today we will create a route with path parameters. Fortunately, Cavia's parameter parsing mechanism is [built-in](https://github.com/caviajs/http-router#route-parameters) and using it is very simple.

## Step 1: New endpoint

Create a new endpoint with path params - to indicate the position of a parameter in the path, add a colon in front of the parameter name.

```typescript
import { Route } from '@caviajs/http-router';

export const GuineaPigDetailsRoute: Route = {
  handler: async (request, response): Promise<void> => {
    const id = request.params.id; // 👈

    console.log(id); // 👈 do sth...
  },
  method: 'GET',
  path: '/guinea-pigs/details/:id', // 👈
};
```

Remember to add the newly created route to the `HttpRouter` instance and start the server.

## Step 2: Make request

Make a request to newly created endpoint.

```shell
curl -XGET 'http://localhost:8080/guinea-pigs/details/1245'
```

Yes, it's that simple.
See you!
Automatizando a Coleta de Dados Estatísticos com Selenium e SQLite
Tags: python, programming
Published: 2023-11-24 19:28:57



Apresento um caso simples de uso do Selenium e SQLite para coleta de dados, a depender da necessidade, é possível então realizar downloads de arquivos de um determinado site para que futuramente seja possível analisar os dados desses arquivos e realizar diversos insights acima disso.

### O script

Feito em Python, o script acessa o site [StatCounter](https://gs.statcounter.com/) e baixa todos os dados estatísticos sobre o uso de plataformas no Brasil ao longo dos anos. 

Com a biblioteca Selenium para acessar e fazer o download dos arquivos CSV, e SQLite para armazenar esses dados.

### Como funciona?

1. **Configuração do Chrome Headless**: O Selenium configurado com a opção headless do Chrome para automatizar a navegação no site sem a necessidade de uma interface gráfica. Representada pela função `configure_chrome_headless()`.

2. **Download e Parse do CSV**: Com a biblioteca `requests`, é feito o download de cada arquivo CSV que contém os dados estatísticos. Em seguida, a biblioteca `csv` é utilizada para analisar e extrair as informações relevantes. Representada pela `função download_and_parse_csv()`.

3. **Armazenamento no SQLite**: São criadas e atualizadas tabelas em um banco de dados SQLite, organizando os dados por ano. Representada pela função `save_to_sqlite()`.

### Como executar o script?

O script está disponível [aqui](https://github.com/everton-tenorio/statcounter-platformsbrazil). Certifique-se de ter as bibliotecas necessárias instaladas - leia o README.md - e o Selenium configurado com o Chrome Driver.

```python
# Execução
python platform_market_share.py
```

Neste artigo, exploro uma abordagem prática usando Selenium, SQLite e outras bibliotecas para automatizar processo de coleta e armazenamento de dados.
Exploring the Rust 1.70 Update and LLVM 16: A Comprehensive Look
Tags: rust, llvm, performance, optimization
Published: 2023-11-24 19:16:59

## Understanding the Impact of Rust 1.70 and LLVM 16 on Runtime Performance

As a Rust developer, keeping up with updates is key to optimizing your projects. The Rust 1.70 update, along with its integration of LLVM 16, brings a range of internal improvements. This article explores these updates, the concept of MSRV, and their impact on development.

## What Is MSRV?
The Minimum Supported Rust Version (MSRV) is the earliest Rust compiler version that can compile specific code or a crate. Adhering to an MSRV ensures compatibility across versions, essential for broadening your project's usability, particularly for library authors.

## The Rust 1.70 Update and LLVM 16
Rust 1.70 introduces several internal changes, including compatibility with LLVM 16. This update potentially optimizes the speed and efficiency of code compilation due to LLVM's modular compiler and toolchain technologies.

### Key Changes in Rust 1.70
- **Enhanced Compilation Speed:** The update may optimize compilation speed through LLVM 16's advancements.
- **Improved Code Generation:** LLVM 16's integration could lead to more efficient machine code production.
- **Broader Platform Support:** Expands Rust's compatibility with more platforms, thanks to LLVM's target support.

## Assessing Performance Improvements
While some community discussions, such as a specific Reddit thread, suggest performance improvements like a 17% increase for particular applications on ARM64 architecture, these are not universally applicable across all Rust applications. The official Rust 1.70 release notes primarily discuss internal changes without specifying such performance figures.

### Example for Benchmarking
```rust
fn calculate_primes(limit: usize) -> Vec<usize> {
    // Prime number calculation logic
}
```
Benchmarking this function in both Rust 1.70 and earlier versions can provide insights into specific performance improvements.

## Implications for Developers
Any improvements in runtime speed can reduce latency and enhance user experience, particularly in compute-intensive tasks. However, the extent of these gains may vary based on application and use case.

## The Broader Impact on the Rust Ecosystem
Internal improvements and optimizations, like those in Rust 1.70, can positively influence future updates and the Rust ecosystem, potentially affecting performance-critical applications.

## Conclusion
The Rust 1.70 update, with LLVM 16 integration, represents a step forward in Rust's evolution, potentially offering performance benefits in certain scenarios. Developers are encouraged to benchmark their applications and stay informed through Rust release notes and LLVM updates. Keeping up with Rust's advancements benefits your projects and contributes to the Rust community's growth and stability.
Newsletter Repost - OpenLampTech issue #106
Tags: webdev, php, mysql, programming
Published: 2023-11-24 19:06:45

MySQL Invisible Columns | Lightweight Linux distros | 10 PHP libraries for 2023 | New WooCommerce install default blocks. OpenLampTech is a media and content source for PHP, MySQL, and the LAMP stack.

---

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

---
To read OpenLampTech each and every week without missing a newsletter, [grab your free subscription](openlamptech.substack.com) today.
This Summer Cash 1000 Dollars is waiting just for you.
Tags: webdev, sweepstakes, winner, summer
Published: 2023-11-24 19:01:48

## **Do you need $1,000 in cash this summer ?**
Are You A Proud USA citizen?
Since you are a USA citizen, you are the eligible recipient of our $1,000.00.
Enter your information now for a chance to win.
Go To Link (https://rb.gy/f3l8s4)
File-Based vs. Directory-Based Routing: Understanding the Difference
Tags: routing, filebased, directorybased
Published: 2023-11-24 18:57:41

I don't know who did it, and why everyone is suddenly confused by this. What you are calling file-based routing is not what you claim. I will gladly explain.

I am going to use Next.js as an example:

### File Based

This is file-based routing:
```shell
src/
└── pages/
    ├── index.js
    ├── about.js
    └── contact.js
```

In the folder that defines your pages, if you are able to create a file in there and it automatically becomes a page (contact, about, services etc) that is file based routing.

File-based routing is a routing where the entry point to your routes is an index file. What that mean is the same way you can have a `contact.jsx` , you could also make a `contact/index.js` and these two would do exactly the same with little to no issues.

Frameworks that employ this:
- Astro
- Eleventy
- Nextjs (with pages)s
- Vue
- Svelte 

---

### Directory Based

This is directory based routing
```shell
src/
└── app/
    ├── page.js
    ├── about/
    │   └── page.js
    └── contact/
        └── page.js
```

With this way, there is a defined method of creating new pages i.e a folder with the file name and a special file within it.

When using this way, anything that does not follow this pattern is not regarded a page.


Frameworks that use this
- Nextjs (with app)
- SvleteKit

---

## A Table To Know What You Are Using

| Ask                                                                       | File-Based Routing | Directory-Based Routing |
| ------------------------------------------------------------------------- | ------------------ | ----------------------- |
| Can I make a file name as a route and it works?                           | Yes                | No                      |
| Can I create a folder with an `index` file and that will become the page? | Yes                | No                      |
| Do I have a special naming convention for pages?                            | No                 | Yes                     |


With this clarification at hand, can you all stop confusing this? You can? Thank you.

---

### Thank you for reading, let's connect!

Thank you for visiting this little corner of mine. Let's connect on [Twitter](https://twitter.com/Psypher1), [Discord](https://discord.com/users/Pharaoh#5441/) and [LinkedIn](https://www.linkedin.com/in/jamesmidzi/)
Win $4,500.00 Cash
Tags: winner, sweepstakes, webdev, beginners
Published: 2023-11-24 18:57:31

**

## Why Make Money?
**
Many people view money as a method of attaining their objectives and dreams as well as a source of security. It can be used to cover both needs like food, housing, and medical expenses as well as extravagance like luxury automobiles and trips. Others view money as a means of achieving respect, position, and influence in society.
Money is vital because it gives you options and puts you in control, which let you live a better life. Being wealthy and secure in your finances gives you the flexibility and choices to live the kind of life you desire and to support the causes that are most important to you.
Even though money has a lot of negative connotations, you ultimately have the power to control how you use it and whether you let it dictate your life. While material wealth is not everything in this life, it can certainly help you reach your objectives and maximize the short time we all have.
Enter your information now for a chance to win.
Pls Go To Link >> **( https://rb.gy/yz1nt5)**
Exploring OpenSign v1.0.6-beta: A Leap Forward in Digital Signature Software
Tags: programming, javascript, react, productivity
Published: 2023-11-24 18:21:49

We have recently released v1.0.6-beta version of OpenSign, the leading open source document signing solution, marking a significant step forward in the development journey. This release encapsulates numerous bug fixes and feature enhancements, highlighting our team's commitment to providing a robust and user-friendly product. In this blog post, we delve into the key changes and improvements introduced in this version.

**Key Improvements and Fixes**
**1. Multiple Annotations in Single File:** A fix has been made to address issues with handling multiple annotations in a single file, enhancing the software's efficiency in managing complex documents.
**2. Document Signature and Certificate Issue Fixes:** Significant fixes were made to the 'need-your-sign' report, document signature, and certificate issues, further solidifying the software's reliability in handling legal documents. 
**3. Mobile view Enhancements:** Adjustments were made to the location of requested signature placeholders in the mobile "Request Signatures" flow, improving user experience on mobile devices.
**4. SMTP Email Integration:** 
The introduction of SMTP for sending emails marks a notable feature enhancement, expanding the software's capabilities in terms of communication and notifications.
**5. Sanitized Output Filenames:** 
A critical fix has been implemented to sanitize output filenames, ensuring better security and data integrity.
**6. Enhanced Modal Titles and Verification Mail Alerts:** 
The modal title for login now includes additional information, and the verification mail alert message has been updated for clarity.
**7. UI and Security Refinements:**Various minor UI changes and security improvements were implemented, reflecting an ongoing effort to refine the user experience and bolster security measures.

OpenSign v1.0.6-beta is more than just an incremental update, it's a testament to the continuous evolution of a software dedicated to simplifying digital signatures. Each fix and feature enhancement is a step towards a more efficient, secure, robust and user-friendly digital signature process. For developers, entrepreneurs and businesses relying on digital signatures, this update offers an array of improvements that streamline operations and enhance security protocols.

As OpenSign continues to evolve, it remains a significant tool for professionals seeking a reliable and efficient open source digital signature solution. This release not only addresses immediate issues but also lays the groundwork for more innovative features and improvements in future releases.

Visit [OpenSign](https://github.com/opensignlabs/opensign) on GitHub and see where your open source contributions can take the project

{% cta https://github.com/opensignlabs/opensign %} ⭐ OpenSign on GitHub{% endcta %}
Anji, provincia china de Zhejiang
Tags: webdev, javascript, beginners
Published: 2023-11-24 18:14:58

[Anji Yucun](https://streamingnewyork.com) pertenece a la ciudad de Huzhou, provincia de Zhejiang, que lleva el nombre de Yuling, situada en la veta restante de la montaña [Tianmu](https://thedailybreaker.com), con una superficie de 4,86 kilómetros cuadrados. Aunque es pequeña, es famosa. Como cuna de “las aguas lúcidas y las montañas exuberantes son activos de valor incalculable”. [Yucun](https://washingtonposition.com) busca un desarrollo sostenible con belleza ecológica, prosperidad industrial y riqueza a lo largo de los diez años, siendo una valiosa muestra para la construcción de la [civilización](https://structurebusinessman.com) ecológica de China.
Unboxing OPPO Find N3 - Gaya Futuristik yang Mencengangkan
Published: 2023-11-24 18:11:45


Intro

Dalam kancah persaingan smartphone yang makin sengit, OPPO Find N3 tampil sebagai bintang terkini dari OPPO, brand yang selalu bikin terkesan. Dengan berbagai fitur canggihnya, OPPO Find N3 janjiin banget buat ngejawab kebutuhan pengguna yang demen teknologi tanpa ngerusak kantong. Nah, kali ini kita bakal bahas detil spesifikasi OPPO Find N3, kinerjanya, teknologi kameranya, daya tahan baterai, desain, dan antarmuka keren di perangkat ini. Langsung aja kita cek kenapa OPPO Find N3 jadi perbincangan hangat.

I. Fitur Keren dan Spesifikasi

A. Tampilan dan Desain Layar utamanya yang Foldable LTPO3 OLED segede 7.82 inci dengan resolusi 2268 x 2440 piksel bikin mata kita dimanjain banget. Desainnya yang tipis cuma 5.8 mm saat dibuka, dan 11.7 mm saat ditutup, dilengkapi dengan fitur dukungan pena stylus, bikin kita ngerasa punya gadget kekinian banget.

B. Kinerja dan Prosesor Prosesor Qualcomm Snapdragon 8 Gen 2 yang jadi andalannya, dipadu sama RAM sebesar 16 GB. OPPO Find N3 dijamin bisa ngejalanin banyak aplikasi tanpa lelet, apalagi buat main game, makin seru dengan GPU Adreno 740 yang kenceng banget.

C. Kemampuan Kamera Sistem kameranya keren banget. Kamera belakang triple: 48 MP (wide), f/1.7; 48 MP (ultrawide), f/2.2; 64 MP (telephoto), f/2.6, bikin jepretan kita makin kece. Kamera depannya juga gak kalah oke, dual kamera: 32 MP (ultrawide), f/2.2 dan 20 MP (ultrawide), f/2.2. Kualitas foto semakin di-boost sama teknologi kecerdasan buatan.

D. Baterai dan Pengisian Daya tahan baterai sebesar 4805 mAh jadi andalan [OPPO Find N3](https://www.gudangreview.com/2023/10/oppo-find-n3-flip-harga-spesifikasi-lengkap.html), cukup buat nemenin kita seharian. Teknologi pengisian cepat 67W bikin kita gak bete nunggu lama buat isi daya. Dalam 10 menit, udah bisa 1-35%, mantap!

E. Perangkat Lunak dan Antarmuka Pengguna Ngejalanin Android 13, antarmuka OPPO Find N3 ini bikin kita gak bosen. Desainnya yang smooth dan user-friendly bikin kita punya kendali penuh atas gadget kece ini.

Kesimpulan

Dengan harga sekitar Rp 29 Jutaan, [OPPO Find N3](https://www.gudangreview.com/2023/09/oppo-find-x6-pro-spesifikasi-harga.html) bener-bener bikin mata kita melek. Cocok banget buat mereka yang demen teknologi dan pengen tampil kekinian tanpa harus jebol kocek. Buat kamu yang lagi cari smartphone dengan performa dan gaya, OPPO Find N3 bisa jadi pilihan yang tepat.
SKYX anuncia unas ventas
Published: 2023-11-24 18:10:12

[Rani Kohen](https://streamingnewyork.com), fundadora y presidenta ejecutiva de [SKYX Platforms](https://thedailybreaker.com), declaró: “estamos muy contentos de iniciar nuestras ventas ahora en más de 16 sitios web de iluminación y [decoración](https://washingtonposition.com) del hogar en EE.UU. y Canadá, así como de comercializar y educar a los clientes minoristas y profesionales sobre la simplicidad, el ahorro de costes, el ahorro de tiempo y los aspectos que salvan vidas de nuestro receptáculo de toma de techo [Sky](https://structurebusinessman.com) y nuestros productos inteligentes y estándar plug & play. Esperamos continuar con el lanzamiento de productos en otros lugares en los próximos meses”.
Parse request body with node.js
Tags: node, typescript, javascript, http
Published: 2023-11-24 18:07:26

In the [last post](https://dev.to/pawpartyka/create-a-simple-http-server-with-nodejs-4kog) we used the Cavia to create the first endpoint, today we will use this micro framework to parse the request body.

## Step 1: Installation

First, let's install the `@caviajs/http-body` package, which enables parsing.

```bash
npm install @caviajs/http-body --save
```

## Step 2: New endpoint

Create a new endpoint whose method is `POST`, `PUT` or `PATCH`.

```typescript
import { Route } from '@caviajs/http-router';
import { HttpBody } from '@caviajs/http-body'; // 👈

export const GuineaPigCreateRoute: Route = {
  handler: async (request, response): Promise<void> => {
    const body = await HttpBody.parse(request, 'json'); // 👈

    console.log(body);
  },
  method: 'POST', // 👈
  path: '/guinea-pigs',
};
```

The created endpoint add to `HttpRouter` instance.

```typescript
import http from 'http';
import { HttpRouter } from '@caviajs/http-router';
import { GuineaPigCreateRoute } from './routes/guinea-pig-create-route'; // 👈

(async () => {
  const httpRouter: HttpRouter = new HttpRouter();

  httpRouter
    .route(GuineaPigCreateRoute); // 👈

  const httpServer: http.Server = http.createServer((req, res) => {
    httpRouter.handle(req, res);
  });

  httpServer.listen(8080, () => {
    console.log(`Http server listening at port ${8080}`);
  });
})();
```

## Step 3: Start server

Start the server using the terminal.

```bash
npx ts-node app/web.ts
```

## Step 4: Make request

Make a request to our newly created endpoint.

```bash
curl -XPOST -H "Content-type: application/json" -d '{"name":"Hello World"}' 'http://localhost:8080/guinea-pigs'
```

It's all for today! I hope this short post was helpful to you.
See you!
Mobile Responsive Website With HTML CSS - How To Make Responsive Website
Tags: webdev, javascript, tutorial, career
Published: 2023-11-24 17:42:37

{% embed https://www.youtube.com/embed/5ZUJZl5LKIM?si=Tf6ZfTo805m0Wgih %}

This [tutorial video](https://www.youtube.com/@learnwithdanial417) guides you through the process of creating a responsive website landing page using just [HTML and CSS](https://www.youtube.com/@learnwithdanial417) in Visual Studio Code. By following the comprehensive tutorial, viewers gain the skills needed to replicate the showcased website. The emphasis is on simplicity, with a focus on the fundamental languages of web development. The tutorial equips viewers with the knowledge to design and structure an effective landing page, enhancing their ability to independently create similar web content. Overall, this instructional video provides a practical and accessible introduction to building responsive landing pages through hands-on [HTML and CSS](https://www.youtube.com/@learnwithdanial417) development in Visual Studio Code.


![HTML CSS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7buclarswbty6vnmase.jpg)

**Certainly! Let's break down the explanation:**

## Tutorial Focus:

- The tutorial video focuses on guiding viewers through the process of creating a responsive website landing page.

## Tools Used:

- The tools used in this tutorial are [HTML and CSS](https://www.youtube.com/@learnwithdanial417).

- Visual Studio Code (vs code) is the chosen code editor for writing and editing the HTML and CSS code.

## Learning Outcome:

- After watching the entire tutorial, viewers are expected to have acquired the skills necessary to independently create a website similar to the one demonstrated in the tutorial.

## Content Covered:

- The tutorial covers the use of [HTML and CSS](https://www.youtube.com/@learnwithdanial417) for building the landing page.

- It emphasizes creating a responsive design, indicating that the website will adapt to different screen sizes and devices.

## Practical Application:

- The goal is not just to teach theoretical concepts but to enable viewers to practically implement their learning. They should be able to replicate the showcased website.

## Accessibility:

- The tutorial aims to be accessible to a wide audience by focusing on fundamental web development languages (HTML and CSS). This approach allows beginners to follow along and understand the process of creating a landing page.


## Tools Mentioned:

- Visual Studio Code is a popular code editor, and its use in the tutorial suggests that viewers can easily replicate the steps using this widely used development environment.

## Overall Impression:

- The tutorial provides a hands-on and practical introduction to creating a responsive landing page, offering a clear path for viewers to enhance their web development skills. It promotes a learn-by-doing approach.
How Muyern Trust Hacker Assists You with Crypto Recovery
Published: 2023-11-24 17:42:03

To avoid the heart-stopping feeling of sending cryptocurrency to the wrong wallet, it's crucial to double-check the wallet address before hitting that send button. Take the time to carefully review the characters and ensure that you are sending your funds to the intended recipient. When you find yourself in the unfortunate position of sending Bitcoin to the wrong wallet, remember that there's hope. With Muyern Trust Hacker by your side, you can stand strong, knowing that your lost funds can be restored. After all, even in the digital realm, there are wizards who can work their magic. Muyern Trust Hacker is catastrophic about security when it comes to your private data. To guarantee the safety and protection of your data, they use cutting-edge security procedures. You can feel secure knowing that your data is in capable hands because of sophisticated encryption technologies and secure servers. In the volatile realm of cryptocurrencies, errors can occur and money might be misplaced just like myself where I sent $70,000 to a wrong wallet. That's why having dependable recovery services, such as Muyern Trust Hacker, is essential. Reach Muyern Trust Hacker via: muyerntrusted[at]mail-me[dot]com  or  Telegram: [at]muyerntrusthacker