kandi background
Explore Kits

slab | Offheap Java POJOs with guaranteed memory alignment

 by   RichardWarburton Java Version: Current License: MIT

 by   RichardWarburton Java Version: Current License: MIT

Download this library from

kandi X-RAY | slab Summary

slab is a Java library. slab has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. You can download it from GitHub.
There is a good description [here](http://www.insightfullogic.com/blog/2013/jan/3/slab-guaranteed-heap-alignment-jvm/). tl;dr: Offheap Java Tuples that look like POJOs with guaranteed memory alignment.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • slab has a highly active ecosystem.
  • It has 183 star(s) with 25 fork(s). There are 23 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 7 open issues and 7 have been closed. On average issues are closed in 29 days. There are no pull requests.
  • It has a negative sentiment in the developer community.
  • The latest version of slab is current.
slab Support
Best in #Java
Average in #Java
slab Support
Best in #Java
Average in #Java

quality kandi Quality

  • slab has 0 bugs and 0 code smells.
slab Quality
Best in #Java
Average in #Java
slab Quality
Best in #Java
Average in #Java

securitySecurity

  • slab has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • slab code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
slab Security
Best in #Java
Average in #Java
slab Security
Best in #Java
Average in #Java

license License

  • slab is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
slab License
Best in #Java
Average in #Java
slab License
Best in #Java
Average in #Java

buildReuse

  • slab releases are not available. You will need to build from source code and install.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • slab saves you 570 person hours of effort in developing the same functionality from scratch.
  • It has 1332 lines of code, 200 functions and 41 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
slab Reuse
Best in #Java
Average in #Java
slab Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed slab and discovered the below as its top functions. This is intended to give you an instant insight into slab implemented functionality, and help decide if they suit your requirements.

  • Declares a method that assigns a safe setter to the given field .
    • Find get methods .
      • Allocates a slab .
        • Calculate the allocated address .
          • Writes the given bytecode to the given file .
            • Release resources allocated by this handler .
              • Resize this buffer .
                • Lookup a value in the map .
                  • Moves cursor to next .
                    • Called when the allocation is freed .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      slab Key Features

                      Offheap Java POJOs with guaranteed memory alignment

                      Code Example

                      copy iconCopydownload iconDownload
                      // Define your DataType
                      public interface GameEvent extends Cursor {
                        public int getId();
                        public void setId(int value);
                        public long getStrength();
                        public void setStrength(long value);
                      }

                      Clip {ggdist} ccdf-barplot

                      copy iconCopydownload iconDownload
                      library(ggplot2)
                      library(ggdist)
                      
                      df <- data.frame(
                        x = rep(c("A", "B"), each = 10),
                        y = c(rnorm(20, mean = rep(c(5, 7), each = 10)))
                      )
                      
                      helper <- function(f, y, group) {
                        split(f, group) <- Map(
                          function(value, y) {
                            f <- value
                            max_y <- max(y[f != 0])
                            f[f == 0 & y > max_y] <- NA
                            f
                          },
                          value = split(f, group),
                          y     = split(y, group)
                        )
                        f
                      }
                      
                      ggplot(df, aes(x, y)) +
                        stat_ccdfinterval(
                          geom = "slab", 
                          aes(thickness = after_stat(helper(f, y, group)))
                        ) +
                        lims(y = c(0, NA))
                      

                      How to plot multi-level meta-analysis by study (in contrast to the subgroup)?

                      copy iconCopydownload iconDownload
                      df$study_group <- c(1,1,1,2,2,3,4,5,5,5) # example
                      
                      full.model <- rma.mv(yi = yi, 
                                           V = vi, 
                                           slab = Author,
                                           data = df,
                                           random = ~ 1 | study_group, 
                                           test = "t", 
                                           method = "REML")
                      forest(full.model)
                      
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      
                      library(metafor)   
                      dat <- dat.konstantopoulos2011
                      res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
                      res
                      
                      agg <- aggregate(dat, cluster=dat$district, V=vcov(res, type="obs"))
                      agg
                      
                      rma(yi, vi, method="EE", data=agg)
                      
                      with(agg, forest(yi, vi, slab=district))
                      
                      dat$yi[dat$year == 1976] <- dat$yi[dat$year == 1976] + 0.8
                      res <- rma.mv(yi, vi, random = ~ 1 | year/district/school, data=dat)
                      res
                      
                      agg <- rma.mv(yi, V=vcov(res, type="obs"), mods = ~ 0 + factor(district), data=dat)
                      agg
                      
                      coef(agg)
                      vcov(agg)
                      
                      rma.mv(coef(agg), V=vcov(agg), method="EE")
                      
                      forest(coef(agg), diag(vcov(agg)), slab=names(coef(agg)))
                      

                      Compare two different images and find the differences

                      copy iconCopydownload iconDownload
                      import cv2
                      import numpy as np
                      
                      # load image
                      img1 = cv2.imread("img1.jpg")
                      img2 = cv2.imread("img2.jpg")
                      
                      # convert to grayscale
                      gray1 = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY)
                      gray2 = cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY)
                      
                      # blur
                      blur1 = cv2.GaussianBlur(gray1, (0,0), sigmaX=13, sigmaY=13)
                      blur2 = cv2.GaussianBlur(gray2, (0,0), sigmaX=13, sigmaY=13)
                      
                      # divide
                      divide1 = cv2.divide(gray1, blur1, scale=255)
                      divide2 = cv2.divide(gray2, blur2, scale=255)
                      
                      # threshold
                      thresh1 = cv2.threshold(divide1, 200, 255, cv2.THRESH_BINARY)[1]
                      thresh2 = cv2.threshold(divide2, 200, 255, cv2.THRESH_BINARY)[1]
                      
                      # morphology
                      kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (3,3))
                      morph1 = cv2.morphologyEx(thresh1, cv2.MORPH_OPEN, kernel)
                      morph2 = cv2.morphologyEx(thresh2, cv2.MORPH_OPEN, kernel)
                      kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (5,5))
                      morph1 = cv2.morphologyEx(morph1, cv2.MORPH_CLOSE, kernel)
                      morph2 = cv2.morphologyEx(morph2, cv2.MORPH_CLOSE, kernel)
                      
                      
                      # write result to disk
                      cv2.imwrite("img1_division_normalize.jpg", divide1)
                      cv2.imwrite("img2_division_normalize.jpg", divide2)
                      cv2.imwrite("img1_division_morph1.jpg", morph1)
                      cv2.imwrite("img1_division_morph2.jpg", morph2)
                      
                      
                      # display it
                      cv2.imshow("img1_norm", divide1)
                      cv2.imshow("img2_norm", divide2)
                      cv2.imshow("img1_thresh", thresh1)
                      cv2.imshow("img2_thresh", thresh2)
                      cv2.imshow("img1_morph", morph1)
                      cv2.imshow("img2_morph", morph2)
                      cv2.waitKey(0)
                      cv2.destroyAllWindows()
                      

                      metafor provides 95%CI that are different from the original values

                      copy iconCopydownload iconDownload
                      pooled <- rma(yi=beta_coef, sei=se, slab=study)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper, ylim=c(-1.5,6))
                      addpoly(pooled, row=-1)
                      abline(h=0)
                      
                      pooled <- rma(yi=beta_coef, sei=se, slab=study)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper, ylim=c(-1.5,6))
                      addpoly(pooled, row=-1)
                      abline(h=0)
                      
                      pooled <- rma(yi=beta_coef, sei=se, slab=study)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper)
                      
                      forest(beta_coef, ci.lb=ci_lower, ci.ub=ci_upper, ylim=c(-1.5,6))
                      addpoly(pooled, row=-1)
                      abline(h=0)
                      

                      Countdown CSS visual formatting

                      copy iconCopydownload iconDownload
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      body {
                        align-items: center;
                        background-color: transparent;
                        display: flex;
                      }
                      
                      .flex-wrapper {
                        display: flex;
                        min-width: 600px;
                      }
                      
                      .flex-wrapper>span {
                        flex: 1 0 150px;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      <div class="flex-wrapper">
                        <span id="circle-days" class="circle-time">00</span>
                        <span id="circle-hours" class="circle-time">00</span>
                        <span id="circle-minutes" class="circle-time">00</span>
                        <span id="circle-seconds" class="circle-time">00</span>
                        <span id="timer"></span>
                      </div>
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      body {
                        align-items: center;
                        background-color: transparent;
                        display: flex;
                      }
                      
                      .flex-wrapper {
                        display: flex;
                        min-width: 600px;
                      }
                      
                      .flex-wrapper>span {
                        flex: 1 0 150px;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      <div class="flex-wrapper">
                        <span id="circle-days" class="circle-time">00</span>
                        <span id="circle-hours" class="circle-time">00</span>
                        <span id="circle-minutes" class="circle-time">00</span>
                        <span id="circle-seconds" class="circle-time">00</span>
                        <span id="timer"></span>
                      </div>
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      body {
                        align-items: center;
                        background-color: transparent;
                        display: flex;
                      }
                      
                      .flex-wrapper {
                        display: flex;
                        min-width: 600px;
                      }
                      
                      .flex-wrapper>span {
                        flex: 1 0 150px;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      <div class="flex-wrapper">
                        <span id="circle-days" class="circle-time">00</span>
                        <span id="circle-hours" class="circle-time">00</span>
                        <span id="circle-minutes" class="circle-time">00</span>
                        <span id="circle-seconds" class="circle-time">00</span>
                        <span id="timer"></span>
                      </div>
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      * {
                        margin: 0;
                        padding: 0;
                        width: 100%;
                      }
                      
                      body {
                        background-color: transparent;
                      }
                      
                      .wrapper {
                        display: flex;
                        gap: 10%;
                        align-items: center;
                        justify-content: center;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      
                      span {
                        text-align: center;
                      }
                      <div class="wrapper">
                        <span style="margin-right: 20px;">
                                <span id="circle-days" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-hours" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-minutes" class="circle-time"></span>
                        </span>
                        <span id="circle-seconds" class="circle-time"></span> <span id="timer"></span>
                      </div>
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      * {
                        margin: 0;
                        padding: 0;
                        width: 100%;
                      }
                      
                      body {
                        background-color: transparent;
                      }
                      
                      .wrapper {
                        display: flex;
                        gap: 10%;
                        align-items: center;
                        justify-content: center;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      
                      span {
                        text-align: center;
                      }
                      <div class="wrapper">
                        <span style="margin-right: 20px;">
                                <span id="circle-days" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-hours" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-minutes" class="circle-time"></span>
                        </span>
                        <span id="circle-seconds" class="circle-time"></span> <span id="timer"></span>
                      </div>
                      function getNextDayOfWeek(date, dayOfWeek, hour) {
                        var resultDate = new Date(date.getTime());
                        resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);
                        resultDate.setHours(hour, 0, 0, 0);
                        return resultDate;
                      }
                      
                      var countDownDate = getNextDayOfWeek(new Date(), 5, 15);
                      
                      // Update the count down every 1 second
                      var x = setInterval(function() {
                      
                        // Get todays date and time
                        var now = new Date().getTime();
                      
                        // Find the distance between now an the count down date
                        var distance = countDownDate - now;
                      
                        // Time calculations for days, hours, minutes and seconds
                        var days = Math.floor(distance / (1000 * 60 * 60 * 24)).toString();
                        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)).toString();
                        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)).toString();
                        var seconds = Math.floor((distance % (1000 * 60)) / 1000).toString();
                      
                        // Display the result in the element with id="timer"
                        document.getElementById("circle-days").innerHTML = days + "<div class='timer-font'>Days</div>";
                        document.getElementById("circle-hours").innerHTML = hours + "<div class='timer-font'>Hours</div>";
                        document.getElementById("circle-minutes").innerHTML = minutes + "<div class='timer-font'>Minutes</div>";
                        document.getElementById("circle-seconds").innerHTML = seconds + "<div class='timer-font'>Seconds</div>";
                      
                        // If the count down is finished, write some text 
                        if (distance < 0) {
                          clearInterval(x);
                          document.getElementById("timer").innerHTML = "Drawing Winners...";
                        }
                      }, 1000);
                      * {
                        margin: 0;
                        padding: 0;
                        width: 100%;
                      }
                      
                      body {
                        background-color: transparent;
                      }
                      
                      .wrapper {
                        display: flex;
                        gap: 10%;
                        align-items: center;
                        justify-content: center;
                      }
                      
                      .container {
                        color: transparent;
                        margin: 0 auto;
                        text-align: center;
                      }
                      
                      .circle-time {
                        color: #FE7030;
                        font-size: 60px;
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        text-align: center;
                      }
                      
                      .timer-font {
                        font-family: "Roboto Slab", Helvetica, Arial, sans-serif;
                        font-weight: bold;
                        color: #027B46;
                        font-size: 25px;
                      }
                      
                      span {
                        text-align: center;
                      }
                      <div class="wrapper">
                        <span style="margin-right: 20px;">
                                <span id="circle-days" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-hours" class="circle-time"></span>
                        </span>
                        <span style="margin-right: 20px;">
                                <span id="circle-minutes" class="circle-time"></span>
                        </span>
                        <span id="circle-seconds" class="circle-time"></span> <span id="timer"></span>
                      </div>

                      Pass data from parent component to child of child in Vue js

                      copy iconCopydownload iconDownload
                      <Child /> <!-- no need to pass the prop -->
                      
                      provide() {
                        return {
                          something: "fooAbc",
                        }
                      }
                      
                      <div>{{ something }}</div>
                      
                      inject: ['something']
                      
                      
                      <Child /> <!-- no need to pass the prop -->
                      
                      provide() {
                        return {
                          something: "fooAbc",
                        }
                      }
                      
                      <div>{{ something }}</div>
                      
                      inject: ['something']
                      
                      

                      Text appear/disappear on top of image with button toggle

                      copy iconCopydownload iconDownload
                      *{
                      
                        box-sizing: border-box;
                        margin: 0;
                      
                      }
                      
                      
                      #blog figure img{
                        height: auto;
                         width:100%;
                      }
                      
                      
                      #blog {
                          width: 100%;
                          padding: 35px;
                      }
                      
                      *{
                      
                        box-sizing: border-box;
                        margin: 0;
                      
                      }
                      
                      
                      #blog figure img{
                        height: auto;
                         width:100%;
                      }
                      
                      
                      #blog {
                          width: 100%;
                          padding: 35px;
                      }
                      
                      *{
                      
                        box-sizing: border-box;
                        margin: 0;
                      
                      }
                      
                      
                      #blog figure img{
                        height: auto;
                         width:100%;
                      }
                      
                      
                      #blog {
                          width: 100%;
                          padding: 35px;
                      }
                      
                      document.querySelectorAll("figure button").forEach(EL_btn => {  
                        EL_btn.addEventListener("click", () => {
                          EL_btn.closest("figure").classList.toggle("is-active");
                        });
                      });
                      /* QuickReset */ * {margin: 0; box-sizing: border-box;}
                      
                      img {
                        max-width: 100%; /* Never extend images more than available */
                      }
                      
                      figure {
                        position: relative;
                        overflow: hidden; /* overflow hidden to allow figcaption hide bottom */
                      }
                      
                      figure img {
                        display: block; /* prevent "bottom space" caused by inline elements */
                      }
                      
                      figure figcaption {
                        position: absolute;
                        width: 100%; 
                        bottom: 0;
                        padding: 1rem;
                        padding-right: 4rem; /* Prevent text going under the button icon */ 
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        transform: translateY(100%); /* Move down, out of view */
                        transition: transform 0.3s; /* Add some transition animation */
                      }
                      
                      figure.is-active figcaption {
                        transform: translateY(0%); /* Move into view */
                      }
                      
                      figure button {
                        position: absolute;
                        width: 2rem;
                        height: 2rem;
                        bottom: 0.5rem;
                        right: 0.5rem;
                        border-radius: 50%;
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        border: 0;
                        cursor: pointer;
                      }
                      figure button::before {
                        content: "\2139"; /* i icon */
                      }
                      
                      figure.is-active button::before {
                        content: "\2A09"; /* x icon */
                      }
                      <figure>
                        <img src="https://cdn2.hubspot.net/hubfs/4635813/marble-around-the-world.jpg" alt="A photo of a slab of marble for example">
                        <figcaption>A photo of a slab of marble for example</figcaption>
                        <button type="button"></button>
                      </figure>
                      document.querySelectorAll("figure button").forEach(EL_btn => {  
                        EL_btn.addEventListener("click", () => {
                          EL_btn.closest("figure").classList.toggle("is-active");
                        });
                      });
                      /* QuickReset */ * {margin: 0; box-sizing: border-box;}
                      
                      img {
                        max-width: 100%; /* Never extend images more than available */
                      }
                      
                      figure {
                        position: relative;
                        overflow: hidden; /* overflow hidden to allow figcaption hide bottom */
                      }
                      
                      figure img {
                        display: block; /* prevent "bottom space" caused by inline elements */
                      }
                      
                      figure figcaption {
                        position: absolute;
                        width: 100%; 
                        bottom: 0;
                        padding: 1rem;
                        padding-right: 4rem; /* Prevent text going under the button icon */ 
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        transform: translateY(100%); /* Move down, out of view */
                        transition: transform 0.3s; /* Add some transition animation */
                      }
                      
                      figure.is-active figcaption {
                        transform: translateY(0%); /* Move into view */
                      }
                      
                      figure button {
                        position: absolute;
                        width: 2rem;
                        height: 2rem;
                        bottom: 0.5rem;
                        right: 0.5rem;
                        border-radius: 50%;
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        border: 0;
                        cursor: pointer;
                      }
                      figure button::before {
                        content: "\2139"; /* i icon */
                      }
                      
                      figure.is-active button::before {
                        content: "\2A09"; /* x icon */
                      }
                      <figure>
                        <img src="https://cdn2.hubspot.net/hubfs/4635813/marble-around-the-world.jpg" alt="A photo of a slab of marble for example">
                        <figcaption>A photo of a slab of marble for example</figcaption>
                        <button type="button"></button>
                      </figure>
                      document.querySelectorAll("figure button").forEach(EL_btn => {  
                        EL_btn.addEventListener("click", () => {
                          EL_btn.closest("figure").classList.toggle("is-active");
                        });
                      });
                      /* QuickReset */ * {margin: 0; box-sizing: border-box;}
                      
                      img {
                        max-width: 100%; /* Never extend images more than available */
                      }
                      
                      figure {
                        position: relative;
                        overflow: hidden; /* overflow hidden to allow figcaption hide bottom */
                      }
                      
                      figure img {
                        display: block; /* prevent "bottom space" caused by inline elements */
                      }
                      
                      figure figcaption {
                        position: absolute;
                        width: 100%; 
                        bottom: 0;
                        padding: 1rem;
                        padding-right: 4rem; /* Prevent text going under the button icon */ 
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        transform: translateY(100%); /* Move down, out of view */
                        transition: transform 0.3s; /* Add some transition animation */
                      }
                      
                      figure.is-active figcaption {
                        transform: translateY(0%); /* Move into view */
                      }
                      
                      figure button {
                        position: absolute;
                        width: 2rem;
                        height: 2rem;
                        bottom: 0.5rem;
                        right: 0.5rem;
                        border-radius: 50%;
                        color: #fff;
                        background: rgba(0, 0, 0, 0.5);
                        border: 0;
                        cursor: pointer;
                      }
                      figure button::before {
                        content: "\2139"; /* i icon */
                      }
                      
                      figure.is-active button::before {
                        content: "\2A09"; /* x icon */
                      }
                      <figure>
                        <img src="https://cdn2.hubspot.net/hubfs/4635813/marble-around-the-world.jpg" alt="A photo of a slab of marble for example">
                        <figcaption>A photo of a slab of marble for example</figcaption>
                        <button type="button"></button>
                      </figure>

                      How can I improve the speed of my large txt processing script?

                      copy iconCopydownload iconDownload
                      std::vector<...> addPoint2Slab(point, std::vector<...> result)
                      {
                          ...
                          return result;
                      }
                      
                      slabVector = addPoint2Slab(point, slabVector);
                      
                      std::vector<...> addPoint2Slab(point, std::vector<...> & result);
                      
                      addPoint2Slab(point, slabVector);
                      
                      std::vector<...> addPoint2Slab(point, std::vector<...> result)
                      {
                          ...
                          return result;
                      }
                      
                      slabVector = addPoint2Slab(point, slabVector);
                      
                      std::vector<...> addPoint2Slab(point, std::vector<...> & result);
                      
                      addPoint2Slab(point, slabVector);
                      
                      std::vector<...> addPoint2Slab(point, std::vector<...> result)
                      {
                          ...
                          return result;
                      }
                      
                      slabVector = addPoint2Slab(point, slabVector);
                      
                      std::vector<...> addPoint2Slab(point, std::vector<...> & result);
                      
                      addPoint2Slab(point, slabVector);
                      
                      std::vector<char> huge_chunk(128*1024*1024);
                      ifstream in("my_file");
                      do {
                         in.read(huge_chunk.data(), huge_chunk.size());
                         parse(huge_chunk.data, in.gcount());
                      } while (in.good());
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::float_ >> x3::float_ >> x3::float_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      
                      slabVector:
                      (-25, -25, -0.49556059843940164, 1807)
                      (-24.899999618530273, -25, -0.48971092838941654, 1682)
                      (-24.799999237060547, -25, -0.49731256076256386, 1731)
                      (-24.700000762939453, -25, -0.5006042266973916, 1725)
                      (-24.600000381469727, -25, -0.5000671732885645, 1784)
                      (-24.5, -25, -0.4940826157717386, 1748)
                      (-24.399999618530273, -25, -0.5045350563593015, 1720)
                      (-24.299999237060547, -25, -0.5088279537549671, 1812)
                      (-24.200000762939453, -25, -0.5065565364794715, 1749)
                      (-24.100000381469727, -25, -0.4933392542558793, 1743)
                      (-24, -25, -0.4947248105973453, 1808)
                      (-23.899999618530273, -25, -0.48640208470636714, 1696)
                      (-23.799999237060547, -25, -0.4994672590531847, 1711)
                      (-23.700000762939453, -25, -0.5033631130808075, 1782)
                      (-23.600000381469727, -25, -0.4995593140170436, 1760)
                      (-23.5, -25, -0.5009948279948179, 1737)
                      (-23.399999618530273, -25, -0.4995986820225158, 1732)
                      (-23.299999237060547, -25, -0.49833906199795897, 1764)
                      (-23.200000762939453, -25, -0.5013796942594327, 1728)
                      (-23.100000381469727, -25, -0.5072275248223541, 1700)
                      (-23, -25, -0.4949060352670081, 1749)
                      (-22.899999618530273, -25, -0.5026246990689665, 1740)
                      (-22.799999237060547, -25, -0.493411989775698, 1746)
                      // ... ~25k lines skipped...
                      (24.200000762939453, 24.900001525878906, -0.508382879738258, 1746)
                      (24.299999237060547, 24.900001525878906, -0.5064457874896565, 1740)
                      (24.400001525878906, 24.900001525878906, -0.4990733400392924, 1756)
                      (24.5, 24.900001525878906, -0.5063144518978036, 1732)
                      (24.60000228881836, 24.900001525878906, -0.49988387744959534, 1855)
                      (24.700000762939453, 24.900001525878906, -0.49970549673984693, 1719)
                      (24.799999237060547, 24.900001525878906, -0.48656442707683384, 1744)
                      (24.900001525878906, 24.900001525878906, -0.49267272688797675, 1705)
                      
                      #include <algorithm>
                      #include <chrono>
                      #include <cmath>
                      #include <iostream>
                      #include <tuple>
                      #include <vector>
                      #include <fmt/ranges.h>
                      
                      // boost library
                      #include <boost/iostreams/device/mapped_file.hpp>
                      #include <boost/iostreams/stream.hpp>
                      
                      struct point { double x, y, z; };
                      
                      /*
                          Compute Slab
                      */
                      using Float = float; //
                      
                      Float slabBox[6] = {-25.,25.,-25.,25.,-1.,0.};
                      Float dx = 0.1;
                      Float dy = 0.1;
                      int slabSizeX = (slabBox[1] - slabBox[0]) / dx;
                      int slabSizeY = (slabBox[3] - slabBox[2]) / dy;
                      
                      using Record = std::tuple<double, double, double, int>;
                      
                      std::vector<Record> initSlab()
                      {
                          // initialize the slab vector according to the grid size
                          std::vector<Record> slabVector(slabSizeX * slabSizeY, {0., 0., 0., 0});
                      
                          // fill the vector with {x,y} cells coordinates
                          for (int y = 0; y < slabSizeY; y++) {
                              for (int x = 0; x < slabSizeX; x++) {
                                  slabVector[x + y * slabSizeX] = {
                                      x * dx + slabBox[0],
                                      y * dy + slabBox[2],
                                      0.,
                                      0,
                                  };
                              }
                          }
                          return slabVector;
                      }
                      
                      void addPoint2Slab(point const p, std::vector<Record>& slabVector)
                      {
                          // find the region {x,y} in the slab in which coord {p.x,p.y} is
                          int x = (int) floor((p.x - slabBox[0])/dx);
                          int y = (int) floor((p.y - slabBox[2])/dy);
                          auto& [ix, iy, iz, icount] = slabVector[x + y * slabSizeX];
                      
                          iz = (iz * icount + p.z) / (icount + 1);
                          icount += 1;
                      }
                      
                      /* Parse the file */
                      #include <boost/spirit/home/x3.hpp>
                      
                      auto readMappedFile(std::string fname)
                      {
                          auto slabVector = initSlab();
                      
                          boost::iostreams::mapped_file_source mmap(fname);
                      
                          auto handle = [&](auto& ctx) {
                              using boost::fusion::at_c;
                              point p{at_c<0>(_attr(ctx)), at_c<1>(_attr(ctx)), at_c<2>(_attr(ctx))};
                              //auto intensity = at_c<3>(_attr(ctx));
                      
                              if (p.z > slabBox[4] && p.z < slabBox[5])
                                  addPoint2Slab(p, slabVector);
                          };
                      
                          namespace x3 = boost::spirit::x3;
                          static auto const line_ =
                              x3::double_ >> x3::double_ >> x3::double_ >> x3::int_;
                      
                          auto first = mmap.data(), last = first + mmap.size();
                          try {
                              bool ok = x3::phrase_parse( //
                                  first, last,
                                  x3::expect[x3::uint_ >> x3::eol] //
                                      >> line_[handle] % x3::eol   //
                                      // expect EOF here
                                      >> *x3::eol >> x3::expect[x3::eoi], //
                                  x3::blank);
                      
                              // ok is true due to the expectation points
                              assert(ok);
                          } catch (x3::expectation_failure<char const*> const& ef) {
                              auto where = ef.where();
                              auto till  = std::min(last, where + 32);
                              throw std::runtime_error("Expected " + ef.which() + " at #" +
                                                       std::to_string(where - mmap.data()) + " '" +
                                                       std::string(where, till) + "'...");
                          }
                      
                          return slabVector;
                      }
                      
                      #include <fmt/ranges.h>
                      #include <fstream>
                      #include <random>
                      #include <ranges>
                      using std::ranges::views::filter;
                      
                      int main()
                      {
                          std::string const fname = "T032_OSE.pts";
                      #if 0 || defined(GENERATE)
                          using namespace std;
                          // generates a ~12Gib file
                          ofstream ofs(fname);
                          mt19937  prng{random_device{}()};
                          uniform_real_distribution<Float> x(-25, 25), y(-25, +25), z(-1, 0);
                          uniform_int_distribution<>       n(0, 100);
                          auto N = 437288479;
                          ofs << N << "\n";
                          while (N--)
                              ofs << x(prng) << " " << y(prng) << " " << z(prng) << " " << n(prng) << "\n";
                      #else
                          auto sv        = readMappedFile(fname);
                          auto has_count = [](Record const& tup) { return get<3>(tup) > 0; };
                          fmt::print("slabVector:\n{}\n", fmt::join(sv | filter(has_count), "\n"));
                      #endif
                      }
                      

                      Angular jspdf [atob] problem with custom font (greek characters)

                      copy iconCopydownload iconDownload
                        import {fontString} from "./font";
                        doc.addFileToVFS("AdriaSlabW00Medium.ttf", fontString);
                        doc.addFont("AdriaSlabW00Medium.ttf", "Adria Slab W00 Medium", "normal");
                        doc.setFont('Adria Slab W00 Medium', 'normal');
                      

                      Trying to create a several boxplots

                      copy iconCopydownload iconDownload
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(factor(name), as.numeric(maf), fill=factor(value))) +
                        geom_boxplot() +
                        scale_y_continuous(labels = function(x) format(x, scientific = FALSE))
                      
                      library(tidyverse)
                      
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(name, maf, fill=factor(value))) +
                        geom_boxplot()
                      
                      df <- structure(list(A5 = c(1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 
                      1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L), A9 = c(NA, 1L, 1L, 1L, 
                      NA, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L
                      ), maf = c(0.933843, 0.207735, 0.928438, 0.717963, 0.102935, 
                      0.928281, 0.9281, 0.28517, 0.267085, 0.928339, 0.0568334, 0.487848, 
                      0.222414, 0.337689, 0.109452, 0.0471361, 0.687674, 0.503323, 
                      0.893953, 0.913662)), class = "data.frame", row.names = c("1", 
                      "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
                      "14", "15", "16", "17", "18", "19", "20"))
                      
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(factor(name), as.numeric(maf), fill=factor(value))) +
                        geom_boxplot() +
                        scale_y_continuous(labels = function(x) format(x, scientific = FALSE))
                      
                      library(tidyverse)
                      
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(name, maf, fill=factor(value))) +
                        geom_boxplot()
                      
                      df <- structure(list(A5 = c(1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 
                      1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L), A9 = c(NA, 1L, 1L, 1L, 
                      NA, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L
                      ), maf = c(0.933843, 0.207735, 0.928438, 0.717963, 0.102935, 
                      0.928281, 0.9281, 0.28517, 0.267085, 0.928339, 0.0568334, 0.487848, 
                      0.222414, 0.337689, 0.109452, 0.0471361, 0.687674, 0.503323, 
                      0.893953, 0.913662)), class = "data.frame", row.names = c("1", 
                      "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
                      "14", "15", "16", "17", "18", "19", "20"))
                      
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(factor(name), as.numeric(maf), fill=factor(value))) +
                        geom_boxplot() +
                        scale_y_continuous(labels = function(x) format(x, scientific = FALSE))
                      
                      library(tidyverse)
                      
                      df %>% 
                        pivot_longer(
                          -maf
                        ) %>% 
                        ggplot(aes(name, maf, fill=factor(value))) +
                        geom_boxplot()
                      
                      df <- structure(list(A5 = c(1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 
                      1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L), A9 = c(NA, 1L, 1L, 1L, 
                      NA, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, NA, 0L, 1L, 1L
                      ), maf = c(0.933843, 0.207735, 0.928438, 0.717963, 0.102935, 
                      0.928281, 0.9281, 0.28517, 0.267085, 0.928339, 0.0568334, 0.487848, 
                      0.222414, 0.337689, 0.109452, 0.0471361, 0.687674, 0.503323, 
                      0.893953, 0.913662)), class = "data.frame", row.names = c("1", 
                      "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
                      "14", "15", "16", "17", "18", "19", "20"))
                      

                      Community Discussions

                      Trending Discussions on slab
                      • How to get elements into the page?
                      • Clip {ggdist} ccdf-barplot
                      • How to plot multi-level meta-analysis by study (in contrast to the subgroup)?
                      • Compare two different images and find the differences
                      • metafor provides 95%CI that are different from the original values
                      • Countdown CSS visual formatting
                      • Pass data from parent component to child of child in Vue js
                      • Text appear/disappear on top of image with button toggle
                      • How can I improve the speed of my large txt processing script?
                      • Angular jspdf [atob] problem with custom font (greek characters)
                      Trending Discussions on slab

                      QUESTION

                      How to get elements into the page?

                      Asked 2022-Apr-02 at 18:26

                      I have this HTML code and the result is that my whole page is center aligned. This causes my background color in the top navigator to be centered and my footer to be centered too. But both in the initial box and in the footer and in the header there is the scrollbar and it does not put these elements on the whole page. Can anyone help me to solve this problem?

                      body, html {
                          height: 100%;
                          width: 100%;
                      }
                      
                      html,
                      body {
                        margin: auto;
                        padding: 0%;
                      }
                      
                      
                      .section {
                        width: 100%;
                      }
                      
                      .container.slidercontent {
                      background: #D4988E;
                      }
                      
                      .container {
                        position: relative;
                        width: 1170px;
                        margin: auto;
                        color: #444;
                        font-size: 14px;
                        font-weight: 300;
                        font-family: Roboto;
                        overflow: hidden;
                      }
                      
                      .section .container {
                        padding: 50px 0 50px 0;
                      }
                      
                      .section.bg {
                        background: #f7f7f7;
                      }
                      /*
                        Header
                      */
                      
                      .hold {
                        height: 80px;
                      }
                      
                      .header {
                        line-height: 80px;
                        width: 100%;
                        transition: line-height 0.2s linear, box-shadow 0.2s linear;
                        position: fixed;
                        top: 0;
                        left: 0;
                        z-index: 100;
                        background: rgba(245, 245, 245, 0.97);
                      }
                      
                      .header.small {
                        line-height: 50px;
                        box-shadow: 0px 1px 3px 0px rgba(50, 50, 50, 0.8);
                      }
                      
                      .header.small > .container > #logo {
                        height: 40px;
                      }
                      
                      #logo {
                        position: absolute;
                        top: 50%;
                        transform: translateY(-50%);
                        background: red;
                        float: left;
                        height: 40px;
                        width: 170px;
                        margin-left: 5px;
                      }
                      
                      /*
                        Slider
                      */
                      
                      .section .slider,
                      .section .footer {
                        background: #333;
                      }
                      
                      .slidercontent {
                        text-align: center;
                      }
                      
                      .hero {
                        font-family: 'roboto';
                        color: white;
                        font-weight: normal;
                        letter-spacing: 1px;
                      }
                      
                      h1.hero {
                        font-size: 54px;
                      }
                      
                      h2.hero {
                        font-size: 20px;
                        margin-bottom: 60px;
                        font-family: 'arial'
                      }
                      
                      h1.hero:after {
                        content: "";
                        width: 300px;
                        position: relative;
                        border-bottom: 1px solid #aaa;
                        text-align: center;
                        margin: auto;
                        margin-top: 15px;
                      }
                      
                      .call {
                        color: white;
                        display: block;
                        margin-bottom: 20px;
                      }
                      
                      .call span {
                        display: inline;
                        border: 1px solid white;
                        padding: 8px 13px;
                        font-size: 20px;
                        transition: background 0.15s linear;
                      }
                      
                      .call span:hover {
                        background: rgba(255, 255, 255, 0.1);
                        cursor: pointer;
                      }
                      /* 
                        Columns 
                      */
                      
                      .col {
                        float: left;
                        padding: 0;
                        margin: 0;
                        position: relative;
                      }
                      
                      .col.four {
                        width: 23%;
                        margin: 0 1%;
                      }
                      
                      .col.three {
                        width: 31.3%;
                        margin: 0 1%;
                      }
                      
                      .col.two {
                        width: 40%;
                        margin: 0 2.5%;
                        padding: 0 2.5%;
                      }
                      
                      .col.extrapad {
                        padding-top: 20px;
                        padding-bottom: 20px;
                      }
                      
                      .col .service,
                      .col .feature {
                        font-size: 21px;
                        font-weight: 300;
                        font-family: 'Roboto Slab', sans-serif;
                      }
                      
                      .col .service:after {
                        content: "";
                        width: 50px;
                        position: relative;
                        border-bottom: 1px solid #eee;
                        display: block;
                        text-align: center;
                        margin: auto;
                        margin-top: 15px;
                      }
                      
                      .col .feature {
                        font-size: 19px;
                      }
                      
                      .col h1.side,
                      .col p.side,
                      .col span.side:first-of-type {
                        margin-left: 50px;
                        text-align: left;
                      }
                      
                      .col .icon {
                        border-radius: 50%;
                        height: 85px;
                        width: 85px;
                        line-height: 85px;
                        text-align: center;
                        margin: 0 auto;
                        transition: background 0.25s linear, color 0.25s linear;
                      }
                      
                      .col .icon.side {
                        position: absolute;
                        padding: 0;
                        margin: 0;
                        top: -15px;
                        height: 50px;
                        width: 50px;
                      }
                      
                      .col:hover > .icon {
                        background: #F44336;
                        color: white;
                      }
                      
                      .col:hover > .icon.side {
                        background: initial;
                        color: initial;
                      }
                      
                      .responsivegroup {
                        display: none;
                      }
                      /*
                        Column specifics
                      */
                      
                      .col p,
                      .col h1 {
                        padding: 0%;
                        text-align: center;
                      }
                      
                      .group.margin {
                        margin-bottom: 20px;
                      }
                      
                      .col .imgholder {
                        height: 300px;
                        width: 100%;
                        background: #333;
                        transition: background 0.3s linear;
                      }
                      
                      
                      .col.bg {
                        background: #FFF;
                      }
                      
                      .col.pointer {
                        cursor: pointer;
                      }
                      
                      .col.bg:hover .imgholder {
                        background: #555;
                      }
                      
                      .col span.feature {
                        font-size: 20px;
                      }
                      
                      /*
                        Text
                      */
                      
                      .container > h1:not(.hero) {
                        margin-bottom: 30px;
                        text-align: center;
                      }
                      
                      .container > h1:after {
                        content: "";
                        width: 30px;
                        position: relative;
                        border-bottom: 1px solid #aaa;
                        display: block;
                        text-align: center;
                        margin: auto;
                        margin-top: 15px;
                      }
                      
                      h2 {
                        font-family: 'Roboto Slab', sans-serif;
                        text-align: center;
                        font-weight: 400;
                        font-size: 18px;
                      }
                      
                      .left,
                      .left > h1,
                      .left > p {
                        text-align: left;
                      }
                      
                      .reset {
                        text-align: left !important;
                      }
                      
                      .reset:after {
                        display: none !important;
                      }
                      
                      
                      /*
                         Gallery
                      */
                      
                      
                      div.gallery {
                        border: 1px;
                         margin-bottom: 25px;
                      }
                      
                      div.gallery:hover {
                        border: 1px solid #D4988E;
                      }
                      
                      div.gallery img {
                        width: 100%;
                        height: auto;
                      }
                      
                      div.desc {
                        padding: 8px;
                        text-align: center;
                        font-family: Verdana;
                      }
                      
                      div.desc1 {
                        padding: 12px;
                        text-align: center;
                        font-family: Garamond;
                      font-weight: bold;
                      font-size: 18px;
                      letter-spacing: 1px;
                      }
                      
                      * {
                        box-sizing: border-box;
                      }
                      
                      .responsive {
                        padding: 0 6px;
                        float: left;
                        width: 25%;
                      }
                      
                      .footer {
                      position:relative;
                      left: 0px; 
                      right: 0px; 
                      right: 0px;
                      }
                      <!DOCTYPE html>
                      <html>
                      <head>
                      <meta charset="utf-8" />
                      <link rel="stylesheet" href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/css/style.css">
                      
                      <title>flowerbee</title>
                      
                      
                      </head>
                      <body>
                      
                      <!-- topnav======================================== -->
                      
                       <div class="topnav">
                       <div style="position:relative;padding-top:0%; bottom: 0;">
                          <iframe src="TopNav.html" width="100%" height="55" allowfullscreen></iframe>
                          <style>iframe {border: none}</style>
                        </div>
                        </div>
                      
                      
                      <div class="section">
                        <div class="slider">
                          <div class="container slidercontent">
                            <h1 class="hero">flowerbee</h1>
                            <h2 class="hero">Flower delivery</h2>
                          </div>
                        </div>
                      </div>
                      
                      <!-- galleria prodotti======================================== -->
                      
                      <div class="section bg">
                        <div class="container">
                          <h1>Product gallery</h1>
                          <h2>all our bouquets!</h2>
                          
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/BigBang.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Big Bang/BigBang1.jpg" alt="Big Bang" width="600" height="600">
                          </a>
                          <div class="desc1">Big Bang</div>
                          <div class="desc">starting from 33.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Iris.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Iris/Iris1.jpg" alt="Iris" width="600" height="400">
                          </a>
                          <div class="desc1">Iris</div>
                          <div class="desc">starting from 35.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Sundays.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Sundays/Sundays1.jpg" alt="Sundays" width="600" height="400">
                          </a>
                          <div class="desc1">Sundays</div>
                          <div class="desc">starting from 35.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Lilac.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Lilac/Lilac1.jpg" alt="Lilac" width="600" height="400">
                          </a>
                          <div class="desc1">Lilac</div>
                          <div class="desc">starting from 29.00 €</div>
                        </div>
                      </div>
                      
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Onirium.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Onirium/Onirium1.jpg" alt="Onirium" width="600" height="600">
                          </a>
                          <div class="desc1">Onirium</div>
                          <div class="desc">starting from 33.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Zanni.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Zanni/Zanni1.jpg" alt="Zanni" width="600" height="400">
                          </a>
                          <div class="desc1">Zanni</div>
                          <div class="desc">starting from 39.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Suite.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Suite/Suite1.jpg" alt="Suite" width="600" height="400">
                          </a>
                          <div class="desc1">Suite</div>
                          <div class="desc">starting from 39.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/BoraBora.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/BoraBora/BoraBora1.jpg" alt="BoraBora" width="600" height="400">
                          </a>
                          <div class="desc1">Bora Bora</div>
                          <div class="desc">starting from 42.00 €</div>
                        </div>
                      </div>
                      
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Moonwalk.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Moonwalk/Moonwalk1.jpg" alt="Moonwalk" width="600" height="600">
                          </a>
                          <div class="desc1">Moonwalk</div>
                          <div class="desc">starting from 33.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Birdy.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Birdy/Birdy1.jpg" alt="Birdy" width="600" height="400">
                          </a>
                          <div class="desc1">Birdy</div>
                          <div class="desc">starting from 51.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/Manila.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Manila/Manila1.jpg" alt="Manila" width="600" height="400">
                          </a>
                          <div class="desc1">Manila</div>
                          <div class="desc">starting from 35.00 €</div>
                        </div>
                      </div>
                      
                      <div class="responsive">
                        <div class="gallery">
                          <a href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/OceanEyes.html">
                            <img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/OceanEyes/OceanEyes1.jpg" alt="OceanEyes" width="600" height="400">
                          </a>
                          <div class="desc1">OceanEyes</div>
                          <div class="desc">starting from 42.00 €</div>
                        </div>
                      </div>
                      
                      
                      
                      <!-- recensioni======================================== -->
                      
                      <div class="section">
                        <div class="container">
                          <h1>Wow? Wow wow wow wow!</h1>
                          <h2>Wow</h2>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="group margin"></div>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="col three">
                            <h1 class="icon side">[]</h1>
                            <h1 class="feature side">Wow</h1>
                            <p class="side">Wow wow wow wow wow wow wow wow</p>
                          </div>
                          <div class="group margin"></div>
                        </div>
                       
                      
                      
                      <!-- footer======================================== -->
                      <div class="footer">  
                        <div style="position:relative;padding-top:0%; bottom: 0;">
                          <iframe src="Footer.html" width="100%" height="370" allowfullscreen></iframe>
                          <style>iframe {border: none}</style>
                        </div>
                        </div>
                      
                      
                      
                      </body>
                      </html>

                      ANSWER

                      Answered 2022-Apr-02 at 14:45

                      you could do <center></center> to fix your situation with the centering but Iframe displays a webpage so using it for anything else other then to advertise a webpage would be pretty useless but just use the attribute scrolling="no" for your iframe

                      Source https://stackoverflow.com/questions/71718423

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install slab

                      You can download it from GitHub.
                      You can use slab like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the slab component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Share this Page

                      share link
                      Consider Popular Java Libraries
                      Try Top Libraries by RichardWarburton
                      Compare Java Libraries with Highest Support
                      Compare Java Libraries with Highest Quality
                      Compare Java Libraries with Highest Security
                      Compare Java Libraries with Permissive License
                      Compare Java Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.