BigQuery DataFrames in Python

Google BigQuery is a powerful cloud-based data warehousing solution that enables users to analyze massive datasets quickly and efficiently. In Python, BigQuery DataFrames provide a Pythonic interface for interacting with BigQuery, allowing developers to leverage familiar tools and syntax for data querying and manipulation. In this comprehensive developer guide, we'll explore the usage of BigQuery DataFrames, their advantages, disadvantages, and potential performance issues.

Introduction to BigQuery DataFrames

BigQuery DataFrames serve as a bridge between Google BigQuery and Python, allowing seamless integration of BigQuery datasets into Python workflows. With BigQuery DataFrames, developers can use familiar libraries like Pandas to query, analyze, and manipulate BigQuery data. This Pythonic approach simplifies the development process and enhances productivity for data-driven applications.

The Cost-Benefit Analysis of Unit, Integration, and E2E Testing

In software testing, the goal is to balance thoroughness with manageability. Unit testing is efficient and manageable, yet it plateaus in effectiveness beyond 70% coverage, a benchmark difficult to achieve in practice. End-to-end (E2E) testing, while comprehensive, becomes increasingly challenging to maintain as software complexity grows, making full coverage impossible. Integration testing is indispensable for ensuring components work together seamlessly, but it also demands more maintenance with software expansion. The key is to strategically combine these testing methods to ensure software quality without overburdening the process, recognizing that more testing doesn't always translate to better outcomes.

“Teams always want to reach high E2E coverage but can’t — and they should reach high unit testing coverage but don’t.“

Generative AI With Spring Boot and Spring AI

It’s been more than 20 years since Spring Framework appeared in the software development landscape and 10 since Spring Boot version 1.0 was released. By now, nobody should have any doubt that Spring has created a unique style through which developers are freed from repetitive tasks and left to focus on business value delivery. As years passed, Spring’s technical depth has continually increased, covering a wide variety of development areas and technologies. On the other hand, its technical breadth has been continually expanded as more focused solutions have been experimented, proof of concepts created, and ultimately promoted under the projects’ umbrella (towards the technical depth).

One such example is the new Spring AI project which, according to its reference documentation, aims to ease the development when a generative artificial intelligence layer is aimed to be incorporated into applications. Once again, developers are freed from repetitive tasks and offered simple interfaces for direct interaction with the pre-trained models that incorporate the actual processing algorithms.

How to Allow Your Users to Subscribe to Comments in WordPress

Do you want to allow your users to subscribe to comments in WordPress?

By subscribing to comments, users will get email alerts about any new replies. This can encourage discussion or even heated debates and get more engagement on your website.

In this article, we will show you how to allow users to subscribe to comments on your WordPress website.

How to allow users to subscribe to comments in WordPress

Why Let Users Subscribe to Comments in WordPress?

Allowing people to comment on your WordPress blog is a great way to get more engagement. However, most of the time, users will visit your website, leave a comment, and never return.

By allowing users to subscribe to comments, they will get email alerts whenever someone comments on the same post. This will remind them about their comment and bring them back to your website.

Comment subscription also allows people to follow comment threads that generate a lot of discussions or heated debates.

Sadly, WordPress doesn’t allow visitors to subscribe to comments by default. However, you can easily add this missing feature using a WordPress plugin.

That said, let’s look at how to allow users to subscribe to comments on your WordPress website.

Allow Users to Subscribe to Comments Using Thrive Comments

The easiest way to offer a comment subscription feature is by using the Thrive Comments plugin.

It is the best WordPress comments plugin on the market. Thrive Comments is part of the Thrive Themes suite of plugins and lets users subscribe to comments with a click of a button. Plus, it includes plenty of features to improve comment interaction, including upvote/downvote, comment badges, and more.

For more details, you can see our detailed Thrive Comments review.

First, you will need to visit the Thrive Themes website and sign up for an account.

ThriveThemes

After creating an account, you can head to the account dashboard.

From here, simply click the ‘Download and install the Thrive Product Manager plugin’ link.

Install Thrive Product Manager

Next, you will need to install the Thrive Product Manager plugin on your WordPress site. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, you can go to the Product Manager option from your WordPress dashboard. Here, simply click the ‘Log into my account’ button.

Log into the Thrive Product Manager dashboard

After logging in to your account, you should see the Thrive Product Manager dashboard.

Simply navigate to the ‘Thrive Comments’ plugin, select it, and then click the ‘Install selected products’ button.

Install Thrive Comments

Once the plugin is installed, you will see a success message saying, ‘Ready to use’.

Next, you can click the ‘Go to the Thrive Themes Dashboard’ button.

View Thrive Comments success message

After that, you will see all your Thrive Themes plugins installed on your site.

Simply click on the ‘Thrive Comments’ button.

Go to Thrive Comments

Setting Up Comment Notifications in Thrive Comments

Next, you will see the Thrive Comments settings.

Go ahead and click on the ‘Notifications’ option.

Go to Thrive Comments notifications

After that, you will need to connect an email delivery service to send notifications to comment subscribers.

Simply click the ‘+ Add new’ button.

Add new comment notification

Next, you will need to select an email marketing service to connect with Thrive Comments.

Go ahead and click the ‘+ Add new Connection’ option.

Add new connection for comments

From here, you should see a dropdown menu with different email tools.

Simply click the dropdown menu and select the email delivery service you’d like to connect.

Select email marketing tool to connect

Thrive Comments will then ask you to enter the API key or API Token for your chosen tool.

You can find the key in your email marketing tool’s dashboard or account area. Do note that the steps to retrieve the API key may be different for each service, so we recommend taking a look at their documentation.

Enter email tool API

Once you connect the email delivery tool, you will see it as an active connection.

Thrive Comments also lets you customize the comment notification and post notification.

This allows you to edit the default notification messages users will receive when they leave a comment and someone replies to their comment or when a new comment or reply is added to the specific post.

Customize post and comment notifications

For instance, if you click the ‘Customize Comment Notification’ option, then you can edit the email subject line, content, and more.

There are also notification shortcodes that you can add to the email text, like the site title or comment author’s name.

Edit comment notification options

Similarly, if you click the ‘Customize Post Notification’ option, then you can edit the email that users will get when someone leaves a comment on the thread.

Here, the plugin lets you change the text of the email and use different shortcodes to include more details in the content.

Customize notification for new comments on thread

When you are done, simply save your settings by clicking on the ‘Save’ button.

Next, you can visit your WordPress website and scroll down to the comment section under any post or page. You will see the ‘Subscribe to comments’ option at the bottom.

View subscribe to comments

After setting up the plugin, it’s a good idea to subscribe to a comment thread to check that WordPress is sending the emails correctly. If you don’t get any email notifications, then just check out our guide on how to fix the WordPress not sending email issue.

Bonus Tips for Managing Comments in WordPress

Now that you’ve set up a comment subscription option on your site, you can take things one step further and learn more tricks for managing comments.

For instance, you can add Google reCAPTCHA to the comment form and filter spam. Users will have to click the checkbox indicating they are not a robot or select a set of images to pass the test.

New recaptcha

Besides that, you can also manage your comment email notifications. WordPress offers default settings to send you an email whenever someone posts a comment or a comment is held for moderation.

However, there are different WordPress plugins that allow you to send notifications to users as well. For example, you can send an email to a user when their comment is approved.

Email me whenever settings

Here are some more helpful resources on WordPress comments:

We hope this article helped you allow your users to subscribe to comments in WordPress. You may also want to check out our guide on how to allow user registration on your WordPress site and our expert picks for the best email marketing services for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Allow Your Users to Subscribe to Comments in WordPress first appeared on WPBeginner.

Making Dropwizard Metrics Accessible via CQL in Apache Cassandra

Metrics are a vital part of complex distributed storage systems, such as Apache Cassandra. It's important for an operator and a user to have access to metrics at the OS, JVM, and application levels to have full control over the data that is being processed and to prevent emergencies before they occur.

To make metrics accessible, Cassandra heavily relies on the open-source Dropwizard Metrics library, which acts as a skeleton for both metrics representation and storage. Metrics representations are provided as Histogram, Timer, Meter, Gauge, etc. classes for metric types, while storage uses MetricRegistry. The Dropwizard library makes it easy to expose the database internals through various APIs, like JMX or REST, in addition to the sidecar pattern. Apache Casandra has a vibrant ecosystem in this regard, for example, you can write your java-agent to export all data from the registry to the collectd Unix daemon. In conjunction, Cassandra's virtual tables, which are a relatively recent development by the project's standards (available since 4.0), have only a fraction of all the metrics so far, so don't give a full view of internal processes and need to be improved to rectify this.

Combating Malware Threats

In the digital age, the security landscape is continually evolving, with malicious actors developing and deploying a variety of sophisticated malware to exploit systems, steal data, and disrupt operations.

Understanding the diverse array of malware types is crucial for individuals, organizations, and cybersecurity professionals to effectively protect against these pervasive threats. 

How To Draw Radar Charts In Web

I got to work with a new type of chart for data visualization called a radar chart when a project asked for it. It was new to me, but the idea is that there is a circular, two-dimensional circle with plots going around the chart. Rather than simple X and Y axes, each plot on a radar chart is its own axis, marking a spot between the outer edge of the circle and the very center of it. The plots represent some sort of category, and when connecting them together, they are like vertices that form shapes to help see the relationship of category values, not totally unlike the vectors in an SVG.

Sometimes, the radar chart is called a spider chart, and it’s easy to see why. The axes that flow outward intersect with the connected plots and form a web-like appearance. So, if your Spidey senses were tingling at first glance, you know why.

You already know where we’re going with this: We’re going to build a radar chart together! We’ll work from scratch with nothing but HTML, CSS, and JavaScript. But before we go there, it’s worth noting a couple of things about radar charts.

First, you don’t have to build them from scratch. Chart.js and D3.js are readily available with convenient approaches that greatly simplify the process. Seeing as I needed just one chart for the project, I decided against using a library and took on the challenge of making it myself. I learned something new, and hopefully, you do as well!

Second, there are caveats to using radar charts for data visualization. While they are indeed effective, they can also be difficult to read when multiple series stack up. The relationships between plots are not nearly as decipherable as, say, bar charts. The order of the categories around the circle affects the overall shape, and the scale between series has to be consistent for drawing conclusions.

That all said, let’s dive in and get our hands sticky with data plots.

The Components

The thing I like immediately about radar charts is that they are inherently geometrical. Connecting plots produces a series of angles that form polygon shapes. The sides are straight lines. And CSS is absolutely wonderful for working with polygons given that we have the CSS polygon() function for drawing them by declaring as many points as we need in the function’s arguments.

We will start with a pentagonal-shaped chart with five data categories.

See the Pen Radar chart (Pentagon) [forked] by Preethi Sam.

There are three components we need to establish in HTML before we work on styling. Those would be:

  1. Grids: These provide the axes over which the diagrams are drawn. It’s the spider web of the bunch.
  2. Graphs: These are the polygons we draw with the coordinates of each data plot before coloring them in.
  3. Labels: The text that identifies the categories along the graphs’ axes.

Here’s how I decided to stub that out in HTML:

<!-- GRIDS -->
<div class="wrapper">
  <div class="grids polygons">
    <div></div>
  </div>
  <div class="grids polygons">
    <div></div>
  </div>
  <div class="grids polygons">
    <div></div>
  </div>
</div>

<!-- GRAPHS -->
<div class="wrapper">
  <div class="graphs polygons">
    <div><!-- Set 1 --></div>
  </div>
  <div class="graphs polygons">
    <div><!-- Set 2 --></div>
  </div>
  <div class="graphs polygons">
    <div><!-- Set 3 --></div>
  </div>
  <!-- etc. -->
</div>

<!-- LABELS -->
<div class="wrapper">
  <div class="labels">Data A</div>
  <div class="labels">Data B</div>
  <div class="labels">Data C</div>
  <div class="labels">Data D</div>
  <div class="labels">Data E</div>
  <!-- etc. -->
</div>

I’m sure you can read the markup and see what’s going on, but we’ve got three parent elements (.wrapper) that each holds one of the main components. The first parent contains the .grids, the second parent contains the .graphs, and the third parent contains the .labels.

Base Styles

We’ll start by setting up a few color variables we can use to fill things in as we go:

:root {
  --color1: rgba(78, 36, 221, 0.6); /* graph set 1 */
  --color2: rgba(236, 19, 154, 0.6); /* graph set 2 */
  --color3: rgba(156, 4, 223, 0.6); /* graph set 3 */
  --colorS: rgba(255, 0, 95, 0.1); /* graph shadow */
}

Our next order of business is to establish the layout. CSS Grid is a solid approach for this because we can place all three grid items together on the grid in just a couple of lines:

/* Parent container */
.wrapper { display: grid; }

/* Placing elements on the grid */
.wrapper > div {
  grid-area: 1 / 1; /* There's only one grid area to cover */
}

Let’s go ahead and set a size on the grid items. I’m using a fixed length value of 300px, but you can use any value you need and variablize it if you plan on using it in other places. And rather than declaring an explicit height, let’s put the burden of calculating a height on CSS using aspect-ratio to form perfect squares.

/* Placing elements on the grid */
.wrapper div {
  aspect-ratio: 1 / 1;
  grid-area: 1 / 1;
  width: 300px;
}

We can’t see anything just yet. We’ll need to color things in:

/* ----------
Graphs
---------- */
.graphs:nth-of-type(1) > div { background: var(--color1); }
.graphs:nth-of-type(2) > div { background: var(--color2); }
.graphs:nth-of-type(3) > div { background: var(--color3); }

.graphs {
  filter: 
    drop-shadow(1px 1px 10px var(--colorS))
    drop-shadow(-1px -1px 10px var(--colorS))
    drop-shadow(-1px 1px 10px var(--colorS))
    drop-shadow(1px -1px 10px var(--colorS));
}

/* --------------
Grids 
-------------- */
.grids {
  filter: 
    drop-shadow(1px 1px 1px #ddd)
    drop-shadow(-1px -1px 1px #ddd)
    drop-shadow(-1px 1px 1px #ddd)
    drop-shadow(1px -1px 1px #ddd);
    mix-blend-mode: multiply;
}

.grids > div { background: white; }

Oh, wait! We need to set widths on the grids and polygons for them to take shape:

.grids:nth-of-type(2) { width: 66%; }
.grids:nth-of-type(3) { width: 33%; }

/* --------------
Polygons 
-------------- */
.polygons { place-self: center; }
.polygons > div { width: 100%; }

Since we’re already here, I’m going to position the labels a smidge and give them width:

/* --------------
Labels
-------------- */
.labels:first-of-type { inset-block-sptart: -10%; }

.labels {
  height: 1lh;
  position: relative;
  width: max-content;
}

We still can’t see what’s going on, but we can if we temporarily draw borders around elements.

See the Pen Radar chart layout [forked] by Preethi Sam.

All combined, it doesn’t look all that great so far. Basically, we have a series of overlapping grids followed by perfectly square graphs stacked right on top of one another. The labels are off in the corner as well. We haven’t drawn anything yet, so this doesn’t bother me for now because we have the HTML elements we need, and CSS is technically establishing a layout that should come together as we start plotting points and drawing polygons.

More specifically:

  • The .wrapper elements are displayed as CSS Grid containers.
  • The direct children of the .wrapper elements are divs placed in the exact same grid-area. This is causing them to stack one right on top of the other.
  • The .polygons are centered (place-self: center).
  • The child divs in the .polygons take up the full width (width:100%).
  • Every single div is 300px wide and squared off with a one-to-one aspect-ratio.
  • We’re explicitly declaring a relative position on the .labels. This way, they can be automatically positioned when we start working in JavaScript.

The rest? Simply apply some colors as backgrounds and drop shadows.

Calculating Plot Coordinates

Don’t worry. We are not getting into a deep dive about polygon geometry. Instead, let’s take a quick look at the equations we’re using to calculate the coordinates of each polygon’s vertices. You don’t have to know these equations to use the code we’re going to write, but it never hurts to peek under the hood to see how it comes together.

x1 = x + cosθ1 = cosθ1 if x=0
y1 = y + sinθ1 = sinθ1 if y=0
x2 = x + cosθ2 = cosθ2 if x=0
y2 = y + sinθ2 = sinθ2 if y=0
etc.

x, y = center of the polygon (assigned (0, 0) in our examples)

x1, x2… = x coordinates of each vertex (vertex 1, 2, and so on)
y1, y2… = y coordinates of each vertex
θ1, θ2… = angle each vertex makes to the x-axis

We can assume that 𝜃 is 90deg (i.e., 𝜋/2) since a vertex can always be placed right above or below the center (i.e., Data A in this example). The rest of the angles can be calculated like this:

n = number of sides of the polygon

𝜃1 = 𝜃0 + 2𝜋/𝑛 = 𝜋/2 + 2𝜋/𝑛
𝜃2 = 𝜃0 + 4𝜋/𝑛 = 𝜋/2 + 4𝜋/𝑛
𝜃3 = 𝜃0 + 6𝜋/𝑛 = 𝜋/2 + 6𝜋/𝑛
𝜃3 = 𝜃0 + 8𝜋/𝑛 = 𝜋/2 + 8𝜋/𝑛
𝜃3 = 𝜃0 + 10𝜋/𝑛 = 𝜋/2 + 10𝜋/𝑛

Armed with this context, we can solve for our x and y values:

x1 = cos(𝜋/2 + 2𝜋/# sides)
y1 = sin(𝜋/2 + 2𝜋/# sides)
x2 = cos(𝜋/2 + 4𝜋/# sides)
y2 = sin(𝜋/2 + 4𝜋/# sides)
etc.

The number of sides depends on the number of plots we need. We said up-front that this is a pentagonal shape, so we’re working with five sides in this particular example.

x1 = cos(𝜋/2 + 2𝜋/5)
y1 = sin(𝜋/2 + 2𝜋/5)
x2 = cos(𝜋/2 + 4𝜋/5)
y2 = sin(𝜋/2 + 4𝜋/5)
etc.
Drawing Polygons With JavaScript

Now that the math is accounted for, we have what we need to start working in JavaScript for the sake of plotting the coordinates, connecting them together, and painting in the resulting polygons.

For simplicity’s sake, we will leave the Canvas API out of this and instead use regular HTML elements to draw the chart. You can, however, use the math outlined above and the following logic as the foundation for drawing polygons in whichever language, framework, or API you prefer.

OK, so we have three types of components to work on: grids, graphs, and labels. We start with the grid and work up from there. In each case, I’ll simply drop in the code and explain what’s happening.

Drawing The Grid

// Variables
let sides = 5; // # of data points
let units = 1; // # of graphs + 1
let vertices = (new Array(units)).fill(""); 
let percents = new Array(units);
percents[0] = (new Array(sides)).fill(100); // for the polygon's grid component
let gradient = "conic-gradient(";
let angle = 360/sides;

// Calculate vertices
with(Math) { 
  for(i=0, n = 2 * PI; i < sides; i++, n += 2 * PI) {
    for(j=0; j < units; j++) {
      let x = ( round(cos(-1 * PI/2 + n/sides) * percents[j][i]) + 100 ) / 2; 
      let y = ( round(sin(-1 * PI/2 + n/sides) * percents[j][i]) + 100 ) / 2; 
      vertices[j] += ${x}% ${y} ${i == sides - 1 ? '%':'%, '};
  }
  gradient += white ${
    (angle &#42; (i+1)) - 1}deg,
    #ddd ${ (angle &#42; (i+1)) - 1 }deg,
    #ddd ${ (angle &#42; (i+1)) + 1 }deg,
    white ${ (angle &#42; (i+1)) + 1 }deg,;}
}

// Draw the grids
document.querySelectorAll('.grids>div').forEach((grid,i) => {
  grid.style.clipPath =polygon(${ vertices[0] });
});
document.querySelector('.grids:nth-of-type(1) > div').style.background =${gradient.slice(0, -1)} );

Check it out! We already have a spider web.

See the Pen Radar chart (Grid) [forked] by Preethi Sam.

Here’s what’s happening in the code:

  1. sides is the number of sides of the chart. Again, we’re working with five sides.
  2. vertices is an array that stores the coordinates of each vertex.
  3. Since we are not constructing any graphs yet — only the grid — the number of units is set to 1, and only one item is added to the percents array at percents[0]. For grid polygons, the data values are 100.
  4. gradient is a string to construct the conic-gradient() that establishes the grid lines.
  5. angle is a calculation of 360deg divided by the total number of sides.

From there, we calculate the vertices:

  1. i is an iterator that cycles through the total number of sides (i.e., 5).
  2. j is an iterator that cycles through the total number of units (i.e., 1).
  3. n is a counter that counts in increments of 2*PI (i.e., 2𝜋, 4𝜋, 6𝜋, and so on).

The x and y values of each vertex are calculated as follows, based on the geometric equations we discussed earlier. Note that we multiply 𝜋 by -1 to steer the rotation.

cos(-1 * PI/2 + n/sides) // cos(𝜋/2 + 2𝜋/sides), cos(𝜋/2 + 4𝜋/sides)...
sin(-1 * PI/2 + n/sides) // sin(𝜋/2 + 2𝜋/sides), sin(𝜋/2 + 4𝜋/sides)...

We convert the x and y values into percentages (since that is how the data points are formatted) and then place them on the chart.

let x = (round(cos(-1 * PI/2 + n/sides) * percents[j][i]) + 100) / 2;
let y = (round(sin(-1 * PI/2 + n/sides) * percents[j][i]) + 100) / 2;

We also construct the conic-gradient(), which is part of the grid. Each color stop corresponds to each vertex’s angle — at each of the angle increments, a grey (#ddd) line is drawn.

gradient += 
  `white ${ (angle * (i+1)) - 1 }deg,
   #ddd ${ (angle * (i+1)) - 1 }deg,
   #ddd ${ (angle * (i+1)) + 1 }deg,
   white ${ (angle * (i+1)) + 1 }deg,`

If we print out the computed variables after the for loop, these will be the results for the grid’s vertices and gradient:

console.log(polygon( ${vertices[0]} )); /* grid’s polygon */
// polygon(97.5% 34.5%, 79.5% 90.5%, 20.5% 90.5%, 2.5% 34.5%, 50% 0%)

console.log(gradient.slice(0, -1)); /* grid’s gradient */
// conic-gradient(white 71deg, #ddd 71deg,# ddd 73deg, white 73deg, white 143deg, #ddd 143deg, #ddd 145deg, white 145deg, white 215deg, #ddd 215deg, #ddd 217deg, white 217deg, white 287deg, #ddd 287deg, #ddd 289deg, white 289deg, white 359deg, #ddd 359deg, #ddd 361deg, white 361deg

These values are assigned to the grid’s clipPath and background, respectively, and thus the grid appears on the page.

The Graph

// Following the other variable declarations 
// Each graph's data points in the order [B, C, D... A] 
percents[1] = [100, 50, 60, 50, 90]; 
percents[2] = [100, 80, 30, 90, 40];
percents[3] = [100, 10, 60, 60, 80];

// Next to drawing grids
document.querySelectorAll('.graphs > div').forEach((graph,i) => {
  graph.style.clipPath =polygon( ${vertices[i+1]} );
});

See the Pen Radar chart (Graph) [forked] by Preethi Sam.

Now it looks like we’re getting somewhere! For each graph, we add its set of data points to the percents array after incrementing the value of units to match the number of graphs. And that’s all we need to draw graphs on the chart. Let’s turn our attention to the labels for the moment.

The Labels

// Positioning labels

// First label is always set in the top middle
let firstLabel = document.querySelector('.labels:first-of-type');
firstLabel.style.insetInlineStart =calc(50% - ${firstLabel.offsetWidth / 2}px);

// Setting labels for the rest of the vertices (data points). 
let v = Array.from(vertices[0].split(' ').splice(0, (2 * sides) - 2), (n)=> parseInt(n)); 

document.querySelectorAll('.labels:not(:first-of-type)').forEach((label, i) => {
  let width = label.offsetWidth / 2; 
  let height = label.offsetHeight;
  label.style.insetInlineStart = calc( ${ v[i&#42;2] }% + ${ v[i&#42;2] &lt; 50 ? - 3&#42;width : v[i&#42;2] == 50 ? - width: width}px );
  label.style.insetBlockStart = calc( ${ v[(i&#42;2) + 1] }% - ${ v[(i &#42; 2) + 1] == 100 ? - height: height / 2 }px );
});

The positioning of the labels is determined by three things:

  1. The coordinates of the vertices (i.e., data points) they should be next to,
  2. The width and height of their text, and
  3. Any blank space needed around the labels so they don’t overlap the chart.

All the labels are positioned relative in CSS. By adding the inset-inline-start and inset-block-start values in the script, we can reposition the labels using the values as coordinates. The first label is always set to the top-middle position. The coordinates for the rest of the labels are the same as their respective vertices, plus an offset. The offset is determined like this:

  1. x-axis/horizontal
    If the label is at the left (i.e., x is less than 50%), then it’s moved towards the left based on its width. Otherwise, it’s moved towards the right side. As such, the right or left edges of the labels, depending on which side of the chart they are on, are uniformly aligned to their vertices.
  2. y-axis/vertical
    The height of each label is fixed. There’s not much offset to add except maybe moving them down half their height. Any label at the bottom (i.e., when y is 100%), however, could use additional space above it for breathing room.

And guess what…

We’re Done!

See the Pen Radar chart (Pentagon) [forked] by Preethi Sam.

Not too shabby, right? The most complicated part, I think, is the math. But since we have that figured out, we can practically plug it into any other situation where a radar chart is needed. Need a four-point chart instead? Update the number of vertices in the script and account for fewer elements in the markup and styles.

In fact, here are two more examples showing different configurations. In each case, I’m merely increasing or decreasing the number of vertices, which the script uses to produce different sets of coordinates that help position points along the grid.

Need just three sides? All that means is two fewer coordinate sets:

See the Pen Radar chart (Triangle) [forked] by Preethi Sam.

Need seven sides? We’ll produce more coordinate sets instead:

See the Pen Radar chart (Heptagon) [forked] by Preethi Sam.

Creating a Hybrid Disaster Recovery Solution Utilizing Availability Group and Log-Shipping

SQL Server Always on availability group is a great addition to SQL Server for providing high availability and disaster recovery. Always-on availability group support failover the environment for a discrete set of user databases, known as availability databases, that failover together. They also support a set of read-write primary databases and several sets of corresponding secondary databases. Optionally, AGs can make secondary databases available for read-only access and some backup operations.  

SQL Server log shipping is another popular disaster recovery solution that utilizes transaction log backups shipped from a primary database on a primary SQL server instance to one or more secondary databases on separate secondary SQL server instances. The transaction log backups are applied to each secondary database individually to obtain a synchronized database as primary.

Unlocking Product Success: The Vital Role of the Discovery Phase

The discovery phase is a vital step in product development that can help increase your product success chances, reduce risks, improve the accuracy of your budget and time estimates, and optimize the development costs. In this article, we share details on how the software development discovery phase works and its benefits and highlight the discovery phase process, deliverables, team, and potential cost.  

A well-done groundwork is an essential aspect of success in any venture. You should create a detailed plan before laying the foundation and building a house. This rule also applies to product development. The phase that comes before the start of the software development project is called the discovery phase and is crucial to the success of any product. The discovery phase process aims to transform the idea of a product into a set of assets sufficient to start product development, thus increasing the odds of product development and market success. 

The State of Data Streaming for Healthcare With Kafka and Flink

This blog post explores the state of data streaming for the healthcare industry in 2023. The digital disruption combined with growing regulatory requirements and IT modernization efforts require a reliable data infrastructure, real-time end-to-end observability, fast time-to-market for new features, and integration with pioneering technologies like sensors, telemedicine, or AI/machine learning. Data streaming allows integrating and correlating legacy and modern interfaces in real-time at any scale to improve most business processes in the healthcare sector much more cost-efficiently.

I look at trends in the healthcare industry to explore how data streaming helps as a business enabler, including customer stories from Humana, Recursion, BHG (former Bankers Healthcare Group), Evernorth Health Services, and more. A complete slide deck and on-demand video recording are included.

Five Java Developer Must-Haves for Ultra-Fast Startup Solutions

Many solutions that promise ultra-fast startup times for serverless Java apps force you to compromise on developer experience, throughput performance, or security. We’ll show you how to get ultra-fast startup of your Java apps without these compromises. 

Say, for example, you’re writing a Java web service that provides a catalog of items that your business sells. At quiet times, your application needs to stop all unneeded instances of the catalog service so that your business is not paying unnecessary cloud bills; at busy times, your application needs to rapidly spin up more instances so that your customers get instantaneous response times on your website. This is “scale-to-zero,” and your application needs to do it fast.  

Evolution of Privacy-Preserving AI: From Protocols to Practical Implementations

Year by year, artificial intelligence evolves and becomes more efficient for solving everyday human tasks. But at the same time, it increases the possibility of personal information misuse, reaching unprecedented levels of power and speed in analyzing and spreading individuals' data. In this article, I would like to take a closer look at the strong connection between artificial intelligence systems and machine learning and their use of increasingly private and sensitive data. 

Together, we'll explore existing privacy risks, discuss traditional approaches to privacy in machine learning, and analyze ways to overcome security breaches.

The Transformative Impact of AI and ML on Software Development

In the ever-evolving landscape of technology, Artificial Intelligence (AI) and Machine Learning (ML) have emerged as revolutionary forces, reshaping the traditional paradigms of software development. The integration of these cutting-edge technologies has ushered in a new era where efficiency, innovation, and user-centricity take center stage.

AI and ML in Software Development

Automated Code Generation

One of the most impactful applications of AI in software development is automated code generation. AI-powered tools can generate code snippets, significantly reducing the manual coding workload. This not only expedites the development process but also minimizes the occurrence of errors, leading to more robust and reliable software.

Google Is Shutting Down Business Profile Sites: 5 Things to Do

Google is shutting down more than 21.7 million websites created with Google My Business.

These were free small business websites that Google offered to users when they created a Google Business Profile.

All of these websites will be turned off in March 2024, and users visiting those sites will be redirected to the Google Business Profiles associated with those accounts.

Let’s talk about how this change may affect your business and what you can do to not lose valuable online traffic.

Here are the things you need to do before Google shutdows Business Profile sites

Here is a list of topics we will cover in this article:

What Is a Google Business Profile Site?

A Google Business Profile helps businesses appear in Google’s local search results with detailed information, including directions, business hours, phone numbers, and a link to visit the business’s website.

Local search results example

Local searches have increased almost 500% over the past few years. According to Google, almost 78% of searches for a local business end up in a physical visit within a week. (Source: ThinkwithGoogle)

This makes it essential for businesses to appear in local search results, and the easiest way to do this is by creating a Google Business Profile.

When you create a Google Business Profile, Google gives you the option to add your website. Previously, businesses that didn’t have a website were offered to create a free one instantly using the information in their Google Business Profile.

Many small businesses took advantage of this option and created these free websites. This drove them traffic, leads, and in-store visits from local searches.

Why Migrate Your Google Business Profile Site?

Google Business Profile sites will be shut down in March 2024. These were small, single-page sites that Google offered free to users when they created a Google Business Profile.

Google business profile website

Once this service is closed, users will be redirected to the Business Profile page until June 10, 2024. After that, users visiting your site will see a page not found error. This will make your business look less professional and legitimate.

More importantly, it will affect the conversions you get from local searches. If you don’t have another website to replace the Business Profile site, then potential customers may not be able to learn everything they want to know about your company before visiting it. Unfortunately, this could lead to them choosing a competitor instead.

What to Do Before Google Business Profile Site Shutdown

If you are among the millions of businesses who used the option to create a Google Business Profile site, then here is what you need to do before Google shuts down the service.

Step 1: Make a Website You Own and Control

Google has a long history of shutting down services and products. Remember Orkut, Google+, and, more recently, Google Domains? There is a long list of products and services that have been shut down, and you can see Google Graveyard for a full list.

That’s why you need to make a website for your business that you own and control.

You will be able to display your website content in local search results. And since you have full control, you can drive even more traffic to your business.

The best way to do this is by using WordPress. It is the world’s most popular website builder, used by over 43% of all websites.

Note: When we say WordPress, we are talking about WordPress.org, also known as self-hosted WordPress. This is not to be confused with WordPress.com, which is a web hosting service. To understand the difference, just see our guide on WordPress.org vs. WordPress.com.

Why Use WordPress for Your Business Website?

WordPress is the most powerful yet easy-to-use website builder on the market. Here are some of the reasons for choosing WordPress:

  • It is free and open-source and has been around for 20+ years.
  • Websites you create using WordPress are fully controlled and owned by you.
  • It is infinitely extendible. You can use it to make a 1-page website, or you can use it to create a full-fledged online store.
  • It has thousands of design templates, tools, and plugins to choose from.
  • Lastly, it is very SEO-friendly and you can use it to get even more traffic from Google search results.

Need more convincing? Take a look at our explainer on why you should use WordPress.

Getting Started With WordPress

WordPress itself is free to download and use, but you’ll need a domain name and web hosting to run it.

These things used to be quite technical for average users, but luckily, they are not anymore.

You simply need to sign up for a web hosting account and purchase a domain name, and they will have a 1-click WordPress installer ready for you.

Web hosting typically costs around $7.99 per month (paid annually), and domain names start at ($16.99/year).

This is a significant investment, especially considering you didn’t pay anything to create your Google Business Profile site.

Luckily, the folks at Bluehost are offering a generous discount on hosting with a free domain name. This deal will help you get started at just $1.99 per month.

Bluehost is one of the biggest hosting companies in the world. They are also one of the officially recommended WordPress hosting providers.

Simply go to the Bluehost website and click on the green ‘Get Started Now’ button.

Bluehost website

Next, you’ll be asked to choose a hosting plan.

Basic and Choice Plus plans should be quite enough for a small business website.

Choose a hosting plan

Click ‘Select’ to choose your plan and continue.

After that, you will need to pick your domain name, or if you have a domain name already, then you can use that.

Bluehost choose your domain name

A domain name is your website’s name and the address that users will enter in their browser to visit it (e.g. wpbeginner.com or google.com).

💡Tip: Try our free business name generator tool. It will help you quickly generate dozens of ideas for your domain name.

After choosing your domain, you will be asked to fill in your account information and finalize the package.

You will see some additional options on the screen under Package Extras. You can uncheck all of them as they will increase your costs. You can always add them later if needed.

Bluehost uncheck extras

After that, enter your payment information to complete the purchase.

Bluehost will now create your hosting account and send you an email with login details.

Once you log in to your Bluehost hosting account, they will automatically install WordPress for you.

You can just click on the ‘Edit Site’ button to log in to WordPress and start working on your website.

Login to WordPress by click on the Edit Site button in Bluehost

Bluehost will walk you through the initial setup, and you can follow the on-screen instructions to create your website.

For more details, you can see our complete WordPress installation tutorial.

Step 2: Set Up Local SEO for Your Business Site

Local SEO is a set of techniques used to improve a business website’s visibility in local search results.

It sounds a bit technical, but it isn’t. Let us explain a bit.

Basically, you just need to add your business information to your website using Schema.org markup.

This markup is added to your website’s code in a special format, and search engines like Google can then find and use this data. This allows search engines to show your company in the search results to people who are looking for businesses like yours.

Luckily, you don’t even need to write this markup code. There are excellent tools that help you add that data to your website and optimize it for local SEO.

We recommend using All in One SEO for WordPress. It is the best WordPress SEO plugin on the market that allows you to easily optimize your website for local SEO easily.

All in One SEO website

Note: You’ll need at least the Plus plan of the plugin to unlock the Local SEO features.

First, you need to install and activate the All in One SEO Plugin. For more details, see our tutorial on how to install a WordPress plugin.

Upon activation, the plugin will show you a setup wizard. Simply follow the on-screen instructions to complete the setup.

AIOSEO Setup Wizard

After finishing the setup, head over to the All in One SEO » Local SEO page in your WordPress dashboard.

You will be asked to ‘Activate Local SEO’ by clicking on the button.

Activate Local SEO

All in One SEO will now download and activate the Local SEO addon.

After that, you will end up in the Locations tab.

Now, if your business has multiple locations, then you can turn the ‘Multiple Location’ toggle to ‘Yes’.

Adding business location information

For more details, see our tutorial on how to add multiple locations schema in WordPress.

Scroll down a little to the Business Info section.

Enter your business information

Here, you will need to provide general information for your business, including its name, logo image, type of business, complete address, phone number, and more.

Next, switch to the ‘Opening Hours’ tab to enter your business hours.

AIOSEO business hours

Ensure that the ‘Show Opening Hours’ toggle is set to ‘Yes’ if you want to display business hours on your website.

Scroll down a little and then add your business hours.

Add business hours in AIOSEO

After that, you can switch to the ‘Google Maps’ tab.

You’ll need a Google Maps API key if you want to display your business location in Google Maps on your website.

Enter Google Maps API key

Just click the ‘Learn More’ link for instructions on how to get the API key.

Finally, click on the ‘Save Changes’ button to save your settings.

Displaying Your Business Information on Your Website

All in One SEO will automatically add the schema markup to your website’s code, making it discoverable by search engines.

You can also display your business information on your website to make it visible to visitors and customers.

Simply edit the page where you want to display it and then click on the [+] add block button on the edit screen.

Search for AIOSEO Local and then add the local SEO blocks to your page.

AIOSEO local SEO blocks

You can then use the WordPress block editor to style or rearrange those items.

Don’t forget to update your page and preview your changes.

AIOSEO local business information preview

For more details, see our guide on how to use the WordPress block editor.

Step 3: Add Your New Website to Google Business Profile

Once you have created your new website, you can add it to your Google Business Profile.

To do that, you need to visit the Google Business Profile website or search Google with your exact business name.

Edit Google Business profile

This will bring up a popup with your business information.

Scroll down to the Website section and replace your old website address with the new one.

Add your new site

Now, visitors who click on the ‘Website’ link in your Google Business Profile will be directed to your new WordPress website instead of the old Business Profile website.

Step 4: Create Landing Pages for Your Google Ads (Optional)

Google previously offered free ad credits to businesses when they added their sites to Google Business Profile.

If your ads were bringing users to your old Google Business Profile site, then you may want to send them to your new WordPress website.

Now that you are using an actual website builder, you can also create attractive landing pages for your Google Ads campaigns.

The easiest way to create professional-looking landing pages is by using SeedProd. It is an easy-to-use drag-and-drop page builder for WordPress.

SeedProd

Note: There is also a free version of SeedProd. However, we recommend upgrading to the paid version to unlock more features.

SeedProd comes with 300+ page templates to use as a starting point. After that, you can use its drag-and-drop interface to design your ad landing page.

A SeedProd landing page template

For more details, you can see our guide on how to make a Google ad landing page in WordPress.

Step 5: Redirect Your Custom Domain

By default, Google hosted Google Business Profile sites on URLs like:

https://example.business.site

Some businesses started using their own custom domains and simply redirected them to their Google Business Profile sites.

Depending on where you registered your domain name, you will need to sign in to your domain registrar website, undo that redirect, and point it to your new WordPress site.

On the other hand, if you want to start using that domain as the primary domain for your new WordPress site, then you need to point it to your hosting provider’s nameservers.

Simply log in to the domain management area and look for ‘DNS & Nameservers’. We are showing the Domain.com settings in screenshots, but it looks pretty much the same across all domain providers.

Here, you will see nameservers pointing to your domain registrar. You need to remove those entries.

Domain.com change nameservers

After that, click on the ‘Add Nameserver’ button and add your new hosting provider’s nameservers.

For instance, if your WordPress site is hosted on Bluehost, then your nameserver information will look like this:

ns1.bluehost.com

ns2.bluehost.com

For more details, please see our guide on how to change domain nameservers and point it to a new host.

Once you have changed the nameserver information, it may take some time (between a few hours to two days) for those changes to propagate across the internet.

Bonus: Make the Most Out of Your New WordPress Site

Now that you have set up your WordPress website and added it to your Google Business profile, you can start customizing your site.

Here are some tips to help you get started.

1. Choose a WordPress Theme

WordPress gives you access to thousands of themes (website templates). Many of them are free, and you can install one of them to instantly transform the appearance of your website.

Browse free WordPress themes

See our article on how to choose the perfect theme for your website for more details.

However, it may get quite confusing when you have this much choice. To avoid this, you can take a look at our curated lists of WordPress themes that are hand-picked by our WordPress experts:

Once you’ve picked one, simply follow our step-by-step tutorial on how to install a WordPress theme.

2. Create Important WordPress Pages

WordPress comes with two default content types, posts and pages. While posts belong to a blog, pages are used to create a site’s structure and layout.

You can start adding pages by going to Pages » Add New Page in the WordPress admin area.

Add new page

For instance, if you run a small plumbing services business, then you may want to add an About page, a Services Page, and a Contact page.

For more information, see our list of essential pages to create on a WordPress website.

We also recommend adding blog posts so that you can get more traffic to your business website. You can see our guide on how to start a WordPress blog for more information.

3. Install Necessary Plugins

Plugins are like apps for your WordPress website. They allow you to add extra functionality and new features to WordPress.

For a small business website, here are some must-have plugins:

  • WPForms – You will need it to create forms that users can submit on your website. These include a contact form, booking forms, appointments, and more. Plus, you can also use WPForms to accept online payments.
  • All in One SEO – We have already mentioned it above, but it’s worth repeating here. This SEO plugin allows you to optimize your website and get free traffic from search engines.
  • MonsterInsights – It helps you see how many users are coming to your site, where they are visiting from, and what they do on your site. It connects WordPress to Google Analytics and unlocks a treasure trove of data that you can use to make informed decisions for your business’s growth.
  • Duplicator – It is a powerful WordPress backup plugin that allows you to create automatic backups and store them on the cloud. Most importantly, it helps you easily restore your website from backups.
  • For more plugin recommendations, just take a look at our list of essential WordPress plugins for business websites.

We hope this article helped you learn what you need to do to protect your business when Google Business Profile sites shut down. Next, you may want to see our guide on how to grow your business online or take a look at our complete WordPress SEO handbook to get more traffic to your new website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Google Is Shutting Down Business Profile Sites: 5 Things to Do first appeared on WPBeginner.

Google Cloud Platform: A Comprehensive Suite of Cloud Services

Google Cloud Platform (GCP) is a robust and adaptable cloud computing platform that provides a diversified set of services to fulfil the demands of enterprises and organisations. GCP has established itself as a key competitor in the cloud computing business because to its powerful infrastructure, advanced tools, and comprehensive variety of cloud solutions. In this post, we will look at Google Cloud Platform’s core cloud services and their benefits for organizations.

1. Compute Services

Google Cloud Platform provides a variety of computing services to cater to different workload requirements. These services include: