Display div content in Sweet Alert

hi everyone,

i want to display content of div into sweet alert message and here is my code

<?php 

echo '<script>
var swal2container = $("#swal2container").text();

setTimeout(function() {
swal({
title: "Alert!",
text: swal2container,
type: "error"
}, function() {
window.location = "index.php";
});
}, 100);




</script>';


?>

<div id="swal2container">test</div> 

i still cant get the content of swal2container when sweet alert . Anyone can help meh?

How I Visualize My Spreadsheet Formula Dependencies in a Chart

Overview

The formula is the heart of an Excel file. And of course, we all want to do correct calculations and deliver accurate results. When there is something wrong, we want to trace back to those referenced cells to find the root cause. Excel natively has a built-in convenient formula dependent/precedent trace feature, it highlights the dependent/precedent cells and displays arrows to indicate the relationships. This helps users to trace back and find any error formulas easily.

Now, when bringing the spreadsheet online, we can do more. We can display the relationships in a custom way that is most useful according to the application context, or bring them to a different service or application for doing the validation programmatically.

Mind Your Code Quality; It’s an Asset

When comes to code quality, I have seen discussion rather than an argument that the main task of a developer is to deliver working code to the customer.

Is it true? I don’t think so. It must be fully covered code; that means not only functionality-focused code, but the quality of code also matters.

Popular IoT Development Platforms: 2021 Edition

The Internet of things or IoT is a real trend that is apparently gaining popularity among other things. We all might have heard about the buzzword ‘IoT’ at some point in our lives either from a friend, a blog post, or people walking by on a sidewalk. IoT is all about 'physical devices connected to the internet,' in other words, ‘Simply, the Internet of Things is made up of devices — from simple sensors to smartphones and wearables — connected together,’ Matthew Evans, the IoT program head at techUK describes IoT in a nutshell.

The Brief History of IoT

The year 1999 is considered huge for IoT. The term ‘Internet of Things' was coined by Kevin Ashton, executive director of the Auto-ID Center. According to British tech pioneer, Kevin Ashton,

How to Check Text Inputs for SQL Injection Attacks in Java

SQL (Structured Query Language) injection is a code injection technique used to attack data-driven applications; the SQL statements are inserted into an entry field for execution and wreak havoc from there. This type of attack tends to seek and target existing security vulnerabilities within websites or other databases to acquire access to sensitive information. For example, if the field of an online form is coded incorrectly, this provides an opening for the malicious user to sneak in SQL commands that the system will consider valid and return a response containing information that can be leveraged to access the data and manipulate, modify, or destroy it from there.

Despite the growing number of organizations that have reported successful SQL injection attacks, this type of threat is often underestimated in comparison to other cyber-crimes. Due to their reliance on check-out forms for their websites, retail companies have shown to be particularly susceptible to these threats. While standard firewalls may aim at protecting your website or application from SQL injection, the potential for failure can cause serious damage and data loss for your company. The following APIs can assist in providing supplementary protection by detecting SQL injection attacks from single or multiple text inputs, and will even define the threat detection level you want to utilize.

An Overview Between Java 8 and Java 11

One of the great news introduced in the Java world is related to the version cycle, of which we have a release every six months and a version of Long Term Support every three years. Currently, the LTS version is Java 11, from which many companies are moving towards its use. First, this movement is significant because new frameworks will not support Java 8 and will consider Java 11 as a minimum beyond the point that the next LTS will be in September 2021 with Java 11. The purpose of this article is to talk a little about the basic APIs that happens between Java 8 and Java 11.

The Functions Classes

An important point that will serve as a basis, starting with Java 8, is the new interfaces within the java.util.function package, in this overview, we'll see covert four interfaces:

There is a Declaration syntax error and i couldn’t solve it

#include <stdio.h>

int main()
(
 float height, weight, bmi

 printf("Enter height in meter\n");
 scanf("%f", &height);

 printf("Enter weight in kg\n");
 scanf("%f", &weight);

 bmi = weight / (height * height);

 printf("Your BMI is %f\n", bmi);

 if(bmi < 15)
 (
      printf("Your BMI category is: Starvation\n");
      )
 else if(bmi >= 15.1 && bmi <= 17.5)
 (
      printf("Your BMI category is: Anorexic\n");
      )
 else if(bmi >= 17.6 && bmi <= 18.5)
 (
      printf("Your BMI category is: Underweight\n");
      )
 else if(bmi >= 18.6 && bmi <= 24.9)
 (
      printf("Your BMI category is: Ideal\n");
      )
 else if(bmi >= 25 && bmi <= 25.9)
 (
      printf("Your BMI category is: Overweight\n");
      )
 else if(bmi >= 30 && bmi <= 30.9)
 (
      printf("Your BMI category is: Obese\n");
      )
 else if(bmi >= 40)
 (
      printf("Your BMI category is: Morbidly Obese\n");
      )
 else
 (
      printf("Wrong entry\b");
 )

)

Recover deleted file in FreeBSD

Hi everyone,
When a file is deleted in the ufs file system, only the path to that file is deleted and the data of the file remains on disk. How can I find this data, this data will help me to recover the file. (As a reminder, I do this on the freebsd operating system)

A Simple AJAX Website in Java

During the Covid New Year of 2020, I created a simple prototype website using AJAX, with the goal of moving Java developers away from JavaScript and ideally also text-based HTML templates. The developer will however need to understand the structure of an HTML page as well as CSS selectors. I made my original solution a little more general, moved certain parts into the Ujorm framework, and am presenting the result here for your further inspiration.

For the prototype to make any sense, I created a web page for testing regular expressions. Let’s take a look at the code, worked into a regular Java servlet:

Certificates for Internal Servers

I often get the question from customers "How do I make a browser trust my internal Intranet web server". Is it possible to use trusted certificates for Intranet servers? The short answer is yes. It is possible, and I'll show you two ways this can be solved. But what exactly is an Intranet server?

What Is an Intranet Server?

An Intranet (internal) server is one that runs on a private (home/business) network with a non-public IP address -- that is, any IPv4 address in the RFC 1918 range (e.g. 10.0.0.0, 172.16.0.0, 192.168.0.0) and any IPv6 address in the RFC 4193 range.

A Look at Kotlin’s Delegation

Kotlin offers many exciting features. In general, developers tend to cite null safety as their favorite. For me, it's function extensions. But delegation comes a close second.

The Delegation Pattern

The delegation pattern is described in the GoF book:

Apache Kafka and MQTT (Part 2 of 5) – V2X and Connected Vehicles

Apache Kafka and MQTT are a perfect combination for many IoT use cases. This blog series covers the pros and cons of both technologies. Various use cases across industries, including connected vehicles, manufacturing, mobility services, and smart city are explored. The examples use different architectures, including lightweight edge scenarios, hybrid integrations, and serverless cloud solutions. This post is part two: Connected Vehicles and V2X applications.

Apache Kafka + MQTT Blog Series

The first blog post explores the relation between MQTT and Apache Kafka. Afterward, the other four blog posts discuss various use cases, architectures, and reference deployments.

Lombok and JPA: What Could Go Wrong?

Lombok is a great tool that makes your Java code concise and clean. However, there are a few things to consider when using it with JPA. In this article, we’ll look at how the misuse of Lombok can hurt the performance of JPA applications or even crash them, and how to avoid that but still gain the benefits of using Lombok.

We develop JPA Buddy – a plugin for IntelliJ IDEA designed to make the use of JPA easier. Before writing a single line of code for it, we went through a ton of projects on GitHub to understand how people work with JPA. Turns out, a lot of them use Lombok for their entities.

Getting Started With Jakarta EE 9: Hello World

Introduction

The release of Jakarta EE 9, at the end of 2020, was in many ways a historic event. The Java Enterprise framework is already 20 years old, having its first release in 1999. It has changed names a few times but the main concepts of the first release can still be found in this new release. During all those years, it has adapted itself to keep it up to date but has always adhered to its main principle of stability and backward compatibility.

Regarding backward compatibility, this release was also historic as the namespaces changed (like package names that changed from 'javax' to 'jakarta'). The change is straightforward, no other changes are introduced between Jakarta EE 8 and EE 9.  This to make the migration as easy as possible.