Blog

Page 294 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Convert string with commas to array
arraysjavascriptstring

Convert string with commas to array

Published on September 2, 2023

# Converting a String with Commas to an Array: An Easy Solution πŸ”’ So you have a string with commas and you want to convert it into a JavaScript array? This can be a common issue when working with data that is stored in a string format. Don't worry though

Cover Image for How to convert an Object {} to an Array [] of key-value pairs in JavaScript
arraysjavascripttype-conversion

How to convert an Object {} to an Array [] of key-value pairs in JavaScript

Published on September 2, 2023

# Converting an Object to an Array of Key-Value Pairs in JavaScript πŸ’» So, you have an object and you want to convert it into an array of key-value pairs in JavaScript? No worries! I've got you covered. 🀩 ## The Problem 🧐 Let's say you have an object

Cover Image for Difference between map and collect in Ruby?
arraysdictionary

Difference between map and collect in Ruby?

Published on September 2, 2023

# Map vs Collect: What's the Difference? πŸ€” Have you ever wondered what the difference is between using `map` and `collect` on an array in Ruby/Rails? πŸ€·β€β™‚οΈ If so, you're not alone! Many developers have found themselves searching for a clear answer, only

Cover Image for How to add an auto-incrementing primary key to an existing table, in PostgreSQL?

How to add an auto-incrementing primary key to an existing table, in PostgreSQL?

Published on September 2, 2023

# How to Add an Auto-Incrementing Primary Key to an Existing Table in PostgreSQL? πŸ’‘ So, you have a table with some existing data and you want to add an auto-incrementing primary key without the hassle of deleting and recreating the entire table? Don't wo

Cover Image for How can I convert the "arguments" object to an array in JavaScript?
argumentsarraysjavascriptsortingvariadic-functions

How can I convert the "arguments" object to an array in JavaScript?

Published on September 2, 2023

# How to convert the πŸ“œ "arguments" object to an array in JavaScript? πŸ‘‹ Hey there! So you're looking to ✨convert the "arguments" object to an array in JavaScript, huh? It's not as straightforward as you might hope, but fear not! I've got you covered with

Cover Image for Array.size() vs Array.length
arraysjavascript

Array.size() vs Array.length

Published on September 2, 2023

# Array.size() vs Array.length: Explained and Compared 😎 ## Introduction So you're scratching your head, trying to figure out the difference between `Array.size()` and `Array.length`. πŸ€” You've come to the right place! In this blog post, we'll dive deep

Cover Image for change values in array when doing foreach
arraysforeachjavascriptpass-by-reference

change values in array when doing foreach

Published on September 2, 2023

# πŸ”„ Changing Values in an Array with foreach - The Easy Way! Are you tired of trying to change the values in an array within a foreach loop, only to find that the original values remain untouched? 😫 Don't worry, we have a solution for you! In this blog

Cover Image for How to select from subquery using Laravel Query Builder?

How to select from subquery using Laravel Query Builder?

Published on September 2, 2023

# πŸš€ How to Select from Subquery using Laravel Query Builder? So, you want to know how to select from a subquery using Laravel Query Builder? πŸ€” Don't worry, I've got you covered! In this blog post, I will address this common issue and provide you with so

Cover Image for How do I convert a Stream into a byte[] in C#?
arraysc#inputstream

How do I convert a Stream into a byte[] in C#?

Published on September 2, 2023

πŸ”Œ Converting a Stream into a byte[] in C#: The Easiest Way πŸ˜ŽπŸ’» So, you've got a Stream and you need to convert it into a byte[] in C#. Don't fret! We've got you covered with an easy solution. In this blog post, we'll walk you through the process step by

Blog | Matheus Mello