![Normal Taylor cover image](https://tiloid.com/images/cover_default.jpg)
Using self vs. $this in PHP
In PHP, both 'self' and '$this' are used to refer to class members, but they have different contexts and usages.
Using 'self'
What is 'self'?
'self' i...
![Using self vs. $this in PHP](https://tiloid.com/uploads/posts/32/UvwcCG7VCXlHZ4krmozIxfrHH53ght-metaY2FyYm9uKDMwKS5wbmc=-.png)
Guide to Parsing JSON in Swift
In Swift, parsing JSON is a common task when working with web APIs or data fetched from the server.
JSON Structure
Before parsing JSON, it's essential...
![Guide to Parsing JSON in Swift](https://tiloid.com/uploads/posts/13/ZMRb3MRsruBCDPRyrwnO2BdvU2ijTE-metaY2FyYm9uKDEwKS5wbmc=-.png)
Extracting filename and extension
To extract the filename and extension from a file path in Bash, you can use various string manipulation techniques.
Using parameter expansion
Paramete...
![Extracting filename and extension](https://tiloid.com/uploads/posts/40/FljO9JjRZug1OVjnAlWv00mlfcYfgW-metaY2FyYm9uKDM4KS5wbmc=-.png)
Using NestJS Logging Service
NestJS provides a built-in logging service that allows you to log messages at different levels of severity. It helps you track and understand the flow...
![Using NestJS Logging Service](https://tiloid.com/uploads/posts/129/x6HA8qLlc1rJE6St2hq44qDHhSqAkb-metaY2FyYm9uKDEzMCkucG5n-.png)
Concatenate Two Slices
In Go, you can concatenate two slices to create a new slice that contains elements from both original slices.
Using Append
The append() function in Go...
Checking Whether a String Contains a Substring
In JavaScript, you can easily check whether a string contains a substring using different methods and techniques.
Using String.includes()
The String.i...
Writing a Switch Statement in Ruby
In Ruby, a switch statement is achieved using the case statement. It allows you to compare the value of an expression against multiple conditions and...
![Writing a Switch Statement in Ruby](https://tiloid.com/uploads/posts/30/Bt7ijj77YM37UUUdwJqeSme4GZxRkD-metaY2FyYm9uKDI4KS5wbmc=-.png)
Using `docker exec` command
To access a Docker container's shell, you can use the docker exec command, which allows you to run commands inside a running container.
Using docker e...
![Using `docker exec` command](https://tiloid.com/uploads/posts/45/rSG7yXcVLcbYaP1mZxSxatgLur1lsZ-metaY2FyYm9uKDQzKS5wbmc=-.png)