How to Send Contact Form Data to an External Endpoint in WordPress

Contact forms are an essential feature for websites, allowing visitors to easily get in touch. In WordPress, there are several popular plugins for creating and managing contact forms, including: Each of these plugins offers customization options and integrations, making them versatile for different use cases. Sometimes, you may need to send the data submitted via … Read more

Factorial function of a number in Python

What is the factorial of a number? The “factorial” of a number is that number multiplied by all the positive whole numbers less than it. It is written with an exclamation point, like “n!”. can we have factorial for negative numbers? No, we cannot factorial for negative numbers! The factorial function is only defined for … Read more

About Python, Installation, Important Things

About Python programming language Python was created in the late 1980s by Guido van Rossum and was designed to be a multi-paradigm programming language making it possible for programmers to adopt multiple styles of programming such as object-oriented programming, structured or functional programming. Python is an interpreted language and not a compiled one! Compiled vs … Read more

About Internet protocol, HTTP methods, Status codes

Internet protocol The payload part of IP packets supports multiple protocols to make sure that information arrives as expected. Two of these are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).TCP is used for data that must arrive correctly and in order. This is because TCP can deal with data packets arriving out of … Read more

Why to set BigAutoField to the Django Models?

The default behavior for Django Models is to create an auto-incrementing integer primary key named “id”. Setting DEFAULT_AUTO_FIELD to ‘django.db.models.BigAutoField’ in Django is not necessary in most cases, but it can be helpful in specific scenarios. By default, Django uses AutoField for primary keys, an integer-based field that automatically increments. However, in some cases, especially … Read more

How to use built-in JavaScript Object Functions?

JavaScript provides some nice utility functions that we can use to work with Objects more easily. These functions are found on JavaScript’s Built-in Object, which can be accessed from anywhere inside the JavaScript programs. Object.keys() The Object.keys() method returns an array of all the Object’s keys or property names. It is a really useful function … Read more

How to convert a date time into format of dd/mm/yyyy in JavaScript?

If you need to convert a date-time like 2020-04-28 00:00:00 which comes for example from the backend, you can use the following JavaScript code: [code lang=”js”] <script type="text/javascript"> function convertDate(inputDate) { function change(s) { return (s < 10) ? ‘0’ + s : s; } var temp = new Date(inputDate); return [change(temp.getDate()), change(temp.getMonth()+1), temp.getFullYear()].join(‘/’); } … Read more

How to install and set up Laravel with Git?

It is not at all complicated to install Laravel, as you will see in this tutorial. 1. Install Composer on Your system For managing dependencies, Laravel uses composer. Therefore before installing Laravel, make sure you have Composer installed on your system. You can install composer to a specific directory by using the –install-dir option and … Read more

How to use built-in JavaScript Array Functions?

JavaScript provides nice built-in array functions that we can use to work with arrays. Unlike with the JavaScript object functions are called with Object dot keys, object dot values or Object dot assign, the functions that we use with arrays aren’t called on a global array object. They’re called from the arrays themselves. push() The … Read more

Javascript Let and Const

Trebuie modificat!! Pana la EcmaScript.. the only way to declare a variable in JavaScript was to use the keyword var. What is hoisting in JavaScript with example? Hoisting is a result of how JavaScript is interpreted by your browser. Essentially, before any JavaScript code is executed, all variables declared with var are “hoisted”, which means … Read more

The best courses, books and tutorials about Angular

If you want to learn Angular, in this topic I present the best paid or FREE courses, books, and tutorials about Angular that I found and considered very useful and interesting. Angular courses for beginners Angular: Getting Started by Deborah Kurata on PluralSight – a course for beginners very well explained, which helped me a … Read more

How to get the current year in Angular template?

If you need to display the current year in Angular for copyright purposes, you can do it in the following way: 1. Create a footer component and add it to your app component. [code lang=”js”] <app-footer></app-footer> [/code] 2. In the footer.component.ts get the current year: [code lang=”js”] export class FooterComponent implements OnInit { currentYear: number … Read more