text:
Q: Why does echo of awk in a bash script remove line breaks? I'm trying to include some awk commands in a bash script, and I've run across some unexpected behavior. Can you give me a clue as to what I'm overlooking?
For example, given a file named list:
1
2
3
4

This simple awk command does what you'd expect:
$ awk -F, '{ print $1 }' list
1
2
3
4

But if I put this command in a bash script:
#!/bin/bash
echo "list:"
cat $1

echo "list after awk:"
echo `awk -F, '{ print $1 }' $1`

exit 0

I get this output:
$ ./script list
list:
1
2
3
4
list after awk:
1 2 3 4

The awk in the bash script has mysteriously stripped away the carriage returns.
I've seen this behavior in bash on OS X as well as in zsh on BSD.
Any ideas?

A: It's not awk, it's in how the shell expands things.
Let's take an example:
$ a="1
> 2
> 3
> 4"

So we've created a variable over 4 lines.  But...
$ echo $a
1 2 3 4

So why is it only on one line?
$ echo "$a"
1
2
3
4

Ah, it isn't!
So there's something magic around echo $a.
We can see some similar magic with spaces:
$ a="1    2    3    4"
$ echo $a
1 2 3 4
$ echo "$a"
1    2    3    4

Now it's not really echo that's doing the magic, here; it's the shell.  Without the "..." wrapper the shell will try and expand the variable.  So globs would be expanded:
$ ls
a  file

$ a="*"
$ echo $a
a file
$ echo "$a"
*

In the same way the shell is taking your output with returns in them, expanding them, and then returning then as parameters; the return is being lost.
In summary... if you want to protect this sort of expansion from happening, use "...".
In your short example, though, you don't need echo at all.  Just call awk directly.

A: Observe the difference in output between these two commands:
$ echo `awk -F, '{ print $1 }' $1`
1 2 3 4
$ echo "`awk -F, '{ print $1 }' $1`"
1
2
3
4

In the first command, because the command substitution is unquoted, the output from awk is subjected to word splitting and pathname expansion.  Word splitting removes the newlines and replaces them with spaces.  In the second, because awk is in double quotes, no word splitting is performed and the newlines are retained.
Documentation
From man bash:

Word Splitting
The shell scans the results of parameter expansion, command
  substitution, and arithmetic expansion that did not occur within
  double quotes  for  word   splitting.
The shell treats each character of IFS as a delimiter, and splits the
  results of the other expansions into words using these characters as
  field terminators.  If IFS is unset, or its value is exactly
  <space><tab><newline>, the default, then sequences of <space>, <tab>,
  and <newline> at the beginning  and end of the results of the previous
  expansions are ignored, and any sequence of IFS characters not at the
  beginning or end serves to delimit  words.  If IFS has a value other
  than the default, then sequences of the whitespace characters space
  and tab are ignored at the beginning and end  of  the word, as long as
  the whitespace character is in the value of IFS (an IFS whitespace
  character).  Any character in IFS that is not IFS whitespace, along
  with any adjacent IFS whitespace characters, delimits a field.  A
  sequence of IFS whitespace characters is also treated as a delimiter.
  If the  value of IFS is null, no word splitting occurs.
Explicit  null  arguments ("" or '') are retained.  Unquoted implicit
  null arguments, resulting from the expansion of parameters that have
  no values,   are removed.  If a parameter with no value is expanded
  within double quotes, a null argument results and is retained.
Note that if no expansion occurs, no splitting is performed.

A: Not awk, the echo stripped. Leave echo, just awk:
awk -F, '{ print $1 }' $1


text:
Q: restricting rsync in daemon mode I'm trying to run rsync in daemon mode on one machine, called node0. I want the machine to accept connections only from node0 (self) or node1 (some other machine which is defined)
The only path I want to be available for use it /tmp/. So that any read/write operation to any other path should be disallowed, for any originatting machine.
I do not want user restrictions, nor rsync to run over ssh.
I've set up /etc/rsyncd.conf as following:
syslog facility = syslog
max verbosity = 3
log file = /var/log/mylog.log
port = 873

[Proj1]
path = /tmp/
include = /tmp/
exclude = *
comment = some comment
hosts allow = node0, node1
hosts deny = *
max verbosity = 3
log file = /var/log/filedistributer.log

I than execute rsync in daemon mode with the following command:
/usr/bin/rsync --daemon --config=/etc/rsyncd.conf --verbose

Than from node1 I run:
rsync -a test.out node0:/tmp/ and it works correctly.
But if I run: rsync -a max.out node0:/someOtherDir  and it also works - where it should not.
If I go to a different machine and run:
rsync -a someFile.out root@node0.MYHOSTNAME:/someOtherDir

It asks me to authorize the ssh key, and enter password for root, after that I copies the file... It should not.
What am I missing? None of my requirments are met:

*

*Rsync uses SSH, when it should not

*Rsync does not restrict hosts.

*Rsync does not restrict folders

The log file, despite the level 3 verbosity only has one line (per each daemon startup) in the form of:

2013/11/18 12:32:35 [22289] rsyncd version 3.0.6 starting, listening
  on port 873

Additionally another problem I encounter is that if I run the rsync command from node0 to node1, it still succeeds, even without me starting rsync in daemon mode on node1.
Your help is appriciated.
Thanks,
Max.

A: So after some digging what I came up with is that:

*

*By default when running rsync it will try to use ssh as its transport, hence it ssh's to the destination machine and invokes rsync there.
To be used it will require valid credentials on the destination machine. There is no way to avoid this - other than removing the ssh daemon from the destination machine.
In order to restrict rsync from working in this mode, it is actually required to restrict ssh or rsh (or whatever shell is used as transport) from accepting connections from unrelated hosts. Yet it will still be impossible to force the "white list" hosts to operate only on the desired folders in this mode.

*My restrictions to rsync in daemon mode using rsyncd.conf are correct and they work, but in order to use tcp as the transport layer and not ssh, it is required to use rsync differently
rsync rsync://node0/Proj1
This will actually make rsync go through a tcp connection and connect to the rsync daemon on the destination.
A very valueble source of information on how rsyn works can be found in the link below:
http://rsync.samba.org/how-rsync-works.html

A: Did you make sure the config file is actually red by the daemon when launched?
Try for example to deny all hosts and check if the rule applies.

redpajama_set_name: RedPajamaStackExchange


text:
Q: JAVA SpringBoot : when inside a Docker the liquibase plugin runs with errors and does not execute changelogs I know that the same question was already asked but i have no way to ask the user if he solved it and his question is not complete enough to get help from other users
WARN Cannot create filesystem for url jar:file:/app.jar!/BOOT-INF/classes!/: null java.nio.file.FileSystemNotFoundException: null
So I will include more info here to try and have this problem solved :
I have a springboot app running fine for several month on docker, I am in process of adding to this app the spring liquibase plugin, this plugin works correctly on my local computer but when I run it in the docker I have the following errors (and the liquibase changelogs are not performed) :
One Exemple of the error is below but about 400 of these appear on the log, one for each jar in the classpath... the exemple below is the last of those errors and it refers to "jakarta.validation-api-2.0.2.jar" as the first line shows, but the issue is not with this particular jar, something must be wrong in my implementation of Liquibase in the docker that runs this app.

2020-09-01 00:11:11.219  WARN 1 --- [           main] liquibase.resource                       : Cannot create filesystem for url jar:file:/opt/target/hov2.jar!/BOOT-INF/lib/jakarta.validation-api-2.0.2.jar!/: null
java.nio.file.FileSystemNotFoundException: null
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(Unknown Source) ~[jdk.zipfs:na]
    at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(Unknown Source) ~[jdk.zipfs:na]
    at java.base/java.nio.file.Path.of(Unknown Source) ~[na:na]
    at java.base/java.nio.file.Paths.get(Unknown Source) ~[na:na]
    at liquibase.resource.ClassLoaderResourceAccessor.loadRootPaths(ClassLoaderResourceAccessor.java:63) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.resource.ClassLoaderResourceAccessor.init(ClassLoaderResourceAccessor.java:47) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.resource.ClassLoaderResourceAccessor.openStreams(ClassLoaderResourceAccessor.java:94) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.resource.CompositeResourceAccessor.openStreams(CompositeResourceAccessor.java:33) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.parser.core.xml.LiquibaseEntityResolver.resolveEntity(LiquibaseEntityResolver.java:40) ~[liquibase-core-4.0.0.jar!/:na]
    at java.xml/com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper.resolveEntity(Unknown Source) ~[na:na]
    at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) ~[na:na]
    at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[na:na]
    at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:91) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:223) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Liquibase$1.run(Liquibase.java:194) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Scope.lambda$child$0(Scope.java:159) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Scope.child(Scope.java:170) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Scope.child(Scope.java:158) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Scope.child(Scope.java:137) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Liquibase.runInScope(Liquibase.java:1790) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Liquibase.update(Liquibase.java:183) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.Liquibase.update(Liquibase.java:179) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:322) ~[liquibase-core-4.0.0.jar!/:na]
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:270) ~[liquibase-core-4.0.0.jar!/:na]
    at org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase.afterPropertiesSet(DataSourceClosingSpringLiquibase.java:46) ~[spring-boot-autoconfigure-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:255) ~[spring-boot-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:229) ~[spring-boot-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source) ~[na:na]
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.36.jar!/:9.0.36]
    ......
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.1.RELEASE.jar!/:2.3.1.RELEASE]
    at com.vyv.hov2.MinimalApplication.main(MinimalApplication.java:74) ~[classes!/:2]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[hov2.jar:2]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) ~[hov2.jar:2]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[hov2.jar:2]
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[hov2.jar:2]

the pom.xml to see the versions used :
<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 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>xxxx</groupId>
    <artifactId>xxxx</artifactId>
    <packaging>jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <spring-boot.version>2.3.1.RELEASE</spring-boot.version>
        <hibernate.version>5.4.12.Final</hibernate.version>
        <liquibase-core.version>4.0.0</liquibase-core.version>
        <liquibase-maven-plugin.version>4.0.0</liquibase-maven-plugin.version>
        <liquibase-hibernate5.version>4.0.0</liquibase-hibernate5.version>
        <validation-api.version>2.0.1.Final</validation-api.version>
        <javassist.version>3.27.0-GA</javassist.version>
        <jaxb-api.version>2.4.0-b180830.0359</jaxb-api.version>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH.mm.ss</maven.build.timestamp.format>
    </properties>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.1.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- JPA + Postgresql -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>4.0.0</version>
        </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.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>1.0.2.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>${validation-api.version}</version>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <activatedProperties>dev</activatedProperties>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <activatedProperties>prod</activatedProperties>
            </properties>
        </profile>
    </profiles>
    <build>
        <plugins>
                <plugin>
                    <groupId>org.liquibase</groupId>
                    <artifactId>liquibase-maven-plugin</artifactId>
                    <version>${liquibase-maven-plugin.version}</version>
                    <configuration>
                        <propertyFile>src/main/resources/liquibase-${activatedProperties}.properties</propertyFile>
                        <outputChangeLogFile>src/main/resources/db/db.changelog-${activatedProperties}.xml</outputChangeLogFile>
                        <changeLogFile>src/main/resources/db/db.changelog-${activatedProperties}.xml</changeLogFile>
                        <diffChangeLogFile>src/main/resources/db/changelog/${activatedProperties}/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
                        <diffTypes>tables,columns,indexes,foreignkeys,primarykeys,uniqueconstraints</diffTypes>
                        <logging>info</logging>
                    </configuration>
                    <!-- Liquibase dependencies-->
                    <dependencies>
                        <dependency>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-core</artifactId>
                            <version>${liquibase-core.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.liquibase.ext</groupId>
                            <artifactId>liquibase-hibernate5</artifactId>
                            <version>${liquibase-hibernate5.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-data-jpa</artifactId>
                            <version>${spring-boot.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>javax.validation</groupId>
                            <artifactId>validation-api</artifactId>
                            <version>${validation-api.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.javassist</groupId>
                            <artifactId>javassist</artifactId>
                            <version>${javassist.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>javax.xml.bind</groupId>
                            <artifactId>jaxb-api</artifactId>
                            <version>${jaxb-api.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.postgresql</groupId>
                            <artifactId>postgresql</artifactId>
                            <version>${postgresql.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.12.0</version>
                <executions>
                    <execution>
                        <id>pmd-scan</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

the liquibase-dev.properties :
url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
username=xxxx
password=xxxx
driver=org.postgresql.Driver
#### Reference database properties
referenceUrl=hibernate:spring:com.vyv.hov2.domain?dialect=org.hibernate.dialect.PostgreSQLDialect
referenceDriver=liquibase.ext.hibernate.database.connection.HibernateDriver
referenceDefaultSchemaName=db
verbose=true

the dockerfile :
FROM maven:3.6.3-openjdk-11-slim as BUILD
WORKDIR /usr/src/app
COPY checkstyle.xml .
COPY checkstyle-supressions.xml .
COPY licenseheader.txt .
COPY pom.xml .
RUN mvn dependency:go-offline
COPY src src
COPY .git ./.git/
RUN mvn -B -e -C -T 1C package  -Dmaven.test.skip=true

FROM openjdk:11.0.8-jre
EXPOSE 8081
COPY --from=BUILD /usr/src/app/target/*.jar /opt/target/hov2.jar
WORKDIR /opt/target
ENV TZ="America/Bogota"
ENV SPRING_PROFILES_ACTIVE="dev"
ENV APP_HTTP_THREADS="4"
ENV DB_MAX_POOL="4"
ENV DB_CONN_TIMEOUT="20000"
ENV DB_HOST="192.168.x.x"
ENV DB_PORT="xxxx"
ENV DB_NAME="yyyy"
ENV DB_USER="zzzz"
ENV DB_PASSWORD="zzzz"
RUN apt-get -y update && apt-get -y install apt-utils tzdata && apt-get -y clean
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar hov2.jar $JAR_OPTS

and the result of the docker build gives :
D:\GitLab\hov2-springboot>docker build -t xxxx/hov:spring .
Sending build context to Docker daemon  69.29MB
Step 1/27 : FROM maven:3.6.3-openjdk-11-slim as BUILD
 ---> 5f736c971204
Step 2/27 : MAINTAINER xxxxx
 ---> Using cache
 ---> 58e7bae3a780
Step 3/27 : WORKDIR /usr/src/app
 ---> Using cache
 ---> b790cb47ac8e
Step 4/27 : COPY checkstyle-GlobalRemises.xml .
 ---> Using cache
 ---> 105a291c538e
Step 5/27 : COPY checkstyle-supressions.xml .
 ---> Using cache
 ---> 59f933795b44
Step 6/27 : COPY licenseheader.txt .
 ---> Using cache
 ---> 227d608636c9
Step 7/27 : COPY pom.xml .
 ---> Using cache
 ---> 3de8cfcf50ce
Step 8/27 : RUN mvn -B dependency:resolve dependency:resolve-plugins
 ---> Using cache
 ---> 4505edb08bc0
Step 9/27 : COPY src src
 ---> 5580f85e37b0
Step 10/27 : COPY .git ./.git/
 ---> 9ffa9fdd1d6b
Step 11/27 : RUN mvn -B -e -C -T 1C package  -Dmaven.test.skip=true
 ---> Running in db75577e3260
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] Using the MultiThreadedBuilder implementation with a thread count of 8
[INFO]
[INFO] --------------------< com.vyv.hov2:HOV2-SpringBoot >--------------------
[INFO] Building HerramientaOperativa 2
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ HOV2-SpringBoot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 994 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ HOV2-SpringBoot ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 536 source files to /usr/src/app/target/classes
[INFO] --- jacoco-maven-plugin:0.8.4:report (report) @ HOV2-SpringBoot ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ HOV2-SpringBoot ---
[INFO] Building jar: /usr/src/app/target/HOV2-SpringBoot-2.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.1.RELEASE:repackage (repackage) @ HOV2-SpringBoot ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.1.RELEASE:repackage (default) @ HOV2-SpringBoot ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20.784 s (Wall Clock)
[INFO] Finished at: 2020-09-01T05:07:54Z
[INFO] ------------------------------------------------------------------------
Removing intermediate container db75577e3260
 ---> 419a981baa13
Step 12/27 : FROM openjdk:11.0.8-jre
 ---> 9cbf6d4bac44
Step 13/27 : EXPOSE 8081
 ---> Using cache
 ---> 48eec46f876c
Step 14/27 : COPY --from=BUILD /usr/src/app/target/*.jar /opt/target/hov2.jar
 ---> 13d80ab4c8a9
Step 15/27 : WORKDIR /opt/target
 ---> Running in f87f4fa28359
Removing intermediate container f87f4fa28359
 ---> c00e6df5a4a3
Step 16/27 : ENV TZ="America/Bogota"
 ---> Running in 09d317dc80d3
Removing intermediate container 09d317dc80d3
 ---> 57e64896eb41
Step 17/27 : ENV SPRING_PROFILES_ACTIVE=""
Step 26/27 : RUN apt-get -y update && apt-get -y install apt-utils tzdata && apt-get -y clean
 ---> Running in 180a8975bfa8
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [224 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7868 B]
Fetched 8378 kB in 4s (2176 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
tzdata is already the newest version (2020a-0+deb10u1).
tzdata set to manually installed.
The following NEW packages will be installed:
  apt-utils libapt-inst2.0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 624 kB of archives.
After this operation, 1650 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libapt-inst2.0 amd64 1.8.2.1 [203 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 apt-utils amd64 1.8.2.1 [421 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 624 kB in 1s (796 kB/s)
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 7867 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.8.2.1_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.8.2.1) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../apt-utils_1.8.2.1_amd64.deb ...
Unpacking apt-utils (1.8.2.1) ...
Setting up libapt-inst2.0:amd64 (1.8.2.1) ...
Setting up apt-utils (1.8.2.1) ...
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 180a8975bfa8
 ---> 6b67dd296d7e
Step 27/27 : ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar hov2.jar $JAR_OPTS
 ---> Running in d8740b5c5e53
Removing intermediate container d8740b5c5e53
 ---> ca68efe70b02
Successfully built ca68efe70b02
Successfully tagged xxxx/hov:spring
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It
 is recommended to double check and reset permissions for sensitive files and directories.

the dev.properties for the liquibase part
# *************   liquibase for DEV
spring.liquibase.enabled=true
spring.liquibase.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
# Change log configuration path.
spring.liquibase.change-Log=classpath:/db/db.changelog-dev.xml
#spring.liquibase.contexts= # Comma-separated list of runtime contexts to use.
# Name of table to use for tracking concurrent Liquibase usage.
spring.liquibase.database-change-log-lock-table=DATABASECHANGELOGLOCK
# Name of table to use for tracking change history.
spring.liquibase.database-change-log-table=DATABASECHANGELOG
#spring.liquibase.default-schema=
# Whether to first drop the database schema.
spring.liquibase.drop-first=false
spring.liquibase.password=xxxx
spring.liquibase.user=xxxx

when starting the docker ( with the dev context) all goes fine untill liquibase pluggin starts,then thousands of error lines (one error for each Jar present in the classpath), then after those errors the app starts fine, the only issue is that the liquibase changlogs are, of course, not executed and therefore the plugin looses most of its utility...
here is the startup log witout the errors in case something usefull is here :

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.1.RELEASE)

2020-09-01 00:11:02.477  INFO 1 --- [           main] com.vyv.hov2.MinimalApplication          : Starting MinimalApplication v2 on c795be63b326 with PID 1 (/opt/target/hov2.jar started by root in /opt/target)
2020-09-01 00:11:02.484  INFO 1 --- [           main] com.vyv.hov2.MinimalApplication          : The following profiles are active: dev
2020-09-01 00:11:05.413  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-09-01 00:11:06.555  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 1120ms. Found 92 JPA repository interfaces.
2020-09-01 00:11:08.286  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@2f40a43' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-01 00:11:08.298  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-01 00:11:08.993  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8081 (https)
2020-09-01 00:11:09.013  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-09-01 00:11:09.013  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.36]
2020-09-01 00:11:09.136  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-09-01 00:11:09.137  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6415 ms
2020-09-01 00:11:09.465  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-09-01 00:11:09.722  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-09-01 00:11:10.384  INFO 1 --- [           main] liquibase.lockservice                    : Successfully acquired change log lock
2020-09-01 00:11:10.435  WARN 1 --- [           main] liquibase.integration                    : Cannot create filesystem for url jar:file:/opt/target/hov2.jar!/BOOT-INF/classes!/: null

java.nio.file.FileSystemNotFoundException: null

Here come the hundreds of error ... then the rest is normal again:

2020-09-01 00:11:11.871  INFO 1 --- [           main] liquibase.changelog                      : Reading from public.databasechangelog
2020-09-01 00:11:11.925  INFO 1 --- [           main] liquibase.lockservice                    : Successfully released change log lock
2020-09-01 00:11:11.935  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2020-09-01 00:11:11.946  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2020-09-01 00:11:12.096  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Starting...
2020-09-01 00:11:12.134  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-2 - Start completed.
2020-09-01 00:11:12.312  INFO 1 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-09-01 00:11:12.467  INFO 1 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.12.Final

What did I do wrong ?
One of my ideas was that the path to the db-changelog-dev.xml indicated in the pom.xml would not be the same on my computer and in the docker, but this path is relative to the src folder, so I don't see how to change it...
I had this idea because in the log of the springboot startup we can see liquibase getting the locks on the database changlog tables, but nowhere can be seen the opening of the db-changelog-dev.xml by liquibase, and the errors are relative to filesystem errors, so it seemed conencted to me, but i did not managed to solve it.
Thanks for any idea that could put me on the right track.
thanks @shrom, the first liquibase method that throws the exception has the following javadocs :
    /**
     * The classloader search logic in {@link #list(String, String, boolean, boolean, boolean)} does not handle jar files well.
     * This method is called by that method to populate {@link #rootPaths} with additional paths to search.
     */

I like the "does not handle jar files well" ! thats an understatement.
it looks like those WARNINGS are not at the origin of the issue I have with liquibase plugin not performing the DB updates. I must have another issue somewhere else, because based on the other post referenced above the other user had those errors but the DB was updated. and furthermore they are just warning not real errors... I will keep digging.

A: Reason found :
In order to get rid of those errors I had to deeply change my pom.xml.
I removed all the hardcoded version numbers in the properties section that already have a value in the referenced springboot parent ( specifically in the spring-boot-dependencies-2.3.1.RELEASE.pom ) and instead I used the properties of this file. As a result some of the resulting versions are lower, but I trust more spring than myself to indicate the right compatible version of the plugins. The resulting POM is as follows :
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <java.version>11</java.version>
        <liquibase-hibernate5.version>3.10.1</liquibase-hibernate5.version>
        <javassist.version>3.27.0-GA</javassist.version>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH.mm.ss</maven.build.timestamp.format>
    </properties>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.1.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <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.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-core</artifactId>
    </dependency>
    ...
<build>
        <plugins>
                <plugin>
                    <groupId>org.liquibase</groupId>
                    <artifactId>liquibase-maven-plugin</artifactId>
                    <version>${liquibase.version}</version>
                    <configuration>
                        <propertyFile>src/main/resources/liquibase-${activatedProperties}.properties</propertyFile>
                        <outputChangeLogFile>src/main/resources/db/db.changelog-${activatedProperties}.xml</outputChangeLogFile>
                        <changeLogFile>src/main/resources/db/db.changelog-${activatedProperties}.xml</changeLogFile>
                        <diffChangeLogFile>src/main/resources/db/changelog/${activatedProperties}/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
                        <diffTypes>tables,columns,indexes,foreignkeys,primarykeys,uniqueconstraints</diffTypes>
                        <!-- diffTypes=tables, views, columns, indexes, foreignkeys, primarykeys, uniqueconstraints, data -->
                        <logging>info</logging>
                    </configuration>
                    <!-- Liquibase dependencies-->
                    <dependencies>
                        <dependency>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-core</artifactId>
                            <version>${liquibase.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.liquibase.ext</groupId>
                            <artifactId>liquibase-hibernate5</artifactId>
                            <version>${liquibase-hibernate5.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-data-jpa</artifactId>
                            <version>${spring-boot.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>javax.validation</groupId>
                            <artifactId>validation-api</artifactId>
                            <version>${javax-validation.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.javassist</groupId>
                            <artifactId>javassist</artifactId>
                            <version>${javassist.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>javax.xml.bind</groupId>
                            <artifactId>jaxb-api</artifactId>
                            <version>${javax-jaxb.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.postgresql</groupId>
                            <artifactId>postgresql</artifactId>
                            <version>${postgresql.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            <plugin>
...

In this pom in the pluggin section you will see version numbers properties, the values are inherited from the SpringBoot pom, no more hard coded in my own pom.
Now running fine in Docker !
If you have the same issue and my answer does not allow you to solve it, drop a comment i will add the other changes i also made, that for the moment, I doubt had any impact.


text:
Q: bootstrap-select fails when Looping through Object for Select Option I have the below JSON and I want to iterate through the object and get it as options in drop down select list bootstrap:
location = {
"1": "1234 E. Big Beaver Rd. Troy WI",
"2": "7340 Shoal Blvd.,Austin CA",
"3": "58 Executive Park, Irvine CA 92456",
"4": "710 rue de la Renaissance Pittsburg"
}

I am using bootstrap-select, ReactJS and ExpressJS. I want to create a select field using the above object. I don't know why it doesn't work in a form. I have a similar select field with similar JSON and it works.
Below is my code:

location:
<select
value={this.state.location}
onChange={this.handleChangeLocation}
style={{ fontSize: 14, width: '750px' }}
className="form-control">
{ Object.entries(this.state.location).map(elem => {
console.log('elem: ' + elem);
    return ( <option value = {elem[1]}>{elem[1]}</option> );
                    })
               }
</select>

What do I need to modify in my render to be able to use both bootstrap-select and ReactJS?

A: Use Object.prototype.keys instead of Object.prototype.entries to iterate over properties. Also do not forget to add key prop on each option so React will know what needs to rerender:
Object.keys(this.state.location)
  .map(key => (
    <option key={key}
            value={this.state.location[key]}>
            {this.state.location[key]}
    </option>
  )
);


text:
Q: As put where if the variable is greater than the condition? I have two tables, one where you last put into the site, and the other with messages and date. The problem is that when I check with PHP for messages with the date greater than the last time I get between 6 Messages with past dates.
Tables MYSQL:
Chatgr(Messages)

id (Id of Message)|Nametable (Id of the group)|text(Message)|idusuario (Id of user)|date|
gruposadd(Other table with last put into the site)

idgroup(Id of the group)|iduser(Id of user)|state|date|
Code PHP:
$group = mysql_query("SELECT * FROM gruposadd WHERE iduser='$_SESSION[id]' AND state='1'");
while ($groups = mysql_fetch_array($group)) {
$smsgr = mysql_query("SELECT * FROM chatgr WHERE nametable='$groups[idgroup]' AND date>'$groups[date]'");
while ($listasgr = mysql_fetch_array($smsgr)) { ....


text:
Q: How to stop retry on bounce in Amazon SES Golang SDK I am using AWS SES SDK for golang. I want to stop retrying on bounces (hard & soft). Following is my code:

import(
    "github.com/aws/aws-sdk-go/aws"
    "github.com/aws/aws-sdk-go/aws/session"
    "github.com/aws/aws-sdk-go/service/ses"
)

CharSet := "UTF-8"
sess, err := session.NewSession(&aws.Config{
    Region: aws.String(AwsRegion)},
)

/* Create an SES client in the session */
svc := ses.New(sess)

/* Assemble the email */
input := &ses.SendEmailInput{
    Destination: &ses.Destination{
        CcAddresses: []*string{},
        ToAddresses: []*string{
            aws.String(test1@example.com),
        },
    },
    Message: &ses.Message{
        Body: &ses.Body{
            Html: &ses.Content{
                Charset: aws.String(CharSet),
                Data:    aws.String(EMAILBODYHTML),
            },
        },
        Subject: &ses.Content{
            Charset: aws.String(CharSet),
            Data:    aws.String(SUBJECT),
        },
    },
    ReplyToAddresses: []*string{aws.String(test3@example.com)},
    Source:           aws.String(test2@example.com),
}

/* Attempt to send the email */
_, err = svc.SendEmail(input)
if err != nil {
    // handle errors
}

Can I stop retrying of bounce emails using SDK by applying any option ? If yes, how can I do this ?

A: You need to use SNS to notice there is bounce mail. Then subscribe http service to your SNS topic. Bounce email need to handle with your script and save bounce email address to your database. Next time you send email check on your database, if it existed then no need you send email since the address mark as bounce.


text:
Q: iOS Objective-C - Selected a row with check mark in UITableView, want to show that selected check mark while updating the previous row I tried this, but i didnt get it. Here's my code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:         (NSIndexPath *)indexPath
  {
NSArray *selectedRows=[tableView indexPathsForSelectedRows];
    NSMutableArray *rownumberArray=[[NSMutableArray alloc]init];
    NSMutableArray *dateArray=[[NSMutableArray alloc]init];

    for (int i=0; i<selectedRows.count; i++)
    {
        NSIndexPath *indexPath = [selectedRows objectAtIndex:i];
        NSInteger row = indexPath.row;
        NSNumber *number = [NSNumber numberWithInteger:row];
        [rownumberArray addObject:[HardDependency_IDArray objectAtIndex:indexPath.row]];
        [dateArray addObject:[endDateArray objectAtIndex:indexPath.row]];

        selectedRowArray=[[NSMutableArray alloc]init];
        dateArray2=[[NSMutableArray alloc]init];
        selectedRowArray=rownumberArray;
        dateArray2=dateArray;

 }

I am not able to see previously selected rows while updating the UITableView cell..


text:
Q: Difference between 'crow's feet' and 'worry lines' I came across the phrases 'crow's feet' and 'worry lines' several times. Please enlighten me about the origin of these two phrases and the difference between them.

A: According to the Random House Dictionary, crow's feet originated sometime between 1350–1400. The phrase refers to wrinkles on the outer corner of the eye, like a crow's foot or footprint, as opposed to worry lines--wrinkles on the forehead.

A: According to the online blog, fandom grammar, the origin of crow's feet can be traced back to the 1300s

"The most commonly used definition of crow's feet is tiny wrinkles at the outer corner of the eyes, resulting from age or constant squinting" and are so called because of the likeness to a crow's foot or footprint.  It originates in the late 14th century from Middle English and is believed to have first appeared in print in Chaucer's poem "Troilus and Criseyde."
  The phrase in the singular is crow's-foot, but it is most often used in the plural, as in crow's-feet.
It can also mean "an embroidery stitch with three points, used as a finish at the end of a seam or opening," or "an arrangement of ropes in which one main rope exerts pull at several points simultaneously through a group of smaller ropes, as in balloon or airship rigging."   These other definitions are much less frequently used, and when they are, it is usually in the singular crow's-foot.

Worry lines
Merriam-Webster defines it as "a crease or wrinkle on the forehead or between the eyebrows" (while crow's feet develop at the outer corners of the eyes).
This expression has been used since the beginning of last century but has become popular since the 1960's probably with the development of the beauty industry.

A: To supplement @Sel and Josh61's answers.
For some reason, the highly unflattery term, crow's feet are wrinkles normally associated with women. The tiny fan-like lines at the outer corners of eyes occur over time when a person repeatedly squints or laughs, in fact a more complimentary term to describe the marked lines on someone's face would be laughter lines or character lines.

On the other hand, worry lines are caused by the repeated raising of eyebrows which in turn lead to the furrowing of the forehead, they are said to represent the expressions of worry and concern. The term is used indifferently between men and women and according to Merriam & Webster it was first used in 1972.
EDIT
One of the first written instances of worry lines I found online which contradicts with the M&W claim is in the book titled:  Are We All Deceivers?: The Lover's Blue Book (1896)

A: The crow is linked to Cronos, the God of time and harvest. Where we get  chronology. So the association between showing aging lines being crows feet.
From Wikipedia
Robert Graves remarks that "cronos probably means 'crow', like the Latin cornix and the Greek corōne", noting that Cronus was depicted with a crow, as were the deities Apollo, Asclepius, Saturn and Bran.
https://en.m.wikipedia.org/wiki/Cronus
The crow symbol is associated with death. Death the character is old man time. Crow is linked to Cronos or Kronos. Also linked to chronology or time. Being the farthest planet visible from earth by the nakid eye. It can blind you to look at it or so its said. Pay too close attention to time and before you know it your time is up. And you end up with crows feet or worry lines.
it's thought by most in ancient times to be the measure of time by which the rest must work to move their heavenly bodies around the firmament.


text:
Q: Get the id of input on keyup I have an input box...
<input type="text" id="search_member" onkeyup="lookup(this.value);">

When I type in the field, it will go to function lookup(). From there I want to get the id of this input. I tried...
var This_id = $(this).attr("id");

but this won't work. Any suggestions on how I can get the id?

A: Get rid of onkeyup="lookup(this.value);
<input type="text" id="search_member">

and then use
$(function(){
    $("#search_member").keyup(function(e){
        var This_id = $(this).attr("id");
    });
};

A: $(document).keyup(function(e) {
    if (e.currentTarget.activeElement != undefined) {
     var id = $(e.currentTarget.activeElement).attr('id');
  }
});

A: Because you are passing this.value to your lookup() function. It's better to pass this to your function and then use arg.value to get the value and arg.getAttribute('id') for the id
<input type="text" id="search_member" onkeyup="lookup(this);">

function lookup(arg){
 var id = arg.getAttribute('id');
 var value = arg.value;
 // do your stuff
}

A: The problem there is you're not passing the element in, you're passing the value. You need to change it to this:
<input type="text" id="search_member" onkeyup="lookup(this);">

Then the rest of your code should work fine.

A: why dont you give the function lookup the THIS?
 lookup(this);

then u can also use the code you suggested

A: To get the id you should use this.id not this.value. I hope it work with you


text:
Q: Drawing animate line on Canvas of a View I simply need to draw a line which moves from one coordinate of a canvas to another. I am having troubles with synchronizing my drawing code with time.\
public class CustomMYChart extends View {

float x=0,y=0;
Canvas canvas;
Paint paint;

public CustomMYChart(Context context) {
    super(context);
    // TODO Auto-generated constructor stub
    paint = new Paint();
    paint.setColor(Color.GREEN);

}

@Override
protected void onDraw(final Canvas canvas) {
    // TODO Auto-generated method stub
    super.onDraw(canvas);
    this.canvas=canvas;

    for(int i=0; i<1000; i++){

        canvas.drawCircle(x, y, 5, paint);
        x+=1;
        y+=1;
        invalidate();
    }

}

}

A: Just remove the for statement in onDraw, with just one for iteration you call 1000 times invalidate() and then you get x and y out of the screen.
  @Override
protected void onDraw(final Canvas canvas) {
    // TODO Auto-generated method stub
    super.onDraw(canvas);
    this.canvas=canvas;

        canvas.drawCircle(x, y, 5, paint);
        x+=1;
        y+=1;
        invalidate();
    }


text:
Q: cannot infer type arguments for ArrayAdapter<> when retrieving data from a database My code is here please tell me what is the problem.
when i want to retrieve data from SQlite database the it give me the following error.
Please someone tell me what is the problem  in my code
public class ViewData extends AppCompatActivity {

DatabaseHelper mDb;
TextView EList;
Button mBtn;
ListView listView;

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

    listView = (ListView) findViewById(R.id.listView);
    mBtn = (Button) findViewById(R.id.buttonList);
    mDb=new DatabaseHelper(this);
    view1All();

}

public void view1All() {
    mBtn.setOnClickListener(
            new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    ArrayList<String> theList=new ArrayList<>();

                    Cursor res = mDb.getAllData();
                    if(res.getCount() == 0) {
                        // show message
                      //  showMessage("Error","Nothing found");
                      //  return;
                    }

                    while (res.moveToNext()) {
                        theList.add(res.getString(1));
                        ListAdapter listAdapter=new ArrayAdapter<>(this,android.R.layout.simple_list_item_1,theList);
                        listView.setAdapter(listAdapter);
                    }

                }
            }
    );
}

}


text:
Q: Ajax Response Finding HTML Fragments Using Find I was doing some test with JQuery find , I have an html response coming from an AJAX request, so initially the result would be this.
<!DOCTYPE html>

Hi

In My Ajax Success code is this..
success : function(response,status) {
    console.log( $(response).find('#dashboard').html() );
}

Upon printing it on the console that gives me an undefined.
However when I modify the response page(I created a nesting div) to this
<!DOCTYPE html>

Hi

The line from my Ajax Success code returned  console.log( $(response).find('#dashboard').html() ); returned the

Hi

My Question, How come on the first HTML  when doing the console.log( $(response).find('#dashboard').html() ); it gave me an undefined, however on the second HTML(the one nested in the div) gave me the the contents of #dashboard(which the one I am expecting to get.

A: As far as I know it is a browser dependent behavior to which tags to drop as a measure of sanitation, e.g. .
The reason for not finding #dashboard while executing
$(response).find('#dashboard')

is most probably because #dashboard has become the root element after the sanitation, and .find() matches against the descendant elements not on the root itself.
I normally to avoid this problem do this over an empty
.
$("
").html(response).find('#dashboard')

A: jQuery strips everything except the contents of the body, so #dashboard is at the top level so find would actually be searching for descendants of #dashboard. Since #dashboard is at the top level you can use filter to select it out of the other top level nodes.
http://jsfiddle.net/mowglisanu/SqL9Q/


text:
Q: How can you check whether a MySQL query is making use of a Covering Index? How can you check whether a MySQL query is making use of a Covering Index and getting all the data it needs solely from that Index?

A: For an index only scan (covering index) MySQL shows 'Using index' in the Extra column.
http://use-the-index-luke.com/sql/explain-plan/mysql/operations


text:
Q: CNN filters with different size using Keras CNN can have multiple number of filters on raw input data. Normally I specify the number of filters needed as 'filters= 250 ' and the size of the filter as 'kernel_size= 3'. (This means I will make 250 filters and each filter has a window width 3 as this is for text). I also learned that theoretically these filters can be all in different sizes. So my questions are:

*

*Is it conventional/in most cases that people use consistent size of filters in CNN?

*Is there some option in Keras that I can set for having different sizes of filters in the same CNN? e.g. the 1st filter is width 3, 2nd filter is width 5, 3rd filter is width 7...etc.

A: Ad different sizes:
The rule of thumb I observed is that shallow networks (https://www.aclweb.org/anthology/D14-1181.pdf) use multiple kernel widths, deep networks (https://arxiv.org/pdf/1705.03122.pdf, https://arxiv.org/pdf/1711.04352.pdf) use typically kernel width 3.
I guess the reason is that with a deeper network, you get a broader receptive field by stacking the smaller filters. With a kernel size 3, you get a receptive field of 3 tokens at the first layers, but on the second layer, you already get 5, etc.
Ad  Keras:
I would create separate Conv1D layers (be careful to use padding, so all outputs have the same length) and they use Concatenate layer merge them together.


text:
Q: cv2.getOptimalNewCameraMatrix returns ROI of [0,0,0,0] on some data sets I am working on a Python program using OpenCV 2.x Below is an exerpt of my code that runs on a list of already captured and saved files. All the images are 80x60 8-bit greyscale images. The best that I have got is a ROI of [1, 6, 73, 49] for one camera, but my other camera has gotten the best ROI is [8, 9, 55, 39]. I am already working with such small images, throwing away ~50% of my pixels is not really a workable solution. I am just not sure what is causing cv2.getOptimalNewCameraMatrix() to return such small ROI, especially when I feed it anywhere from 15-40 images that seem to have found the corners correctly.
import numpy as np
import cv2
import glob

# termination criteria
criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 100, .01)
goodImages = 0

# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
objp = np.zeros((3*4,3), np.float32)
objp[:,:2] = np.mgrid[0:4,0:3].T.reshape(-1,2)

# Arrays to store object points and image points from all the images.
objpoints = [] # 3d point in real world space
imgpoints = [] # 2d points in image plane.

images = glob.glob('*Left.bmp')

for fname in images:
print("Working on file: %s" % (fname))
img = cv2.imread(fname,cv2.CV_LOAD_IMAGE_COLOR)
gray = cv2.imread(fname,0)

# Find the chess board corners
ret, corners = cv2.findChessboardCorners(gray, (4,3),None)

# If found, add object points, image points (after refining them)
if ret == True:
    print("Found Corners for %s" % (fname))

    objpoints.append(objp)

    cv2.cornerSubPix(gray,corners,(3,3),(-1,-1),criteria)
    if corners is None:
        print("Something went wrong with cornerSubPix in file: %s" % (fname))
    else:
        imgpoints.append(corners)
        goodImages+=1

        # Draw and display the corners
        cv2.drawChessboardCorners(img, (4,3), corners,ret)
        cv2.imshow('img',img)
        cv2.waitKey(0)

if goodImages >9:
ret, intrinsicMatrix, distortionCoeffs, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1],None,None)

h,  w = img.shape[:2]
refinedCameraMatrix, roi=cv2.getOptimalNewCameraMatrix(intrinsicMatrix,distortionCoeffs,(w,h),1,(w,h))

np.savez("LeftCamera", refinedCameraMatrix=refinedCameraMatrix, roi=roi, intrinsicMatrix=intrinsicMatrix, distortionCoeffs=distortionCoeffs)

A sample data set can be downloaded at:
http://s000.tinyupload.com/?file_id=67483192025612443532
EDIT
I have found a data set after much trial and error that gives me a ROI of [3, 4, 75, 53] so the need for this question is not urgent, but I do find the question interesting. While I was experimenting I found that a good data set + another good picture does not always increase the ROI and can in fact decrease the ROI. That does not intuitively work for me, as more good data should increase the usable area.

A: Solved.
Tl;dr: make sure the edges and corners are well represented by the checkerboard in the calibration images.
With data only in the center, where distortion is minimal, the solution is subject to greater error.
Further discussion here.
http://answers.opencv.org/question/28438/undistortion-at-far-edges-of-image/?answer=180493#post-id-180493

A: What I found out is that the criteria matters alot for this:
self.criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.1) returns good values.
self.criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.01)
returns 0 0 0 0
in other words, if you set the last term as 0.1 it might work, if it is lower... might not
(if I set the last value to 1 it also work... maybe just try to modify that value and see what works best for you)
I am still not sure what that value does but, if I set it to 0.05 it works and the picture is pixelated (scaled) and if I set it to a higher value like 5 or 10, it looks that it still works but the picture is clearer (not scaled).
Overall, if you encounter this problem just try to adjust the last value from the termination criteria.


text:
Q: Line break in other ways than `NSLineBreakMode` offers (with Core Text?) I'm creating an application where users are able to change the font and size of certain texts. This makes layout kind of hard. However I've got some predefined texts and I don't like the way they're broken down to lines sometimes.
For example, a text might be: "• Midsommardagen", which might be broken down to what's shown in the image provided.

I think that's ugly and would rather break it down to:
• Midsommar-
dagen

As that's more visually pleasing and fit's better with the Swedish language ("Midsummer day").
What's the best approach to this? Core Text? Any tips on how to realise it with Core Text?


text:
Q: Networkx weights on edges with cumulative sum I am drawing a networkx graph with weights on edges, which I want to sum weight cumulatively. The code below only gets the last weight of edges but the cumulative sum. There are 5 nodes and 3 edges. The edges are ('A', 'B'), ('A', 'D'), and ('C', 'E'), and the weight is [1, 1, 1]. What I want the weight is [2, 2, 1] not [1, 1, 1]. Need help. Tks.
1. Create a df
import pandas as pd
import networkx as nx
ints = [1] * 5
a = ['A', 'B', 'C', 'A', 'A']
b = ['D', 'A', 'E', 'D', 'B']
df = pd.DataFrame(ints, columns=['weight'])
df['a'] = a
df['b'] = b
df

    weight  a   b
0   1       A   D
1   1       B   A
2   1       C   E
3   1       A   D
4   1       A   B

2. Draw a graph.
G=nx.from_pandas_dataframe(df, 'a', 'b', ['weight'])
edges = G.edges()
weights = [G[u][v]['weight'] for u,v in edges]
pos = nx.circular_layout(G)
nx.draw(G, pos, with_labels=True,  width=weights)

A: So, I don't think you can do a cumulative sum directly with nx.from_pandas_dataframe, at least after a quick look to the documentation.
You can, however, do that in pandas before passing it to networkx.
Since you said that you want weights to be [2,2,1], it means you're considering the graph as undirected, so you'll have to ensure that first:
df["a'"] = pd.DataFrame([df["a"], df["b"]]).min()
df["b'"] = pd.DataFrame([df["a"], df["b"]]).max()

Then you can do the cumulative sum with a simple groupby:
df = df.groupby(by = ["a'", "b'"]).sum().reset_index()

At this point, df will be correctly converted by nx.from_pandas_dataframe:
G = nx.from_pandas_dataframe(df, "a'", "b'", ['weight'])
[G[u][v]['weight'] for u,v in edges]


text:
Q: How to search data from enum file I have a enum file name 'EmployeePosition' which contain 'position list' and i want to search here a position name. Is any way to search here name?
enum EmployeePosition:int {
    case Manager = 1;
    case Officer = 2;
    case Executive = 3;
    case Worker = 4;

    public static function name(string $name){
        return constant("self::$name");
    }
}


text:
Q: IPython NameError: name 'pkg_resources' is not defined Out of the blue my IPython Kernel stopped working, repeatedly failing to restart. The error message is shown below. I have no idea what triggered this, and how to fix it. I tried upgrading setuptools and distribute as some other posts had mentioned, but no success. I appreciate your help!
WARNING:root:kernel 0abd40d4-471d-4eef-ba76-0aacea899699 restarted
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 151, in _run_module_as_main
    mod_name, loader, code, fname = _get_module_details(mod_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 109, in _get_module_details
    return _get_module_details(pkg_main_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 101, in _get_module_details
    loader = get_loader(mod_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 464, in get_loader
    return find_loader(fullname)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 474, in find_loader
    for importer in iter_importers(fullname):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 430, in iter_importers
    __import__(pkg)
  File "/Library/Python/2.7/site-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/Library/Python/2.7/site-packages/ipykernel/connect.py", line 12, in <module>
    from IPython.core.profiledir import ProfileDir
  File "/Library/Python/2.7/site-packages/IPython/__init__.py", line 48, in <module>
    from .terminal.embed import embed
  File "/Library/Python/2.7/site-packages/IPython/terminal/embed.py", line 16, in <module>
    from IPython.core.interactiveshell import DummyMod
  File "/Library/Python/2.7/site-packages/IPython/core/interactiveshell.py", line 31, in <module>
    from pickleshare import PickleShareDB
  File "/Library/Python/2.7/site-packages/pickleshare.py", line 41, in <module>
    from path import path as Path
  File "/Library/Python/2.7/site-packages/path.py", line 126, in <module>
    except pkg_resources.DistributionNotFound:
NameError: name 'pkg_resources' is not defined

A: I get a similar error recently after installing a specific package with anaconda using "sudo". The installation upgraded some core package used by ipython and obviously changed the permission associated with them. Using "sudo" while lauching ipython solved the issue.

A: I also got this error after installing specific packages in an anaconda distribution as root.
This was fixed by changing ownership of the anaconda directory ie
chown -R myname:mygroup anaconda_dir

Should be prevented by installing packages as user rather than as root


text:
Q: this.setSate not update how to fix this issue I  have change function but setState not work how to fix this issue
all value setState blank how to this issue solve
 handleAddressSubmit = (e) => {
e.preventDefault();
let isValidForm = false;
this.props.form.validateFieldsAndScroll((err, values) => {
  if (!err) {
    isValidForm = true;
  }
});
if (!isValidForm) {
  return false;
}

if (this.state.flatno) {
  this.setState({
    full_address:
      this.state.flatno +
      "," +
      this.state.address1 +
      "," +
      this.state.suburb +
      "," +
      this.state.state +
      "," +
      this.state.post_code +
      "," +
      this.state.country,
  });
} else {
  this.setState({
    full_address:
      this.state.address1 +
      "," +
      this.state.suburb +
      "," +
      this.state.state +
      "," +
      this.state.post_code +
      "," +
      this.state.country,
  });
}

console.log(this.state.is_default);
this.props.addAddressAction({
  flat_no: this.state.flatno,
  address1: this.state.address1,
  address2: this.state.address2,
  suburb: this.state.suburb,
  state: this.state.state,
  postal_code: this.state.post_code,
  country: this.state.country,
  full_address: this.state.full_address,
  lat: this.state.lataddress,
  lang: this.state.lngaddress,
  is_default: this.state.is_default,
});

this.setState({
      flat_no: "",
      address1: "",
      address2: "",
      suburb: "",
      state: "",
      postal_code: "",
      country: "",
      full_address: "",
      lat: "",
      lang: "",
      is_default: "",
    });
};

A: You can't read the state value right after calling a state setter (this.setState or setState from useState). You will always have the old values.
You should read it in the next render.
The state setter just tells react to enqueue an update for a component. It doesn't mutate the state right away.
For a complete understanding of what setState does, I recommend this blog post from Dan


text:
Q: numpy double installation (pip vs apt-get) I am using python 2.7 on Ubuntu 14.04 LTS.
I have tensorflow, scipy, numpy installed, but when I try installing sklearn or opencv using apt-get, another numpy is installed whose version is 1.8 and it "overwrites" the one I previously installed using pip which is 1.12. I tried updating it then, because I need 1.12, but it does not work.
Can anyone tell me why this is happening, is it because apt-get has priority over pip?
How do I force update numpy, or just remove the one installed through apt-get without removing the whole package which installed it as a dependency (e.g. sklearn)?

A: I met the similar problem in Debian. This is how I solved (workaround) this.
numpy versions:

*

*apt-get: v1.8, at /usr/lib/python2.7/dist-packages, let this be "path1"

*pip: v1.12, at /usr/local/lib/python2.7/dist-packages,let this be "path2"
Add BOTH path1 and path2 to the environment variable PYTHONPATH, and make path2 before path1, if you want the pip version as default.
Thus, in the shell config, say ~/.bashrc, add this line (replace path1/2 with the real path):
export PYTHONPATH=path2:path1:${PYTHONPATH}

Then restart the shell.
You can test if it works with this command: $ python -c "import numpy; print numpy.__file__", and make sure the path is path2.

I tried skipping path1, i.e. export PYTHONPATH=path2:${PYTHONPATH}, but this didn't work.


text:
Q: How to Display output to PowerShell form textbox data from PowerShell output I had wrote a powershell script to ping a ip address and I want to display a ping result to powershell form textboxt. I tried the below scripts below script. Script is working but not clear output.
Herewith i had attached the powershell output and powershell form textbox outputs.
[PowerShell output][1]
    # Load required assemblies
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

# Create Form to contain elements
$Form = New-Object System.Windows.Forms.Form

# Set Form Titlebar text
$Form.Text = "PING"

# Set size of form
# Size(<length>,<height>) in pixels
$Form.Size = New-Object System.Drawing.Size(600,600)

# Create an Input textbox
$inputBoxui = New-Object System.Windows.Forms.TextBox
$inputBoxui.Location = New-Object System.Drawing.Size(20,50)
$inputBoxui.Size = New-Object System.Drawing.Size(100,20)

# Initialize the textbox inside the Form
$Form.Controls.Add($inputBoxui)

# Create Instruction Label for inputBox
$Labelui = New-Object System.Windows.Forms.Label
$Labelui.Text = "Enter IP Address"
$Labelui.Location = New-Object System.Drawing.Size(20,30)
$Labelui.BackColor = "Transparent"
$Labelui.AutoSize = $true

# Initialize Label
$Form.Controls.Add($Labelui)

# Create an Output textbox, 10 pixels in from Form Boundary and 150 pixels down
# As we want a multiline output set textbox size to 565 px x 200 px
# .Multiline declares the textbox is multi-line
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.Location = New-Object System.Drawing.Size(10,250)
$outputBox.Size = New-Object System.Drawing.Size(565,300)
$outputBox.MultiLine = $True
$outputBox.Scrollbars = "Vertical"

# Initialize the textbox inside the Form
$Form.Controls.Add($OutputBox)

# Add a Button which can be used to generate an action from our textboxes
$Button = New-Object System.Windows.Forms.Button
$Button.Location = New-Object System.Drawing.Size(20,80)
$Button.Size = New-Object System.Drawing.Size(100,40)
$Button.Text = "PING Start"

# Declare the action to occur when button clicked
$Button.Add_Click( { pingstart } )

# Initialize the button inside the Form
$Form.Controls.Add($Button)

# Create a Function
function pingstart {

  $outputBox.Clear()

  # Variable to store what user types into Input textbox
  $Inputui = $inputBoxui.Text

  while ($true) {

        $Computer = $Inputui
        $Ping = Test-Connection -Count 3 -ComputerName $Computer
    ForEach ($Result in $Ping) {
        If ($Result.ResponseTime -lt 100) {
        $Result | Select-Object -Property Address,BufferSize,ResponseTime | Write-Host -BackgroundColor Green
        }
    If ( ($Result.ResponseTime -ge 100) -and ($Result.ResponseTime -lt 200) ) {
         $Result | Select-Object -Property Address,BufferSize,ResponseTime | Write-Host -BackgroundColor Yellow
        }
  If ($Result.ResponseTime -ge 200) {
        $Result | Select-Object -Property Address,BufferSize,ResponseTime | Write-Host -BackgroundColor Red
  }

}
# Assign Result to OutputBox
  $outputBox.Text = $Ping
}

}

# Initialize form and show it
# [void] used to suppress other messages generated by Form actions
[void] $Form.ShowDialog()

A: unrelated but it seems there is a mistake with this
Initialize the textbox inside the Form
$Form.Controls.Add($OutputBox)
caps lock.
$outputBox = New-Object System.Windows.Forms.TextBox


text:
Q: Efficient way to get the user_name My question is there any way to better manage this database implementation.
Background:
Web page worked with mysql, php and javascript.
Assuming the following table (simplified for the discussion):
*user_table*
user_id (PK)
user_name

*thread_table*
thread_id (PK)
user_id (Index)
thread_title

I want a view with a list of the thread titles together with the user publishing them.
So this would be my usual query:
SELECT thread_title, thread_table.user_id, user_name
FROM thread_table INNER JOIN user_table
WHERE user_table.user_id = thread_table.user_id

My question is, would be this the most efficient way (faster) to get the user_name having the user_id?
This is a simplified example, but I have more complex queries, joining different tables and it's "painful" to have to join another table only to get the user_name.
So what could I do to improve the effectiveness of this execution? At least should I make a memory table of user_table with a hash key to better get the user_name having the user_id?
Thanks!!

A: This is the correct implementation. If JOINs are painful to you, then you are using the wrong tool! JOINs are an inherent part of SQL, and that fact that you need to use a JOIN to retrieve a specific piece of information does not mean that you should change your schema.
If this is a common pattern that you use over and over in other queries, then it is a perfect candidate for a view. Then you can use that view in other queries, and eliminate some typing.
If performance is really a concern, you can start to look into denomralization, but I am not getting the sense that you are at that stage here. Posting your query times and the output of EXPLAIN PLAN would help diagnose this further.


text:
Q: Google Fit implementation - NOT tracking steps when on stand by mode (on Samsung S5, S6) - works on other phones I wrote an app following the Google Fit documentation and the github examples that google has here:
https://github.com/googlesamples/android-fit
Using the recording and history api to subscriber, record, retrieve data.
Everything works great. Except when device goes on stand by mode.
When device goes on stand by mode, i can walk a whole bunch of steps. Come back, and Google Fit Api doesn't show any updated steps.
Anybody else have this issue or know how to resolve it? Google Fit not recording steps when device on stand by mode.
The thing that bugs me most is that the Google Fit app itself (that can be downloaded on play store) shows the correct steps taken even when device was on stand by mode.
Anybody have any idea on what I might be missing.
I even put a wake lock so the device doesn't go to sleep.
Do I need a Service to have Google Fit Track steps when on stand by mode. How does this work?
Any help would be greatly appreciated.


text:
Q: fetching file from job server to my frontend server I need some suggestions on how to fetch dynamically generated files via jobs running on my remote job server to my frontend server running a user panel to manage jobs.
I do not want my job server's IP to be exposed so allowing user to directly download from the job server is undesired.
I would also need some Jquery library to show download speed, a progress bar of some sort.

A: I think it would help to know the answers to a few questions.
Off the top of my head:

*

*How large can the files be?

*How long is it likely to take to download a file?

*What format are the files?

*Are the files you're fetching from the job server static? (or, are they being regenerated each time?)

Edit:
jQuery UI has a progress bar. (docs)
From your user panel you would have a link like this:
File 100

This link should start a jQuery.getJSON() request to remoteTxtFile.php on your frontend server, which:

*

*Checks to see if the requested file has already been downloaded.

*If it has, return a JSON object like this: {'location': '/cache/file_100.txt'}

*

*The Ajax success callback can then show a link to the file.

*If not, start downloading the file using something (ideas further down) which can output progress to a text file. Save the file to a 'cache' folder. Return a JSON object like this: {'progress':0}

*Periodically (every second or so) fire another getJSON() to a PHP script which reads the download progress txt file and returns a JSON object like this: {'progress': 52} (percent)

*When the download is complete, from the PHP return JSON like this: {'location': '/cache/file_100.txt'}

*

*When the Ajax success callback sees 'location', the file is done, so show a link to it.

I'm not sure what you should use for the actual downloading of files. The problem with using PHP and stream_notification_callback to do the download (and output progress) is that the entire file would be downloaded into memory, which is no good for a 1 GB file.
Perhaps using wget to do the actual download would work better.


text:
Q: Trying to install rJava but error says JDK is incomplete I'm using install.packages('rJava', type='source')to install rJava, but it presents with the following error:

configure: error: one or more Java tools are missing.
*** JDK is incomplete! Please make sure you have a complete JDK. JRE is not sufficient.
  configure: error: ./configure failed for jri
  ERROR: configuration failed for package 'rJava'
  * removing '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava'
  * restoring previous '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava'
Warning in install.packages :
  installation of package 'rJava' had non-zero exit status

I just installed JDK8 so I'm not sure what's going on.
javac -version throws javac 1.8.0_231
java -version throws java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
This guy at R: rJava package install failing came up with a solution that I don't even understand since I'm new to this, but it has something to do with PATH and JAVA_HOMEand /jre apparently.

A: Looks like JAVA_HOME points to a JRE, not the JDK you want and need. Have a look at the top voted answer to "What should I set JAVA_HOME to on OS X". Also see https://developer.apple.com/library/archive/qa/qa1170/_index.html


text:
Q: How to preserve the value in arrays in asp.net I made 2 classes in App_code folder. In Class1 I declare some int,string and double type array (like double[] abc) and I wrote a method to fill the value in those arrays. I use these values to show on gridview on default.aspx page. Now when i want use these value again in my Class2, I got to those array null. I think I load the aspx page so these variable get refreshed. So now How can i preserved the value, so i use them again. I don't know about Session.

A: Two possibilities are these. You could use the Session (if the data is user-specific) or the Cache (if the data is to/can be shared between contexts).
These two things are used in largely the same ways, just with different accessibilities and lifetime control etc.


text:
Q: How can I get the path of a file I am trying to open using file explorer's "open with" dialog box So I have a very specific question that I realize is a bit stupid, however regardless of how I search for it, nothing really shows up.
I am aware that I can use system() to execute commands in cmd, and I am so done with writing
g++ <filename.cpp> & a.exe & del a.exe

every time I want to compile, build and then delete the exe of a c++ app. Therefore I plan on making a simple handling software using c++ to open other c++ apps. It will just take the name of the app I am trying to run and do all of the things said in the above code. My problem is, when using cmd I can write the name of the file I am running, however how can I get the name of the file if I double click?
Example would be to always open cpp files with the program I am making. Upon double click, it will open a cmd console, type the code for me and execute the program. Then when I close the program, the cmd will close. I am aware how to do all of that, except how to get the file name of the file I am opening using the program.
I have tried using different libraries and have not found anything similar or at least nothing that states of this use. I am not expecting the whole program nor do I want it, I realize it is a simple project, however I am struggling with this one part and am unable to find a solution.
I simply want to make my own starting script. Then in file explorer I right click on any .cpp file, click open with and the dialog box shows up. I click the program I have created and there I compile the .cpp file with the script of my choice, however I do not understand how to get the path from right click, open with, and using my own program. This is all withing file explorer, not within the software I am making.


text:
Q: main() creates undefined error when running starter file I am going to be writing a program with this starter file provided to me by my instructor. The issue is is that the file she gave us does not run. I don't know if this is because I am using IDLE, or if the code only runs on certain operating systems.
For example, I use Windows, but my teacher uses both Windows and Linux systems. I cannot get a hold of her to figure out the issue, so I was hoping you guys could.
Currently, when I run the starter file, I get an error:
TypeError: main() is not defined.

When I switch main() for GUI() at the bottom of the program, I get a new error:
TypeError: __init__() missing 1 required positional argument: 'rootWindow'

This is the full code:
from tkinter import*
from tkinter import tk

class GUI:
    def __init__(self,rootWindow):
        self.label = ttk.Label(rootWindow, text="Hellow World!")
        self.label.grid(row=0,column=0)

        self.button1=ttk.Button(rootWindow,text="Hello",command=self.hello)
        self.button1.grid(row=0,column=1)
        self.button2=ttk.Button(rootWindow,text="Bye",command=self.bye)
        self.button2.grid(row=0,column=2)

    def bye(self):
        self.label.config(text="GoodbyeWorld!")

    def hello(self):
        self.label.config(text="HelloWorld!")

    def main():
        global label
        rootWindow = Tk()

        gui = GUI(rootWindow)
        rootWindow.mainloop()

main()

A: There are two problems with this code:

*

*You need to unindent the main function, because otherwise you can't just call main because it is a part of the GUI class.

*The imports are messed up. You need to import tkinter as ttk because otherwise ttk is undefined, and import Tk instead of import tk.
Note that I am using Python 3, so yours may be slightly different if you're using Python 2.
The full corrected code is below:
import tkinter as ttk
from tkinter import Tk

class GUI:
    def __init__(self,rootWindow):
        self.label = ttk.Label(rootWindow, text="Hellow World!")
        self.label.grid(row=0,column=0)

        self.button1=ttk.Button(rootWindow,text="Hello",command=self.hello)
        self.button1.grid(row=0,column=1)
        self.button2=ttk.Button(rootWindow,text="Bye",command=self.bye)
        self.button2.grid(row=0,column=2)

    def bye(self):
        self.label.config(text="GoodbyeWorld!")

    def hello(self):
        self.label.config(text="HelloWorld!")

def main():
    global label
    rootWindow = Tk()

    gui = GUI(rootWindow)
    rootWindow.mainloop()

main()


text:
Q: Delete text in excel cell with certain format How do I easily delete strings in excel cells with certain formatting.I want to get cell with formatted string deleted like the second cell

The string could be anything the only thing that define him is formatting

A: I can't see a way of doing it without code if the formatting is mixed within a cell. You could use a UDF like this below :
Function DeleteFormat(aSource As Range) As String
    Underline = xlUnderlineStyleSingle
    Strikethrough = True
    DeleteFormat = ""
    For i = 1 To Len(aSource.Value)
        If Not (aSource.Characters(i, 1).Font.Strikethrough = Strikethrough And     aSource.Characters(i, 1).Font.Underline = Underline) Then
            DeleteFormat = DeleteFormat & aSource.Characters(i, 1).Text
        End If
    Next

End Function


text:
Q: Use results from one PostGIS SQL query in WHERE clause of another query I am building a mapping application that stores GPS tracks as lists of coordinates in a table called base_points.
I have a web application that uses leaflet to display these tracks. When I move the map, I make an AJAX call to my backend, with the bounds of the current view.
I'd like to return a simplified set of points within the bounds of the map.
At first, I used this query which works pretty well:
SELECT ST_AsGeoJSON(
               ST_Simplify(
                       ST_MakeLine(ARRAY(SELECT geom
                                         FROM base_point
                                         WHERE track_id = %s
                                           AND geom @
                                               ST_MakeEnvelope(
                                                       %s, %s, %s, %s, %s)
                                         ORDER BY time)),
                       %s
                   )
           );

The problem is that on certain zoom levels where the track exists and enters the viewport, I get a subset of the track as some parts are cut out by the geom @ ST_MakeEnvelop. I'd like to find the min and max track point within the viewport, and use those to retrieve all the points, and then using ST_Simplify(ST_MakeLine).
I am trying the following SQL expression, but it doesn't work.
WITH bounds as (SELECT MIN(id) as min, MAX(id) as max
                FROM base_point
                WHERE track_id = %s
                  AND geom @ ST_MakeEnvelope(%s, %s, %s, %s, %s))
SELECT ST_AsGeoJSON(ST_Simplify(ST_MakeLine(ARRAY(
        SELECT geom
        FROM base_point, bounds
        WHERE track_id = %s
            AND id < bounds.max
          AND id > bounds.min ORDER BY time
    )),
%s));

I've edited this from earlier, and the query now works, but is very slow.
Here's an explain/analyze output:
Result  (cost=8.95..34.46 rows=1 width=32) (actual time=59806.894..59806.896 rows=1 loops=1)
  InitPlan 1 (returns $2)
    ->  Sort  (cost=8.95..8.95 rows=1 width=40) (actual time=59803.755..59804.242 rows=14001 loops=1)
"          Sort Key: base_point.""time"""
          Sort Method: quicksort  Memory: 1478kB
          ->  Nested Loop  (cost=4.88..8.94 rows=1 width=40) (actual time=13.074..59799.753 rows=14001 loops=1)
                Join Filter: ((base_point.id < (max(base_point_1.id))) AND (base_point.id > (min(base_point_1.id))))
                Rows Removed by Join Filter: 523
                ->  Index Scan using base_point_track_id_b527d95c on base_point  (cost=0.43..4.45 rows=1 width=44) (actual time=0.031..2.440 rows=14524 loops=1)
                      Index Cond: (track_id = 40)
                ->  Aggregate  (cost=4.46..4.46 rows=1 width=8) (actual time=4.117..4.117 rows=1 loops=14524)
                      ->  Index Scan using base_point_track_id_b527d95c on base_point base_point_1  (cost=0.43..4.45 rows=1 width=4) (actual time=0.005..3.477 rows=14003 loops=14524)
                            Index Cond: (track_id = 40)
                            Filter: (geom @ '0103000020E61000000100000005000000C3F5285C8FF256C08FC2F5285C4F4340C3F5285C8FF256C07B14AE47E15A4440A4703D0AD73355C07B14AE47E15A4440A4703D0AD73355C08FC2F5285C4F4340C3F5285C8FF256C08FC2F5285C4F4340'::geometry)
                            Rows Removed by Filter: 521
Planning Time: 0.294 ms
Execution Time: 59807.087 ms

If I separate out the queries and hard code the ids for comparison, the query runs in 15ms.

A: Add bounds to your from clause.
Select geom
From base_point, bounds
Where.....

A: I figured it out. Doing a join is much faster.
WITH bounds as (SELECT MIN(id) as min, MAX(id) as max
                FROM base_point
                WHERE track_id = %s
                  AND geom @ ST_MakeEnvelope(%s, %s, %s, %s, %s))
SELECT ST_AsGeoJSON(ST_Simplify(ST_MakeLine(ARRAY(
        SELECT geom
        FROM base_point
        INNER JOIN bounds ON
            id < bounds.max
          AND id > bounds.min ORDER BY time
    )),
%s));

If someone can explain why, I'd greatly appreciate it!


text:
Q: fcolorbox without borders I'm using \fcolorbox (from xcolor) to get a coloured page. However, I was wondering whether it is possible to hide/remove the border keeping the page coloured. This is the command I'm currently using and even keeping the first parenthesis empty, the border is still black:
\fcolorbox{black}{blue!05}

Thank you in advance for your help.

A: use \colorbox  which is the same but doesn't add a border (and just takes one color argument)  so
\colorbox{blue!05}{...}


text:
Q: NoClassDefFoundError: Urban Airship for Android Push I've been trying to set up Urban Airship for days and it really stress me out.
Since their instruction isn't clear, I had to follow this one to work through.
However, I'm currently getting this errorLogs and trying to see if I can find some help.
Please any advice would be greatly appreciated! Thank you!
10-18 12:41:10.585: E/AndroidRuntime(11870): FATAL EXCEPTION: main
10-18 12:41:10.585: E/AndroidRuntime(11870): java.lang.NoClassDefFoundError: com.urbanairship.UAirship
10-18 12:41:10.585: E/AndroidRuntime(11870):    at com.app.android.NotifyMeApplication.onCreate(NotifyMeApplication.java:15)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:973)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3971)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.app.ActivityThread.access$1300(ActivityThread.java:128)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.os.Handler.dispatchMessage(Handler.java:99)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.os.Looper.loop(Looper.java:137)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at android.app.ActivityThread.main(ActivityThread.java:4517)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at java.lang.reflect.Method.invokeNative(Native Method)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at java.lang.reflect.Method.invoke(Method.java:511)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
10-18 12:41:10.585: E/AndroidRuntime(11870):    at dalvik.system.NativeStart.main(Native Method)

I found a similar qnestion and answers,
-Remove all Android Library projects and external jars from the build path.
-Create a folder named 'libs' in your project.
-Place all external .jars in that folder, the ADT should now place them under 'Android Dependencies'.
-Re-import all your previous Android Library projects the normal way.
but it doesn't work for me.
This is Manifestfile, and the application runs fine if i remove the application name.
But I need that in order to enable the push notification..
AndroidManifest.xml
<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:name="com.app.android.NotifyMeApplication"
        android:debuggable="true"
        android:allowClearUserData="true"
        android:enabled="true" >

NotifyMeApplication.java
package com.app.android;

import com.urbanairship.Logger;
import com.urbanairship.UAirship;
import com.urbanairship.push.PushManager;
import com.urbanairship.push.PushPreferences;

import android.app.Application;

public class NotifyMeApplication extends Application{

    @Override
    public void onCreate() {
        super.onCreate();
                UAirship.takeOff(this); // always needs to be called when starting an application

                // even though we call takeoff push notifications are disabled by default
                // you have to explicitly turn them on like so
                PushManager.enablePush();

                // let the push manager know about our intent receiver
                PushManager.shared().setIntentReceiver(IntentReceiver.class);
                // name must match broadcast receiver from step 7

                // set some preferences for sounds and vibration
                PushPreferences prefs = PushManager.shared().getPreferences();
                prefs.setSoundEnabled(true);
                prefs.setVibrateEnabled(true);

                // apid is a unique identifier for a particular device
                String lPushId = prefs.getPushId();
                Logger.info("My Application onCreate - App APID: " + lPushId);

    }
}

A: If you get NoClassDefFoundError during Runtime, then I suspect you did not include them to work at runtime. You have to check the checkbox for each .jar like this:


text:
Q: keeping an instance of an object avaliable throughout an entire application Yesterday i was given a project in my summer internships requiring the use of both XAML and C# in visual studios 2010 to make a WPF version of a Console Application i had created. unfortunately i had no experience in either language until 3 days ago, so while the solution to this problem may be simple it escapes me and i haven't been able to find any usable solutions online
essentially, when i start this WPF application i want to instantiate an object that is defined inside the application in C#. i want this instance of the class to be available for the entire time that the application is running. i was wondering if this could be accomplished by creating a global resource for the application, but as far as i can tell that can only be done for XAML resources.
any help and ideas would be appreciated. if anything i wrote is too ambiguous please let me know and i will try to clarify

A: Resources are normally used for XAML type things (styles, converter instances and the like).
This seems like a good use case for a static class. Static classes are instantiated the first time they are used and there is only ever one instance. You can also use a singleton (which generally takes advantage of a static member).
Note that singletons can be a code smell, but if you know you need one, go ahead and make it! A resource isn't the way to go here though.
A quick singleton example:
public class MyGlobalClass
{
    private Lazy<MyGlobalClass> _instance = new Lazy<MyGlobalClass>();
    public static MyGlobalClass Instance { get { return _instance.Value; } }

    //Whatever else, accessed by MyGlobalClass.Instance.<Whatever>
}

A: Looks like BradleyDotNet has the basic answer covered. Additionally, you may want to look into using an IoC container and having it manage the singleton instance. So no static, no implementing the singleton pattern, just let the IoC container handle that responsibility.
One other word of caution, static != thread safe so if there are multiple threads accessing your singleton object make sure thread safety is considered.


text:
Q: django/apache permissions problem I'm running a django project on Centos 5.4 and serving it with httpd/mod_wsgi.  I can't figure out the correct permissions for /home/website/django_project so that I don't get a 403 error.
In my httpd.conf the user and group to run httpd as is apache.  The group django is set up with website and apache as members. The owner of /home/website and all subdirs is website:django, and the permissions are rwxrwx---.  Right now the project works fine with the dev server, but if I try to view it through apache, I get a 403 error.  chmod -R o+rx /home/website/django_project fixes the problem, but this obviously isn't a good solution.
Thanks

A: First, try setting the group-sticky bit on the directories:
find /home/website -type d -exec chmod g+s {} \;

Then the perms should read rwxrws---.  See if this makes a difference.
If that fails, you can try to poke around as the "website" user and see what happens.  Temporarily give the user "website" a home directory (not /home/website, it needs to be something else, like /var/home/website), password, and login shell, then use su - website to switch to it.  Try listing the contents of /home/website and try reading files in there.  Fix any problems.
Hope this helps.
P.S. I'm assuming /var/log/apache/access_log (or maybe it's /var/log/http/access_log) doesn't have anything useful.