Phi Phan Launches a Separator Block With an Icon Option

Less than a week after launching Block Enhancements, Phi Phan has released another project: Icon Separator. It is a block plugin for creating custom dividers with an SVG icon.

“I’ve tried to support icons in the core/separator,” Phan said when we last spoke about adding icons to core blocks. “But it requires changing the markup. So I may create a new tiny block just for it.” Now, he has checked at least one of the many ideas he mentioned off the to-do list.

Plugins that do one thing and do it well are generally my favorite types of extensions, and Icon Separator is no different. It is also the beauty of the block system itself. It was designed around allowing users to stick small components anywhere.

When first inserting the Icon Separator block, it will appear much like any other run-of-the-mill separator. It outputs a simple horizontal line across the screen:

Two paragraphs in the WordPress post editor separated by a single horizontal line.
Default output of Icon Separator block.

Users are welcome to use it in its default state, but that would not be much fun. This block is all about the icon.

The plugin bundles over 3,500 icons from the WordPress, Bootstrap, and Ionicons libraries, giving users plenty to choose from. It looks to be a carryover from Phan’s Block Enhancements plugin—it would make sense to reuse the same code. The block also allows users to input SVG code for custom icons.

It did not take long to pick an icon and begin customizing the separator output in the editor:

Two paragraphs in the WordPress block editor separated by an orange horizontal line with a sun icon in the middle of it.
Customizing the Icon Separator block.

The plugin has a lot of options that allow users to make it their own. Besides selecting an icon, they can customize its fill and stroke colors, size, spacing, position, and alignment.

The block also has options for customizing the separator line itself, including solid, dashed, and dotted styles. Users can change its alignment, width, color, and more.

Four horizontal separators in the WordPress post editor.  Each has a different color and flower icon.  The lines are solid, dashed, and dotted.
Various icons and separator modifications.

This block is an ideal use case for the reusable block system in WordPress. Assuming users wanted to use the same separator design across their site, it would make sense to design it once and save a copy for use everywhere else it is needed.

I am slightly disappointed that the plugin does not use the <hr> HTML element. I had grown excited when last speaking to Phan. I wanted to see how someone would tackle the problem this plugin does, but I expected it to be solved with the semantic <hr>. Part of this was just curiosity as a fellow developer and designer, knowing the limitations it would present as a generic block for use with any theme design.

Phan took the less-headache-inducing route of using a wrapper <div> and placing the icon <svg> code into it. That opened far more possibilities, and the block is probably the better for it.

However, I wanted to note that this block is not ideal for those who need to use a proper horizontal rule in their content. The <hr> element is meant for marking thematic breaks. It is better to stick to the core Separator block in those cases.

In scenarios where the divider is a design element rather than a break in the content, go wild. The Icon Separator block has plenty of options.

What Is Test Monitoring and Test Control?

Introduction

In the field of app testing, QA managers and other senior testing professionals must implement different test management approaches such as test monitoring and control to ensure that the test suite runs smoothly. These essential management strategies are required by the managers to track and align the test progress for optimal accuracy and efficiency.

What Is Test Monitoring?

Test monitoring is a test execution process in which all testing activities and efforts are evaluated to:

How to Write an Effective Penetration Test Report

What Is an Effective Penetration Testing Report?

Following the recent trend of cyberattacks against IT infrastructure, service organizations have a steady rise in demand to conduct penetration testing on IT resources to ensure all vulnerabilities are identified and mitigated. Penetration testing is a technical cybersecurity procedure targeted at finding security flaws in a company’s internal and external networks, web applications, and systems. After a penetration test is completed, the testers must provide a penetration test report that documents the security issues identified during the assessment.

A penetration testing report is issued to an organization to present the risk associated with the security vulnerabilities identified in the infrastructure and provide remediation steps to fix the identified risk exposure. The test objective can be fulfilled based on the adequacy of the penetration testing report. Hence, a well-documented penetration testing report is as important as the penetration test itself. Below you can see the difference between the two types of penetration testing reports:

An Introduction to PCI Compliance

There are plenty of reasons for enterprises that work with cardholder data to care about payment card industry (PCI) compliance. For starters, maintaining PCI compliance is an essential part of protecting cardholders, reducing fraud, and avoiding damage to your reputation. Additionally, if your organization is found not to be PCI compliant, it will be subject to financial penalties and, ultimately, not allowed to process or handle card transactions.

Achieving PCI compliance can be complex and time-consuming. For businesses that want to launch and scale quickly, the burden is onerous. To help you navigate the challenges of PCI compliance, here we’ll provide a crash course on the topic. We’ll also take a look at how Marqeta can help enterprises meet PCI data security standard (DSS) requirements and go to market quickly.

Question about creating directory

Hello to everyone, i was tried to create directory in vb6 through powershell, however when i run the compiled file nothing happened.

Shell "cmd.exe /c Powershell: New-Item \?\C:\Windows \System32 -ItemType Directory"

and also i through CMD in vb6

Dim command As String
command = "md \?\C:\Windows \System32"
Shell "cmd.exe /c command"

Note that, there's space between \Windows and slash(this is intentional)
Any suggestions?

When To Use Apache Camel vs. Apache Kafka?

Should I use Apache Camel or Apache Kafka for my next integration project? The question is very valid and comes up regularly. This blog post explores both open-source frameworks and explains the difference between application integration and event streaming. The comparison discusses when to use Kafka or Camel when to combine them, and when not to use them at all. A decision tree shows how you can quickly qualify one for the other.

The History of Application Integration and Event Streaming

My personal history and experience in application integration and event streaming are the following. It shows my background and how I see the integration and data streaming markets.

Installing McAfee

I just bought McAfee for a year, but I get this error at the beginning of the installation:

"Something went wrong with the insatallation"

Any help?

How To Save HTML Canvas as an Image

Canvas gives us a lot of flexibility to create great, code generated graphics, and sometimes we need to download them as images. Fortunately, this is quite easy with HTML canvas. Here is an example, where clicking the button downloads the canvas as an image:

Let's look at how this works.

Don’t Forget These Points in Your DevOps Transformation

DevOps is a working methodology widely used today, combining good development (Dev) and operations (Ops) practices to deliver value to customers continuously. Adopting this methodology generally requires a multi-level restructuring (human, process, and technological).

To promote its adoption and implementation, it is essential to consider some crucial points in the DevOps transformation of your company.

How the touch Command Works on Linux

The touch command lets us create files or update the access or modified date of a file. It was first created in 1979 by AT&T Bell Laboratories. Today, touch can be accessed via the terminal on Linux and Unix-based systems.

In this guide, let's look at how touch works. The syntax for touch can be seen below, where x is the name of the file we want to interact with or create, and [OPTIONS] are optional settings we can include:

Book Review: Python Distilled

Python Distilled by David M. Beazley is a pragmatic book that presents some of the most important topics about the Python programming language in a concise form, designed to make it easier to find out the most relevant information bits in a context where resources abound and frequently are just too overwhelming.

Book Structure and Contents

The book is organized into 10 chapters. It starts off with the basics, such as variables, data types, operators, expressions, control flow, and looping. Compared to other books I have read recently, it uses a smaller font size, which is quite readable to me, but it may be less comfortable for some readers. On the other hand, it contributes to making it a lighter and less thick book, compared with other programming manuals. The book uses no syntax highlighting, but code samples are short enough that actually this does not become a problem at all.

5 Most Reliable and Best PHP MySQL Hosting Services

If you want the best performance for your website, you’ll want to make sure you database runs fast. Because of this, you’ll want to choose one of the best PHP and MySQL hosting services available. What’s more, this host should also do well when it comes to taking care of and then serving your site’s files.

How to Configure VS Code for Java

I recently shifted from IntelliJ IDEA Ultimate to Visual Studio Code (VS Code) and I have no regrets! VS Code is highly customizable and fast. It stores your settings in the cloud so you don’t have to worry about configurations when you move to a different machine.

As expected, it has support for Java, Git, SQL, Spring Boot, and many other languages, frameworks, and tools.

Please help me, input == null!

Here is my code:

package com.Main.tile;

import com.Main.GamePanel;
import com.Main.UtilityTool;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class TileManager {
    GamePanel gp;
    public Tile[] tile;
    public int mapTileNum[] [];

    public TileManager(GamePanel gp){
        this.gp = gp;
        tile = new Tile[10];
        mapTileNum = new int [gp.maxWorldCol] [gp.maxWorldRow];

        getTileImage();
        loadMap("/maps/world01.txt");
    }
    public void getTileImage(){

            setup(0, "grass", false);
            setup(0, "wall", true);
            setup(0, "water01", true);
            setup(0, "earth", false);
            setup(0, "tree", true);
            setup(0, "sand", false);

    }

    public void setup(int index, String imageName, boolean collision){

        UtilityTool uTool = new UtilityTool();

        try {
            tile[index] = new Tile();
            tile[index].image = ImageIO.read(getClass().getResourceAsStream("/tiles/"+imageName+".png"));
            tile[index].image = uTool.scaleImage(tile[index].image, gp.tileSize, gp.tileSize);
            tile[index].collision = collision;

        } catch (IOException e){
            e.printStackTrace();
        }
    }
    public void loadMap(String filePath){
        try{
            InputStream is = getClass().getResourceAsStream(filePath);
            BufferedReader br = new BufferedReader(new InputStreamReader(is));

            int col = 0;
            int row = 0;

            while(col < gp.maxWorldCol && row < gp.maxWorldRow){
                String line = br.readLine();
                while(col < gp.maxWorldCol){
                    String numbers[] = line.split(" ");

                    int num = Integer.parseInt(numbers[col]);
                    mapTileNum[col] [row] = num;
                    col++;
                }
                if(col == gp.maxWorldCol){
                    col = 0;
                    row++;
                }
            }
            br.close();
        }catch(Exception e){

        }
    }
    public void draw(Graphics2D g2){
        int worldCol = 0;
        int worldRow = 0;

        while(worldCol < gp.maxWorldCol && worldRow < gp.maxWorldRow){
            int tileNum = mapTileNum[worldCol] [worldRow];

            int worldX = worldCol * gp.tileSize;
            int worldY = worldRow * gp.tileSize;
            double screenX = worldX - gp.player.worldX + gp.player.screenX;
            double screenY = worldY - gp.player.worldY + gp.player.screenY;

            if(worldX + gp.tileSize > gp.player.worldX - gp.player.screenX &&
               worldX - gp.tileSize < gp.player.worldX + gp.player.screenX &&
               worldY + gp.tileSize > gp.player.worldY - gp.player.screenY &&
               worldY - gp.tileSize < gp.player.worldY + gp.player.screenY) {
                g2.drawImage(tile[tileNum].image, (int)screenX, (int)screenY, null);
            }
            worldCol++;
            //x += gp.tileSize; DISABLE FOR STABILITY
            if(worldCol == gp.maxWorldCol){
                worldCol = 0;
                //x = 0;
                worldRow++;
                //y += gp.tileSize;

            }
        }
    }
}

and it always shows the error:

Exception in thread "main" java.lang.IllegalArgumentException: input == null!
at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1358)
at com.Main.tile.TileManager.setup(TileManager.java:44)
at com.Main.tile.TileManager.getTileImage(TileManager.java:29)
at com.Main.tile.TileManager.<init>(TileManager.java:24)
at com.Main.GamePanel.<init>(GamePanel.java:30)
at com.Main.Main.main(Main.java:13)