Blog

Page 256 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Laravel Eloquent where field is X or null

Laravel Eloquent where field is X or null

Published on September 2, 2023

📝 **Title:** Mastering Laravel Eloquent: Filtering Results with Nullable Fields 💡 **Introduction:** Are you struggling to filter your Laravel Eloquent results when dealing with nullable fields? Fear no more! In this guide, we'll tackle a common issue fa

Cover Image for ASP.NET MVC controller actions that return JSON or partial html
ajaxjson

ASP.NET MVC controller actions that return JSON or partial html

Published on September 2, 2023

📝 **Title**: ASP.NET MVC Controller: Return JSON or Partial HTML? Here's the Solution! ✍️ **Introduction**: Are you tired of struggling with ASP.NET MVC controller actions that need to return either JSON or partial HTML? You're not alone! Many developers

Cover Image for Concept behind these four lines of tricky C code
c#

Concept behind these four lines of tricky C code

Published on September 2, 2023

# Understanding the Concept Behind These Tricky C Code Lines 💡 If you've come across the following mind-boggling lines of C code and found yourself scratching your head 🤔, don't worry, you're not alone. Let's break it down and understand the concept beh

Cover Image for Printing all global variables/local variables?
c#global-variablesvariables

Printing all global variables/local variables?

Published on September 2, 2023

🖨️🌍🔍 The Ultimate Guide to Printing All Global and Local Variables in GDB 🔍🖨️ Do you often find yourself debugging code using GDB and wondering how to print all global and local variables? 🤔 Well, you're not alone! Many developers face this challeng

Cover Image for do { ... } while (0) — what is it good for?
c#loops

do { ... } while (0) — what is it good for?

Published on September 2, 2023

# 🤔 Do { ... } while (0) — What is it Good For? 🤷‍♀️ Have you ever come across the `do { ... } while (0)` construct in your code and wondered what its purpose is? 🤔 Well, you're not alone! Many developers have encountered this peculiar construct and qu

Cover Image for How do I concatenate const/literal strings in C?
c#concatenationstring

How do I concatenate const/literal strings in C?

Published on September 2, 2023

# 🧩 Concatenating Const/Literal Strings in C: A Guide 🧩 Are you struggling with concatenating const/literal strings in C? 😫 Don't worry, you're not alone! This common issue often leads to frustrating segmentation faults. But fear not, as I'm here to gu

Cover Image for How exactly does __attribute__((constructor)) work?
c#gcc

How exactly does __attribute__((constructor)) work?

Published on September 2, 2023

# How does \_\_attribute\_\_((constructor)) work? 🤔 Have you ever come across the `__attribute__((constructor))` in your code and wondered what it actually does? 🤷‍♀️ In this post, we'll dive deep into understanding this curious attribute. Let's address

Cover Image for Why do all the C files written by my lecturer start with a single # on the first line?
c#

Why do all the C files written by my lecturer start with a single # on the first line?

Published on September 2, 2023

📝Why do all the C files written by my lecturer start with a single # on the first line?🤔 If you've been going through C course notes or coding samples and noticed that every C program source file starts with a single "#" on the first line, you might be

Cover Image for How to printf "unsigned long" in C?
c#printf

How to printf "unsigned long" in C?

Published on September 2, 2023

# How to printf "unsigned long" in C? 🖨️ Have you ever found yourself scratching your head trying to figure out how to properly print an "unsigned long" datatype in C? Don't worry, you're not alone! Many developers face this common issue, but fear not, w

Cover Image for How do I write to the console from a Laravel Controller?

How do I write to the console from a Laravel Controller?

Published on September 2, 2023

# How to Write to the Console from a Laravel Controller Are you having trouble figuring out how to log console messages from a Laravel controller? Don't worry, we've got you covered! In this guide, we'll walk you through the steps to write to the console