Detect proxies and user IP by PHP

To get the IP address of a visitor in PHP, you can use the $_SERVER superglobal array, specifically the $_SERVER[‘REMOTE_ADDR’] variable. To handle cases where the visitor’s IP address is masked by proxies or load balancers, you can check for specific HTTP headers that may contain the original IP address. Common proxy headers include X-Forwarded-For, … Read more

Run directly or in docker container

Containerization is a technology that allows you to package an application along with its dependencies and runtime environment into a self-contained unit called a container. Docker provides tools and a runtime environment to create, deploy, and manage containers efficiently. The advantages and disadvantages of Docker: Advantages of Docker Disadvantages of Docker Isolation and Portability Learning … Read more

Infix expression to prefix expression and function calls

In computer science and mathematics, expressions can be represented and manipulated in different formats, such as infix, prefix (also known as Polish notation), and postfix (also known as Reverse Polish Notation or RPN). Each format has its advantages and use cases, and understanding all three can be beneficial for various reasons:Prefix Notation (Polish Notation): In … Read more

Microstrip Lines

Microstrip lines are a type of transmission line used in microwave and RF (radio frequency) engineering for routing signals on printed circuit boards (PCBs) and integrated circuits (ICs). They are widely used due to their simplicity, ease of fabrication, and cost-effectiveness compared to other transmission line technologies like stripline or waveguides.A microstrip line consists of … Read more

How to get the tangential and normal components of fields from FEM softwares?

Finite Element Method (FEM) software often provides results in Cartesian coordinates due to its inherent computational approach. The FEM breaks down complex problems into smaller, manageable elements, typically triangles or quadrilaterals in 2D or tetrahedra and hexahedra in 3D. These elements are defined by their vertices and edges, forming a mesh that covers the entire … Read more

Useful formula for electromagnetism

Here are some useful vector identities commonly used in electromagnetic theory: Gradient of a scalar function: \[ \nabla (\phi) = \frac{\partial \phi}{\partial x} \mathbf{\hat{i}} + \frac{\partial \phi}{\partial y} \mathbf{\hat{j}} + \frac{\partial \phi}{\partial z} \mathbf{\hat{k}} \] Where \(\phi\) is a scalar function and \(\mathbf{\hat{i}}\), \(\mathbf{\hat{j}}\), and \(\mathbf{\hat{k}}\) are unit vectors along the \(x\), \(y\), and \(z\) … Read more

High power coaxial cable

Coaxial cable is a type of electrical cable that is widely used in telecommunications and computer networking to transmit data, video, and audio signals. It consists of a central conductor, which is usually made of copper or aluminum, surrounded by a dielectric insulating layer, and then an outer conductor that is typically made of a … Read more

Install LNMP on Alpine linux quickly

Alpine Linux is a lightweight, security-oriented Linux distribution based on musl libc and BusyBox. Some key things to know about Alpine Linux: So in summary, Alpine emphasizes security and extreme compactness, making it well-suited for containerized environments and constrained hardware while still being a capable general-purpose Linux distribution. Compared with Debian, both package manager and … Read more

How to install Nginx, Mysql, PHP (LNMP) on Debian linux quickly and transfer datas

LNMP is a software bundle that stands for Linux, Nginx, MySQL/MariaDB, and PHP. It is a popular stack for building web applications and hosting websites on Linux-based operating systems, particularly on Debian and Ubuntu. If you need to set up a web server to host and serve dynamic websites, web applications, or content management systems … Read more

Standard rectangle waveguide

A rectangular waveguide is a type of electromagnetic waveguide with a rectangular cross-section. It is used to guide electromagnetic waves, typically in the microwave frequency range. The dimensions of the waveguide are critical for determining its operating characteristics. The standard rectangular waveguide has two parallel broad walls and two narrow walls. The width (a) and … Read more