text:
Q: Problems with the Iterator throwing NoSuchElementException I am trying to write a program that randomizes groups of people. I am experiencing problems with the Iterator.
Here is the code:
@SuppressWarnings("deprecation")
public static void results(List<String> nameslist) {

    Scanner scan = new Scanner(System.in);
    int groups = 0;
    int count = nameslist.size();
    int done=0;

    do{
        System.out.println("How many people do you want per group?");
        groups = scan.nextInt();
    } while(groups == 0);
    Iterator itr = nameslist.listIterator();
    int peopledone=0;
    while(peopledone<count){
    int groupsdone = 0;
    while (groupsdone <= groups){
        groupsdone++;
        peopledone = 0;
        System.out.println("Group "+groupsdone+":");
        while (peopledone <= groups){
            try{
                Object obj = itr.next();
                System.out.println(obj);
                peopledone++;
            }catch (NoSuchElementException e){
                System.out.println("Error");
                Thread.currentThread().stop();
            }
        }
    }
}

A few things to note:

*

*nameslist is a list of letters (a-f) that I put together for testing purposes. Normally, they would be names of people in a class.

*I am trying to get it to just list off names until it runs out.
Thanks so much!

A: Your getting the NoSuchElementException because, due to the nested loops, you are doing too many iterations.  Once you reach the end of the list, if you call next() on the iterator again, it throws that exception.
Unless I'm misunderstanding what you're trying to do, this should work (there's probably a more elegant way but it at least corrects your issue):
public static void results(List<String> namesList)
    {
        Scanner scan = new Scanner(System.in);
        int namesPerGroup = 0;
        while (namesPerGroup == 0)
            namesPerGroup = scan.nextInt();

        int group = 0;
        int namesInGroup = 0;
        System.out.println("Group " + group + ": ");
        for (String name : namesList)
        {
            if (namesInGroup == namesPerGroup)
            {
                group++;
                namesInGroup = 0;
                System.out.println("Group " + group + ": ");
            }
            System.out.println(name);
            namesInGroup++;

        }
    }

A: You are iterating more times than there are list elements - be sure how many times your loop is going to loop.
What you are trying to do could and should be done in two lines:
    Collections.shuffle(nameslist);
    List<String> result = nameslist.subList(0, Math.min(count, nameslist.size()));


text:
Q: Self Invoking Functions Importance of using ! in this code
var testValue;
!function test() { testValue = 3; }();
console.log(testValue);

A: The ! indicates to the interpreter to parse what follows as an expression rather than as what would otherwise be a function declaration. Function declarations can't be invoked on the same line, so without the !, a SyntaxError would be thrown:

var testValue;
function test() { testValue = 3; }();
console.log(testValue);

Only function expressions can be immediately invoked. Though, to indicate a function expression, it would probably be clearer to use parentheses around the function rather than !, and there isn't all that much point to naming the function test if the function name isn't used anywhere, eg:

var testValue;
(() => {
  testValue = 3;
})();
console.log(testValue);

A: Functions are not automatically objects. You should define it inside brackets or assign it to a variable. If you use ! for function definition. It means
    !(function(){console.log("hi");})
Now you can insert () to run that function.

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to get current DATE/TIME with microseconds in CI4? Awkward problem -> I'm trying to get current date&time in ISO 8601 format (like this: 2022-02-11 12:30:02.846108).
When I run $time = new Time('now', 'Europe/Amsterdam') in CI4, $time returns this:
object(CodeIgniter\I18n\Time)#79 (6)
  { ["timezone":protected]=> object(DateTimeZone)#80 (2)
    { ["timezone_type"]=> int(3)
      ["timezone"]=> string(16) "Europe/Amsterdam"
    }
    ["locale":protected]=> string(2) "en"
    ["toStringFormat":protected]=> string(19) "yyyy-MM-dd HH:mm:ss"
    ["date"]=> string(26) "2022-02-11 12:30:02.846108"
    ["timezone_type"]=> int(3)
    ["timezone"]=> string(16) "Europe/Amsterdam"
}

but when i try to get $time->date returns NULL.
Any ideea how to access date string in order to get the current time with microseconds?

A: Found out there is no ->date attribute in the DateTime object, which is why  $time->date returns NULL.
The proper way to get the date with microseconds is:
$time->format('Y-m-d\TH:i:s.u')


text:
Q: AWS CLI tools - cannot download recursively from S3 I have a following structure on S3:
bucket:
   - dir_test
       - dir_a
           - dir
               - file
           - file_2
           - file_2
           - file_n
       - dir_b
           - dir
                - file
           - file_2
           - file_2
           - file_n

I want to download a whole content of dir_test to my working directory from a shell script:
source_path="s3://bucket/dir_test/"
target_path="."
aws s3 cp "$source_path" "$target_path" --recursive

Everything is downloaded fine, however aws reports Errno 21:
download failed: s3://bucket/dir_test/dir_a/dir/ to dir_a/dir/ [Errno 21] Is a directory: u'/my-wd/dir_a/dir/'

What am I doing wrong?

A: Your copy command looks correct, but that error doesn't make sense -- S3 doesn't actually have directories, so it should never attempt to "download" an empty directory. Directories are created locally as a side-effect of downloading files (the S3 file is actually named "foo/bar/baz.txt" and the CLI tool is translating that into "baz.txt" in the "bar" dir in the "foo" dir).
I wonder if you have something strange, like a file named "dir/"? Or a file with an empty name? Try aws s3 ls s3://bucket/dir_test/dir_a/dir/

A: You can try out mc tool too:
mc cp  https://s3-us-west-2.amazonaws.com/bucketName/... localdir
The ... in the command indicates recursive operation


text:
Q: Does Edge implement multiple specialist ServiceWorker instances? There is a fundamental design flaw with the current ServiceWorker design/implementations in that there is only ONE per UA per domain.
However, I believe Edge, notwithstanding their tardy arrival on the scene, has specialist SW instances for push, fetch, etc.
Can someone please confirm that Edge implements multiple, specialist SW instances?
EDIT 1
Ok, it might have been Safari/Webkit but reading this it looks like 1 process for all ServiceWorker threads plus another to monitor/start/stop but only one simultaneous SW instance per domain (plus that dodgy iFrame logic webkit has got going on)
So if neither Webkit or Edge do what my memory tells me then is it not a good performance idea? (Barring reduced hit rate on SW recycling)
EDIT 2
On third thoughts, the fact that everything in a ServiceWorker is Asynchronous or verbotten means Fetch, Push, Travel events can all multiplex to the same SW instance without performance degradation.
Oh Well, I'm back to "Stuffed if I know why no one is implementing the TravelManager :-("
FWIW The WebKit implementation of shared memory buffer must surely necessitate a synchronous API? Breaking one of the major premises of SW design?

A: While Edge does implement multiple service workers, it does not support specialist service workers for push, fetch, etc.


text:
Q: In R How to remove a precise character in a column ( in this case the " , " )that has other same character that i don't want to remove? i have a dataset with some columns that have a monetized value, but considering the name of the columns and the description of them, i believe that there's an error in the representation of the numbers. i.e. (5,52,32,974)----> this is an example of the number, i believe there is a comma too many or put in the wrong position. I would like to know if it's possible to remove a certain comma in this case and came to this representation of the number, for instance 55.232.974... of $ for example. The dataset is in .csv. Thanks in advance.

A: if I understand it correctly your data is given as a string.
Then you could use the following code:

a <- c("5,52,32,974", "5,52,32,974", "5,52,32,974")

b <- gsub(",", "", a)

as.numeric(b)
#[1] 55232974 55232974 55232974


text:
Q: ERROR Plugin org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE or one of its dependencies could not be resolved I am getting below error while building Jenkins Job:-
Maven version- apache-maven-3.2.1
Error:-
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:1.5.8.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:1.5.8.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/1.5.8.RELEASE/spring-boot-maven-plugin-1.5.8.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

pom.xml:-
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.abcd</groupId>
    <artifactId>mnopqrstuvwxyz</artifactId>
    <version>0.0.0</version>
    <packaging>jar</packaging>

    <name>mnopqrstuvwxyz</name>
    <description>Project for mnopqrstuvwxyz</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.8.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <distributionManagement>
        <repository>
            <id>abcdReleases</id>
            <name>abcdReleases</name>
            <url>http://maven.abcdefgh.com/artifactory/libs-release-local/</url>
        </repository>
        <snapshotRepository>
            <id>abcdSnapshots</id>
            <name>abcdSnapshots</name>
            <url>http://maven.abcdefgh.com/artifactory/libs-snapshot-local/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>abcdSnapshots</id>
            <name>abcdSnapshots</name>
            <url>http://maven.abcdefgh.com/artifactory/libs-snapshot-local</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>abcd-release</id>
            <url>http://maven.abcdefgh.com/artifactory/libs-release-local/</url>
        </repository>
        <repository>
            <id>abcd-3rd-party</id>
            <url>http://maven.abcdefgh.com/artifactory/ext-release-local/</url>
        </repository>
    </repositories>

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

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.4.0</version>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-core</artifactId>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>1.2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>1.2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>1.7.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <version>1.7.4</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>hypergate-commons-lib</artifactId>
            <version>1.0.103</version>
        </dependency>
        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>common-properties-lib</artifactId>
            <version>1.0.76</version>
        </dependency>
        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>hypergate-redis-util</artifactId>
            <version>0.0.22</version>
        </dependency>
        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>common-redis-lib</artifactId>
            <version>1.0.24</version>
        </dependency>
        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>common-salesforce-lib</artifactId>
            <version>1.0.40</version>
        </dependency>
        <dependency>
            <groupId>com.abcdefgh</groupId>
            <artifactId>common-moso-lib</artifactId>
            <version>1.0.45</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.newrelic.agent.java</groupId>
            <artifactId>newrelic-agent</artifactId>
            <version>5.0.0</version>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Camden.SR5</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!-- <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>newrelic-agent</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin> -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Premain-Class>com.newrelic.bootstrap.BootstrapAgent</Premain-Class>
                            <Can-Redefine-Classes>true</Can-Redefine-Classes>
                            <Can-Retransform-Classes>true</Can-Retransform-Classes>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.abcdefgh.mnopqrstuvwxyz.mnopqrstuvwxyzApplication</mainClass>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <includePom>true</includePom>
                </configuration>
                <executions>
                    <execution>
                        <id>execution12</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources/wsdl</schemaDirectory>
                            <clearOutputDir>false</clearOutputDir>
                            <wsdl>true</wsdl>
                            <xmlschema>false</xmlschema>
                            <schemaFiles>getSession.wsdl</schemaFiles>
                        </configuration>
                    </execution>

                    <execution>
                        <id>execution3</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources/wsdl</schemaDirectory>
                            <clearOutputDir>false</clearOutputDir>
                            <wsdl>true</wsdl>
                            <xmlschema>false</xmlschema>
                            <schemaFiles>EqPaymentGateway_GatewayFacade.wsdl</schemaFiles>
                        </configuration>
                    </execution>

                    <execution>
                        <id>execution4</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources/wsdl</schemaDirectory>
                            <clearOutputDir>false</clearOutputDir>
                            <wsdl>true</wsdl>
                            <xmlschema>false</xmlschema>
                            <schemaFiles>createLead.wsdl</schemaFiles>
                        </configuration>
                    </execution>

                    <execution>
                        <id>execution5</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources/wsdl</schemaDirectory>
                            <clearOutputDir>false</clearOutputDir>
                            <wsdl>true</wsdl>
                            <xmlschema>false</xmlschema>
                            <schemaFiles>PaymentGatewayFacade.wsdl</schemaFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- plug-in for docker image , kindly comment out this plug-in if not
                required -->
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.11</version>
                <configuration>
                    <imageName>${project.artifactId}:${project.version}</imageName>
                    <dockerDirectory>${project.basedir}/src/main/resources</dockerDirectory>
                    <buildArgs>
                        <finalName>${project.build.finalName}.jar</finalName>
                    </buildArgs>
                    <resources>
                        <resource>
                            <targetPath>/app</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
            <!-- Jacoca code coverage plougin -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>target/jacoco.exec</dataFile>
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <systemPropertyVariables>
                        <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

C:\Program Files\apache-maven-3.2.1\conf\settings.xml:-
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.home}/conf/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>D:\maven\m2\repository</localRepository>

  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
  <servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     |
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
     |       used together.
     |
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->

    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
  </mirrors>

  <!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |-->
  <profiles>
    <!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    <profile>
      <id>jdk-1.4</id>

      <activation>
        <jdk>1.4</jdk>
      </activation>

      <repositories>
        <repository>
          <id>jdk14</id>
          <name>Repository for JDK 1.4 builds</name>
          <url>http://www.myhost.com/maven/jdk14</url>
          <layout>default</layout>
          <snapshotPolicy>always</snapshotPolicy>
        </repository>
      </repositories>
    </profile>
    -->

    <!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | <plugin>
     |   <groupId>org.myco.myplugins</groupId>
     |   <artifactId>myplugin</artifactId>
     |
     |   <configuration>
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
     |   </configuration>
     | </plugin>
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the <value/> inside the activation-property.
     |
    <profile>
      <id>env-dev</id>

      <activation>
        <property>
          <name>target-env</name>
          <value>dev</value>
        </property>
      </activation>

      <properties>
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
      </properties>
    </profile>
    -->
  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->
</settings>


text:
Q: Detect when object values, that match, all have a new prop and fire a method from it I have an array of objects like this below which represents a carousel and it's slides:
[
  {
    text: "Lorem",
    imgSrc: "Url",
    section: "t1"
  },
  {
    text: "Lorem",
    imgSrc: "Url",
    section: "t1"
  },
  {
    text: "Lorem",
    imgSrc: "Url",
    section: "t2"
  },
  {
    text: "Lorem",
    imgSrc: "Url",
    section: "t2"
  },
  {
    text: "Lorem",
    imgSrc: "Url",
    section: "t3"
  }
]

And when a slide is viewed, I'm adding a prop viewed: true to that particular object, i.e:
{
  text: "Lorem",
  imgSrc: "Url",
  section: "t2",
  viewed: true
}

This is the method that fires when a carousel slide has been viewed and sets the viewed prop:
onSlideViewed() {
  _.map(this.tutorialSlides, (slide, index) => {
    if (currentIndex === Number(index)) {
      slide.viewed = true;
    }
  });
}

I want to be able to detect when a whole section (all "t2" for example) has been viewed and fire a method when it does but I'm struggling to be figure out how to set the loop up that check that all sections have been viewed - can you help?
Thanks!


text:
Q: How to render HTML templates in Pedestal? I am going over the Pedestal docs at
https://github.com/pedestal/pedestal/tree/master/guides/documentation

There are no examples for how to render html from templates. Does pedestal even have this functionality? If so, can anyone please explain how this works, with an example...

A: Pedestal  doesn't ship with a template system, but instead relies on third-party libraries. You could check this template-serverexample.
It demonstrates the use of several popular templating libraries :

*

*hiccup

*enlive

*mustache

*stringtemplate

*comb

*Selmer
But you could use any templating library you want.
Here is an article to help choose one.


text:
Q: Tiles not working with spring I have added tiles in my project but it is not working as. I have added footer. But footer and header do not show in the output. I only get the output
hello ...........................

But I do not get the content of footer in the output. How can I make tiles work? Thanks in advance.
In my layout folder I have classic.jsp and footer.jsp.
classic.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><tiles:getAsString name="title" /></title>

    <tiles:insertAttribute name="body" />

    <tiles:insertAttribute name="footer" />

footer.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

© Test

index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

hello ...........................

dispatcher-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

    <context:component-scan base-package="cz.jiripinkas.jba.controller" />

    <bean id="tilesConfigurer"
        class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
        <property name="definitions">
            <list>
                <value>/WEB-INF/defs/general.xml</value>
            </list>
        </property>
    </bean>

    <bean id="viewResolver"
        class="org.springframework.web.servlet.view.UrlBasedViewResolver">
        <property name="viewClass"
            value="org.springframework.web.servlet.view.tiles3.TilesView" />
    </bean>

    <bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/jsp/" />
        <property name="suffix" value=".jsp" />
    </bean>

</beans>

general.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
    <definition name="common" template="/WEB-INF/layout/classic.jsp">
        <put-attribute name="footer" value="/WEB-INF/layout/footer.jsp" />
    </definition>

    <definition name="index" extends="common">
        <put-attribute name="title" value="Java Blog Aggregator" />
        <put-attribute name="body" value="/WEB-INF/jsp/index.jsp" />
    </definition>

</tiles-definitions>

and IndexController
package cz.jiripinkas.jba.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @RequestMapping("/index")
    public String index() {
        return "index";
    }
}

A: @RequestMapping("/index")
    public ModelAndView index() {
        return new ModelAndView("index") ;
    }

so rteurn ModelAndView Instead of String.

A: i suggest the code should be changed to this
<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.tiles3.TilesView" />

<bean id= "viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />

A: Nothing worked for me. I had to upgrade my apache tiles version to current version.

A: You return wrong value in IndexController, your IndexController directs to index.jsp, which is:
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

hello ...........................

It just outputs hello ..........................., right?
Try:
@Controller
public class IndexController {

    @RequestMapping("/classic")
    public String classic() {
        return "classic";
    }
}


text:
Q: Prevent Autofac from registering all types in referenced assemblies I'm using autofac modules to register my applications services/types etc... like so:
 var builder = new ContainerBuilder();
 builder.RegisterModule(new ConduitRegistryModule());
 // etc...

Example module class/code:
    /// <summary>
    /// Handle the container builder load event.
    /// </summary>
    /// <param name="builder">The builder through which components can be registered.</param>
    protected override void Load(ContainerBuilder builder)
    {
        RegisterServices(builder);
    }

    /// <summary>
    /// Register conduit services.
    /// </summary>
    /// <param name="builder">The builder through which components can be registered.</param>
    private void RegisterServices(ContainerBuilder builder)
    {
        builder.RegisterType<Conduit>().As<IConduit>().SingleInstance();
        builder.RegisterType<PhonelistService>().As<IPhonelistService>().InstancePerLifetimeScope();
        builder.RegisterType<UtilityService>().As<IUtilityService>().InstancePerLifetimeScope();
        builder.RegisterType<VacancyService>().As<IVacancyService>().InstancePerLifetimeScope();
        builder.RegisterType<InteractionService>().As<IInteractionService>().InstancePerLifetimeScope();
    }

This is then being built in the Global.asax.cs file on application start where Get() returns the builder with registered modules:
var builder = new ContainerBuilderFactory().Get();

_containerProvider = new ContainerProvider(builder.Build());

This is all great however I'm finding that a lot of unrelated types are being registered by autofac when i review containers component registery property. This is causing some issues with some types that are part of a framework we use (have no control over these unfortunately) so would like to configure Autofac to either:
a) NOT register all types/classes in the application (I thought using autofac modules would achieve this?)
b) Exclude a specific type/class/interface from registration
Are either of these possible? Have I possibly used modules incorrectly somehow? Any help is appreciated.


text:
Q: excel 2013: COUNTIFS: text comparisons give incorrect/unexpected results Using MS Office Professional Plus 2013 on Win10:
the COUNTIFS function seems to perform string equality tests ok but inequality and lexicographic comparisons incorrectly.
In the example below, column A has data type "Text". (The function ISTEXT() confirms that).
The formula displyed in column B is evaluated in column C with the unexpected results shown in red in the screen capture.
Can this behaviour be explained?   thanks...

DATA
FORMULA
RESULT
EXPECTED RESULT

2022-01-11

2022-01-14
=COUNTIF($A2:$A20, "=2022*")
19
19

2022-01-17
=COUNTIFS($A2:$A20, "=" & "2022-02-10")
3
3

2022-02-03
=COUNTIFS($A2:$A20, "<>" & "2022-02-10")
19
16

2022-02-03
=COUNTIFS($A2:$A20, "<" & "2022-02-10")
0
10

2022-02-03
=COUNTIFS($A2:$A20, ">" & "2022-02-10")
0
6

2022-02-04

2022-02-07

2022-02-09

2022-02-09

2022-02-10

2022-02-10

2022-02-10

2022-02-11

2022-02-15

2022-02-15

2022-04-11

2022-07-10

2022-12-14

screen capture


text:
Q: Melting diamond and cool down as diamond Is it possible to melt diamond? And if possible while let it cool will it became diamond again?

A: While I agree in principle with David Lynch's answer, I think it's good to take a closer look at the phase diagram (adapted from http://upload.wikimedia.org/wikipedia/commons/4/46/Carbon_basic_phase_diagram.png):

I added the arrows to show possible paths you might follow.
Red path: diamond would become graphite before melting; the molten carbon becomes diamond just above 10 GPa, and you cool it down while maintaining the pressure. Once the diamond is cool enough it can be depressurised slowly without changing phase (the hashed region has to be traversed carefully).
Blue path: if you just heat your diamond, it will turn to graphite and then vaporize (sublimate) around 4000 K.
The green path shows the only "sure" way to melt diamond - starting at a very high pressure, then raising the temperature; above 5000 K one could either continue raising the temperature, or lower the pressure.
Note that there is a real problem with doing this - there are no containers that I know of that will allow that combination of temperature and pressure to be maintained. Synthetic diamonds have been made, but typically not by growing from the melt...

A: Carbon, at atmospheric pressure, has no melting point as its triple point is at 10.8 ± 0.2 MPa and 4,600 ± 300 K (~4,330°C or 7,820°F), so it sublimes at about 3,900 K. You can make it liquid at larger pressures, in an inert gas atmosphere. When you cool it, what it becomes depends on the pressure. Below about 10 GPa it will become graphite, above that it will become diamond again.
You can see a carbon phase diagram here.


text:
Q: difference between 'var a = 2' and 'this.a = 2' I just discovered the weirdest bug in some javascript code dealing with RegExp.test. I had a regular expression regexp declared inside a function and I had a closure that had a reference to regexp and I was using the closure to iterate over an array of strings to test them with the help of collect from prototype.js, i.e.
function some_func() {
  var regexp = /regular_expression/;
  an_array_of_strings.collect(
     function(str) {
       if (regexp.test(str)) {
         do_something();
       }
     }
  );
}

The really weird thing was that calling regexp.test(str) inside the closure would alternate between true and false on the same input. I looked at the source for RegExp.test and I didn't see anything fishy but there was something going on because how can the same string pass and fail the same regular expression. After staring some more at RegExp.test I basically concluded that variables declared in RegExp.test were continuing to exist between invocations and were messing up subsequent invocations. So here's the question: What is the difference between
this.a = 2;

and
var a = 2;

when the above statements appear inside a method being called on an object inside a closure that holds a reference to that object? I'm asking because the bug disappears when I move regexp.test outside the closure. When regexp.test is called outside the closure then it doesn't flip-flop between true and false on each call. I have no idea why this is happening.
Edit: When I was moving the regexp outside the closure I was forgetting to add the global option so that's why the bug was disappearing. Thanks Ivo.

A: Since you didn't show your RegExp but I just answered something similar to this, I suppose that you're using the global option in your RegExp, which has some interesting side effects.

As with exec (or in combination with
  it), test called multiple times on the
  same global regular expression
  instance will advance past the
  previous match.

Source: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp/test
So what exactly happens here is that since you're using the global option for the regex, it will continue to search the string after it found an match.
regexp.test("d")

This will find d at position 0.
regexp.test("d")

This will now search for d starting at position 1, but since that's the end of the string it will not find anything therefore returning false.
We can use the lastIndex property of the regex to proof that:
regexp.lastIndex
>> 0
regexp.test("d")
>> true
regexp.lastIndex
>> 1
regexp.test("d")
>> false

So to solve the issue you need to remove the global option from your RegExp.
Disclaimer, this is a copy of my previous answer:
Unusual javascript Regex result, explanation please!

A: This is a tricky question, as at first glance they appear to be identical.
I would surmise that this.a is owned by the function, but may also extend for the life of that function, not just the function call itself; whereas var a would be created and destroyed each time the function is executed.

A: Have a look at this page about the wonders of this in JS. The meaning of this changes quite dramatically, depending on how you use your functions.


text:
Q: Banner news in Wordpress is separated? Can you please help me solve the problem with this page https://noviero.com/ which is in wordpress? It is a free theme so there is no customer support.
This banner news gets separated when page is opened, but if I zoom the page or click on Windows Restore down everything on the page gets on the right place?
This is the space between elements on the banner when page is first opened:

This is how the page looks like after I zoom in then out. Everything gets as it should be:

Is there something I could do in CSS or what?
https://noviero.com


text:
Q: How do I output the row containing the lowest value from a specific column inside a filtered dynamic array? I have a list of suppliers which contains the product name and the prices. I then formatted the data where there are multiple entries of the product name but under different suppliers. For each product, I need the lowest price and under what supplier I can get that lowest price from.
I don't know if there's an easier method through power query but the solution I used is using FILTER.
=FILTER(DATA,CRITERIA)

ITEM
SUPPLIER
PRICE

ITEMA
SUPPLIERA
100

ITEMA
SUPPLIERB
150

ITEMA
SUPPLIERC
125

ITEMB
SUPPLIERA
100

ITEMB
SUPPLIERB
150

ITEMB
SUPPLIERC
125

What I tried:
I was able to create a FILTER function to output the suppliers and price based on the item I need. Through searching the net, I don't know how to get the minimum number from the filtered list itself.
Output I was able to get through the function:
UNIQUE(TABLE[ITEM])|FILTER(TABLE,A1=TABLE[ITEM])

A
B
C

ITEMA
SUPPLIERA
100

ITEMA
SUPPLIERB
150

ITEMA
SUPPLIERC
125

Since the output is a dynamic array, I don't know how to "read" the 3rd column of this array to get the minimum value.

A: Solved it.
Instead of using 1 filter function to output the whole row, I used 2 filter functions.
First filter function gets the minimum value with the selected criteria:
MIN(FILTER(TABLE[PRICE],A1=ITEMA))
Second filter function outputs the row with the minimum value:
FILTER(TABLE,B1=TABLE[PRICE])
So my dynamic table looks like
|A|B|C|
|-|-|-|
|ItemA|=MIN(FILTER(TABLE[PRICE],A1=ITEMA))|=FILTER(TABLE,B1=TABLE[PRICE])|

A
B
C
D

ItemA
100
SupplierB
100

For clarity sake, I decided to leave the extra 100 there but there is a way to output filter only specific columns and that's what I used


text:
Q: SPARK 1.6 Insert into existing Hive table (non-partitioned) Given that I can get these singleton insert statements below to work as from another stack overflow question (thanks), then
  val sqlContext = new org.apache.spark.sql.hive.HiveContext(sc)
  sqlContext.sql("CREATE TABLE IF NOT EXISTS e360_models.employee(id INT, name STRING, age INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'")

   sqlContext.sql("insert into table e360_models.employee select t.* from (select 1210, 'rahul', 55) t")
   sqlContext.sql("insert into table e360_models.employee select t.* from (select 1211, 'sriram pv', 35) t")
   sqlContext.sql("insert into table e360_models.employee select t.* from (select 1212, 'gowri', 59) t")

   val result = sqlContext.sql("FROM e360_models.employee SELECT id, name, age")
   result.show()

what about if wanting to do an insert select from a SPARK DF registered as temporary table, to an already existing Hive table? I cannot seem to get it to work. Is it in fact possible?
Using 1.6 SPARK. Not interested in creating a table a la CTAS, but rather inserting to as per the above, but in bulk, e.g.
sqlContext.sql("INSERT INTO TABLE default.ged_555 SELECT t.* FROM mytempTable t")

A:
As I understood you want to insert some data in to
  e360_models.employee and then you want to select some columns and
  again insert in to default.ged_555 and also you don't want to do CTAS
  Prepare a dataframe from e360_models.employee and then do like below

// since you are using hive I used hiveContext below...
 val dataframe = hiveContext.sql("select * from e360_models.employee ");

df.show(10) // to verify whether data is there in dataframe or not

df.printSchema(); // print schema as well for debug purpose.
    dataframe.write.mode(SaveMode.OverWrite).insertInto("default.ged_555")

val sampleDataFrame = hiveContext.sql("select * from default.get_555");

// again do print 10 records to verify your result for debug purpose
sampleDataFrame.show()
// again print schema of the target table
sampleDataFrame.printSchema()


text:
Q: What is the benefit of creating an Object in Java? I would like to know what is benefit of creating an object in Java.  Because i can refer to methods , variables etc.  of  that class without creating an object for example.  SecondClass second = null;  second.start();

A: An object is created so that you can encapsulate local state.  Each object instantiated from a class holds its own set of member variables.
Static methods do not require such encapsulation, but they don't hold local state, either.  You have to pass in any relevant state, and any variables you declare within the static method go out of scope when you leave the method body.
Any "advanced" OOP features such as inheritance and factory methods only have meaning within the context of an instantiated object.


text:
Q: Spring Circular placeholder reference while running an executable jar I'm facing "Circular Placeholder reference" exception while trying to run an executable jar file. Here's the detailed exception.

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'postProcessProperties' defined in class path resource [applicationContext.xml]: Circular placeholder reference 'processor.core.poolsize' in property definitions
     [echo]     at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
     [echo]     at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
     [echo]     at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
     [echo]     at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
     [echo]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
     [echo]     at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
     [echo]     at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
     [echo]     at com.autodesk.postprocess.engine.PostProcessEngine.start(PostProcessEngine.java:39)
     [echo]     at com.autodesk.postprocess.engine.PostProcessEngine.main(PostProcessEngine.java:29)

This is a spring application which uses an external property file to read values at startup. Here's the spring definition. This has worked pretty well till now.

<bean id="propertyConfig"
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_NEVER" />
        <property name="ignoreResourceNotFound" value="true" />
        <property name="locations">
            <list>
                <value>classpath:/postprocess.properties</value>
            </list>
        </property>
        <property name="properties">
            <props>
                <prop key="processor.core.poolsize">${processor.core.poolsize}</prop>
                <prop key="processor.max.poolsize">${processor.max.poolsize}</prop>
            </props>
        </property>
    </bean>

    <bean id="postProcessProperties"
        class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="properties">
            <props>
                <prop key="processor.core.poolsize">${processor.core.poolsize}</prop>
                <prop key="processor.max.poolsize">${processor.max.poolsize}</prop>
                <prop key="processor.polling.delay">${processor.polling.delay}</prop>
                <prop key="processor.polling.period">${processor.polling.period}</prop>
        </property>
    </bean>

I'm using shade plugin to generate the jar file. Here's a snippet

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.7.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.test.postprocess.engine.PostProcessEngine</mainClass>
                                </transformer>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/spring.handlers</resource>
                                </transformer>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/spring.schemas</resource>
                                </transformer>
                            </transformers>
                            <filters>
                                <filter>
                                    <artifact>:</artifact>
                                    <excludes>
                                        <exclude>META-INF/.SF</exclude>
                                        <exclude>META-INF/.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

I'm not sure what's causing this issue, as I've used similar pattern before in other executable jar files.
Any pointer will be appreciated.
Thanks

A: Its probably late to answer this, but adding it for benefit of someone facing similar issue.
I was able to fix it by changing the key names. e.g.
 <prop key="processor.core.poolsize">${processor.core.poolsize}</prop>
 <prop key="processor.max.poolsize">${processor.max.poolsize}</prop>

Was changed to something like
<prop key="processor.core.poolsize">${core.poolsize}</prop>
<prop key="processor.max.poolsize">${max.poolsize}</prop>

property-placeholder key and the key of property value to be filtered cannot be same.

A: I was having the same issue when trying to run a spring integration test using SpringJUnit4ClassRunner.  I was unsure of how to get my properties file loaded and after a few mis-steps, I found the @TestPropertySource annotation that allowed me to define the properties file(s) needed.
I had tried @PropertySource before that, and it does not work when you are running a spring integration test like this.
Hopefully this helps someone else.

A: Circular placeholder reference XXXX in property definitions

Above kind of exception will be thrown by the spring-framework when your property key name and value variable name are exactly the same.
Make sure your property should not look like
 key={$key}. Keeping different name for key and value will fix this issue.

A: It is probably not able to find the resource - postprocess.properties. Can you please remove this line -
<property name="ignoreResourceNotFound" value="true" />

Then if the resource is not found appropriate message should be displayed.

A: In your java code, if you are using keys declared in some .properties or yaml file other than application.properties or application.yaml, you will get this exception when you try to run your Spring application without specifying the profile to use.
Solution:
In my case, I'm using Spring Boot 2.4, here is one way to tell your app which profile(s) will be used:
Command Line:
java -jar -Dspring.profiles.active=DEV myapp.jar

If you're running your apps via an IDE such as IntelliJ:
Run -> Edit configurations
In your Spring Config, specify the profiles(s) that you want to be active (separated by commas):


text:
Q: Unable to install rpy2 on Mac OS X 10.9 I have been trying to install rpy2 on Mac OS X 10.9, but I have not been able to do so. I think there is a problem with the R shared library, but I read that R is installed with the shared library option as default. Any help would be very appreciated!
This is the log:

Downloading from URL https://pypi.python.org/packages/source/r/rpy2/rpy2-2.3.9.tar.gz#md5=86851a56f637e7b87709eb2b91dc5075 (from https://pypi.python.org/simple/rpy2/)
Running setup.py (path:/private/tmp/pip_build_root/rpy2/setup.py) egg_info for package rpy2
  running egg_info
  creating pip-egg-info/rpy2.egg-info
  writing dependency_links to pip-egg-info/rpy2.egg-info/dependency_links.txt
  writing pip-egg-info/rpy2.egg-info/PKG-INFO
  writing top-level names to pip-egg-info/rpy2.egg-info/top_level.txt
  writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'
  warning: manifest_maker: standard file '-c' not found

  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --ldflags
  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --cppflags
  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config LAPACK_LIBS

  returned an empty string.

  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config BLAS_LIBS

  returned an empty string.

  Configuration for R as a library:
    include_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/include',)
    libraries: ()
    library_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/lib',)
    extra_link_args: ('-F/opt/local/Library/Frameworks/R.framework/..', '-framework R')
   # OSX-specific (included in extra_link_args)
    framework_dirs: ('-F/opt/local/Library/Frameworks/R.framework/..',)
    frameworks: ('-framework R',)
  reading manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*patch*' found anywhere in distribution
  warning: no previously-included files matching '*diff*' found anywhere in distribution
  warning: no previously-included files matching '.hg' found anywhere in distribution
  no previously-included directories found matching 'dist'
  writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt'
Source in /private/tmp/pip_build_root/rpy2 has version 2.3.9, which satisfies requirement rpy2
Installing collected packages: rpy2
  Running setup.py install for rpy2
    Running command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/rpy2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-E3rnYf-record/install-record.txt --single-version-externally-managed --compile
  running install
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-intel-2.7
  creating build/lib.macosx-10.9-intel-2.7/rpy2
  copying ./rpy/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2
  copying ./rpy/rpy_classic.py -> build/lib.macosx-10.9-intel-2.7/rpy2
  copying ./rpy/tests.py -> build/lib.macosx-10.9-intel-2.7/rpy2
  copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.9-intel-2.7/rpy2
  creating build/lib.macosx-10.9-intel-2.7/rpy2/rlike
  copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike
  copying ./rpy/rlike/container.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike
  copying ./rpy/rlike/functional.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike
  copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike
  creating build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests
  copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests
  copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests
  copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests
  copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests
  creating build/lib.macosx-10.9-intel-2.7/rpy2/rinterface
  copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface
  creating build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests
  creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/constants.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/environments.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/functions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/help.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/language.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/methods.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/packages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/robject.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects
  creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests
  creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib
  copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib
  copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib
  copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib
  creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests
  copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests
  copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests
  creating build/lib.macosx-10.9-intel-2.7/rpy2/interactive
  copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive
  copying ./rpy/interactive/ipython.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive
  copying ./rpy/interactive/packages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive
  copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive
  creating build/lib.macosx-10.9-intel-2.7/rpy2/interactive/tests
  copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive/tests
  running build_ext
  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --ldflags
  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --cppflags
  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config LAPACK_LIBS

  returned an empty string.

  "/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config BLAS_LIBS

  returned an empty string.

  Configuration for R as a library:
    include_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/include',)
    libraries: ()
    library_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/lib',)
    extra_link_args: ('-F/opt/local/Library/Frameworks/R.framework/..', '-framework R')
   # OSX-specific (included in extra_link_args)
    framework_dirs: ('-F/opt/local/Library/Frameworks/R.framework/..',)
    frameworks: ('-framework R',)
  building 'rpy2.rinterface._rinterface' extension
  creating build/temp.macosx-10.9-intel-2.7
  creating build/temp.macosx-10.9-intel-2.7/rpy
  creating build/temp.macosx-10.9-intel-2.7/rpy/rinterface
  cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.9-intel-2.7/./rpy/rinterface/_rinterface.o
  clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
  clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
  error: command 'cc' failed with exit status 1
  Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/rpy2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-E3rnYf-record/install-record.txt --single-version-externally-managed --compile:
  running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/rpy2

copying ./rpy/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2

copying ./rpy/rpy_classic.py -> build/lib.macosx-10.9-intel-2.7/rpy2

copying ./rpy/tests.py -> build/lib.macosx-10.9-intel-2.7/rpy2

copying ./rpy/tests_rpy_classic.py -> build/lib.macosx-10.9-intel-2.7/rpy2

creating build/lib.macosx-10.9-intel-2.7/rpy2/rlike

copying ./rpy/rlike/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike

copying ./rpy/rlike/container.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike

copying ./rpy/rlike/functional.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike

copying ./rpy/rlike/indexing.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike

creating build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests

copying ./rpy/rlike/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests

copying ./rpy/rlike/tests/test_container.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests

copying ./rpy/rlike/tests/test_functional.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests

copying ./rpy/rlike/tests/test_indexing.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rlike/tests

creating build/lib.macosx-10.9-intel-2.7/rpy2/rinterface

copying ./rpy/rinterface/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface

creating build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_Device.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_EmbeddedR.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_Sexp.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_SexpClosure.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_SexpEnvironment.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_SexpExtPtr.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_SexpVector.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

copying ./rpy/rinterface/tests/test_SexpVectorNumeric.py -> build/lib.macosx-10.9-intel-2.7/rpy2/rinterface/tests

creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/constants.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/conversion.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/environments.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/functions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/help.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/language.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/methods.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/numpy2ri.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/packages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/pandas2ri.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/robject.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

copying ./rpy/robjects/vectors.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects

creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testArray.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testDataFrame.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testEnvironment.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testFormula.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testFunction.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testHelp.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testLanguage.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testMethods.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testNumpyConversions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testPackages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testPandasConversions.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testRObject.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testRobjects.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

copying ./rpy/robjects/tests/testVector.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/tests

creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib

copying ./rpy/robjects/lib/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib

copying ./rpy/robjects/lib/ggplot2.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib

copying ./rpy/robjects/lib/grid.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib

creating build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests

copying ./rpy/robjects/lib/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests

copying ./rpy/robjects/lib/tests/test_ggplot2.py -> build/lib.macosx-10.9-intel-2.7/rpy2/robjects/lib/tests

creating build/lib.macosx-10.9-intel-2.7/rpy2/interactive

copying ./rpy/interactive/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive

copying ./rpy/interactive/ipython.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive

copying ./rpy/interactive/packages.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive

copying ./rpy/interactive/process_revents.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive

creating build/lib.macosx-10.9-intel-2.7/rpy2/interactive/tests

copying ./rpy/interactive/tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/rpy2/interactive/tests

running build_ext

"/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --ldflags

"/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config --cppflags

"/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config LAPACK_LIBS

returned an empty string.

"/opt/local/Library/Frameworks/R.framework/Resources/bin/R" CMD config BLAS_LIBS

returned an empty string.

Configuration for R as a library:

  include_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/include',)

  libraries: ()

  library_dirs: ('/opt/local/Library/Frameworks/R.framework/Resources/lib',)

  extra_link_args: ('-F/opt/local/Library/Frameworks/R.framework/..', '-framework R')

 # OSX-specific (included in extra_link_args)

  framework_dirs: ('-F/opt/local/Library/Frameworks/R.framework/..',)

  frameworks: ('-framework R',)

building 'rpy2.rinterface._rinterface' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/rpy

creating build/temp.macosx-10.9-intel-2.7/rpy/rinterface

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.9-intel-2.7/./rpy/rinterface/_rinterface.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /private/tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/rpy2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-E3rnYf-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/rpy2
Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.1-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.1-py2.7.egg/pip/commands/install.py", line 279, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.1-py2.7.egg/pip/req.py", line 1380, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5.1-py2.7.egg/pip/req.py", line 699, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Python/2.7/site-packages/pip-1.5.1-py2.7.egg/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools,     tokenize;__file__='/private/tmp/pip_build_root/rpy2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-E3rnYf-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/rpy2

A: I had the same problem, this worked for me.
Just set these environment variables before you build rpy2:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

A: This has to do with the CC compiler (error is right before the Python traceback):
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.9-intel-2.7/./rpy/rinterface/_rinterface.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

Can you provide details regarding the origin of the C compiler (OS X dev tools ? elsewhere ?) and of Python (homebrew ? binary install ? other ?). Do you use specific environment variables (e.g. CFLAGS, or other likely to be picked up by clang) ?


text: Q: LSTM data structure I'm trying to predict trade international flows between countries using LSTM Neural Nets for which I have a panel structured data set with country-pair-year observations $x_{i, j, t}$. Given a  lookback period, I would have to specify the "lagged" periods $t-1, t-2$ until $t-$lookback for each pair $i, j$ in a year $t$. However, some of the country-pairs have missing years (maybe because they just didn't trade that year, or it wasn't recorded). Should I be filling up the missing datapoints with NA until the observation is lookback long?


text:
Q: Parsing java logs for multiline entries using bash I have loads of java logs on a Linux machine and I'm trying to find a grep expression or something else (perl, awk) that gives me the entire log entry on a match somewhere in its body. Logstash looks like it could do the job, but something with onboard tools would be way better.
An example should help best. Here is an exemplary log with 5 different entries:
25 Aug 2016 14:00:46,435 DEBUG [User][IP][rsc] An error occurred
java.Exception: Foo1
 at xyz
25 Aug 2016 14:00:46,436 Foo2 [User][IP][rsc] Some error occured
25 Aug 2016 14:00:46,436 DEBUG [User][IP][rsc] Somethin occured Foo3
25 Aug 2016 14:18:18,224 XYZ [User][IP][rsc] Some problems
More: bla1
More: bla2
USER.bla.bla: Blala::123 - 456
More: Could not open something
 at 567
 at 890
Caused by: Foo4: Could not open another thing
 at 123
 at 456
 ... 127 more
Caused by: gaga
 at a1a2a3
 at b3b3b3
 ... 146 more
25 Aug 2016 14:18:20,118 SSO [User][IP][rsc] Process: error -
Could not Foo5
<here is a blank line>

When I search for "Foo1", I need:
25 Aug 2016 14:00:46,435 DEBUG [User][IP][rsc] An error occurred
java.Exception: Foo1
 at xyz

When I search for "Foo2":
25 Aug 2016 14:00:46,436 Foo2 [User][IP][rsc] Some error occured

For "Foo3":
25 Aug 2016 14:00:46,436 DEBUG [User][IP][rsc] Somethin occured Foo3

For "Foo4":
25 Aug 2016 01:18:18,224 XYZ [User][IP][rsc] Some problems
More: bla1
More: bla2
USER.bla.bla: Blala::123 - 456
More: Could not open connection
 at 567
 at 890
Caused by: Foo4: Could not open connection
 at 123
 at 456
 ... 127 more
Caused by: gaga
 at a1a2a3
 at b3b3b3
 ... 146 more

And finally for "Foo5":
25 Aug 2016 01:18:20,118 SSO [User][IP][rsc] Process: error -
Could not Foo5

When I search for "Foo", everything should be returned.
Is something like this possible? Maybe even as a one liner?
I would like to use it in a Webmin Custom Commands module where I supply the expression via variable.
The only basic idea I have at the moment is search for the expression and use the "[" as pattern to identify where a new entry begins.
Thanks in advance for anybody who has an idea!

A: A sed solution - good for environments where awk is not allowed - same sed command is shown in oneliner and multiline forms
pat=$1
# oneliner form
#sed -nr '/^[0-9]{2} [a-zA-Z]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} /!{H; $!b}; x; /'"$pat"'/p; ${g; /^[0-9]{2} [a-zA-Z]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} /!q; /'"$pat"'/p }'
# multiline form
sed -nr '
/^[0-9]{2} [a-zA-Z]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} /!{H; $!b}
x
/'"$pat"'/p
${
g
/^[0-9]{2} [a-zA-Z]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} /!q
/'"$pat"'/p
}'

uses timestamp at beginning of line as record start - accumulates non-timestamp lines i.e. record body in holdspace - swaps holdspace and patternspace on record start - prints record if pattern is matched
special case for record start on last line - it has to be re-gotten from holdspace and separately tested for pattern match
shell quoting needed to construct sed command with pat bash variable

A: I set awk RS to the timestamp pattern for multiline records:
pat=$1
awk -vpat="$pat" '
BEGIN{
  RS="[0-9]{2} [a-zA-Z]{3} [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} "
}
$0 ~ pat {printf("%s%s", prt, $0)}
{prt=RT}
'


text:
Q: News web part filter not working on mobile Android app I have a filter set up on a news web part on my site, but when viewing this list of news in the SharePoint Android app, the items are not filtered. Is there a way to get this working?

A: What filter do you use?
Per my test, I could not reproduce your issue when I add a simple filter in news web part, SharePoint android app will display filtered news successfully.

Please make sure you have published the page after editing, if the issue still exists, switch to other mobile phones to compare the result.


text:
Q: jenkins bash script - remove directory path from find command results I need to search in my dist directory for minified .js and .css files within jenkins.
I have a bash script with a find cmd, like this:
for path in $(/usr/bin/find dist/renew-online -maxdepth 1 -name "*.js" -or -name "*.css" -type f); do
# URL of the JavaScript file on the web server
url=$linkTarget/$path
echo "url=$linkTarget/$path"

Where linkTarget is: http://uat.xxxx.com/renew-online.
I want to attach the minified files form dist/renew-online to the linkTarget,
for example:
http://uat.xxxx.com/renew-online/main-es2015.cf7da54187dc97781fff.js
BUT I keeping getting: http://uat.xxxx.com/renew-online/dist/renew-online/main-es2015.cf7da54187dc97781fff.js
I've tried with -maxdepth 0 also but can't get the correct url - newbie at scripts!
Hopefully one of you guys can help, thanks your time

A: This can be achieved by using 'find' command only:
/usr/bin/find dist/renew-online -maxdepth 1 \( -name "*.js" -o -name "*.css" \) -type f -printf "$linkTarget/%f\n"

It is also recommended to isolate 'or' statements inside round brackets.

A: This is more a bash question than a jenkins one and you have multiple ways to do it.
If all your files are in a single path, and actually you are forcing with the depth, you can use a cut
for path in $(/usr/bin/find dist/renew-online -maxdepth 1 -name "*.js" -or -name "*.css" -type f | cut -d'/' -f2); do

In the other hand the here https://serverfault.com/questions/354403/remove-path-from-find-command-output by the usage of -printf '%f\n'
Please note as well that the usage of find in a for loop is fragile and it is recommended to use a while https://github.com/koalaman/shellcheck/wiki/SC2044
EDIT
the field used in cut depends on the folders you have in your find syntax. The most accurate way is the one in the serverfault link above


text:
Q: Visual Studio Team Services - Sync w/ Github Repository I'm attempting to set my company up with a Visual Studio Team Services repository, and sync it with a private Github repo.  There are only a handful of us that work on the tech side, but some like to use VSTS and some like to use Github.
The documentation everywhere says that you can sync the two. That way changes made in Github will show up in Visual Studio Online, and vice-versa. I'm learning that's easier said than done.
I've attempted to follow the directions provided by Microsoft, and have not found any solutions to my problem. I can clone the existing Github repo easily enough, but changes there don't sync to the VSTS repo.
I tried the following instructions as well:
How to synchronize VSTS and Github respositories when commits are made
The build passes, and it even shows what commits it has picked up. However new files and/or any changes do not appear in the VSTS repo at all.
Can someone please help??

A: Simple way to sync VSTS repo from Github repo.

*

*Add GitHub service endpoint to your VSTS (Setting > Service)

*Create an Empty build definition with GitHub repository in your VSTS

*Select Repository tab and specify Connection, Repository and Default branch. (set Clean to true if necessary)

*Select Triggers tab and check Continuous integration, Batch changes and specify Branch filters

*Select Options tab and check Allow Scripts to Access OAuth Token

*Select Build tab and add Command Line step/task (Tool: [Git tool path]; Arguments: push https://$(System.AccessToken)@[xxx].visualstudio.com/[teamproject]/_git/[repo name] HEAD:[branch]; Working folder: $(Build.SourcesDirectory)

A: You can do it all in the same directory by adding a second remote origin, if you've already added VSTS as 'origin', then run:
git remote add github https://github.com/user/repo.git

then you can push up your changes you've made to the two repos
to push to VSTS:
git push origin

and then to push to GitHub
git push github

See this github doc page
If you wanted to automate this you might want to set it up as a scheduled task on a machine, or you can get it connected to git hooks on VSTS?

A: Actually you can use "Git Mirror" from marketplace.
https://marketplace.visualstudio.com/items?itemName=nobitagamer.gitmirror


text:
Q: Bootstrap 3.x Tab not working - Uncaught TypeError: Object [object Object] has no method 'tab' I'm trying to get tabs working on my app, and following the Bootstrap docs to set them up results in an error: Uncaught TypeError: Object [object Object] has no method 'tab' . I have a JSFiddle of the problem code: Not Working Fiddle

A little more info, which could be relevant: my app, built using Symfony, is compiling Bootstrap with Less, hence needing to use my own Bootstrap resources for the Fiddle example. There could be a problem with the compiling that's causing this, but I do see the Tab javascript code in there...

The HTML:

Tasks

Schedule

Upgrade

        Tab 1

        Tab 2

        Tab 3

The JS:
$('#campaignTabs a').click(function (e) {
    e.preventDefault();
    $(this).tab('show');
});

Any help would be appreciated!

EDIT: My original link was accidentally using links to local resources, so naturally that wasn't working! I updated to using resources from Dropbox, so hopefully those are working now.

A: You are miss the CSS and JS files.
I update your jsfidle at http://jsfiddle.net/LS37A/3/ to fix your problem by point to official bootstrap CSS and JS at http://getbootstrap.com/getting-started/#download-cdn

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">

A: Working fiddle Demo with added live links of bootstrap library.

Problem with your fiddle

links are dead see-
http://kiomedia.virt/app_dev.php/js/93eb36e_bootstrap_1.js
http://kiomedia.virt/app_dev.php/css/fabf8b3_bootstrap_1.css

A: as answered in the chat, your compiled bootstrap.js is faulty. Either use the prebuilt js in dist folder, or make sure your compiler is including all required .js libs.


text:
Q: How to Transform / Reverse SVG Icon When it is Used as a Click Icon in Accordion Menu
I'm trying to create accordion menu with jQuery and SVG.
Then, I attempt to use SVG Arrow Icon as a click button, but I can not make the Icon rotate flexibly.
Here is my Codepen.
//SVG Arrow Icon
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
    viewBox="0 0 48 48" enable-background="new 0 0 48 48" width="30" height="30" class="svg_arrow">
<rect class="st0" width="30" height="30"/>
<path class="st1" d="M16,28l7.5-7.5c0.9-0.9,2.2-0.9,3.1,0L34,28" stroke="#2dac9a"/>
</svg>

//SVG CSS
svg{
  fill: #2dac9a;
  position: absolute;
  top: 15px;
  right: 10px;
  transform: rotate(180deg);
}

.tr{
  transform: rotate(0deg);
}

$('.faq_accordion').on('click', function () {
  $(this).children().eq(1).slideToggle(300);
  $(this).children('.faq_li').toggleClass('b');
  $(this).children('.faq_li').find('svg')[0].setAttribute('class', 'tr'); //does not work...
  $(".faq_accordion .faq_answer").not($(this).children().eq(1)).slideUp(300);
});

When I click the SVG Arrow Icon, the 'setAttribute' Method works,
but I do not know how to reverse position when I click it once again.
It seems to me that 'toggleAttribute' method also does not work...(I tried it.)
I appreciate if you teach me the effective way.
I 'm sorry if this question is already solved in another section.
Thank you.

A: .tr{
  transform: rotate(0deg);
} // revome this

svg{
     fill: #2dac9a;
     position: absolute;
     top: 15px;
     right: 10px;
     transform: rotate(180deg);
     transition: transform 300ms; // Add this
}

.b svg {
    transform: rotate(0deg);
} // Add this


text:
Q: Определить номер текущего элемента и вывести его в span Подскажите пожалуйста, есть небольшой переключатель div блоков на jQuery. Пытаюсь сделать "пагинацию" для него, но в какой-то момент всё пошло не так.

$(document).ready(function(){
    $(".divs div").each(function(e) {
        if (e != 0)
            $(this).hide();
    });

    $("#next").click(function(){
        if ($(".divs div:visible").next().length != 0)
            $(".divs div:visible").next().show().prev().hide();
        else {
            $(".divs div:visible").hide();
            $(".divs div:first").show();
        }
        return false;
    });

    $("#prev").click(function(){
        if ($(".divs div:visible").prev().length != 0)
            $(".divs div:visible").prev().show().next().hide();
        else {
            $(".divs div:visible").hide();
            $(".divs div:last").show();
        }
        return false;
    });
});

1

2

3

4

5

6

7

Prev
1
/
7
Next

Помогите реализовать примерно такой вид переключателей: "< Prev 2 / 7 Next >"

A: В целом для задачи

Определить номер текущего элемента и вывести его в span

достаточно добавить строку
$(".divs-nav__cur").text($(".divs div:visible").index()+1);

Однако, для упрощения кода я бы сделал следующее:

*

*объединить обработчики кликов вперед/назад

*не использовал :visible, это несколько усложняет  код, проще использовать css-класс, например, .current.

    $("#next,#prev").click(function(e){
        e.preventDefault();
        var lastIdx = $(".divs div").length - 1;
        var cIdx = $(".divs .current").index();

        if($(this).attr('id') == 'next'){
           cIdx = cIdx == lastIdx  ? 0 : cIdx + 1;
        }
        else{
           cIdx = cIdx == 0 ? lastIdx : cIdx - 1;
        }

        $(".divs div").removeClass("current")
              .eq(cIdx)
              .addClass("current");

       $(".divs-nav__cur").text(cIdx + 1);
    });
.divs div { display: none; }
.current { display: block !important; }

1

2

3

4

5

6

7

   Prev
   1
   /
   7
   Next