Tag: Source Code

Solving the Knapsack Problem with Code Examples

The Knapsack Problem is a classic optimization problem in computer science and mathematics. The goal is to maximize the value of items placed in a knapsack without exceeding its weight capacity. This problem has many variations, but the most common are: 0/1 Knapsack Problem: Each item can either be included or excluded. Fractional Knapsack Problem: Items can be divided to maximize value.

Read More

Binary Decision Diagram Data Structure

A BDD (Bryant 1986) or branching program is a data structure that is used to represent a Boolean function. On a more abstract level, BDDs can be considered as a compressed representation of sets or relations. Unlike other compressed representations, operations are performed directly on the compressed representation, i.e. without decompression.

Read More

A Comprehensive Comparison of Static Code Analysis Tools

This article will list the top 10 source code analysis and code review tools that I have used throughout my 13+ years in the software development field. These tools are also known as Static Application Security Testing (SAST) Tools and can help analyze source code or compiled programs. Most developers use static analysis tools that are plugged into their development environments, such as Visual Studio, Eclipse, or other IDE consoles.

Read More

How to Send Email using PHP

A detailed guide on PHP mail sending options with examples of using the built-in mail function(), PHPMailer, Symfony, and third-party mail service providers such as Amazon SES, SendGrid and GetResponse.

Read More

Errors: To Fail or To Recover?

The environment in which your code runs is imperfect: users will provide invalid inputs, external systems will go down, and your code and other code around it will often contain some number of bugs. Given this, errors are inevitable; things can and will go wrong, and as a result you can’t write robust and reliable code without thinking carefully about error cases.

Read More

C++ Program to Solve the Quadratic Equation

This program will solve quadratic equations. It accepts coefficients of a quadratic equation from the user i.e. a, b and c and displays the roots. To compile the program name it quadratic_solver.cpp then type g++ -o quadratic_solver quadratic_solver.cpp You may need to use math.h like this: #include if you are using windows C++ programming software. (I tried it without the math.h and got an “undeclared identifier” error)

Read More

The Phoenix Project
Transform your IT and business with The Phoenix Project – the gripping story that redefines how we think about DevOps and innovation!
View on Amazon