Java Stream API: Country and City Data Analysis


public record Country (String code, String name, String continent, double surfaceArea, int population, double gnp, int capital, List<City> cities) {
   public record City(int id,String name,int population) { }
}

import java.util.*;

import java.util.stream.Collectors;


public class Main {
    private static List<Movie> movies;
    private static List<Country> countries;
    public static void main(String[] args) {
        initializeMovies();
        initializeCountries();
    
Read More

Data Insights: Validation, Reliability, and Healthcare Statistics

Turning Data into Useful Information

Visualization – understand the data, discover hidden patterns for data analysis and storytelling.

Descriptive statistics – story about what happened, an overview of the state of the situation, etc.

Baseline performance, Performance Indicators – e.g., Dashboard.

Detect trends, identify patterns, and uncover relationships.

What is Data Validation?

Data validation is the process of ensuring that a program operates on clean, correct, and useful data. It uses routines,

Read More

Protecting Yourself From Cyberattacks: Tips and Tricks

An increase in cyber-attacks and identity theft make the Internet seem like a scary place these days.

The hacking of Sony Pictures led the news for some time. The U.S. State Department public email system was shut down. Even the White House was a target of cyber-attack.

Last week, there were reports of a billion-dollar theft from European banks and secret viruses on millions of computer systems across Russia, China, India, Iran, and elsewhere. This raises a question:

How can individuals protect or

Read More

Racket Programming: List Manipulation and Sorting

Variable Definitions

These variables are used for testing the functions to ensure they operate as expected.

  • x: '(1 2 3 4 5 6 7 8 9 10) (Used for deep-member? and steamroller functions)
  • y: '(((a) b) (c d (d (f g) h)) i) (Used for deep-member? function)
  • z: '(a f c d f g e g h e g e e) (Used for the splitter function)
  • a: '(1 3 5 7 9) (Used for the merge function)
  • b: '(2 4 6 8 10) (Used for the merge function)
  • x1: '(12 23 2 5 64 23 6756 234 2 42 535) (Used for the mymergesort function)
  • x2: '(how does he do
Read More

Traffic Regulations in Urban Areas: Key Articles

Article 7: Powers of Localities

Management and control of traffic on urban roads. Regulation by Municipal Traffic. Immobilization and removal of vehicles on urban roads. Authorization of sporting events as it passes wholly and exclusively in town for testing. Urban determination of the degree of intoxication on urban roads. Closure of roads when necessary.

Article 20: Rates of Alcohol in Blood and Expired Air

Drivers of motor vehicles and bicycles may not drive on roads subject to traffic laws with

Read More

Understanding Urban Fabric: Morphology, Elements, and Growth

Urban Fabric: Planar and Volumetric Shapes

Urban morphology: Conditions and characteristics of the shape and dimensions of the built environment.

Planar shape: Two-dimensional analysis, divided into streets, blocks, and public spaces.

Volumetric shape: Three-dimensional analysis.

Elements of Urban Fabric

  • Blocks: Floor area, built or unbuilt, externally bounded by streets or public spaces.
  • Streets: Linear public space limited by two blocks, linear elements for channeling fluxes.
  • Open spaces: Public spaces
Read More