coding

Implementing Webpack from Scratch, But in Rust – [3] Using NAPI-RS to Create Node.js Addons

Implementing Webpack from Scratch, But in Rust – [3] Using NAPI-RS to Create Node.js Addons

Referencing mini-webpack, I implemented a simple webpack from scratch using Rust. This allowed me to gain a deeper understanding of webpack and also improve my Rust skills. It's a win-win situation! Code repository: https://github.com/ParadeTo/rs-webpack This article corresponds to the Pull Request: https://github.com/ParadeTo/rs-webpack/pull/4 The title seems unrelated to this series, as implementing webpack with Rust involves Node.js plugin development. But don't worry, let me explain. When we use webpack for bundling, don't we often run the following command? webpack --config webpack.config.js Enter fullscreen mode Exit fullscreen mode Similarly, we want our RS Webpack to support such a command. But how can…
Read More
How to Validate Upload and Download in Cypress

How to Validate Upload and Download in Cypress

Introduction Handling file uploads and downloads are common scenarios in end-to-end testing. In this post, we will explore how to handle both file uploads and downloads using Cypress. Even though Cypress lacks built-in support for these operations, you can achieve this functionality by leveraging a few libraries and Cypress’s robust set of commands. By the end of this guide, you'll know how to: Upload files using Cypress. Validate successful file uploads. Download files and validate their content in Cypress. Prerequisites To follow along with the examples, ensure you have Cypress installed and set up. If you're using Cypress v13.6.2, it’s…
Read More
Implementacion de videollamadas multiplataforma iOS – Android

Implementacion de videollamadas multiplataforma iOS – Android

Me llego un requerimiento sobre una aplicacion de desarrollo hibrido, esta es la misma para la que desarrolle el uso de los datos de salud, en este caso el requerimiento solicitaba que se implementara el servicio de videollamadas donde pueda ser usado para comunicarse indistintamente el sistema operativo iOS, Android y Web. Comence revisando las soluciones entre ellas dos: 1. Uso de WebRtc y STUN server, la implementacion representaba la configuracion de un nuevo servidor y desarrollo altamente complejo, cosa que me entusiasmo mucho; 2. Usar un iframe, como la implementacion por parte de la documentacion demostraba mayor facilidad de…
Read More
Understanding Error Handling: From Try-Catch to Result Types

Understanding Error Handling: From Try-Catch to Result Types

Introduction Error handling is a fundamental aspect of writing reliable software, yet many developers find themselves struggling with different approaches across programming languages. Whether you're coming from a try-catch background or exploring functional programming's Result types, understanding these patterns can significantly improve your code quality. 1. The Traditional Approach: Try-Catch Most developers start their journey with try-catch blocks, a familiar pattern in languages like Java, JavaScript, and Python. Let's look at how this works: try { const data = JSON.parse(userInput); processData(data); } catch (error) { console.error("Failed to process data:", error.message); } Enter fullscreen mode Exit fullscreen mode Why Try-Catch? Intuitive…
Read More
Análise de Sulco de Pneus com Inteligência Artificial em Python!

Análise de Sulco de Pneus com Inteligência Artificial em Python!

A análise de sulcos de pneus é uma tarefa crucial para identificar o desgaste e garantir a segurança, especialmente em veículos que percorrem longas distâncias. Com o uso de Inteligência Artificial (IA) e Python, podemos automatizar esse processo de maneira rápida e precisa. Aqui, mostramos como um modelo de rede neural convolucional (CNN), baseado na arquitetura VGG16, classifica pneus em "novos" ou "usados", enquanto o OpenCV ajuda a analisar as imagens para medir a profundidade dos sulcos. Tecnologias Usadas Python:Linguagem de programação popular para IA e Machine Learning, especialmente por suas bibliotecas avançadas. OpenCV: Usado para processar as imagens, detectar…
Read More
A Simple, mostly CSS code editor

A Simple, mostly CSS code editor

In this article, I'm going to talk about how to make a very simple, browser based code editor using mostly CSS. I originally built this when I needed to let users edit JSON in a CMS that I was building. If you just want to jump to the code and the working example, here you go. The code can be found here and the working example here Contenteditable sucks... So if you were ever pondered building your own code editor, you have probably looked at contenteditable. While contenteditable is great for many situations, there is one huge problem in regards…
Read More
My Experience with GitHub Copilot

My Experience with GitHub Copilot

Hello,I'm Duke and I recently dove into using GitHub Copilot, and I’ve got to say, it’s been quite an adventure! I integrated it with a couple of languages—Python and .NET—and tried it out on several popular IDEs, including VSCode, Visual Studio, Rider, and PyCharm. Here’s a rundown of what I found during my experiments. Setting It UpGetting GitHub Copilot up and running wasn’t too tricky. However, if you’re using Visual Studio, make sure you’re on version 17.10 or later (2022). It’s a little bit of a hurdle if you're on an older version, but once you get through that, you’re…
Read More
Ruby exception Handling Pitfall: Understanding Rescue Clause Hierarchy

Ruby exception Handling Pitfall: Understanding Rescue Clause Hierarchy

Context Let's consider the following code, defining basic classes and one custom error: class CustomError < StandardError; end class Parent def raise_custom_error raise CustomError rescue StandardError puts "StandardError rescued" end end class Child < Parent def call raise_custom_error rescue CustomError puts "CustomError rescued" end end Enter fullscreen mode Exit fullscreen mode Now, let's examine the following method call:: Child.new.call Enter fullscreen mode Exit fullscreen mode To summarize, this code does the following: Defines a CustomError class that inherits from StandardError Creates a Child class with a #call method that invokes raise_custom_error from its parent class Parent Implements exception handling in…
Read More
BUILDING A CYBERSECURITY DETECTION AND MONITORING LAB BY LEVERAGING LOCAL VIRTUAL MACHINES (VMs) AND MICROSOFT AZURE

BUILDING A CYBERSECURITY DETECTION AND MONITORING LAB BY LEVERAGING LOCAL VIRTUAL MACHINES (VMs) AND MICROSOFT AZURE

Introduction Learning and implementing cybersecurity concepts can be challenging without access to practical and secure infrastructure. These challenges are further complicated by budget constraints that limit the acquisition of necessary hardware resources. To overcome this, this home lab guide provides instructions for provisioning, configuring, optimizing, and securing IT infrastructure using a combination of local virtual machines (VMs) and cloud resources for practical use cases. This approach enables deploying less resource-intensive tools on local VMs while leveraging the cloud for more demanding applications. It simulates both on-premises and cloud environments. The knowledge gained here can aid in production and large-scale, enterprise-level…
Read More
AI Tools Every Mobile Developer Needs to Use

AI Tools Every Mobile Developer Needs to Use

In recent years, artificial intelligence (AI) has transformed mobile app development, enabling developers to build smarter, more responsive, and user-friendly applications. AI tools can enhance various aspects of mobile development, from coding and debugging to user experience optimization and security. This article will explore the must-have AI tools that every mobile developer should consider for efficient, innovative app creation. For developers and businesses looking to take advantage of professional AI expertise, a great starting point is the list of Top Artificial Intelligence Companies which provides an overview of trusted vendors specializing in these fields. 1. Machine Learning Platforms Machine learning…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.