text:
Q: Reader-writer concurrency I am trying to achieve the following scenario. In case of only readers in the system, don't take the mutex. I have written the following implementation.
LockReader()
{
  flag = 0;
  atomic increment cntReader;
  if(atomic check cntWriter > 0)
  {
    while(noLock != 0);
    flag = 1;
    mutexLock(var);
  }
  else
  {
    atomic increment noLock;
  }

  //CS

  if(flag == 1)
    mutexUnlock(var);
  else
    atomic decrement noLock;

  atomic decrement cntReader;
}

LockWriter()
{
  atomic increment cntWriter;
  if(atomic check cntReader > 0)
  {
    while(noLock != 0);
  }

  mutexLock(var);

  mutexUnlock(var);
  atomic decrement cntWriter;

}

But this code has the issue that, if there is a reader and it gets context switch after evaluating line 3 of LockShared(if(cntWriter > 1)) and a writer comes, then it can get the mutexLock, since noLock  is not incremented yet. And after the mutexLock, if writer is context switched, the reader will also be allowed. We have let both reader and writer together.
How do I avoid this scenario?
EDIT 1:
I have changed LockReader() this way:
LockReader()
{
  flag = 0;
  atomic increment cntReader;
  atomic increment noLock;
  if(atomic check cntWriter > 0)
  {
    atomic decrement noLock;
    while(noLock != 0);
    flag = 1;
    mutexLock(var);
  }

  //CS

  if(flag == 1)
    mutexUnlock(var);
  else
    atomic decrement noLock;

  atomic decrement cntReader;
}

I think this should fix the issue I mentioned. But are there any other reader-writer concurrency problems possible?
EDIT 2: Added unlock code as well.

A: If it is all about the performance, you should not use mutex at all. Instead use just one counter and busy waiting, i.e.:
volatile int rw_lock;

LockReader() {
    int l, success = 0;

    while (success == 0) {
        l = rw_lock;
        if (l < 0) {
            // wait for a writer
            continue;
        }
        // atomically increment rw_lock
        success == cmpset(rw_lock, l, l + 1);
    }
}

LockWriter() {
    int l, success = 0;

    while (success == 0) {
        l = rw_lock;
        if (l != 0) {
            // wait for readers
            continue;
        }
        // atomically set rw_lock to -1
        success = cmpset(rw_lock, 0, -1);
    }
}

UnlockReader() {
    atomic_dec(rw_lock);
}

UnlockWriter() {
    atomic_inc(rw_lock);
}

Those type of locks are called reader-writer locks. You can find more info at Wikipedia:
https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock
EDIT:
Write-preferring version:
volatile int rw_lock;
volatile int w_req;

LockReader() {
    int l, success = 0;

    while (success == 0) {
        while (w_req) {
            // wait due to write preference
        }
        l = rw_lock;
        if (l < 0) {
            // wait for a writer
            continue;
        }
        // atomically increment rw_lock
        success == cmpset(rw_lock, l, l + 1);
    }
}

LockWriter() {
    int l, success = 0;

    w_req = 1; // request a write, i.e. block new reads
    while (success == 0) {
        l = rw_lock;
        if (l != 0) {
            // wait for readers
            continue;
        }
        // atomically set rw_lock to -1
        success = cmpset(rw_lock, 0, -1);
    }
    w_req = 0; // allow new reads
}

UnlockReader() {
    atomic_dec(rw_lock);
}

UnlockWriter() {
    atomic_inc(rw_lock);
}


text:
Q: cv filestorage read yaml without the "%YAML:1.0" line specified I need to write a c++ parser that can read YAML files that look like this:
image_width: 1920
image_height: 1200
camera_name: narrow_stereo
camera_matrix:
  rows: 3
  cols: 3
  data: [1063.422080, 0.000000, 918.069798, 0.000000, 1063.715929, 590.178737, 0.000000, 0.000000, 1.000000]

This is my first attempt:
#include <opencv2/core/core.hpp>
static cv::Mat CameraMat;
static int ImageWidth, ImageHeight;
cv::FileStorage fs(calibration_file, cv::FileStorage::READ | cv::FileStorage::FORMAT_YAML);
fs["camera_matrix"] >> CameraMat;
fs["image_width"] >> ImageWidth;
fs["image_height"] >> ImageHeight;

This fails for a few reasons, relating to the YAML in this config file, not matching the YAML standard opencv expects. If I make three additions to my YAML file, as below, the above code works as expected.
%YAML:1.0
image_width: 1920
image_height: 1200
camera_name: narrow_stereo
camera_matrix: !!opencv-matrix
  rows: 3
  cols: 3
  dt: d
  data: [1063.422080, 0.000000, 918.069798, 0.000000, 1063.715929, 590.178737, 0.000000, 0.000000, 1.000000]

My Question is: How can I read these YAML files (without having to edit them)? Can it be done with some cv::FileStorage hack or do I need to write my own parser and constructor from scratch?
Note that without the top line filestorage can't even get past the constructor.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Overloading << operator for Array of Arrays I have defined the following function in the header of my class Array1 which prints the length of the array and it works.
 friend std::ostream& operator<<(std::ostream &out,Array1<T> x)
 {
     out<<x.length();
 }

But how can I use the << operator to print the total length of objects like
 Array1<Array1<double>> myarray;

A: I would do it this way:
#include <vector>
#include <iostream>

// I don't know what your Array1 looks like but for this demo
// deriving from std::vector seems reasonable
template<class T> struct Array1 : std::vector<T>
{

};

// general case of computing a length of an array
template<class T> std::size_t totalArrayLength(Array1<T> const& a)
{
    return a.size();
}

// specific case of an array of arrays
template<class T> std::size_t totalArrayLength(Array1<Array1<T>> const& a)
{
    auto total = std::size_t(0);
    for (auto const& i : a) {
        total += totalArrayLength(i);
    }
    return total;
}

// defer to the totalArrayLength function overloads for length
// computation
template<class T>
std::ostream& operator<<(std::ostream& os, const Array1<T>& a)
{
    return os << totalArrayLength(a);
}

int main()
{
    Array1<Array1<int>> a;
    a.push_back({});
    a.push_back({});
    a[0].push_back(1);
    a[0].push_back(2);
    a[0].push_back(3);
    a[1].push_back(4);
    a[1].push_back(5);
    a[1].push_back(6);

    std::cout << a << std::endl;

    // works with any number of dimensions
    Array1<Array1<Array1<int>>> aaa;
    aaa.push_back(a);
    aaa.push_back(a);
    std::cout << aaa << std::endl;
}


text:
Q: ConfigServletWebServerApplicationContext : How to uninstall Flyway from Spring Maven Project The goal: Uninstall flyway from my Spring Maven project !
Maybe my question is more global and consists of how to get rid of dependecies or libraries....
The context:
My project is called "Meetzicker" it will be a restfull API to meet musicians.
I will dockerize it and use docker-compose with many services:

*

*my API

*postgres db

*pgAdmin to manage DB

*and later flyway but not for now !

If you have advices I accept them gladly !
enter image description here
First I build an image of my project with the pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.praline40</groupId>
    <artifactId>meetzicker</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <description>MeetZicker REST API</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.18.Final</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-hateoas</artifactId>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version> 2.0.1.Final </version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.20.1</version>
                <configuration>
                    <images>
                        <image>
                            <name>${project.artifactId}</name>
                            <build>
                                <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
                                <assembly>
                                    <mode>dir</mode>
                                    <targetDir>/var/lib/${project.artifactId}</targetDir>
                                    <descriptor>${project.basedir}/src/main/docker/assembly.xml</descriptor>
                                </assembly>
                            </build>
                        </image>
                    </images>
                </configuration>
                <executions>
                    <execution>
                        <id>build</id>
                        <phase>install</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

The last part of the pom (between  ... ) builds my image automatically when I call:
~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker$ mvn clean install -DskipTests=true

I am using docker-composed with 3 services:
# meetzicker/docker-compose.yml
version: "3.3"
services:

  db:
    image: postgres:${POSTGRES_VERSION}
    container_name: db
    network_mode: bridge
    volumes:
      - db-data:/var/lib/postgresql/data
    expose:
      - 5432
    ports:
      - 5432:5432
    environment:
      - POSTGRES_DB=${POSTGRES_DB}
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    restart: unless-stopped

  pgadmin:
    image: dpage/pgadmin4
    network_mode: bridge
    container_name: pgadmin4
    volumes:
      - pgadmin-data:/var/lib/pgadmin
    expose:
      - 5050
    ports:
      - 5051:5050
    links:
      - db:pgsql-server
    environment:
      PGADMIN_DEFAULT_EMAIL: praline40@hotmail.fr
      PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD}
      PGADMIN_PORT: 5050
    restart: unless-stopped

  meetzicker:
    image: meetzicker
    network_mode: bridge
    container_name: meetzicker
    volumes:
      - meetzicker-data:/var/lib/meetzicker
    expose:
      - 8080
    ports:
      - 8080:8080
    restart: unless-stopped
    depends_on:
      - db

volumes:
  db-data:
  pgadmin-data:
  meetzicker-data:

When I call docker-compose:
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up

I have this error:
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up
WARNING: Found orphan containers (my-flyway) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
db is up-to-date
Starting pgadmin4   ... done
Starting meetzicker ... done
Attaching to db, meetzicker, pgadmin4
meetzicker    | wait-for-it.sh: waiting 15 seconds for db:5432
db            |
db            | PostgreSQL Database directory appears to contain a database; Skipping initialization
db            |
db            | LOG:  database system was shut down at 2021-05-14 13:52:50 UTC
db            | LOG:  MultiXact member wraparound protections are now enabled
db            | LOG:  database system is ready to accept connections
db            | LOG:  autovacuum launcher started
pgadmin4      | [2021-05-14 14:16:16 +0000] [1] [INFO] Starting gunicorn 20.1.0
pgadmin4      | [2021-05-14 14:16:16 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmin4      | [2021-05-14 14:16:16 +0000] [1] [INFO] Using worker: threads
pgadmin4      | [2021-05-14 14:16:16 +0000] [82] [INFO] Booting worker with pid: 82
meetzicker    | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker    |
meetzicker    |   .   ____          _            __ _ _
meetzicker    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
meetzicker    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
meetzicker    |   '  |____| .__|_| |_|_| |_\__, | / / / /
meetzicker    |  =========|_|==============|___/=/_/_/_/
meetzicker    |  :: Spring Boot ::        (v2.3.4.RELEASE)
meetzicker    |
meetzicker    | 2021-05-14 14:16:29.399  INFO 43 --- [           main] c.p.MeetZicker.MeetZickerApplication     : Starting MeetZickerApplication v0.0.1-SNAPSHOT on c9ed3b2b0bd9 with PID 43 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker    | 2021-05-14 14:16:29.401  INFO 43 --- [           main] c.p.MeetZicker.MeetZickerApplication     : The following profiles are active: dev
meetzicker    | 2021-05-14 14:16:29.849  INFO 43 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker    | 2021-05-14 14:16:29.918  INFO 43 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 62ms. Found 12 JPA repository interfaces.
meetzicker    | 2021-05-14 14:16:30.323  INFO 43 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
meetzicker    | 2021-05-14 14:16:30.331  INFO 43 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
meetzicker    | 2021-05-14 14:16:30.331  INFO 43 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker    | 2021-05-14 14:16:30.368  INFO 43 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
meetzicker    | 2021-05-14 14:16:30.368  INFO 43 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 936 ms
meetzicker    | 2021-05-14 14:16:30.445  WARN 43 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker    | 2021-05-14 14:16:30.447  INFO 43 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
meetzicker    | 2021-05-14 14:16:30.453  INFO 43 --- [           main] ConditionEvaluationReportLoggingListener :
meetzicker    |
meetzicker    | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker    | 2021-05-14 14:16:30.454 ERROR 43 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
meetzicker    |
meetzicker    | ***************************
meetzicker    | APPLICATION FAILED TO START
meetzicker    | ***************************
meetzicker    |
meetzicker    | Description:
meetzicker    |
meetzicker    | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker    |
meetzicker    |         - classpath:db/migration
meetzicker    |
meetzicker    |
meetzicker    | Action:
meetzicker    |
meetzicker    | Review the locations above or check your Flyway configuration
meetzicker    |
meetzicker    | wait-for-it.sh: waiting 15 seconds for db:5432
meetzicker    | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker    |
meetzicker    |   .   ____          _            __ _ _
meetzicker    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
meetzicker    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
meetzicker    |   '  |____| .__|_| |_|_| |_\__, | / / / /
meetzicker    |  =========|_|==============|___/=/_/_/_/
meetzicker    |  :: Spring Boot ::        (v2.3.4.RELEASE)
meetzicker    |
meetzicker    | 2021-05-14 14:16:46.742  INFO 44 --- [           main] c.p.MeetZicker.MeetZickerApplication     : Starting MeetZickerApplication v0.0.1-SNAPSHOT on c9ed3b2b0bd9 with PID 44 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker    | 2021-05-14 14:16:46.743  INFO 44 --- [           main] c.p.MeetZicker.MeetZickerApplication     : The following profiles are active: dev
meetzicker    | 2021-05-14 14:16:47.199  INFO 44 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker    | 2021-05-14 14:16:47.268  INFO 44 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 63ms. Found 12 JPA repository interfaces.
meetzicker    | 2021-05-14 14:16:47.673  INFO 44 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
meetzicker    | 2021-05-14 14:16:47.681  INFO 44 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
meetzicker    | 2021-05-14 14:16:47.681  INFO 44 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker    | 2021-05-14 14:16:47.719  INFO 44 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
meetzicker    | 2021-05-14 14:16:47.719  INFO 44 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 945 ms
meetzicker    | 2021-05-14 14:16:47.811  WARN 44 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker    | 2021-05-14 14:16:47.813  INFO 44 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
meetzicker    | 2021-05-14 14:16:47.819  INFO 44 --- [           main] ConditionEvaluationReportLoggingListener :
meetzicker    |
meetzicker    | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker    | 2021-05-14 14:16:47.820 ERROR 44 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
meetzicker    |
meetzicker    | ***************************
meetzicker    | APPLICATION FAILED TO START
meetzicker    | ***************************
meetzicker    |
meetzicker    | Description:
meetzicker    |
meetzicker    | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker    |
meetzicker    |         - classpath:db/migration
meetzicker    |
meetzicker    |
meetzicker    | Action:
meetzicker    |
meetzicker    | Review the locations above or check your Flyway configuration
meetzicker    |
meetzicker exited with code 1
meetzicker    | wait-for-it.sh: waiting 15 seconds for db:5432

¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
I removed orphans:
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up --remove-orphans
Removing orphan container "my-flyway"
Starting db ... done
Starting meetzicker ... done
Starting pgadmin4   ... done
Attaching to db, meetzicker, pgadmin4
db            |
db            | PostgreSQL Database directory appears to contain a database; Skipping initialization
db            |
db            | LOG:  database system was interrupted; last known up at 2021-05-16 12:21:00 UTC
db            | LOG:  database system was not properly shut down; automatic recovery in progress
db            | LOG:  invalid record length at 0/14F1D38: wanted 24, got 0
db            | LOG:  redo is not required
meetzicker    | wait-for-it.sh: waiting 15 seconds for db:5432
db            | LOG:  MultiXact member wraparound protections are now enabled
db            | LOG:  database system is ready to accept connections
db            | LOG:  autovacuum launcher started
pgadmin4      | [2021-05-17 11:09:31 +0000] [1] [INFO] Starting gunicorn 20.1.0
pgadmin4      | [2021-05-17 11:09:31 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmin4      | [2021-05-17 11:09:31 +0000] [1] [INFO] Using worker: threads
pgadmin4      | [2021-05-17 11:09:31 +0000] [83] [INFO] Booting worker with pid: 83
meetzicker    | wait-for-it.sh: timeout occurred after waiting 15 seconds for db:5432
meetzicker    |
meetzicker    |   .   ____          _            __ _ _
meetzicker    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
meetzicker    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
meetzicker    |   '  |____| .__|_| |_|_| |_\__, | / / / /
meetzicker    |  =========|_|==============|___/=/_/_/_/
meetzicker    |  :: Spring Boot ::        (v2.3.4.RELEASE)
meetzicker    |
meetzicker    | 2021-05-17 11:09:44.061  INFO 43 --- [           main] c.p.MeetZicker.MeetZickerApplication     : Starting MeetZickerApplication v0.0.1-SNAPSHOT on d256a05b5f82 with PID 43 (/var/lib/meetzicker/meetzicker.jar started by root in /var/lib/meetzicker)
meetzicker    | 2021-05-17 11:09:44.062  INFO 43 --- [           main] c.p.MeetZicker.MeetZickerApplication     : The following profiles are active: dev
meetzicker    | 2021-05-17 11:09:44.512  INFO 43 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker    | 2021-05-17 11:09:44.581  INFO 43 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 63ms. Found 12 JPA repository interfaces.
meetzicker    | 2021-05-17 11:09:44.988  INFO 43 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
meetzicker    | 2021-05-17 11:09:44.996  INFO 43 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
meetzicker    | 2021-05-17 11:09:44.996  INFO 43 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker    | 2021-05-17 11:09:45.032  INFO 43 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
meetzicker    | 2021-05-17 11:09:45.032  INFO 43 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 939 ms
meetzicker    | 2021-05-17 11:09:45.123  WARN 43 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Unsatisfied dependency expressed through method 'flywayInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'flyway' threw exception; nested exception is org.springframework.boot.autoconfigure.flyway.FlywayMigrationScriptMissingException: Cannot find migration scripts in: [classpath:db/migration] (please add migration scripts or check your Flyway configuration)
meetzicker    | 2021-05-17 11:09:45.125  INFO 43 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
meetzicker    | 2021-05-17 11:09:45.131  INFO 43 --- [           main] ConditionEvaluationReportLoggingListener :
meetzicker    |
meetzicker    | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
meetzicker    | 2021-05-17 11:09:45.133 ERROR 43 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :
meetzicker    |
meetzicker    | ***************************
meetzicker    | APPLICATION FAILED TO START
meetzicker    | ***************************
meetzicker    |
meetzicker    | Description:
meetzicker    |
meetzicker    | Flyway failed to initialize: none of the following migration scripts locations could be found:
meetzicker    |
meetzicker    |         - classpath:db/migration
meetzicker    |
meetzicker    |
meetzicker    | Action:
meetzicker    |
meetzicker    | Review the locations above or check your Flyway configuration
meetzicker    |

Here is my public project:
https://github.com/praline40/MeetZickerAPI


text:
Q: Play store do not accept app less than oreo From November 2018 onward Google playstore won't accept app which are having minimum android version less than Oreo . I wonder is there any chance for the Oreo app to support android version less than Oreo, because there are a  huge number of customers out there under Oreo.

A: Play Store requires TargetSdk to be 26 , not MinSdk version . So the apps will support lower versions as well . If you don't want to update your app then the changes will not affect your app by any way.
From Official blog

Existing apps that are not receiving updates are unaffected. Developers remain free to use a minSdkVersion of their choice, so there is no change to your ability to build apps for older Android versions. We encourage developers to provide backwards compatibility as far as reasonably possible

Blog post link

A: Yes, your app can have targetSdk less than Oreo, just not lower than Lollipop, as stated.
You'll have to spend some time with a bunch of if statements in your code for version checks when using newer APIs that are not available in older SDK versions in the case of trying to target older Android versions

A: ...having minimum android version less than lollipop...
They are taking about the Android Target Version (targetSdkVersion) not the Android Minimum Version (minSdkVersion).
So you can supply an older API level for the minSdkVersion and Oreo or above for targetSdkVersion and then at runtime perform API level checking to determine which SDKs to use.
re: https://developer.android.com/guide/topics/manifest/uses-sdk-element


text:
Q: How to make a calculator I am trying to create a calculator for class, we have to show the operation, we have to make it loop back to the top where it says to enter the first number but also give an option to return back to the top
every time I try to add something, something goes wrong
any ideas on how to make this calculator on how I want it to be?
import java.util.Scanner;

public class Calculator {
  public static void main(String[] argument) {
    {
      char repeat; //initialize repeat
      String input; //initialize input
      Scanner keyboard = new Scanner(System.in);
      System.out.println(" Please enter the first Number");
      int Number1 = keyboard.nextInt();
      System.out.println("Please enter the second number");
      int Number2 = keyboard.nextInt();
      System.out.println("Please enter the operation");
      keyboard.nextLine();
      {
        System.out.println(
            "The result of " + Number1 + " + " + Number2 + " = " + (Number1 + Number2));
        System.out.println(
            "The result of " + Number1 + " - " + Number2 + " = " + (Number1 - Number2));
        System.out.println(
            "The result of " + Number1 + " * " + Number2 + " = " + (Number1 * Number2));
        System.out.println(
            "The result of " + Number1 + " % " + Number2 + " = " + (Number1 % Number2));
        System.out.println(
            "The result of " + Number1 + " / " + Number2 + " = " + (Number1 / Number2));
        if (Number2 >= 0) System.out.println("Division by Zero is not possible.");
        System.out.println("Please run program again and ");
        System.out.println("enter a number other then zero.");
      }
      String userChoice = null;
      do {
        System.out.println("Would you like to " + "select again? ");
        System.out.print("Enter Y for yes or N for no: ");
        input = keyboard.nextLine();
        repeat = input.charAt(0);
      } while (repeat == 'Y' || repeat == 'y');
      System.out.println(userChoice); //give user option to go back to the top

      {
        keyboard.close();
      }
    }
  }
}

A: Your do should be at the beginning of the method. That way i would execute one time and then ask the user if he/she wants to repeat the process.
do{
   //some process
  }
   while(condition is true)

A: Your code has a number of issues :

*

*If you want to prompt user to enter numbers again and again, you need to move you do { of the do-while loop.

do {
            System.out.println(" Please enter the first Number");
            int Number1 = keyboard.nextInt();

*you are calculating division and mod before you check if Number2 == 0. So if you number2 is infact 0, your program will throw an exception. You need to change it to :

if (Number2 == 0)
    System.out.println("Division by Zero is not possible.");
else {
    System.out.println("The result of " + Number1 + " % " + Number2 + " = " + (Number1 % Number2));
    System.out.println("The result of " + Number1 + " / " + Number2 + " = " + (Number1 / Number2));
}

*After making these changes, I was getting an error on System.out.print("Enter Y for yes or N for no: "); keyboard.nextLine(); as it would not wait for user input. I looked it up and looks like an issue with the way Scanner works, explained here.

So making changes to your code:
System.out.print("Enter Y for yes or N for no: ");
keyboard.nextLine();
input = keyboard.nextLine();
repeat = input.charAt(0);

And voila! It works. :)


text:
Q: How to return a single boost::range or two joined boost::ranges from a function I want to write a function that returns either a range that represents two containers, or a range for a single container. The goal is to abstract that in an iteration:
const auto range = getRange(...);
for (const auto& object : range) {
   ...
}

I thought about using boost::range::join this way:
auto getRange(...) {
    if (...) {
        return boost::range::join(container1, container2);
    } else {
        return boost::make_iterator_range(container3);
    }
}

But it does not compile. Probably I'm not using the correct type here. How can I declare a function that returns a common type that could be iterated uniformly independently of if it represents one or two containers?


text:
Q: SQL - column from all rows returned from a Join into a single column? I'm writing an SQL query that displays a deliveries details, plus in a seperate column, all the delivery item ID's seperated by commas. Both Deliveries and DeliveryItems are in a seperate table, so I guess I'll be using a Join to retrieve all items that link to that delivery, but how do I get them into a column I'll be displaying, and seperate each item with a comma?
Thanks
EDIT: Here's an idea of my table structure
Deliveries -
ID (PK)
...(other non relevant fields)...

DeliveryItems -
ID (PK)
Delivery (links to ID of delivery)

So for every item of that delivery, I want to display the item ID comma seperated in a column for that delivery.

A: you can do it by using PIVOT in SQL server 2005.
PIVOT is used for Transpose row to column or column to row, so in your case you can get data in row format by using simple join after that you can use PIVOT for to transpose data and then you can concatenate columns in a single column.
check this link, it has a good example.

A: There is a GROUP_CONCAT function in MySQL that does just that (take a look at the documentation). Look for something similar in your DBMS.


text:
Q: does Using clean URL's with query strings change the path/directory When i use .htaccess and mod_rewrite to redirect my url with query strings,
for example: http://www.mysite.com/index.php?group=A&id=23
to a Url like this: http://www.mysite.com/index/A/23
Does this change the path on my server, with is used to link to .css and .js files?

So when i have a main.css in the same folder as index.php, do i have to change the link to this file to like:
<link href="../../main.css" rel="stylesheet" type="text/css">
Or can i stay with this:
<link href="main.css" rel="stylesheet" type="text/css">

A: Yes that changes the path that the browser will send. The browser does not know about your mod_rewrite rules at all.


text:
Q: Cox PH linearity assumption: reading martingal residual plots According to a lot of ressources about Cox PH model, continuous numeric variables should be tested for linearity assymption by plotting the Martingale residuals.
In R, you can use survminer::ggcoxfunctional() to easily plot these residuals for the Null model :

These are zoomed-in images so user can see the scaled functionnal form of the curve, the lowess smooth curve account for other points which you can see on unzoomed the image here
The problem is that depending on the ressource you are looking at, the rule for violating the linearity assumption is either:

*

*loess curve should be somehow linear:

http://www.sthda.com

Fitted lines with lowess function should be linear to satisfy the Cox
  proportional hazards model assumptions.

*

*loess curve should be somehow linear and horizontal:

https://www.stat.ubc.ca

In both cases the smoothers are roughly flat and horizontal, providing
  no indication of the need to transform

https://www.researchgate.net

Local linear regression (LOESS) curve is usually parallel to zero
line.

Is there any real consensus about how to interpret Martingale residual plots in a Cox PH model ?
Is my example plot OK for the linearity assumption ? (please take a look at the zoomed-out picture)
Also, in some ressources, Martingale residuals plots presented as they give the "functionnal form" of the variable, like this would represent a HR for each value, is this correct ?

A: Quoting from Harrell's Regression Modeling Strategies, second edition, page 494:

When correlations among predictors are mild, plots of estimated predictor transformations without adjustment for other predictors (i.e., marginal transformations) may be useful. Martingale residuals may be obtained quickly by fixing $\hat \beta$ = 0 for all predictors. Then smoothed plots of predictor against residual may be made for all predictors.

So there is nothing necessarily wrong with examining martingale residuals from a null model for linearity, provided that "correlations among predictors are mild." As noted in Table 20.3 on page 494, there are several acceptable ways to use martingale residuals in this context, depending on whether you want to estimate transformations versus checking for nonlinearity, and whether you wish to adjust for other predictors in the process.
The apparent differences among the cited references represent different ways the martingale residuals were calculated and used.
If you display residuals for a model null in the continuous predictor of interest, then you will display the shape of the relation of the predictor to outcome. So if that's a reasonably straight line you have close to a linear relation, as in the first example you cite (and in the zoomed-out picture for your data). If you don't get a straight line, the shape of the curve might suggest a useful functional form to try for that predictor. As the martingale residuals can't go above 1, the actual value at each point along the curve is not a hazard ratio, but the shape of the curve indicates the general shape of the relation of hazard to the predictor. That's what you do when you try to estimate the functional form of the relation.
If instead you check the relation of the martingale residuals to the predictor from a model including an estimated coefficient for that predictor, then you hope for a flat horizontal smoothed line, indicating that the single linear coefficient for the predictor adequately represents the contribution of the predictor to outcome. That's what you do when you test for linearity in the predictor, as in the 2nd and 3rd references.
Nevertheless, particularly with this many data points, starting with restricted spline fits for continuous predictors might provide a simpler and more general way to both test for and adjust for nonlinearities. If the relation of a predictor to outcome is linear, then the higher-order spline terms will have non-significant coefficients. If the relation is non-linear, you can adjust for any reasonable degree of nonlinearity by adding more knots. You ultimately should calibrate the full model (checking linearity with respect to the overall linear predictor, and correcting for optimism), as with the calibrate() function in Harrell's rms package in R.


text:
Q: curl command works as expected on CLI but not in a shell script I have a series of curl commands I use to warm varnish using a script.  The individual commands work just fine on the command line but when I put those same commands in a script they don't work.
#!/bin/bash
curl -o /dev/null --insecure -X PURGE -H 'X-Magento-Tags-Pattern: ((^|,)cat_p_123456(,|$))' https://www.example1.com/page1.html --resolve www.example1.com:443:127.0.0.1
curl -o /dev/null --insecure -I -X GET 'https://www.example1.com/page1.html'

On the command line I can run these commands individually and they work as expected.  The first command purges the cache, the second warms the cache.  When I visit the page after running these on the command line I get the expected hit cached.
If I put these in a shell script, make it executable and run with ./script.sh or even /bin/bash script.sh the purge works but the get doesn't.  I get a cache miss.

A: Try this variant:
#!/bin/bash
curl -o /dev/null --insecure -X PURGE -H 'X-Magento-Tags-Pattern: ((^|,)cat_p_123456(,|$))' https://www.example1.com/page1.html --resolve www.example1.com:443:127.0.0.1 && curl -o /dev/null --insecure -I -X GET 'https://www.example1.com/page1.html'


text:
Q: Spring set a property using a runtime object? I have a hard time figuring out how to set a property with the help of spring annotations.
I have an abstract base class.
abstract class AbstractTest{
 private static Session session;

 @BeforeClass
 public static void initApplication() throws Exception {
  session = new Session();
  ...
 }

 public Session getSession(){

I have an test class extending my AbstractTest.
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class RealTest extends AbstractTest{

 @Autowired
 Service service;

I have a service that needs to make use of the session object and I want it to be "autoset" to the session object.
public class ServiceImpl implements Service {

// @AutoSomething how to make this work?
private Session session;

The spring file that is automatically used for my RealTest thanks to the @ContextConfiguration Annotation
<bean id="Service" class="...ServiceImpl" >
 <property name="session">
  getSession()?? // What's the syntax or how to do this?
 </property>

A: *

*Read about bean scopes. It doesn't really make sence the kind of injection You're trying to do. You should not inject the session itself to the business service classes. You should use the session scoped beans instead.

*The test class itself is not a part of the test ApplicationContext, so You cannot autowire the values created in the test class to the test class. Anyway, why would You do that? You already have it in the test class, so why not just use simple setter in @Before public void setUp() {} method? Or see the next point.

*If You have classes that have dependecies created inside the test class, than the @ContextConfiguration will be of no help here. You can use AnnotationConfigApplicationContext by creating inside the test class an inner @Configuration class and configure the service class using Spring Java Config.
i.e.:
@ContextConfiguration
public class RealTest extends AbstractTest {

    @Autowired
    private ApplicationContext appCtx;

    private Service service;

    @Before
    public void setUp() {
        AnnotationConfigApplicationContext testCtx = new AnnotationConfigApplicationContext();
        testCtx.setParent(this.appCtx);
        testCtx.register(RealTestCfg.class);
        testCtx.refresh();

        this.service = BeanFactoryUtils.beanOfType(testCtx, Service.class);
    }

    @Configuration
    public static class RealTestCfg {

        @Bean
        public Session session() {
            return AbstractTest.session;
        }

        @Bean
        public Service service() {
            return new Service();
        }
    }
}

The @ContextConfiguration and parent ApplicationContext is optional, if You don't have any other dependencies. And AbstractTest.session needs to be protected static, or have protected static accessor.


text:
Q: How to access a Postgres db from Excel Mac? I need to create a really simple table in Excel with data from a Postgres db in localhost.
I've managed to do it with OpenLink PostgreSQL Lite Driver but doesn't look friendly or manageable. I used to use ODBC on Windows, but I'm not sure on OS X. I need it to be open source.

A: The official Microsoft method for connecting Excel For Mac to a database is to use one of a few supported drivers, none of which are open source:
https://support.office.com/en-us/article/ODBC-drivers-that-are-compatible-with-Excel-for-Mac-9FA6BC7F-D19E-4F7F-9BE4-92E85C77D712
Personally, I've used the Actual Technologies driver with Excel For Mac 2011 and it worked, but I had problems with it with the 2016 version of Excel. I was using Postgres as well.
Instead I decided to write the data from the DB out to a csv, and then connect to the csv from Excel. That way I don't have to deal with the database connection, but it's not ideal.


text:
Q: Setup mirror repo from overseas server to local server Our project involves 5 developers in China and 3 developers in U.S.  The server machine in China is considered the master machine.  I want to setup a mirror of the repo from China server to U.S. server such that our local developers can repo sync much faster.  Right now a repo init / sync from China server took 5 hours.
As an example, assume the China server is called server1.china.com and the U.S. server is called server2.usa.com.
The project is pulled from China server using the command:
repo init -u ssh://server1.china.com/projectA/standard.git -b release17
repo sync

I want to be able to setup a local mirror such that pulling the project becomes:
repo init -u ssh://server2.usa.com/projectA/standard.git -b release 17
repo sync

I would expect to also need a cron job to run periodically to pull latest changes from server1 to server2 after the initial setup.
I have seen discussions of using git clone --mirror but not quite sure it will give exactly what I needed.
Thanks

A: What you want is repo init --mirror, from repo init -h:
--mirror            create a replica of the remote repositories rather
                    than a client working directory

After you have created it you can keep it up to date with repo sync.


text:
Q: I can not find my garbage [19.1] I need to access and restore files from a USB drive's trash folder using the the terminal.
I moved some files from a USB drive to the trash and I need to get them back. The Files GUI isn't any good for it "Items in the trash may not be modified" and "Could not determine the original location of 'My file'". Doing it from the command line also did not work. Where is my trash?

A: The trash for each disk partition and USB device is in that device's local Trash (.trash-1000) folder.

*

*Each partition, device, etc, has it's own Trash folder. The system does not waste resources copying files to a central Trash location. That would be annoying every time you wanted to delete, say, a movie ("Why does it take 10 minutes to put my movie in the Trash?").

*Your Desktop Trash shows ALL the currently available Trash folders together. You don't need to switch between them.

*Emptying The Trash will delete the contents of only the currently-available Trash folders (currently-mounted partitions and devices). Unplugged USB sticks, for example, won't have their Trash contents deleted.

Bottom line: Re-insert your USB stick, and your files should re-appear in the Trash.
Usage note: Some folks complain that their USB storage keeps decreasing. They deleted all those movies, but only a few GB are available! You guessed it: They didn't Empty Their Trash while the device was plugged in.

A: I figured it out! I did it by going into the USB drive, doing CTRL+H to show hidden files, going into the .trash-1000 folder, and moving my files from there to my desktop! Thanks everyone for helping!


text:
Q: Excel vba to copy slides to an existing powerpoint presentation I need to copy some pictures from Excel (the pictures are in different folders within the same file) to PowerPoint, adding a slide for every picture in an already existing PowerPoint file (the file name is TBD_ppt_WRK which has already 2 slides inside that must be kept).
I need to run the macro from Excel. The macro I'm using is:
Sub TBD_GENERATE_PPW()

' OPEN FILE TBD_ppt_WRK WHERE COPY THE PICTURES FROM EXCEL
Dim pp As Object
Set pp = CreateObject("PowerPoint.Application")
pp.Visible = True
pp.Presentations.Open ("C:\ Desktop\ ppt_TBD_WRK.ppt")
 'C:\ Desktop\ ppt_TBD_WRK.ppt is path & name of the PPW file where to add the slides

'Step 1:  Declare variables
Dim ppPres As Object
Dim ppSlide As Object
Dim xlwksht As Worksheet
Dim MyRange As String

'Step 2:
Set pp = New PowerPoint.Application
Set ppPres = pp.ActivePresentation
pp.Visible = True

'Step 3:  Set the ranges for your data and title
MyRange = "B2:S40"

'Step 4:  Start the loop through each worksheet
For Each xlwksht In ActiveWorkbook.Worksheets
xlwksht.Select
Application.Wait (Now + TimeValue("0:00:1"))

'Step 5:  Copy the range as picture
xlwksht.Range(MyRange).CopyPicture _
Appearance:=xlScreen, Format:=xlPicture

'Step 6:  Count slides and add new blank slide as next available slide number
'(the number 12 represents the enumeration for a Blank Slide)
Slidecount = ppPres.Slides.Count
Set ppSlide = ppPres.Slides.Add(Slidecount + 1, 12)
ppSlide.Select

'Step 7:  Paste the picture and adjust its position
ppSlide.Shapes.Paste.Select ' => THIS IS WHERE MACRO GOES IN ERROR SEE BELOW
pp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
pp.ActiveWindow.Selection.ShapeRange.Top = 75
pp.ActiveWindow.Selection.ShapeRange.Left = 125
pp.ActiveWindow.Selection.ShapeRange.Width = 550

'Step 8:  Add the title to the slide then move to next worksheet
Next xlwksht

'Step 9: Saves the Powerpoint file updated with the name TDB pat_PAG_.ppt  and closes it the Powerpoint file updated
ppPres.SaveAs "C:\Users\392710\Desktop\MENSILI_WRK\TDB patrimoni_PAG_.ppt", 1
ppPres.Close

'Step 10:  Memory Cleanup
pp.Activate
Set ppSlide = Nothing
Set ppPres = Nothing
Set pp = Nothing

END SUB

The strange thing is that the macro works perfectly when I run it in debug (F8) step by step, but it doesn't work anymore when I run it directly from the Excel Macro (Macro/View/Run). It stops after the first picture has been copied in the first slide added to ppw (see the comment in the code).
The error message is:

Run time error '-2147188160 (80048240)' ShapeRange.Select : Invalid request. To select a shape, its view must be active.

Can you help me please?

A: Shape must be activated to perform any operation on it
Below is the code that I have created to copy charts from Excel and paste into existing PPT template (in picture format)
You can also use for loop to go through charts in each sheet. I could not do it beacuse chart names were not same in each sheet
Sub create_ppt()

Application.ScreenUpdating = False
Application.DisplayAlerts = False

Dim wb1 As Workbook
Dim wb1_path As String
Dim ppt_app_1 As Object
Dim ppt_1 As PowerPoint.Presentation
Dim ppt_sld As PowerPoint.Slide
Dim ppt_path As String
Dim month_name As String
Dim year_num As String
Dim month_full As String
Dim year_full As String

month_name = Range("Output!C5")
year_num = Range("Output!C8")
month_full = Range("Output!C9")
year_full = Range("Output!C7")

''opening target excel

wb1_path = ThisWorkbook.Path & "\Report\Acquisition_Summary_" & month_name & "_" & year_num & ".xlsx"
Set wb1 = Workbooks.Open(wb1_path)

''opening target ppt

Set ppt_app_1 = CreateObject("Powerpoint.Application")
Set ppt_1 = ppt_app_1.Presentations.Open(ThisWorkbook.Path & "\Template.pptx")

''slide 1

    ppt_1.Slides(1).Shapes(2).TextFrame.TextRange.Text = "Small Business" & vbCrLf & "( " & month_full & " - " & year_full & " )"

''slide 2

    wb1.Sheets("Sheet1").Select
    Set ppt_sld = ppt_1.Slides(2)

    ActiveSheet.ChartObjects("Chart 33").Activate
    ActiveSheet.Shapes("Chart 33").Height = 198
    ActiveSheet.Shapes("Chart 33").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76   ''1 inch = 72 macro units

    ActiveSheet.ChartObjects("Chart 19").Activate
    ActiveSheet.Shapes("Chart 19").Height = 198
    ActiveSheet.Shapes("Chart 19").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 20").Activate
    ActiveSheet.Shapes("Chart 20").Height = 198
    ActiveSheet.Shapes("Chart 20").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 15").Activate
    ActiveSheet.Shapes("Chart 15").Height = 198
    ActiveSheet.Shapes("Chart 15").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 26").Activate
    ActiveSheet.Shapes("Chart 26").Height = 198
    ActiveSheet.Shapes("Chart 26").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

''slide 3

    Set ppt_sld = ppt_1.Slides(3)

    ActiveSheet.ChartObjects("Chart 14").Activate
    ActiveSheet.Shapes("Chart 14").Height = 198
    ActiveSheet.Shapes("Chart 14").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76   ''1 inch = 72 macro units

    ActiveSheet.ChartObjects("Chart 23").Activate
    ActiveSheet.Shapes("Chart 23").Height = 198
    ActiveSheet.Shapes("Chart 23").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 25").Activate
    ActiveSheet.Shapes("Chart 25").Height = 198
    ActiveSheet.Shapes("Chart 25").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 27").Activate
    ActiveSheet.Shapes("Chart 27").Height = 198
    ActiveSheet.Shapes("Chart 27").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 28").Activate
    ActiveSheet.Shapes("Chart 28").Height = 198
    ActiveSheet.Shapes("Chart 28").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

''slide 4

    wb1.Sheets("Sheet2").Select
    Set ppt_sld = ppt_1.Slides(4)

    ActiveSheet.ChartObjects("Chart 16").Activate
    ActiveSheet.Shapes("Chart 16").Height = 198
    ActiveSheet.Shapes("Chart 16").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 18").Activate
    ActiveSheet.Shapes("Chart 18").Height = 198
    ActiveSheet.Shapes("Chart 18").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 17").Activate
    ActiveSheet.Shapes("Chart 17").Height = 198
    ActiveSheet.Shapes("Chart 17").Width = 198
      ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 3").Activate
    ActiveSheet.Shapes("Chart 3").Height = 198
    ActiveSheet.Shapes("Chart 3").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 4").Activate
    ActiveSheet.Shapes("Chart 4").Height = 198
    ActiveSheet.Shapes("Chart 4").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    '' slide 5
     Set ppt_sld = ppt_1.Slides(5)

    ActiveSheet.ChartObjects("Chart 19").Activate
    ActiveSheet.Shapes("Chart 19").Height = 198
    ActiveSheet.Shapes("Chart 19").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 21").Activate
    ActiveSheet.Shapes("Chart 21").Height = 198
    ActiveSheet.Shapes("Chart 21").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 20").Activate
    ActiveSheet.Shapes("Chart 20").Height = 198
    ActiveSheet.Shapes("Chart 20").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 24").Activate
    ActiveSheet.Shapes("Chart 24").Height = 198
    ActiveSheet.Shapes("Chart 24").Width = 247
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 25").Activate
    ActiveSheet.Shapes("Chart 25").Height = 198
    ActiveSheet.Shapes("Chart 25").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 6

    wb1.Sheets("Sheet3").Select
    Set ppt_sld = ppt_1.Slides(6)

    ActiveSheet.ChartObjects("Chart 4").Activate
    ActiveSheet.Shapes("Chart 4").Height = 198
    ActiveSheet.Shapes("Chart 4").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 6").Activate
    ActiveSheet.Shapes("Chart 6").Height = 198
    ActiveSheet.Shapes("Chart 6").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 5").Activate
    ActiveSheet.Shapes("Chart 5").Height = 198
    ActiveSheet.Shapes("Chart 5").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").Height = 198
    ActiveSheet.Shapes("Chart 1").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 2").Activate
    ActiveSheet.Shapes("Chart 2").Height = 198
    ActiveSheet.Shapes("Chart 2").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 7

    Set ppt_sld = ppt_1.Slides(7)

    ActiveSheet.ChartObjects("Chart 7").Activate
    ActiveSheet.Shapes("Chart 7").Height = 198
    ActiveSheet.Shapes("Chart 7").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 9").Activate
    ActiveSheet.Shapes("Chart 9").Height = 198
    ActiveSheet.Shapes("Chart 9").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 8").Activate
    ActiveSheet.Shapes("Chart 8").Height = 198
    ActiveSheet.Shapes("Chart 8").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 12").Activate
    ActiveSheet.Shapes("Chart 12").Height = 198
    ActiveSheet.Shapes("Chart 12").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 13").Activate
    ActiveSheet.Shapes("Chart 13").Height = 198
    ActiveSheet.Shapes("Chart 13").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 8

    wb1.Sheets("Sheet4").Select
    Set ppt_sld = ppt_1.Slides(8)

    ActiveSheet.ChartObjects("Chart 4").Activate
    ActiveSheet.Shapes("Chart 4").Height = 198
    ActiveSheet.Shapes("Chart 4").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 6").Activate
    ActiveSheet.Shapes("Chart 6").Height = 198
    ActiveSheet.Shapes("Chart 6").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 5").Activate
    ActiveSheet.Shapes("Chart 5").Height = 198
    ActiveSheet.Shapes("Chart 5").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").Height = 198
    ActiveSheet.Shapes("Chart 1").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 2").Activate
    ActiveSheet.Shapes("Chart 2").Height = 198
    ActiveSheet.Shapes("Chart 2").Width = 247
  ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 9
    Set ppt_sld = ppt_1.Slides(9)

    ActiveSheet.ChartObjects("Chart 7").Activate
    ActiveSheet.Shapes("Chart 7").Height = 198
    ActiveSheet.Shapes("Chart 7").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 9").Activate
    ActiveSheet.Shapes("Chart 9").Height = 198
    ActiveSheet.Shapes("Chart 9").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 8").Activate
    ActiveSheet.Shapes("Chart 8").Height = 198
    ActiveSheet.Shapes("Chart 8").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 12").Activate
    ActiveSheet.Shapes("Chart 12").Height = 198
    ActiveSheet.Shapes("Chart 12").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 13").Activate
    ActiveSheet.Shapes("Chart 13").Height = 198
    ActiveSheet.Shapes("Chart 13").Width = 247
   ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 10

    wb1.Sheets("Sheet5").Select
    Set ppt_sld = ppt_1.Slides(10)

    ActiveSheet.ChartObjects("Chart 4").Activate
    ActiveSheet.Shapes("Chart 4").Height = 198
    ActiveSheet.Shapes("Chart 4").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 6").Activate
    ActiveSheet.Shapes("Chart 6").Height = 198
    ActiveSheet.Shapes("Chart 6").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 5").Activate
    ActiveSheet.Shapes("Chart 5").Height = 198
    ActiveSheet.Shapes("Chart 5").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.Shapes("Chart 1").Height = 198
    ActiveSheet.Shapes("Chart 1").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.246

    ActiveSheet.ChartObjects("Chart 2").Activate
    ActiveSheet.Shapes("Chart 2").Height = 198
    ActiveSheet.Shapes("Chart 2").Width = 247
  ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''slide 11
    Set ppt_sld = ppt_1.Slides(11)

    ActiveSheet.ChartObjects("Chart 7").Activate
    ActiveSheet.Shapes("Chart 7").Height = 198
    ActiveSheet.Shapes("Chart 7").Width = 500.4
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 7.2
    ppt_sld.Shapes(3).Top = 59.76

    ActiveSheet.ChartObjects("Chart 9").Activate
    ActiveSheet.Shapes("Chart 9").Height = 198
    ActiveSheet.Shapes("Chart 9").Width = 198
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 516.24
    ppt_sld.Shapes(4).Top = 59.76

    ActiveSheet.ChartObjects("Chart 8").Activate
    ActiveSheet.Shapes("Chart 8").Height = 198
    ActiveSheet.Shapes("Chart 8").Width = 198
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(5).Left = 516.24
    ppt_sld.Shapes(5).Top = 264.24

    ActiveSheet.ChartObjects("Chart 12").Activate
    ActiveSheet.Shapes("Chart 12").Height = 198
    ActiveSheet.Shapes("Chart 12").Width = 247
     ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(6).Left = 7.2
    ppt_sld.Shapes(6).Top = 264.24

    ActiveSheet.ChartObjects("Chart 13").Activate
    ActiveSheet.Shapes("Chart 13").Height = 198
    ActiveSheet.Shapes("Chart 13").Width = 247
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(7).Left = 261.36
    ppt_sld.Shapes(7).Top = 264.24

    ''credilt line charts
    ''slide 13

    wb1.Sheets("Sheet1").Select
    Set ppt_sld = ppt_1.Slides(13)

    ActiveSheet.ChartObjects("Chart 21").Activate
    ActiveSheet.Shapes("Chart 21").Height = 199.44
    ActiveSheet.Shapes("Chart 21").Width = 653.76
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 33.12
    ppt_sld.Shapes(3).Top = 59.04

    ActiveSheet.ChartObjects("Chart 29").Activate
    ActiveSheet.Shapes("Chart 29").Height = 199.44
    ActiveSheet.Shapes("Chart 29").Width = 653.76
    ActiveChart.ChartTitle.Text = "Credit Limit / Company - High Value"
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 33.12
    ppt_sld.Shapes(4).Top = 263.52

    ''slide 14

    wb1.Sheets("Sheet2").Select
    Set ppt_sld = ppt_1.Slides(14)

    ActiveSheet.ChartObjects("Chart 22").Activate
    ActiveSheet.Shapes("Chart 22").Height = 199.44
    ActiveSheet.Shapes("Chart 22").Width = 653.76
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 33.12
    ppt_sld.Shapes(3).Top = 59.04

    ActiveSheet.ChartObjects("Chart 23").Activate
    ActiveSheet.Shapes("Chart 23").Height = 199.44
    ActiveSheet.Shapes("Chart 23").Width = 653.76
    ActiveChart.ChartTitle.Text = "Credit Limit / Company - High Value"
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 33.12
    ppt_sld.Shapes(4).Top = 263.52

    ''slide 15

    wb1.Sheets("Sheet3").Select
    Set ppt_sld = ppt_1.Slides(15)

    ActiveSheet.ChartObjects("Chart 10").Activate
    ActiveSheet.Shapes("Chart 10").Height = 199.44
    ActiveSheet.Shapes("Chart 10").Width = 653.76
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 33.12
    ppt_sld.Shapes(3).Top = 59.04

    ActiveSheet.ChartObjects("Chart 11").Activate
    ActiveSheet.Shapes("Chart 11").Height = 199.44
    ActiveSheet.Shapes("Chart 11").Width = 653.76
    ActiveChart.ChartTitle.Text = "Credit Limit / Company - High Value"
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 33.12
    ppt_sld.Shapes(4).Top = 263.52

    ''slide 16

    wb1.Sheets("Sheet4").Select
    Set ppt_sld = ppt_1.Slides(16)

    ActiveSheet.ChartObjects("Chart 10").Activate
    ActiveSheet.Shapes("Chart 10").Height = 199.44
    ActiveSheet.Shapes("Chart 10").Width = 653.76
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 33.12
    ppt_sld.Shapes(3).Top = 59.04

    ActiveSheet.ChartObjects("Chart 11").Activate
    ActiveSheet.Shapes("Chart 11").Height = 199.44
    ActiveSheet.Shapes("Chart 11").Width = 653.76
    ActiveChart.ChartTitle.Text = "Credit Limit / Company - High Value"
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 33.12
    ppt_sld.Shapes(4).Top = 263.52

    ''slide 17

    wb1.Sheets("Sheet5").Select
    Set ppt_sld = ppt_1.Slides(17)

    ActiveSheet.ChartObjects("Chart 10").Activate
    ActiveSheet.Shapes("Chart 10").Height = 199.44
    ActiveSheet.Shapes("Chart 10").Width = 653.76
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(3).Left = 33.12
    ppt_sld.Shapes(3).Top = 59.04

    ActiveSheet.ChartObjects("Chart 11").Activate
    ActiveSheet.Shapes("Chart 11").Height = 199.44
    ActiveSheet.Shapes("Chart 11").Width = 653.76
    ActiveChart.ChartTitle.Text = "Credit Limit / Company - High Value"
    ActiveChart.ChartArea.Copy
    ppt_sld.Select
    ppt_sld.Shapes.PasteSpecial ppPastePNG
    ppt_sld.Shapes(4).Left = 33.12
    ppt_sld.Shapes(4).Top = 263.52

    ''22 23 usb
    '' 10 11 other

    ppt_path = ThisWorkbook.Path & "\Presentation\Acquisition_Summary_" & month_name & "_" & year_num

    If Len(Dir(ppt_path)) > 0 Then
        SetAttr ppt_path, vbNormal
        Kill ppt_path
    End If

    ppt_1.SaveAs ppt_path, 24                ''24 for .pptx format
    ppt_1.Close
    wb1.Close SaveChanges:=False

    ppt_app_1.Quit

    Application.ScreenUpdating = True
    Application.DisplayAlerts = True

    MsgBox "Macro successfully executed"

End Sub


text:
Q: Sidecar containers in Kubernetes Jobs? We use Kubernetes Jobs for a lot of batch computing here and I'd like to instrument each Job with a monitoring sidecar to update a centralized tracking system with the progress of a job.
The only problem is, I can't figure out what the semantics are (or are supposed to be) of multiple containers in a job.
I gave it a shot anyways (with an alpine sidecar that printed "hello" every 1 sec) and after my main task completed, the Jobs are considered Successful and the kubectl get pods in Kubernetes 1.2.0 shows:
NAME                                         READY     STATUS      RESTARTS   AGE
    job-69541b2b2c0189ba82529830fe6064bd-ddt2b   1/2       Completed   0          4m
    job-c53e78aee371403fe5d479ef69485a3d-4qtli   1/2       Completed   0          4m
    job-df9a48b2fc89c75d50b298a43ca2c8d3-9r0te   1/2       Completed   0          4m
    job-e98fb7df5e78fc3ccd5add85f8825471-eghtw   1/2       Completed   0          4m

And if I describe one of those pods
State:              Terminated
  Reason:           Completed
  Exit Code:        0
  Started:          Thu, 24 Mar 2016 11:59:19 -0700
  Finished:         Thu, 24 Mar 2016 11:59:21 -0700

Then GETing the yaml of the job shows information per container:
  status:
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2016-03-24T18:59:29Z
      message: 'containers with unready status: [pod-template]'
      reason: ContainersNotReady
      status: "False"
      type: Ready
    containerStatuses:
    - containerID: docker://333709ca66462b0e41f42f297fa36261aa81fc099741e425b7192fa7ef733937
      image: luigi-reduce:0.2
      imageID: docker://sha256:5a5e15390ef8e89a450dac7f85a9821fb86a33b1b7daeab9f116be252424db70
      lastState: {}
      name: pod-template
      ready: false
      restartCount: 0
      state:
        terminated:
          containerID: docker://333709ca66462b0e41f42f297fa36261aa81fc099741e425b7192fa7ef733937
          exitCode: 0
          finishedAt: 2016-03-24T18:59:30Z
          reason: Completed
          startedAt: 2016-03-24T18:59:29Z
    - containerID: docker://3d2b51436e435e0b887af92c420d175fafbeb8441753e378eb77d009a38b7e1e
      image: alpine
      imageID: docker://sha256:70c557e50ed630deed07cbb0dc4d28aa0f2a485cf7af124cc48f06bce83f784b
      lastState: {}
      name: sidecar
      ready: true
      restartCount: 0
      state:
        running:
          startedAt: 2016-03-24T18:59:31Z
    hostIP: 10.2.113.74
    phase: Running

So it looks like my sidecar would need to watch the main process (how?) and exit gracefully once it detects it is alone in the pod? If this is correct, then are there best practices/patterns for this (should the sidecar exit with the return code of the main container? but how does it get that?)?
** Update **
After further experimentation, I've also discovered the following:
If there are two containers in a pod, then it is not considered successful until all containers in the pod return with exit code 0.
Additionally, if restartPolicy: OnFailure is set on the pod spec, then any container in the pod that terminates with non-zero exit code will be restarted in the same pod (this could be useful for a monitoring sidecar to count the number of retries and delete the job after a certain number (to workaround no max-retries currently available in Kubernetes jobs)).

A: You can use the downward api to figure out your own podname from within the sidecar, and then retrieving your own pod from the apiserver to lookup exist status. Let me know how this goes.


text:
Q: How do I download Wine 1.4? When I try to go download Wine, It says "There isn't a software package called "wine1.4" in your current software sources." I've already checked the Wiki page, but it says to just "install" it, which I cannot. Can anyone help me with this, I've already added the respository thing from the wine site, but it doesn't seem to do anything. Please help!

A: Just checked the wine site, and 1.4 is available from their PPA. Head to your terminal, and add the PPA manually:
sudo add-apt-repository ppa:ubuntu-wine/ppa
Then update your APT package information by:
sudo apt-get update
You should then be able to install 1.4 with the following command in the Terminal:
sudo apt-get install wine1.4
Let me know if that works.


text:
Q: Unable to test the GMail custom actions I have been trying to test GMail actions for a few days but it does not seem to work. Since I am not registered I use the little piece of Java code below to send an email from myself to myself using GMail's smtp servers. The message's body is a direct copy from the documentation.
The Apps Script version works, though.
final String username = "david.hatanian@gmail.com";
final String password = "X";

Properties props = new Properties();
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", "587");

Session session = Session.getInstance(props,
        new javax.mail.Authenticator() {
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(username, password);
            }
        });

try {

    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(username));
    message.setRecipients(Message.RecipientType.TO,
            InternetAddress.parse(username));
    message.setSubject("Testing Subject");
    message.setContent("<html>" +
            "  <head>" +
            "    <script type=\"application/ld+json\">" +
            "    {" +
            "      \"@context\": \"http://schema.org\"," +
            "      \"@type\": \"EmailMessage\"," +
            "      \"description\": \"Check this out\"," +
            "      \"action\": {" +
            "        \"@type\": \"ViewAction\"," +
            "        \"url\":   \"https://www.youtube.com/watch?v=eH8KwfdkSqU\"" +
            "      }" +
            "    }" +
            "    </script>" +
            "  </head>" +
            "  <body>" +
            "    <p>" +
            "      This a test for a Go-To action in Gmail." +
            "    </p>" +
            "  </body>" +
            "</html>", "text/html; charset=utf-8");

    Transport.send(message);

    System.out.println("Done");

} catch (MessagingException e) {
    throw new RuntimeException(e);
}

A: Even test emails need to be signed with DKIM/SPF in order to prevent spoofing, and I'm not sure if there's a way to do that with SMTP.
If you don't want to use Apps Script, a Google Apps domain (with proper DKIM/SPF configuration) is probably your best bet.


text:
Q: Android Studio Java code I'm trying to replace a part of the text after clicking the bottom but I can't make it work. When I click the bottom without entering a name the message should say "Hello Username", and if I enter a name the "Username" should be replace by the name. Here is the code so far. Thanks
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;

public class HelloAndroid extends AppCompatActivity implements OnClickListener {

    private EditText name;
    private TextView display;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_hello_android);
        name = (EditText) findViewById(R.id.name);
        display = (TextView) findViewById(R.id.display);
        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(this);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_hello_android, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @Override
    public void onClick(View view) {
        if (button == view) {
            String message = "Hello, Username " + name.getText().toString() + "!";

            if (button == view) {
                String username = "Hello " + name.getText().toString() + "";

                Toast toast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
                toast.show();
                display.setText(message);

            }
        }
    }
}

A: You are enable to do this because may be you are not getting click here . Here is my code change it .

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import java.util.ArrayList;

public class HelloAndroid extends AppCompatActivity implements View.OnClickListener {

    private EditText name;
    private TextView display;
    private Button button;

    String message ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dummy);

        name = (EditText) findViewById(R.id.name);
        display = (TextView) findViewById(R.id.display);
        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.button :
                if (name.getText().toString().isEmpty())
                {
                    message = "Hello username" ;

                }
                else {
                    message = "Hello "+name.getText().toString() ;

                }

            Toast toast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
                    toast.show();
                    display.setText(message);
                break;
        }
    }
}


text:
Q: How do you convert a " x × y^z " expression into a readable/sayable number? I read an article explaining that the mass of earth is 6 × 10^24 kg, but this expression means nothing to me since I can't convert it into a number as I do not know what ^ is supposed to mean. How would I read or speak it?

A: Unformatted expression:

6 × 10^24 kg

Formatted expression:

6 × 1024 kg

Spoken:

Six times ten to the power of twenty-four kilograms