text:
Q: "The Google Maps Embed API must be used in an iframe." I am trying to embed a Google Maps in an iFrame (as a pop up on my page). It works perfectly when I view it remotely, but as soon as I make it "live" it gives me the error "The Google Maps Embed API must be used in an iframe". It would seem like one of my links isn't working, but I have checked everything and can't seem to find anything. Any help would be greatly appreciated! Here is my code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-     strict.dtd">

<title></title>
<link rel="stylesheet" href="menu_style.css" type="text/css" />

 <link rel="stylesheet" type="text/css" href="http://fancyapps.com/fancybox/source/jquery.fancybox.css?v=2.1.4" media="screen" />

If you would like directions / to view this on a map, please click here.

A: fancyapps.com is not a CDN, when you request the both files(js+css) from a webserver they don't deliver the files.
Upload the files to your own server or load them from  a CDN(e.g. cloudflare):

 <link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen" />


text:
Q: how to fix locale error I just did a fresh install of ubuntu using debootstrap.  When I do sudo aptitude upgrade, I get this error message:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:en",
    LC_ALL = (unset),
    LANG = "en_US.ISO-8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Can someone please tell me how to resolve this issue?  I see a lot of postings similar to this online but none of them seems to resolve the problem.
I am using Ubuntu 14.04 LTS.  Thanks.

FYI:
$ locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.iso88591
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX

and
$ locale
LANG=en_US.ISO-8859-1
LANGUAGE=en_US:en
LC_CTYPE="en_US.ISO-8859-1"
LC_NUMERIC="en_US.ISO-8859-1"
LC_TIME="en_US.ISO-8859-1"
LC_COLLATE="en_US.ISO-8859-1"
LC_MONETARY="en_US.ISO-8859-1"
LC_MESSAGES="en_US.ISO-8859-1"
LC_PAPER="en_US.ISO-8859-1"
LC_NAME="en_US.ISO-8859-1"
LC_ADDRESS="en_US.ISO-8859-1"
LC_TELEPHONE="en_US.ISO-8859-1"
LC_MEASUREMENT="en_US.ISO-8859-1"
LC_IDENTIFICATION="en_US.ISO-8859-1"
LC_ALL=

A: A permanent solution for locale issue is to export the locale variables in your ~/.bash_profile.  You can also use /etc/profile file instead of .bash_profile to have the change take effect for all users on the system.
echo "export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
" >> ~/.bash_profile

Don't forget to start a new shell or to manually source  ~/.bash_profile.

A: The debootstrap doesn't create a locale. So we use something else as a locale. Use this command:
sudo locale-gen en_US.ISO-8859-1

I hope this helps!

A: This works for me.

*

*export LANGUAGE=en_US.UTF-8

*export LANG=en_US.UTF-8

*export LC_ALL=en_US.UTF-8

*sudo locale-gen en_US.UTF-8

*sudo dpkg-reconfigure locales

A: An Ubuntu desktop should be set up with UTF-8 encoding. For some reason your system tries to set the latin1 locale en_US.ISO-8859-1. You should really change that.
Maybe the setting takes place in /etc/default/locale.
Whereever it happens, change it to
LANG=en_US.UTF-8

or else you will encounter various locale related surprises.

A: Add LC_ALL="en_US.UTF-8" to /etc/environment and then restart the instance/machine
For more info visit this blog
http://www.pixelninja.me/how-to-fix-invalid-locale-setting-in-ubuntu-14-04-in-the-cloud/

A: What worked for me is as follows:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

For a permanent solution you can put

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

in your .zshrc or .bashrc
Ref

*

*https://jee-appy.blogspot.com/2016/02/set-locale-on-ubuntu-permanent-solution.html

*https://www.thomas-krenn.com/en/wiki/Perl_warning_Setting_locale_failed_in_Debian

redpajama_set_name: RedPajamaStackExchange


text:
Q: run a jar file (generated by ant) in command line I have a build.xml file that works fine.
The problem is that the generated jar file, and I need to run it without 'ant run'
How can I run the jar file?
running with
java -jar Main.jar main.Main

gives me:
Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/graphdb/GraphDatabaseService

This is how I'm creating the jar file (build.xml):
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
    <jar destfile= "${jar.dir}/${ant.project.name}.jar" basedir="${build.dir}">
        <manifest>
            <attribute name="Main-Class" value="${main-class}"/>
        </manifest>
    </jar>
</target>

<target name="compile">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${build.dir}/${conf.dir}"/>
    <javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="classpath" includeantruntime="false"/>
    <copy todir="${build.dir}/${conf.dir}">
        <fileset dir="${conf.dir}"/>
    </copy>
</target>

<target name="run" >
    <java fork="true" classname="${main-class}">
        <classpath>
            <path refid="classpath"/>
            <path location="${jar.dir}/${ant.project.name}.jar"/>
        </classpath>
    </java>
</target>

<path id="classpath">
    <fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>

The "ant run" task works fine with this jar.
How can I run this project without ant?

A: Use java -cp Main.jar main.Main, -jar is for bundled jars with a Manifest saying which class is to be used as the main class. What you're doing with -cp (and within your ant build file) is just putting it on the main path: you're specifying main.Main as the main class explicitly, not within a manifest.
You should also put the other jars on the classpath (e.g. -cp lib/example1.jar:lib/example2.jar:Main.jar). Depending on what matches **/*.jar, there may be a number of them.

A: Have you tried:
java -jar Main.jar

Have you checked that Main.jar does in fact include your org/neo4j/graphdb/GraphDatabaseService class?

A: The neo4j.jars are missing at runtime. Add a classpath parameter like:
java -cp yourLibDir -jar Main.jar

A: You need to add -classpath xxx.jar in your command line


text:
Q: enumerating availability zones for ECS cluster VPC subnets in CloudFormation When I manually create an AWS ECS cluster in the UI, by default it shows the default VPC with the default subnets selected, one in each availability region, which I infer to be best practice.
I'm creating a new ECS Fargate deployment using CloudFormation, and I believe the best practice is to create a new VPC with its own subnets, similarly each in a different availability zone.
Rather than hard-coding them in CloudFormation, how can I enumerate the availability zones for the current region and create subnets for each of them?
I'm new to CloudFormation. I've seen that there is a built-in function to enumerate availability zones, so with some thought I'm sure I can figure this out on my own. And I'll be sure to add that as an answer here. But being what surely is a common use case, perhaps there is an existing best-practices template somewhere that already shows how to do that so I don't have to reinvent it. (I haven't been able to find it immediately by searching.)


text:
Q: R data.frame columns into single list I can't seem to find answer though I'm sure it's already been asked...but I wanted to extract and combine a subset of data.frame columns into a single list without use of any packages. For example:
DF <- data.frame(a = c(1,2,3), b = c(4,5,6), c = c(7,8,9))
test <- c(DF[,1], DF[,2], DF[,3]) # Gives what I want
test <- c(DF[,1:3]) # Doesn't give what I want

So desired output would be a single list of values 1:9.
I'd want the subset to be dynamically assigned so I can't do it the way I typed it even though it is giving the output I'd like. The only other way I could think is to have a loop and incrementally add one column at a time e.g. test <- c(test, DF[,i])

A: Maybe you can try c within do.call
test <- do.call(c,DF)

such that
> test
a1 a2 a3 b1 b2 b3 c1 c2 c3
 1  2  3  4  5  6  7  8  9

A: You can just unlist:
unlist(DF)

# a1 a2 a3 b1 b2 b3 c1 c2 c3
# 1  2  3  4  5  6  7  8  9

And to get rid of names if needed:
unlist(DF, use.names = FALSE) # or also unname(unlist(DF))

# [1] 1 2 3 4 5 6 7 8 9

A: An option with flatten from purrr
library(dplyr)
library(purrr)
DF %>%
   flatten_dbl
#[1] 1 2 3 4 5 6 7 8 9


text:
Q: Expected number of visits to a state in a Markov Chain
Attached above is an image from an exercice I have worked on, I have answered all questions but particularily struggled with question 4. When we were given the solutions, the correction simply said: $E_3(N(4)) = \frac{\rho_{34}}{1- \rho{44}}$ which equals infinity because the denominator is zero, but I struggle to understand how the expression was achieved. Is there a general formula for this? I couldn't find it in my class notes. How can we get the expected number of visits to class 3 starting at 2 , for instance?

A: If you start in state 3, then you enter state 4 with positive probability, and once you enter state 4, you stay there indefinitely. Therefore, you're expected to visit state 4 infinitely many times, if you start in state 3.


text:
Q: Avoid crawling part of a page with "googleoff" and "googleon" I am trying to tell Google and other search engines not to crawl some parts of my web page.
What I do is:
<!--googleoff: all-->

<select name="ddlCountry" id="ddlCountry">
<option value="All">All</option>
<option value="bahrain">Bahrain</option>
<option value="china">China</option>
</select>

<!--googleon: all-->

After I uploaded the page, I noticed that search engines are stilling rendering elements within the googleoff markup.
Am I doing something wrong?

A: "googleon" and "googleoff" are only supported by the Google Search Appliance (when you host your own search results, usually for your own internal website).
They are not supported by Google's web-search at all.

A: Is replaced by data attribute data-nosnippet only to div, span, or section elements, as shown here: https://developers.google.com/search/docs/advanced/robots/robots_meta_tag?hl=en#data-nosnippet-attr

A: The correct googleon tag is as given below:
    <!--googleon: all>


text:
Q: How to set gui languages to english in MS Access I have installed a german version of MS Office Professional. How can I get away from the german translation of all GUI elements.
I like to see the english names of the properties, like I have to use in VBA and find them in the Dokumentation.
Edit:
My Solution: I downloaded

*

*SW_DVD5_Office_Professional_Plus_2016_W32_English_MLF_X20-41353.ISO

*SW_DVD9_Office_Multi_Lang_Pack_2016_W32_MultiLang_Disk_1_MLF_X20-42853.ISO

from Microsofts Software Portal (https://www.microsoft.com/Licensing/servicecenter/Downloads/DownloadsAndKeys.aspx).
I first install the eng-Version of Office and than the german language pack. I now can switch between two languages like I want.

A: There is no way other than install a US version of Access/Office on another (virtual) machine.
That's what I've done.


text:
Q: SQL Server : window function to avoid duplicate rows I need your help please with my problem below. I have data in a SQL Server database that shows whether a user has logged in a security system or not.
The structure of the data is as following:
id SystemId    Time         PC   User   Logged
-----------------------------------------------
1    2      20171025 16:01   1   John    In
2    2      20171025 17:41   4   Mike    In
3    2      20171025 17:58   1   John    Out
4    2      20171025 17:58   4   Mike    Out
5    2      20171025 19:21   4   Peter   In
6    2      20171025 21:45   4   Peter   In
7    2      20171025 22:59   4   Peter   Out

I need to develop a script that runs every 30 minutes and must show when there is no user logged in the security monitoring systems.
The below script does the job with the exception where we have system/network issues and users are forcibly logged out and in again without the forced log off being recorded in the database. i.e. User logged out was not recorded in row 6 but instead only the logged in was.
This means that when I run my script yesterday at 23:30 to check if Peter (in the example) was logged in and doing his job, the result came back showing that Peter was logged in, when in fact he wasn't. (See row 6)
I believe my solution is a window function (partition by) that skips any consecutive rows that have identical values in column (PC, User, Logged). This way I will avoid the double counting. But I don't know whether I am at the right direction or not.
SELECT
    SystemId,
    SUM(CASE
           WHEN Logged = 'In' THEN 1
           WHEN Logged = 'Out' THEN -1
           ELSE 0
        END) AS Connected
FROM
    log.SecurityLogs
GROUP BY
    SystemId
HAVING
    SUM(CASE
           WHEN Logged = 'In' THEN 1
           WHEN Logged = 'Out' THEN -1
           ELSE 0
        END) = 0

A: The state of the user changes between In and Out.  From what you descrdibe, there are no nested states (i.e., you wouldn't expect In-->In-->Out-->Out).
So, just compare the maximum times:
select sl.SystemId,
       max(case when logged = 'In' then time end) as in_time,
       max(case when logged = 'Out' then time end) as out_time
from log.SecurityLogs sl
group by sl.SystemId;

If you want those whose most recent event was "in", then:
select sl.SystemId,
       max(case when logged = 'In' then time end) as in_time,
       max(case when logged = 'Out' then time end) as out_time
from log.SecurityLogs sl
group by sl.SystemId
having max(case when logged = 'In' then time end) > max(case when logged = 'Out' then time end);


text:
Q: Queries Facebook sdk 2.1 for unity3d I am developing an application on Unity and need location information of my friends. Facebook Graph API says i have to submit the app for review before accessing these informations. Since my target platform is not facebook but iOS and Android. Why do i need to submit the app here?
Facebook also asks for apk build and iOS link, Do they review this like iTunes? Please clarify.
If yes, How can i submit the build when its still in development phase ?
Any suggestions would really be helpful.
Thanks in advance...


text:
Q: ListModel , QMap, Xml parsing i am trying to parse some car2go response xml and create my c++ model. then expose that model to qml.
Question: which map to use Qmap or qmultimap ? and how to parse ?
so looks car2go response :
http://code.google.com/p/car2go/wiki/vehicles_v2_0
THanks in advance

A: You can do it much easier than that. There are 2 ways:
1) Use XmlListModel and specify the xml option as a path
2) Since JSON is supported, use AJAX technique - use XmlHttpRequest in QML and post a request to the server and operate on your JSON object by getting it using JSON.parse(xml_http_request.responseText)


text:
Q: Coherent absorption of light in photosynthesis I am reading this article about vibronic coherence in photosynthesis right now, and I came across the following line about initial photon absorption in Photosystem II:

For a single cell, only one solar photon is likely to impinge on the cell during the timescale of energy transfer of a single excitation. The coherence volume of the photon is much larger than cellular dimensions, meaning that the photon can interact with all suitable chromophores in a single cell.

This confused me quite a bit, because the size of the average plant cell is on the order of 10 um or so, while the wavelengths of light that power photosynthesis have wavelength around 500 nm. So how is it possible that this kind of light can interact with every chromophore in the cell at once?

A: Coherence volumes are explained in this abstract, though I don't think I can read more than the abstract of that paper to say for sure.
It seems that the coherence volume is the quantum representation of the size of a photon, which is in practice a more relevant value than the wavelength due to the distribution of possible quantum positions the photon is actually occupying.
This is illuminated a little bit by the next bit after your quote, which answers a question I had about how one photon can excite all the chromophores:

From a quantum mechanical perspective, the photon will initially excite all resonant chromophores within the coherence volume in a superposition of states; however, this collective excitation will decay on femtosecond time scale resulting in the excitation being localised to a single protein system.


text:
Q: Angular2: Can't resolve all parameters for my directive I'm writing a directive which has dependencies on TemplateRef<any> and ViewContainerRef. But my directive cannot get these dependencies injected in. The following are all my code:
main.ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

app.module.ts
import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { HelloWorld } from './HelloWorld.directive';

@NgModule({
    imports: [BrowserModule],
    declarations: [AppComponent, HelloWorld],
    bootstrap: [AppComponent]
})
export class AppModule { }

app.component.ts
import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    template: `
           Hello world!
           <template [lcngHw]="true">

</template>
           `
})
export class AppComponent {
}

HelloWorld.directive.ts
import { Directive } from '@angular/core';
import { Input } from '@angular/core';

import { TemplateRef, ViewContainerRef } from '@angular/core';

@Directive({
    selector: '[lcngHw]'
})
export class HelloWorld{
    constructor(private tf: TemplateRef<any>, private vc: ViewContainerRef){

    }

    @Input()
    set lcngHw(value: boolean) {
        if (value) {
            this.vc.createEmbeddedView(this.tf);
        }
        else {
            this.vc.clear();
        }
    }
}

And here is my transpiled HelloWorld.directive.js:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var core_1 = require('@angular/core');
var core_2 = require('@angular/core');
var HelloWorld = (function () {
    function HelloWorld(tf, vc) {
        this.tf = tf;
        this.vc = vc;
    }
    Object.defineProperty(HelloWorld.prototype, "lcngHw", {
        set: function (value) {
            if (value) {
                this.vc.createEmbeddedView(this.tf);
            }
            else {
                this.vc.clear();
            }
        },
        enumerable: true,
        configurable: true
    });
    __decorate([
        core_2.Input()
    ], HelloWorld.prototype, "lcngHw", null);
    HelloWorld = __decorate([
        core_1.Directive({
            selector: '[lcngHw]'
        })
    ], HelloWorld);
    return HelloWorld;
}());
exports.HelloWorld = HelloWorld;

Then I run my app, and I get the following error:
Error: (SystemJS) Can't resolve all parameters for HelloWorld: (?, ?).

Error: Can't resolve all parameters for HelloWorld: (?, ?).
          at CompileMetadataResolver.getDependenciesMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14268:21)
          at CompileMetadataResolver.getTypeMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14169:28)
          at CompileMetadataResolver.getDirectiveMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:13944:30)
          at eval (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14037:51)
          at Array.forEach (native)
          at CompileMetadataResolver.getNgModuleMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14031:51)
          at RuntimeCompiler._compileComponents (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16721:49)
          at RuntimeCompiler._compileModuleAndComponents (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16659:39)
          at RuntimeCompiler.compileModuleAsync (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16650:23)
          at PlatformRef_._bootstrapModuleWithZone (http://localhost:5000/node_modules/@angular/core/bundles/core.umd.js:6707:29)
      Evaluating http://localhost:5000/ViewContainerRefApp/main.js
      Error loading http://localhost:5000/ViewContainerRefApp/main.js
          at CompileMetadataResolver.getDependenciesMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14268:21)
          at CompileMetadataResolver.getTypeMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14169:28)
          at CompileMetadataResolver.getDirectiveMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:13944:30)
          at eval (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14037:51)
          at Array.forEach (native)
          at CompileMetadataResolver.getNgModuleMetadata (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:14031:51)
          at RuntimeCompiler._compileComponents (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16721:49)
          at RuntimeCompiler._compileModuleAndComponents (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16659:39)
          at RuntimeCompiler.compileModuleAsync (http://localhost:5000/node_modules/@angular/compiler/bundles/compiler.umd.js:16650:23)
          at PlatformRef_._bootstrapModuleWithZone (http://localhost:5000/node_modules/@angular/core/bundles/core.umd.js:6707:29)
      Evaluating http://localhost:5000/ViewContainerRefApp/main.js
      Error loading http://localhost:5000/ViewContainerRefApp/main.js

I also copied the code from this live sample and I got the same error.
It seems that TemplateRef<any> and ViewContainerRef's metadata are not registerd. But I cannot find out the reason. Anyone can help me? Thank you.

A: You have to use one of these options for structural directive:

<template [lcngHw]="true">

</template>

This way you can inject TemplateRef in your component
Plunker Example
This also might be useful:

*

*Angular2: How is ngfor expanded

A: If you are using a tsconfig.json, add emitDecoratorMetaData: true
If you are using Visual Studio without a tsConfig.json add the
TypeScriptEmitDecoratorMetadata tag to your project file
Note: you will probably need more tags
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <TypeScriptRemoveComments>false</TypeScriptRemoveComments>
    <TypeScriptSourceMap>true</TypeScriptSourceMap>
    <TypeScriptTarget>ES5</TypeScriptTarget>
    <TypeScriptJSXEmit>None</TypeScriptJSXEmit>
    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
    <TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
    <TypeScriptModuleKind>System</TypeScriptModuleKind>
    <TypeScriptModuleResolution>node</TypeScriptModuleResolution>
    <TypeScriptOutFile />
    <TypeScriptOutDir />
    <TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
    <TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
    <TypeScriptMapRoot />
    <TypeScriptSourceRoot />
    <TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
    <TypeScriptEmitDecoratorMetadata>True</TypeScriptEmitDecoratorMetadata>
</PropertyGroup>


text:
Q: Effect of baseline on change over time in mixed models? I was wondering whether and how it is possible to model, within some sample, change of outcome over time which is dependent on the baseline value of this outcome, using a mixed model?
Imagine, for example, a situation where the same knowledge test is administered 5 times to the same group of people. Since the questions are always the same, the students will learn the correct answers over time and will score higher on each administration. However, in those who scored high in the first place, there will be less change than in those who at first scored poorly. Thus, it is quite apparent that the rate of change depends on the baseline value.
I know that in mixed models, I could include a random slope for time in addition to a random intercept, to account for the fact that in some students there will be more change than in others. However, am I right to assume that it is not possible or meaningful to include the value of the first measurement as a baseline covariate (and its interaction with time)? It doesn't "feel" right to me in any case. But on the other hand, it boggles my mind that it wouldn't be possible to explicitly model the effect of the baseline value using a fixed effect. I must admit I'm somewhat confused over this. Any help would be highly appreciated.

A: This seems to be a growth model scenario. Suppose we had the following variables:

*

*occasion: taking values 1,2,3,4,5 to reflect the occasion that test was taken, 1 being the first, or baseline.

*ID: the identifier of the each participant.

*score: the test score for this participant on this test occasion.

Random intercepts for ID will take care of the different baselines (subject to having sufficient participants.
Thus a simple linear mixed effects model for these data is (using lme4 syntax):
score ~ occasion + (1|ID)
or
score ~ occasion + (occasion|ID)
where the latter allows the linear slope of occasion to vary among participants
However, for the particular example in the OP, we have the additional problem that the score variable is bounded above by the maximum score on the test. To allow for this, we need to cater for non-linear growth. This could be achieved in a variety of ways, the simplest being the addition of quadratic and possibly cubic terms to the model:
score ~ occasion + I(occasion^2) + I(occasion^3) + (1|ID)
Let's look at a toy example:
require(lme4)
require(ggplot2)

dt2 <- structure(list(occasion = c(0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4), score = c(55.5, 74.5, 92.5, 97.5, 98.5, 54.5, 81.5, 94.5, 97.5, 98.5, 47.5, 68.5, 86.5, 96.5, 98.5, 56.5, 86.5, 91.5, 97.5, 98.5, 60.5, 84.5, 95.5, 97.5, 99.5, 73.5, 87.5, 96.5, 98.5, 99.5), ID = structure(c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L), .Label = c("1", "2", "3", "4", "5", "6"), class = "factor")), .Names = c("occasion", "score", "ID"), row.names = c(25L, 26L, 27L, 28L, 29L, 31L, 32L, 33L, 34L, 35L, 37L, 38L, 39L, 40L, 41L, 43L, 44L, 45L, 46L, 47L, 49L, 50L, 51L, 52L, 53L, 55L, 56L, 57L, 58L, 59L), class = "data.frame")

m1 <- lmer(score~occasion+(1|ID),data=dt2)

fun1 <- function(x) fixef(m1)[1] + fixef(m1)[2]*x

ggplot(dt2,aes(x=occasion,y=score, color=ID)) + geom_line(size=0.65) + geom_point() +
 stat_function(fun=fun1, geom="line", size=1, colour="black")

Here we have plots for 6 participants that have been measured over 5 successive occasions, and we have plotted the fixed effects with the solid black line. Clearly this is not a good model for these data, so we introduce a quadratic term, and then a cubic term, after centering the data to reduce collinearity:
dt2$occasion <- dt2$occasion - mean(dt2$occasion)

m2 <- lmer(score~occasion + I(occasion^2) + (1|ID),data=dt2)
fun2 <- function(x) fixef(m2)[1] + fixef(m2)[2]*x + fixef(m2)[3]*(x^2)

m3 <- lmer(score~occasion + I(occasion^2) + I(occasion^3) + (1|ID),data=dt2)
fun3 <- function(x) fixef(m3)[1] + fixef(m3)[2]*x + fixef(m3)[3]*(x^2) + fixef(m3)[4]*(x^3)

p2 <- ggplot(dt2,aes(x=occasion,y=score, color=ID)) + geom_line(size=0.5) + geom_point()

p2 + stat_function(fun=fun2, geom="line", size=1, colour="black")

Here we see that the quadratic model is an obvious improvement over the linear-only model, but is not ideal because it underestimates the scores for the final measurement, and overestimates it for the previous one.
The cubic model on the other hand appears to work very well:
p2 + stat_function(fun=fun3, geom="line", size=1, colour="black")

A slightly more sophisticated approach is to recognise the upper bound explicity, and use (for example) a logistic growth curve model. One way to accomplish this is to transform the outcome to a proportion (of the upper bound), say $\pi$ and then model the logit of this proportion, $\pi/(1-\pi)$ as the outcome of a linear mixed effects model. In addition to recognising the upper bound, this has the added advantage of modelling heteroscasticity in the residuals of the untransformed data, since it seems likely that over successive tests (assuming that the results get better) there will be less variance.
Putting this into practice, as expected, this also models the overall trend in the data very well:
pi <- dt2$score/100
dt2$logitpi <- log(pi/(1-pi))

m0 <- lmer(logitpi~occasion+(1|ID),data=dt2)
funlogis <- function(x) 100*exp(fixef(m0)[1] + fixef(m0)[2]*x)/(1+exp(fixef(m0)[1] + fixef(m0)[2]*x))
p2 + stat_function(fun=funlogis, geom="line", size=0.5, colour="black")

The following shows the cubic mode and the logistic growth models plotted together, and we see very little difference between them, though as mentioned above we may prefer the logistic growth model due to the heteroscedasticity issue:
p2 +  stat_function(fun=fun3, geom="line", size=1, colour="black")  +
stat_function(fun=funlogis, geom="line", size=1, colour="blue")

A more sophisticated approach still would be to use a nonlinear mixed effects model where the logistic growth curve is modelled explicitly, allowing for random variation in the parameters of the logistic function itself.


text:
Q: XSL-FO external-graphic not showing uri is not recognized Issue
Load a image using the fo:external-graphic tag.  I have a parameter with the base64 value of the image.
<xsl:param name="Name">data:image/jpg;base64,/9j/4AAQSkZJRgA..</xsl:param>

I have tried to load the image using
<fo:external-graphic src="{$Name}" width="40mm" height="18.25mm" >
                        </fo:external-graphic>

Error
I get  an error uri is not recognized
XSLT
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"  xmlns:m="http://www.ibm.com/maximo"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format" >
  <xsl:output method="xml" version="1.0" encoding="UTF-8"  indent="yes" />

  <xsl:param name="Name">data:image/jpg;base64,/9j/dddds....ghP/Z</xsl:param>
  <xsl:template match="/">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

      <fo:layout-master-set>
        <fo:simple-page-master master-name="hello"
                    page-height="11in"  page-width="8.5in" margin-top="1in"
                    margin-bottom="1in" margin-left="1in" margin-right="1in">
          <fo:region-body margin-top="1in" margin-bottom=".5in"/>
        </fo:simple-page-master>
      </fo:layout-master-set>

      <fo:page-sequence master-reference="hello">
        <fo:flow flow-name="xsl-region-body">
          <fo:block font-size="18pt" text-align="center" font-weight="bold">
            Hello World!

            <fo:external-graphic src="{$Name}"/>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>

    </fo:root>
  </xsl:template>
</xsl:stylesheet>

I am using Fonet.dll


text:
Q: bootstrap with fontAwesome issue I m sonal.
I am designing a website.
In which i m using font-Awesome and bootstrap combine.
But some where confused in linking.
my linking files are:
     <link rel="stylesheet" href="../goyal/bootstrap-3.0.0/dist/css/
                  bootstrap.min.css">
      <link rel="stylesheet" href="../goyal/bootstrap-3.0.0/dist/css/
               bootstrap-theme.min.css">
      <script src="../goyal/bootstrap-3.0.0/dist/js/bootstrap.min.js"></script>

        <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
       <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/
        bootstrap-combined.no-icons.min.css" rel="stylesheet">
       <link href="../goyal/font-awesome/css/font-awesome.css" rel="stylesheet">
       <link rel="stylesheet" href="../goyal/font-awesome/css/font-
        awesome.min.css">
       <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

Where i am lacking. I am in new in this feild.

A: The only issue I can see is that you are linking both full and minified version of a few of the files.
Try this instead:
<link rel="stylesheet" href="../goyal/bootstrap-3.0.0/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../goyal/bootstrap-3.0.0/dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../goyal/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="../goyal/bootstrap-3.0.0/dist/js/bootstrap.min.js"></script>

The .min.css and .min.js files are supposed to be used in production, they ususaly have shorter variable names etc to make the files smaller, but are ALOT harder to read.
I would recomend linking to the files that are not minified while developing then switch to the minified files when going 'live' with the site to keep the bandwidth down.


text:
Q: When running --coverage-html in phpunit a test fails when it shouldn't I have a test that will always pass if I run phpunit but fails if I run phpunit --coverage-html.
One of the key points in this test is that I'm testing the ordering. The ordering seems to change when I run the coverage. What does --coverage do that could interfere with how my code is being executed?
Versions:

*

*PHP 7.1.15

*PHPUnit 6.5.6

*Laravel 5.5.34

Phpunit test
    public function testGetAUsersInvites()
    {
        $carbon = \Carbon\Carbon::create();

        $user = factory(User::class)->create();

        $user->invites()->saveMany(factory(Invite::class, 7)->make());
        // Users who are a part of the communication
        $communciationUsers = factory(User::class, 2)->create();

        // Save users to the communication
        $user->invites()->each(function($invite) use ($communciationUsers, $carbon) {
            $invite->communication->users()->attach($communciationUsers);
            // Added some messages
            $invite->communication->messages()->save(factory(Message::class)->make([
                'messageType' => 'subject',
                'created_at' => $carbon->subDays($invite->id) // force created date so we can predict the ordering
            ]));
        });

        $invite = $user->invites->first();
        $lastInvite = $user->invites->last();

        Passport::actingAs($user, ['full'], 'api');

        $this->get(self::URL . 'user/invites/list', ['Accept' => 'application/json'])
            ->assertStatus(200)
            ->assertJson([
                "data" => [
                    [
                        "id" => $invite->id,
                    ],
                    [],[],[],[],[]
                    [
                        "id" => $lastInvite->id,
                    ]
                ],
            ]);
    }

A: This ended out being an ordering issue.
When you run coverage your test time significantly increases. This caused my factories to take longer to create which also meant that my created_at times were off by milliseconds than what they usually are.
I fixed this by hard coding my created_at value in my test.


text:
Q: What steps are required to setup PostgreSQL and create a db in Windows? I have installed PostgreSQL 12 from https://www.2ndquadrant.com/en/blog/pginstaller-install-postgresql/. and put \C:\...\PostgreSQL\12\bin in the PATH.
In an admin powershell I execute psql.exe -U postgres and enter the password I chose in the installation wizard. Now I'm in a shell. I want to create a database so I run createdb but it seems the database is not created:
postgres-# \l
                                          List of databases
   Name    |  Owner   | Encoding |       Collate       |        Ctype        |   Access privileges
-----------+----------+----------+---------------------+---------------------+-----------------------
 postgres  | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 |
 template0 | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 | =c/postgres          +
           |          |          |                     |                     | postgres=CTc/postgres
 template1 | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 | =c/postgres          +
           |          |          |                     |                     | postgres=CTc/postgres
(3 rows)

postgres-# createdb demo
postgres-# absolute nonsense
postgres-# \l
                                          List of databases
   Name    |  Owner   | Encoding |       Collate       |        Ctype        |   Access privileges
-----------+----------+----------+---------------------+---------------------+-----------------------
 postgres  | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 |
 template0 | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 | =c/postgres          +
           |          |          |                     |                     | postgres=CTc/postgres
 template1 | postgres | UTF8     | German_Germany.1252 | German_Germany.1252 | =c/postgres          +
           |          |          |                     |                     | postgres=CTc/postgres
(3 rows)

I assume that my command createdb demo fails without error response as the intentionally wrong next command absolute nonsense fails as well. But I don't know how else to create a db, and moreover I'd like to know why this doesn't work and how to debug this.

A: In the psql client, you can only run SQL statements and psql commands (which start with a backslash).
So, to create a database, you would have to run
CREATE DATABASE demo;

The semicolon in the end is required to tell psql that the statement is complete.

The prompt you see:
postgres-#

shows that you didn't do that and psql is waiting for a continuation line. You see that from the -.
To delete the input buffer and get back to the prompt
postgres=#

simply press Ctrl+C. Then you can enter the CREATE DATABASE statement.

createdb is not an SQL statement, but an executable (program) that you would call from the shell (or from cmd.exe on Windows).
So the alternative is not to start psql, but type
createdb -U postgres demo


text:
Q: JavaScript equivalent to angularjs ng-if If I want to remove/add element on DOM I just use ng-if and the code under it does not compile into to DOM, can I do the same using pure js? I don't want the HTML code inside my js code.
Hiding it using CSS:

Will still insert the element to the DOM.
EDIT
The condition for showing or not is based on a flag like:
var show = false; //or true

A: You can try something like this:
Idea:

*

*Create an object that holds reference of currentElement and its parent (so you know where to add).

*Create a clone of current element as you want to add same element after its removed.

*Create a property using Object.defineProperty. This way you can have your own setter and you can observe changes over it.

*To toggle element, check

*

*If value is true, you have to add element. But check if same element is already available or not to avoid duplication.

*If false, remove element.

var CustomNGIf = function(element, callback, propertyName) {
  var _value = null;

  // Create copies of elements do that you can store/use it in future
  this.parent = element.parentNode;
  this.element = element;
  this.clone = null;

  // Create a property that is supposed to be watched
  Object.defineProperty(this, propertyName, {
    get: function() {
      return _value;
    },
    set: function(value) {
      // If same value is passed, do nothing.
      if (_value === value) return;
      _value = !!value;
      this.handleChange(_value);
    }
  });

  this.handleChange = function(value) {
    this.clone = this.element.cloneNode(true);
    if (_value) {
      var index = Array.from(this.parent.children).indexOf(this.element);

      // Check if element is already existing or not.
      // This can happen if some code breaks before deleting node.
      if (index >= 0) return;
      this.element = this.clone.cloneNode(true);
      this.parent.appendChild(this.element);
    } else {
      this.element.remove();
    }

    // For any special handling
    callback && callback();
  }
}

var div = document.getElementById('infoPage');
const propName = 'value';
var obj = new CustomNGIf(div, function() {
  console.log("change")
}, propName);

var count = 0;
var interval = setInterval(function() {
  obj[propName] = count++ % 2;
  if (count >= 10) {
    window.clearInterval(interval);
  }
}, 2000)

 test


text:
Q: phpmyadmin: #1055 - 'information_schema.s.SCHEMA_NAME' isn't in GROUP BY I am getting the following error in PHPMyAdmin when I attempt to do click "Databases" tab:

#1055 - 'information_schema.s.SCHEMA_NAME' isn't in GROUP BY

Please advise on what code in phpmyadmin file needs to be updated to fix this query and how to re-write it...
Seems to be a bug in PHPMyAdmin, but I don't wanna wait around until they fix in a "later" release.


text:
Q: How to make main window wait until a newly opened window closes in C# WPF? I am new to WPF as well as C#, please bear with me.
I have a main window which opens up a new window. Now this new window is a prompt whether or not to overwrite a file, and the main window accesses a public variable in the new window to check for the prompt's result.
But I can't get the main window processing to wait until the new window closes.
 Window1 Win = new Window1();
 Win.Show();

 if (Win.pr_res == 1)
 {
      abc.Text = "File to be overwritten";
      File.Delete(_destination);
      Start();
 }
 else
 {
      abc.Text = "Operation Aborted";
 }

I tried adding a while loop checking another public boolean in the main window, but that just hangs the entire program.
 while(!_closecheck);

Any suggestions are welcome.

A: Use ShowDialog() method as it Opens a window and returns only when the newly opened window is closed.
syntax
Win.ShowDialog();

A: Use ShowDialog instead of Show -
Win.ShowDialog();

From MSDN -

Opens a window and returns only when the newly opened window is
  closed.

A: Although ShowDialog works fine, you may set MainWindow.IsEnabled = false if you don't like that modal window. Sometimes it's useful to see the main window.

A: Instead of using the .Show() property for openning/showing the window, use .ShowDialog() instead :)


text:
Q: Bootstrap dropdown won't appear I'm trying to get some Bootstrap examples to work, which they all have worked so far except for dropdown, what do I need to add/change on this code to make the dropdown appear?
http://jsbin.com/kuhin/2/edit
<!DOCTYPE html>

<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<title>Bootstrap 101 Template</title>

Hello, world!

Action

Another action

Something else here

Separated link

A: Initially I thought it might also require dropdown.js which is not the case when you include the minified js file as it includes all the necessary plugins.
However you seem to miss to wrap it in a
. You can find the fiddle here. Also you are importing jquery twice, remove the import at the bottom.

A: *

*You'll want to remove one of the jquery includes as it causes conflict.

*It appears you've removed the parent div.dropdown container. As mentioned in Bootsrap documentation:

Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .open class on the parent list item.

*So you need to preserve parent div.dropdown:

    Dropdown trigger

Action

Another action

Something else here

Separated link

*

*As Tim C mentioned, bootstrap.min.js DOES include dropdown functionality and no further includes are necessary.


text:
Q: Изучение Qt с азов. Фигачил в Дельфе/Билдере потом на долго пересел на .NET.
Но появилась перспектива проекта на Qt на никсах.
Порекомендуйте литературу в которых начинается с азов для новичков/дурачков до более серьезного.
A: Вообще, начинающим Qt-шникам советуют Макса Шлее. Однако, на мой взгляд, тут лучше начать что-то писать и по ходу спрашивать у Qt-doc. Лично меня  Qt-шная справка очень порадовала.
A: Для старта рекомендую вот эти тренинги просмотреть. Мы собрали туда все вопросы, которые обычно возникают у новичков.


text:
Q: Uncaught Error: Syntax error, unrecognized expression: div.[data-target='2.nj.ryan']?

Filter:

<select class="filterby">
  <option value="all">Show All</option>
  <option value="1">One</option>
  <option value="2">Two</option>
  <option value="3">Three</option>
</select>

Location:

<select class="filterby">
  <option value="all">All Locations</option>
  <option value="nj">NJ</option>
  <option value="ny">NY</option>
  <option value="pa">PA</option>
</select>

Test:

<select class="filterby">
  <option value="all">All Locations</option>
  <option value="ryan">Ryan</option>
  <option value="ny">NY</option>
  <option value="pa">PA</option>
</select>

Test One NJ

Test One NY

Test One PA

Test Two NJ Ryan

Test Two NY

Test Two PA

Test Three NJ

Test Three NY

Test Three PA Ryan

Test One NJ

Test One PA

Test One PA

Test Two NJ Ryan

Test Two NY

Test Two NY Ryan

div.[data-target='"+ filters +"' this line should be error. How to solve this problem?

A: There are a few problems:

*

*div.[attr] is invalid. There should be no . in between the tag name and the brackets

*Attribute selectors are not like class selectors, you cannot use . to look for multiple of them in a space separated list of words.

*

*Solution: use multiple attribute selectors such as [data-attr~="word"][data-attr~="word2"]

Filter:

<select class="filterby">
  <option value="all">Show All</option>
  <option value="1">One</option>
  <option value="2">Two</option>
  <option value="3">Three</option>
</select>

Location:

<select class="filterby">
  <option value="all">All Locations</option>
  <option value="nj">NJ</option>
  <option value="ny">NY</option>
  <option value="pa">PA</option>
</select>

Test:

<select class="filterby">
  <option value="all">All Locations</option>
  <option value="ryan">Ryan</option>
  <option value="ny">NY</option>
  <option value="pa">PA</option>
</select>

Test One NJ

Test One NY

Test One PA

Test Two NJ Ryan

Test Two NY

Test Two PA

Test Three NJ

Test Three NY

Test Three PA Ryan

Test One NJ

Test One PA

Test One PA

Test Two NJ Ryan

Test Two NY

Test Two NY Ryan


text:
Q: Ubuntu freezes when RAM usage peaks I've been often annoyed on Ubuntu when there's a peak in RAM -- for example when starting Android Studio's emulator or when a Chrome tab freezes -- the whole GUI freezes and so I'm forced to either wait for it come back or go to TTY and kill the culprit.
Is it possible that Ubuntu manages RAM very differently than Windows does? On Windows, the app itself freezes but not the whole GUI. Is there a way to make Ubuntu behave more like Windows in that respect?

A: Modern OSs use paging to manage memory. It gives some advantadges to the system like being able to use more memory than you have physically, securing some sensitive memory area (like the kernel reserved memory) amongst other things that I can point some reference to if you want to learn more about paging.
But what is paging?
I'll skip the technicals and give you an analogy. Imagine you have an encyclopedia collection, A to Z, and being a curious person you like to spend afternoons reading it. You keep all of the encyclopedias on your bookshelf and you have a reading table which you can have 4 books on.
One day you are reading about "Sailing", which is on the letter S encyclopedia. At some point you might need to read about something else related, like "Winds" on letter W book. As long as you have it on your reading table you can quickly open it and read what you need, then go back to the "Sailing" book. Problem is, since your reading table can only fit 4 books, the chances are high you will need a book that isn't there already. Then you would need to take one of the books from the table back to the shelf, grab the book you need to the reading table and read it.
Ok, what does this whole book story has to do with my freezes? Well, the computer does something similar all the time. To be able to use more memory than it physically has, the computer divide memory in pages, which are small continuous blocks of memory. Those don't need to be on RAM (the "reading table") all the time, they might be stored on your disk (the "bookshelf"). If the RAM is full and the CPU needs to read/write on those pages stored on disk, one of the pages on RAM will be stored on disk, and the page requested will be loaded on RAM.
This is a Kernel job, so it is transparent to the user and programs. But since reading and writing to the disk is much slower than reading and writing on RAM, you will notice those freezes.
On Linux, there is a partition called swap, which is used to store those extra pages. Windows does the same thing, but I think it uses a file. The system kernel itself won't freeze, since it will be on locked ("non-swappable") pages.
The image below (from an wikipedia article) illustrates the concept of paging (and virtual memory, which we don't need to go into). Those blocks represents the pages being allocated on both memory or disk.

I believe the reason it might look like Linux is freezing too, is because Unity (the desktop GUI) might experience the delays caused by this swapping, while on Windows they might keep the desktop GUI code in locked ("non-swappable") pages. This is just a brainstorm theory though.

A: I had similar problems in the past. I changed swappiness of ubuntu in order to make the OS write RAM to HD much later.
Read an answer to change swappiness here: How do I configure swappiness?
I can not guarantee this helps to solve your problem, but in my opinion it is the best bet.


text:
Q: Access Siebel WSDL through Python Packages (SOAPpy, suds, requests) I am trying to access Siebel WSDL through python module.
My End Scenario is creating Service request in Siebel through external link.
I have tried,
Requests, Suds and soapPY.
When Importing WSDL file to SOAP-UI after making changes to URL and appending user-name and password to same and making changes in body, Its working for me and giving 200 server response.
When trying to access the same with postman(rest client) and giving URL with user name and password added. And passing the required XML as part of body I am getting 500 internal server error.
Not understanding where difference is coming in the way the request is going through soapUI and postman.
What difference in I have to make, to make it work with postman.
What is the right way to consume a WSDL service in python.
SOAP Input:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aud="http://siebel.com/Service/ServiceReqs" xmlns:aud1="http://www.siebel.com/xml/%20Service%20Request%20IO">
   <soapenv:Header/>
   <soapenv:Body>
      <aud:SRQueryByExample_Input>
         <aud1:ListOfServiceRequestIo>
            <aud1:ServiceRequestOpen Operation="?">
            <aud1:IntegrationId>0000123</aud1:IntegrationId>
        </aud1:ServiceRequestOpen>
        </aud1:ListOfAudetemiServiceRequestIo>
      </aud:SRQueryByExample_Input>
   </soapenv:Body>
</soapenv:Envelope>

I need to know here if Integration ID is something that I need to pass dynamically how to achieve same.
Many thank for your time

A: If you are getting a 500 error, that means the request is stuck at the web server, and has not yet hit the siebel server behind it. If the error is due to something missing in the xml, you will get a "SBL-" error code in the response. Until you get that, and are getting 500 errors, the request SOAP has not yet hit the siebel server.
I don't know python, but my suggestion would be to capture the RAW message going from your python script and compare that to the RAW message in SOAP-UI. Specially check the SOAPAction string, it should have a forward slash (/) and a colon (:). "Content-Type", "text/xml"
For further debugging, you will have to check the webserver logs to see how the message arrives there.


text:
Q: How to use dplyr to perform descriptives and a chi-square test within function my question has a similar one  [here][1], but as long dplyr changes the way it does the things, I believe my question is original and could help other people.
First, I'm trying to Inside a function, reports descriptive statistics and run some statistical inference tests, such as chi-square.
This syntax works very well:
> desc_chi <- function(group_var) {   group_var <- enquo(group_var)   j
> <- dataset %>%
>     group_by(!!group_var) %>%
>     summarise(n = n())   print(j) }
desc_chi(GENDER)

But when I add a Chi-square test, it stops and reports an error:
desc_chi <- function(group_var) {
  group_var <- enquo(group_var)
  j <- dataset %>%
    group_by(!!group_var) %>%
    summarise(n = n(),
      pvalue=chisq.test(.$LOCATION, .$group_var))
  print(j)
}

Column pvalue must be length 1 (a summary value), not 9
Thanks for all support you always provide.

A: How about this?
 desc_chi <- function(dataset, group_var) {
  group_var <- enquo(group_var)
  dataset %>%
      group_by(!!group_var) %>%
      summarise(n = n()) %>%
      mutate(chisq_pval = chisq.test(n)$p.value)
 }

mtcars %>%
     desc_chi(cyl)

# A tibble: 3 x 3
    cyl     n chisq_pval
   <dbl> <int>      <dbl>
1  4.00    11      0.315
2  6.00     7      0.315
3  8.00    14      0.315


text:
Q: Forcing Matlab to not overlap XTickLabels with YTickLabels Is there any way to prevent XTickLabels from overlapping with YTickLabels in a figure in Matlab?
Good:

Bad (-2 and -5 are overlapping):

Code (I would prefer a solution that is not customized to this particular piece of code):
Good:
wavelet_name = 'coif1';
[~,psi,xval] = wavefun(wavelet_name,10);
scale = 1;
shift = 1;
x_min = -1;
x_max = 8;
plot([x_min, shift+xval.*scale, x_max],[0, psi, 0]);
axis([x_min x_max -2 3]);
set(gca,'FontSize',50)
save_figure( [wavelet_name '_scale' num2str(scale) '_shift' num2str(shift)] )

Bad: (I only changed  x_min = -1; to x_min = -5;)
wavelet_name = 'coif1';
[~,psi,xval] = wavefun(wavelet_name,10);
scale = 1;
shift = 1;
x_min = -5;
x_max = 8;
plot([x_min, shift+xval.*scale, x_max],[0, psi, 0]);
axis([x_min x_max -2 2]);
%title('Sym2 Wavelet');
set(gca,'FontSize',50)
save_figure( [wavelet_name '_scale' num2str(scale) '_shift' num2str(shift)] )

I use Matlab R2014a with Windows 7 SP1 x64 Ultimate.

A: It seems that this problem has been fixed in Matlab R2014b. The execution of your code privides the following figure.


text:
Q: Как можно указать в java диапазон натуральных чисел (0-6)? Стоит задача написать программу, которая в зависимости от значения переменной, содержащей значение текущего часа выводит в терминал соответствующее этому часу сообщение. Задачу необходимо решить через Switch. В сутках 24 часа и писать 24 кейса будет не лучшим вариантом. Как можно в 1 case уместить значения от 0-6 , во 2й кейс 7 - 12 и тд. Пробовал через выражение inputNumber >=0 && inputNumber <=6, результат получается boolean и в кейс он не записывается.

A: Попробуйте так:
switch (inputNumber) {
    case 0:
    case 1:
    ...
    case 6:
        System.out.println("0-6");
        break;
    case 7:
    case 8:
    ...
    case 12:
        System.out.println("7-12");
        break;
    default:
        System.out.println("дичь какая-то");
}

Всё равно 24 кейса, но действие-то можно написать только один раз для группы последовательно идущих кейсов.

A: Если бы диапазоны часов были распределены равномерно по 6 часов:
[ 0,  6) -> [ 0.. 5],
[ 6, 12) -> [ 6..11],
[12, 18) -> [12..17],
[18, 24) -> [18..23]

достаточно было бы обойтись четырьмя кейсами, разделив часы на ширину диапазона 6, как указано в комментариях и ответе Труфальдино (здесь и дальше используется синтаксис switch-выражения, доступного с Java 14):
public static String timeRange(int h) {
    return switch(h / 6) {
        case 0 -> "Доброй ночи! 0 - 6";
        case 1 -> "Доброе утро! 6 - 12";
        case 2 -> "Добрый день! 13 - 18";
        case 3 -> "Добрый вечер! 18 - 24";
        default -> "Здравствуйте";
    };
}

Для неравномерного диапазона в "новом" синтаксисе switch можно перечислять значения через запятую (формально также будет 4 case):
public static String timeRange(int h) {
    return switch(h) {
        case  0,  1,  2,  3,  4,  5, 6 -> "Доброй ночи! 0- 6"; // 7 значений
        case  7,  8,  9, 10, 11, 12 -> "Доброе утро! 7 - 12";  // 6 значений
        case 13, 14, 15, 16, 17, 18 -> "Добрый день! 13 - 18"; // 6 значений
        case 19, 20, 21, 22, 23 -> "Добрый вечер! 19 - 23";    // 5 значений
        default -> "Здравствуйте";
    };
}

Также для неравномерных диапазонов можно было бы создать enum с параметрами from, to и с методом для выбора соответствующего значения по входному значению hour:
enum TimeOfDay {
    NIGHT(0, 6),
    MORNING(7, 12),
    DAY(13, 18),
    EVENING(19, 23);

    private final int from;
    private final int to;

    TimeOfDay(int f, int t) {
        this.from = f;
        this.to = t;
    }

    public static TimeOfDay byHour(int hour) {
        return Stream.of(TimeOfDay.values())
            .filter(td -> td.from <= hour && hour <= td.to)
            .findFirst()
            .orElseThrow(() -> new IllegalArgumentException(
                "Incorrect hour value, 0..23 expected, hour = " + hour
            ));
    }
}

public static String timeRange(int h) {
    return switch(TimeOfDay.byHour(h)) {
        case NIGHT -> "Доброй ночи! 0- 6";
        case MORNING -> "Доброе утро! 7 - 12";
        case DAY -> "Добрый день! 13 - 18";
        case EVENING -> "Добрый вечер! 19 - 23";
    };
}

A: К сожалению, в Java не возможен такой вариант как switch(true){...}, и в case должны быть константы, не могут быть выражения, но можно пойти немного другим путем, тем более что switch(true) я бы предпочел обычный if.
Суть метода заключается в том что мы можем использовать условия как систему счисления т.е. к примеру бинарную ([4][2][1] - только один бит включен) , правда пример у меня на 10-ричной, но разницы почти нет.
public class MyClass {
    public static int test(int n) {
        int case1 = (n >= 0 && n <= 6) ? 1: 0;
        int case2 = (n >= 7 && n <= 12) ? 2: 0;
        int case3 = (n >= 13 && n <= 18) ? 3: 0;

        switch(case1 + case2 + case3) {
          case 1:
            return 1;
          case 2:
            return 2;
          case 3:
            return 3;
          default:
            return 4;
        }
    }
    public static void main(String args[]) {
      int i;
      for (i = 0; i <24; i++ ){
        System.out.println("для " + i +  " кейс " + test(i));
      }
    }
}

Вариант с переменными caseN просто легче читается, по идее можно было   записать все в одно выражение, но его сложно было бы поддерживать. А используемый вариант позволяет хранить кейсы например в функциях.
Этот код может казаться избыточным в данном случае, но если бы речь шла о больших диапазонах или о более запутанных кейсах, возможно пересекающихся, т.е. когда несколько условий могут быть истинны(только бинарная система) то такой подход имеет смысл. А так же он имеет смысл если условия могут быть динамичны и задаваться через конфиг.

A: Не суди строго, но я не понял задачу.
  LocalTime localTime=LocalTime.now();
    int h= localTime.plusHours(6).getHour(); //каждые  шесть часов
    int t= h/6; //период между 6 часами
    switch (t) {
    case 1:
        System.out.print("utro :=" + h);
    break ;
    case 2:
    System.out.print("den :=" + h);
    break;
    case 3:
    System.out.print("vecher :=" + h);
    break ;
    default:
    System.out.print("noch :=" + h);
    break ;
        }

A: Создайте такой enum:
public enum FuzzyTime {
    NIGHT, MORNING, OTHER;

    public static FuzzyTime fromHour(int hour) {
        if (hour <= 6) {
            return NIGHT;
        } else if (hour <= 12) {
            return MORNING;
        } else {
            return OTHER;
        }
    }
}

Теперь напишите switch так:
int hour = ...;
switch (FuzzyTime.fromHour(hour)) {
    case NIGHT:
        System.out.println("Сейчас ночь");
        break;
    case MORNING:
        System.out.println("Сейчас утро");
        break;
    default:
        System.out.println("Сейчас что-то другое");
        break;
}


text:
Q: Approximating the erf function I was trying to find an approximate solution to the following:
$\DeclareMathOperator\erf{erf}$
$$\frac12 \sqrt{\pi}  \erf\left (\frac{x-2}{\sqrt{10}}\right) + \frac12 \sqrt{\pi} \erf \left(\frac{x+2}{\sqrt{10}}\right) = \frac25 \sqrt{\pi}$$
This naturally equals
$$\int_0^{\frac{x-2}{\sqrt{10}}} e^{-t^2} dt+ \int_0^{\frac{x+2}{\sqrt{10}}} e^{-t^2} dt = \frac25 \sqrt\pi$$
What I tried then was to use the taylor approximation and then solve the polynomial equations.. but the results I obtained were not consistently getting close to the correct solution ($x \sim 1.71$), obtained with wolfram alpha
In fact, using $\displaystyle \int_0^x e^{-t^2}dt = x - \frac{x^3}{3} + \frac{x^5}{10} - \frac{x^7}{42} + \dots$
I obtained the following approximations ($x_i$ indicates the result obtained considering the terms until $x^i$)
$$x_1 \sim 1.12\ \ \ \ x_3 = -4.975 \ \ \ x_5 = 1.59 \ \ \ x_7 = -4.718 | 3.729 | 1.755 \ \ \ \ x_9 = 1.70$$
Questions
1) If I take into account the whole series, what assures me that only one solution will be found (with $x_7$, for example, I find $3$ real solutions)
2) I understand that as long as I am near $0$, the solution will be good approximation. But a priori I don't know what values $x$ is going to take, so the error can be large as large as $x$ and the Taylor approximation is useless.
3) Why is (eventually) the error going to $0$ if one takes the whole series?
I don't think I have a clear understanding of the passage between Taylor polynomial (valid only near a point $x_0$) and series (why exactly they are convergent everywhere (well, at least in the case of $e^x$) if we consider an an infinite amount of terms)

A: $\DeclareMathOperator\erf{erf}$Approximations of $\erf$ according to the Handbook of Mathematical Functions:
http://people.math.sfu.ca/~cbm/aands/page_299.htm

A: There actually is a closed form if you allow functions implemented in a Python Library named SciPy. Notice that this function is just a special case of the Marcum Q function:
$$Q_m(a,b)=1-e^{-\frac{a^2}2}\sum_{k=0}\frac{\text P\left(m+k,\frac{b^2}2\right)}{k!}\left(\frac{a^2}2\right)^k=1-a^{1-m}\int _0^b x^v e^{-\frac{x^2+a^2}2}\text I_{v-1}(ax)dx$$
where appears the Bessel I and the Lower Normalized Incomplete Gamma "P" functions. Also, notice that it is the Non-Central Chi-Squared Distribution which is just the standard scipy.special.chndtr
$$\text{chndtr}(x,d,n)=1-Q_\frac n2(\sqrt d,\sqrt x)$$
and the special case follows after integrating using the function's definition. Note that Wolfram Alpha's "NonCentralChiSquareDistribution" command gives a positive sign in the integral whereas simply using the Marcum Q function definition gives the negative sign due to Wolfram Alpha's not being the compliment unlike Wikipedia' definition:
$$\text{chndtr}(x,p,1)=\int_0^x \frac{\cosh(\sqrt d\sqrt x)}{\sqrt{2\pi x}e^\frac{d+x}2}=\frac12\left(\text{erf}\left(\frac{\sqrt x-\sqrt d}{\sqrt 2}\right) +\text{erf}\left(\frac{\sqrt x+\sqrt d}{\sqrt 2}\right)\right)\mathop=^\text{set}p$$
Now use SciPy's chndtrix function and a small change of variable to get a "closed form" since these functions are only in a some code databases:
$$\text{erf}\left(\frac{\sqrt x+\sqrt d}{\sqrt 2}\right)+\text{erf}\left(\frac{\sqrt x+\sqrt d}{\sqrt 2}\right)\mathop=2p\implies x=\text{chndtrix}(p,d,1) $$
Now to test it on SciPy software, which I do not know how to access. In short, the solution to your equation is a quantile of a Noncentral Chi Squared Distribution with a Noncentral Parameter of $1$. Let me finish with a few variable changes. Please correct me and give me feedback!
Here is the solution:
$$\text{erf}\left(\sqrt \frac x2-\sqrt \frac d2\right) +\text{erf}\left(\sqrt \frac x2+\sqrt \frac d2\right)= \frac2{\sqrt\pi}\frac {2\sqrt\pi}5=2p\implies x=\text{chndtrix}(p,d,1)$$
$$\mathop\iff ^{x\to a x}$$
$$ \text{erf}\left(\sqrt \frac {ax}2-\sqrt \frac {d}2\right) +\text{erf}\left(\sqrt \frac {ax}2+\sqrt \frac {d}2\right)=\frac 45=2p\implies ax=\text{chndtrix}(p,d,1) $$
set:
$$\sqrt{\frac{a x}2}=\frac x{\sqrt {10}},\sqrt{\frac d2}=\frac 2{\sqrt{10}},2p=\frac45\implies a=\frac 15,p=\frac 25,d=\frac45$$
Therefore:
$$\boxed{\frac12 \sqrt{\pi}  \text{erf}\left (\frac{x-2}{\sqrt{10}}\right) + \frac12 \sqrt{\pi} \text{erf }\left(\frac{x+2}{\sqrt{10}}\right) = \frac25 \sqrt{\pi}\implies x=5\,\text{chndtrix}\left(\frac25,\frac45,1\right)}$$
which is 5 times the the value of $x$ such that a Non-central Chi Squared Distribution, with non centrality parameter of $1$ and $\frac45$ degrees of freedom, has a probability of $\frac25$.

A: As you suspect, Taylor series expansions are only accurate near one point. To obtain a polynomial approximation that's good over an entire interval, the standard technique is to use Chebyshev approximation. The easiest approach is to just do interpolation at some carefully chosen nodes (the Chebyshev nodes). If you have access to Matlab, there is an add-on called Chebfun that does a very good job of constructing these sorts of approximations.

A: use this
$$\text{Solve}\left[\frac{x \left(-2 \left(\sqrt{2 \left(\sqrt{2}+2\right) \pi } \left(\text{erf}\left(\frac{\sqrt{2-\sqrt{2}}-4}{2 \sqrt{10}}\right)+\text{erf}\left(\frac{\sqrt{2-\sqrt{2}}+4}{2 \sqrt{10}}\right)\right)-\sqrt{2 \left(2-\sqrt{2}\right) \pi } \left(\text{erf}\left(\frac{\sqrt{\sqrt{2}+2}-4}{2 \sqrt{10}}\right)+\text{erf}\left(\frac{\sqrt{\sqrt{2}+2}+4}{2 \sqrt{10}}\right)\right)\right) x^2-\left(\sqrt{2}-1\right) \sqrt{\left(2-\sqrt{2}\right) \pi } \left(\text{erf}\left(\frac{\sqrt{\sqrt{2}+2}-4}{2 \sqrt{10}}\right)+\text{erf}\left(\frac{\sqrt{\sqrt{2}+2}+4}{2 \sqrt{10}}\right)\right)+\left(\sqrt{2}+1\right) \sqrt{\left(\sqrt{2}+2\right) \pi } \left(\text{erf}\left(\frac{\sqrt{2-\sqrt{2}}-4}{2 \sqrt{10}}\right)+\text{erf}\left(\frac{\sqrt{2-\sqrt{2}}+4}{2 \sqrt{10}}\right)\right)\right)}{2 \sqrt{2}}=\frac{2 \sqrt{\pi }}{5},x\right]$$
gives x aproximately 1.7106147726585592

A: $\DeclareMathOperator\erf{erf}$Since
$\erf'(x)
=\dfrac{2}{\sqrt{\pi}}e^{-x^2/2}
$,
once you have a routine
for $\erf(x)$,
you can use Newton's iteration
$\left(x_{n+1}
=x_n-\dfrac{f(x_n)}{f'(x_n)}
\right)$
to find the root
of
$f(x) = 0$.


text:
Q: How to get put $scope.value name inside $('input:radio[name="optradio"][value="$scope.t_color"]') .attr('checked', true); I am retrieving a row from a database using Angular JS and putting the data inside an editable form; the form consists of multiple radio buttons. I want to make sure when the data is retrieved; the particular radio button gets selected based on the value given in $scope.radio_val

    <input type="radio" ng-model="tube" class="form-check-input ml-5"
           name="optradio" value="Grey">

    Grey

    <input type="radio" ng-model="tube" class="form-check-input ml-5"
           name="optradio" value="Black">

    Black

    <input type="radio" ng-model="tube" class="form-check-input ml-5"
           name="optradio" value="Culture">

    Culture

    <input type="radio" ng-model="tube" class="form-check-input ml-5"
           name="optradio" value="Urine">

    Urine

The above contains a portion of the radio button in the edit form page.
$scope.t_color=data.tube;
$('input:radio[name="optradio"][value=" $scope.t_color"]').attr('checked', true);

This is what I am trying to do but the AngularJS isn't working

A: There is no need of JQuery to check the radio button.
Just set the ng-model with the value and the radio button with that value will be selected:
$scope.tube = data.tube;

A: This is very simple. You can do 2 way binding of your radio button as you're already using ng-model.
In your controller code you should do this:
$scope.tube = data.tube;

And your HTML will stay as-is. You can refer to below official Angular documentation link for more understanding: https://docs.angularjs.org/api/ng/input/input%5Bradio%5D


text:
Q: for loop over all git branches with certain name I have the following git branches
foo
bar
foobar
feature/foo
feature/bar
feature/buzz

How would you do a for loop over all branches that start with the word 'feature/' ?
When I try the following, it strangely prints out more than just the git branches.
for i in $(git branch --list "feature/*"); do echo $i; done;
stuff.txt
icon.jpg
morestuff.txt
Vagrantfile
feature/foo
feature/bar
feature/buzz

A: "We actively discourage against use of any Porcelain command, including git branch, in scripts" - from the Git Maintainer's Blog
You want to use something like
git for-each-ref --format='%(refname:short)' refs/heads/feature/
which will work fine inside a for br in $() construct


text:
Q: Windows Forms, Element Host and style inheritance I have a Windows Forms application in which I host a usercontrol created with WPF. This is done using the Element Host class. All WPF elements in the element host container inherit the windows forms style, including fonts, etc.
I want to prevent that from happening. All elements should inherit the default WPF style, so the fonts (and other styles) are the same. How can I achieve that?
I do not want to set all defaults myself.

Example Window, note the difference between the 'g' in 'segeo' and 'S' in 'MS Sans Serif'

A: Found it:
Just add:
this.InheritanceBehavior = InheritanceBehavior.SkipToAppNext;

to your constructor of your UserControl.


text:
Q: div expands off screen instead of scrolling I inherited some code and I'm having trouble figuring out how to prevent a container with a large number of items is overflowing off the visible screen instead of a scroll bar appearing. I have made a jsfiddle to demonstrate the issue:
https://jsfiddle.net/yellavon/vo437qaL/

    <panel style="display: flex; position: relative; flex-direction: column; height: 100%; width: 100%;">
      <panelrow style="position: relative; display: flex; flex-shrink: 0; padding: 5px; font-size: 1.3em;" class="bg-gray k-widget">Title </panelrow>

A: Notice you have overflow: hidden; property set on the body. Removing it will resolve your problem. Read up on overflow here for more information.


text:
Q: Search engines and removed questions Before I ask a question on Stack Overflow, I try googling. When I google for "visibility of panel in vb.net," I got this link in Google. When I click on that link I got:

This question was voluntarily removed by its author.

I know what it means. Why did the search engine show that link, if the question was already removed? Is there any mechanism to hide questions from search engines, when they are removed?


text:
Q: Getting error while installing SonarQube plugin in eclipse 4.2.2 I am trying to install the sonar in my eclipse but it can not find the url even though the url is working fine in my browser. If any one knows the solution please let me know, thanks.

A: To install the plugin you can also go to Help > Eclipse Marketplace... and search for "SonarQube". Check this for more details.

A: Anyway, the Eclipse SonarQube plugin has been deprecated and SonarLint for Eclipse should be used in place : see http://www.sonarlint.org/eclipse/index.html


text:
Q: Files not present in container after COPY or ADD in Dockerfile I'm trying to build a simple docker file that itself will launch a compose fleet. It may break the purpose of containers; but i found it was what I thought was the most suited in my case.
When trying to copy files to the image, it does not fail but I cannot find the files after run. I tried both ADD and COPY instructions. As seen in the example below, the docker-compose.yml and all my config files are not present in the container after launch. Can someone help with this ?
Here is my Dockerfile and the log it generates during image build and at container launch
FROM docker/compose

# Default user defined values
ENV TIMEZONE=Europe/Paris
ENV PLAXDMIN_DNS="plaxdmin.default.org"

# Final values
ENV PLAXDMIN_VERSION="PL_V_PLACEHOLDER"

# Init folders and copy docker-compose api configuration files
WORKDIR /var/log/plaxdmin

WORKDIR /etc/plaxdmin
ADD ./resources/conf/* ./
RUN ls -al ./

WORKDIR /opt/plaxdmin/
ADD ./resources/docker-compose.yml ./
RUN ls -al ./

# Expose folders and port
EXPOSE 80

# On run debug and start compose fleet
CMD  docker -v \
    && docker-compose -v \
    && printenv \
    && ls -al /etc/plaxdmin \
    &&  ls -al /opt/plaxdmin/ \
    &&  ls -al /var/log/plaxdmin/ \
    && pwd \
    && whoami \
    && docker-compose up

plaxdmin_1   | Docker version 19.03.8, build afacb8b7f0
plaxdmin_1   | docker-compose version 1.26.2, build eefe0d3
plaxdmin_1   | HOSTNAME=2bf446fc73cb
plaxdmin_1   | SHLVL=2
plaxdmin_1   | HOME=/root
plaxdmin_1   | PGID=1421
plaxdmin_1   | TIMEZONE=Europe/Paris
plaxdmin_1   | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
plaxdmin_1   | PLAXDMIN_DNS=plaxdmin.vba.ovh
plaxdmin_1   | PUID=1421
plaxdmin_1   | PWD=/opt/plaxdmin
plaxdmin_1   | PLAXDMIN_VERSION=v-202101312014-alpha
plaxdmin_1   | total 8
plaxdmin_1   | drwxr-xr-x    2 root     root          4096 Jan 31 17:59 .
plaxdmin_1   | drwxr-xr-x    1 root     root          4096 Jan 31 20:26 ..
plaxdmin_1   | total 12
plaxdmin_1   | drwxr-xr-x    3 root     root          4096 Jan 31 19:34 .
plaxdmin_1   | drwxr-xr-x    1 root     root          4096 Jan 31 20:15 ..
plaxdmin_1   | drwxr-xr-x    5 root     root          4096 Jan 31 19:34 portainer
plaxdmin_1   | total 8
plaxdmin_1   | drwxr-xr-x    2 root     root          4096 Jan 31 17:59 .
plaxdmin_1   | drwxr-xr-x    1 root     root          4096 Jan 31 20:15 ..
plaxdmin_1   | /opt/plaxdmin
plaxdmin_1   | root
plaxdmin_1   |
plaxdmin_1   |         Can't find a suitable configuration file in this directory or any
plaxdmin_1   |         parent. Are you in the right directory?
plaxdmin_1   |
plaxdmin_1   |         Supported filenames: docker-compose.yml, docker-compose.yaml
plaxdmin_1   |
appdata_plaxdmin_1 exited with code 1

EDIT :
To explain my main goal more clearly, I need to develop an app that run as a SINGLE service among others in a compose file. My app is divided in docker containers (api, web client, discord client, database, proxy, more to come).
So my code is organized as a meta topp repository having all other repos as git submodule. When I commit the meta project, it triggers the build/publish of every child image on dockerhub. Then the meta project build an image that runs all this sub images/containers in a compose file. The Dockerfile you're seeing above is for that meta project.
EDIT 2:
Update dockerfile that contains error. And adding the docker build output.
Step 1/13 : FROM docker/compose
latest: Pulling from docker/compose
aad63a933944: Pulling fs layer
b396cd7cbac4: Pulling fs layer
0426ec0ed60a: Pulling fs layer
9ac2a98ece5b: Pulling fs layer
9ac2a98ece5b: Waiting
b396cd7cbac4: Verifying Checksum
b396cd7cbac4: Download complete
aad63a933944: Verifying Checksum
aad63a933944: Download complete
0426ec0ed60a: Verifying Checksum
0426ec0ed60a: Download complete
9ac2a98ece5b: Verifying Checksum
9ac2a98ece5b: Download complete
aad63a933944: Pull complete
b396cd7cbac4: Pull complete
0426ec0ed60a: Pull complete
9ac2a98ece5b: Pull complete
Digest: sha256:b60a020c0f68047b353a4a747f27f5e5ddb17116b7b018762edfb6f7a6439a82
Status: Downloaded newer image for docker/compose:latest
 ---> c3e188a6b38f
Step 2/13 : ENV TIMEZONE=Europe/Paris
 ---> Running in 313daae863cf
Removing intermediate container 313daae863cf
 ---> d0dd8c94b9e3
Step 3/13 : ENV PLAXDMIN_DNS="plaxdmin.default.org"
 ---> Running in dbd36e109d3f
Removing intermediate container dbd36e109d3f
 ---> 5df13f4aec2c
Step 4/13 : ENV PLAXDMIN_VERSION="v-202101312014-alpha"
 ---> Running in 9085c5958ae5
Removing intermediate container 9085c5958ae5
 ---> 8b16db353f10
Step 5/13 : WORKDIR /var/log/plaxdmin
 ---> Running in 2f3dd94d0e75
Removing intermediate container 2f3dd94d0e75
 ---> d228994e7927
Step 6/13 : WORKDIR /etc/plaxdmin
 ---> Running in 92f3713bd54c
Removing intermediate container 92f3713bd54c
 ---> ef7a8736ba0b
Step 7/13 : ADD ./resources/conf/* ./
 ---> ee36033c9c5e
Step 8/13 : RUN ls -al ./
 ---> Running in 60bb92954ecf
total 20
drwxr-xr-x    1 root     root          4096 Jan 31 20:15 .
drwxr-xr-x    1 root     root          4096 Jan 31 20:15 ..
-rw-rw-rw-    1 root     root           262 Jan 31 02:06 application.properties
-rw-rw-rw-    1 root     root           690 Jan 31 02:06 log4j.properties
-rw-rw-rw-    1 root     root          1518 Jan 31 19:31 nginx.conf
Removing intermediate container 60bb92954ecf
 ---> c794e76b2cb3
Step 9/13 : WORKDIR /opt/plaxdmin/
 ---> Running in bf6ed28a47a8
Removing intermediate container bf6ed28a47a8
 ---> e2dcd4913ea3
Step 10/13 : ADD ./resources/docker-compose.yml ./
 ---> 1346e4e2d930
Step 11/13 : RUN ls -al ./
 ---> Running in 5ddbbe7f440f
total 12
drwxr-xr-x    1 root     root          4096 Jan 31 20:15 .
drwxr-xr-x    1 root     root          4096 Jan 31 20:15 ..
-rw-rw-rw-    1 root     root          2317 Jan 31 19:31 docker-compose.yml
Removing intermediate container 5ddbbe7f440f
 ---> f3013003a8ea
Step 12/13 : EXPOSE 80
 ---> Running in 229fc6cdbfe1
Removing intermediate container 229fc6cdbfe1
 ---> 21189a057021
Step 13/13 : CMD  docker -v     && docker-compose -v     && printenv     && ls -al /etc/plaxdmin     &&  ls -al /opt/plaxdmin/     &&  ls -al /var/log/plaxdmin/     && pwd     && whoami     && docker-compose up
 ---> Running in 9265e36232c1
Removing intermediate container 9265e36232c1
 ---> d94ccaeebf34
Successfully built d94ccaeebf34
Successfully tagged plaxdmin/full:v-202101312014-alpha

A: I ran that image via a compose file; in it I mapped those folder for them to be accessible in their parent as volumes. I tried to remove those and it works now.
I'm not sure this is the final solution as I have other troubles now as I need those files at least readable from the host but that is a problem for later?


text:
Q: How to split all words from several lines of a word file? (python) I have a text file:
But soft what light through yonder window breaks
It is the east and Juliet is the sun
Arise fair sun and kill the envious moon
Who is already sick and pale with grief

Instruction: Open the file and read it line by line. For each line, split the line into a list of words using the split() method. The program should build a list of words. For each word on each line check to see if the word is already in the list and if not append it to the list. When the program completes, sort and print the resulting words in alphabetical order.
Desired output:
['Arise', 'But', 'It', 'Juliet', 'Who', 'already', 'and', 'breaks', 'east', 'envious', 'fair', 'grief', 'is', 'kill', 'light', 'moon', 'pale', 'sick', 'soft', 'sun', 'the', 'through', 'what', 'window', 'with', 'yonder']

I'm stuck here:
fname = input("Enter file name: ")
fh = open(fname)
lst = list()
for line in fh:
    line=line.rstrip()
    lst = line.split()
    lst.append(line)
    lst.sort()
print(lst)


text:
Q: Cannot show a message during program load on iOS During load of my application I am loading settings and other things, and want to be able to show a message to the user. However this does not work on my Delphi XE6 FireMonkey application targeting iOS (iOSSimulator).
When I call ShowMessage or MessageDlg during program load, it locks, and nothing is shown. It is probably entering the modal state, but since the message is not shown, it is not possible to continue.
Even in the main forms FormActivate, calling ShowMessage does not show anything.
How can I show a message while loading the application?

A: You can use loading symbol along with Message. It will serve your purpose. You can use "MBProgressHud", you not need to give any extra effort, just pass parameter and it will display loading image along with text. Enjoy!

A: I am surprised that no one have written about this before and that no Firemonkey users have answered my question.
That you are allowed to call Showmessage during program load, but the app locks if you do it, is not appropriate behavior. In a desktop app, it is quite normal to show a message during program load, in case something fails.
I am converting a 500k line project from VCL to FMX, and since I cannot show a message on iOS, I will have to restructure the create and load code.
The solution I plan to implement is to make failsafe solutions that will allow the app to load no matter what happens, then when the app is running, I can show whatever messages have come up during load (those that the user have to consider).
If anyone have more information or suggestions for a better solution, please comment.


text:
Q: HTTP POST Request Popup Window I am attempting to log into a website using Java's HttpURLConnection. I have figured out how to use a POST request to post to the website and log in, but I have no way of knowing if the login was successful or not.
Looking at some tutorials, I discerned that reloading the page usually works. The problem with this specific implementation is that upon entering credentials, the website opens a pop up window, with the same URL as the parent site.
This can be solved either of two ways. Looking at Chrome's Developer Tools, I realized that the POST request returns whether the login was successful, as seen here
Is it possible to get the popup window or look for the response to the POST request? I'd rather use native java is possible.

A: Reload will work, if you'll keep the same HTTP session. Actually the website cannot open an popup - the web browser does it according to the login response. You should do the same - that is to check the response. Luckily you don't have to parse the response content, try to check the response code. For login the HTTP 200 may stand for successful login and HTTP 401 for failure.


text:
Q: Chaining Where Clauses Does Not Return Results I have a search method that takes a list of ID's and I wish to restrict the query based on the ID's.
Param: IEnumerable filterType
foreach (int id in filterType)
{
    query = query.Where(q => q.Item1 == id);
}

If I try:
foreach (int id in filterType)
{
    query = query.Where(q => q.Item1 != id);
}

It seems to work.
Does anyone know why?
Thanks in advance.

A: Multiple where clauses are effectively "AND-ed" together - so if your filterType list had 5 and 10 in, you'd be saying that Item1 had to be both 5 and 10, which it can't be simultaneously.
I suspect you actually want:
query = query.Where(q => filterType.Contains(q.Item1));

In other words, where Item1 matches one of the values in filterType. (You might also want to consider the case where filterType is empty. Should that match everything or nothing?)

A: By doing query = query.Where(q => q.Item1 == id);, you're effectively building a query similar to the following:
query.Where(q => q.Item1 == id1)
     .Where(q => q.Item1 == id2)
     .Where(q => q.Item1 == id3)
     .Where(q => q.Item1 == id4);

Which obviously won't return results: an item cannot have two different IDs.
You probably want:
query.Where(q = filterType.Contains(q.Item1));


text:
Q: Navigating to a Navigation view controller via button I have a master detail class that has a navigation view controller. I have created another view controller which I want to use to load the navigation view controller via a button. I have added a view controller and have linked a button to the navigation view controller however when i test to see if the new view loads, I receive an error on the main.m
What am i doing wrong?

A: I think you need not take another navigation controller if you have navigation controller for the view controller having button and you can directly take view controller which you want (UITableviewController or UIViewController). Give connection from your button to that view controller


text:
Q: Getting feature importance by sample - Python Scikit Learn I have a fitted model (clf) using sklearn.ensemble.RandomForestClassifier. I already know that I can get the feature importances with clf.feature_importances_. Anyway, I would like to know, if it's possible, how to get feature importances but by each sample.
Example:
from sklearn.ensemble import RandomForestClassifier

X = {"f1":[0,1,1,0,1], "f2":[1,1,1,0,1]}
y = [0,1,0,1,0]

clf = RandomForestClassifier(max_depth=2, random_state=0)
clf.fit(X, y)

y_pred = clf.predict(X)

Then, how do I get something like this:
y_pred f1_importance f2_importance
   1         0.57          0.43
   1         0.26          0.74
   1         0.31          0.69
   0         0.62          0.38
   1         0.16          0.84

* y_pred values aren't real. I'm actually using pandas for the real project in Python 3.8.

A: You can use the treeinterpreter to get the feature importance for individual predictions of your RandomForestClassifier
You can find the treeinterpreter on Github and install it via
pip install treeinterpreter

I used your reference code but had to adjust it, because you can not use a dictionary as input to fit your RandomForestClassifier:
from sklearn.ensemble import RandomForestClassifier
from treeinterpreter import treeinterpreter as ti
import numpy as np
import pandas as pd

X = np.array([[0,1],[1,1],[1,1],[0,0],[1,1]])
y = [0,1,0,1,0]

clf = RandomForestClassifier(max_depth=2, random_state=0)
clf.fit(X, y)

y_pred = clf.predict(X)
y_pred_probas = clf.predict_proba(X)

Then I used the treeinterpreter with your classifier and data to compute the bias, contributions and also the prediction values:
prediction, bias, contributions = ti.predict(clf, X)

df = pd.DataFrame(data=np.matrix([y_pred, prediction.transpose()[0], prediction.transpose()[1], np.sum(contributions, axis=1).transpose()[0], bias.transpose()[0], np.sum(contributions, axis=1).transpose()[1], bias.transpose()[1]]).transpose(), columns=["Prediction", "Prediction value 0", "Prediction value 1", "f1_contribution", "f1_bias", "f2_contribution","f2_bias"])

df

Output

You can have a look at this blogpost by the author, to understand better how it works.
In the table the prediction value for 0 and 1 refers to the probability for both classes, which you can also compute by using the existing predict_proba() method of RandomForestClassifier.
You can verify, that the bias and contributions add up to the prediction value/probability like this:
bias + np.sum(contributions, axis=1)

Output
array([[0.744 , 0.256 ],
       [0.6565, 0.3435],
       [0.6565, 0.3435],
       [0.214 , 0.786 ],
       [0.6565, 0.3435]])


text:
Q: jquery load method after loading the window in IE jQuery(window).load() not working properly in IE, especially in IE 8 and below. I need to call one method after loading the window completely.
But in IE the window shows after executing the function given in jQuery(window).load() also.
.
.
.
.
</body>
<script language="javascript">
jQuery(window).load(function(){
    renderEditNView();
});
</script>
</html>

Even an alert within the load method shows before the window loads. How will I fix it?

A: try this I hope it works on your browser too
$(window)[0].onload = (function(){alert('done');});

javascript :
window.onload = (function(){alert('done');});

note: even your code is working on chrome and jQuery 1.9.1!

A: Use any method call Inside $(function() :
<script type="text/javascript">
    $(function(){
       alert('Alert box after page Completely Ready');
       renderEditNView();
    });

    function renderEditNView(){
         alert('Render Edit and View after Page Competely ready');
    }
</script>

A: See document http://api.jquery.com/load-event/
In general, it is not necessary to wait for all images to be fully loaded. If code can be executed earlier, it is usually best to place it in a handler sent to the .ready() method.

A: Try to put the script code inside the body tag (at the end for example). IE might be have some problems with that if the renderEditNView is changing the DOM...
See this question for more info

A: I tested all of the responses offered and all of them is not working, I am trying to get the outerHeight using $("#element").outerHewight(); after the page is loaded and always is returning 0 because I need to know the height after to fill the data. What I tested is:
<script type="text/javascript">
   // it is no working
   window.onload = (function(){alert($("#myelement").outerHeight());});

   // It is no workking
   $(window)[0].onload = (function(){alert($("#myelement").outerHeight());});

</script>

If I am not mistaken, $("#myelement").outerHeight(), should return some value after the page is loaded, why is returning 0?
For this reason I think both pruposed option arent right.
I can not use pluggin.
I am using Internet Explorer 8. (I can not  changhe of navigator)
I wrote in this question because it is quite similar what we are looking for.


text:
Q: I need a way to group data based on previous rows Let me try to explain this again.
This table has a record for each person for each day of the month.  There are approx 20 fields in the table.  If any of the fields change (other than the date fields), then I want to group those records.  So, for example, if days 1, 2, & 3 are the same, then when I read in day 4 and notice that it is changed, I want to group days 1, 2, & 3 together with a begindate of day one, and an enddate of day 3...etc
Rownum  ID BegDate  EndDate   Field1, Field2.... Field20
 1      1  6/1/2017 6/1/2017  xxxx    xxxx        xxxxx
 2      1  6/2/2017 6/2/2017  xxxx    xxxx        xxxxx
 3      1  6/3/2017 6/3/2017  xxxx    xxxx        xxxxx
 4      1  6/4/2017 6/4/2017  yyyy    yyyy        yyyy
 5      1  6/5/2017 6/5/2017  yyyy    yyyy        yyyy
 6      1  6/6/2017 6/6/2017  xxxx    xxxx        xxxxx
 7      1  6/7/2017 6/7/2017  xxxx    xxxx        xxxxx
 8      1  6/8/2017 6/8/2017  zzzz    zzzz        zzzz
....

So in the example data above, I would have a group with rows 1,2,3 then a group with rows 4,5 then a group with rows 6,7 then a group with 8...etc
ID  BegDate    EndDate  Field1  Field2 ...... Field20   Sum
1   6/1/2017   6/3/2017  xxxx    xxxx          xxxxx      3
1   6/4/2017   6/5/2017  yyyy    yyyy          yyyy       2
1   6/6/2017   6/7/2017  xxxx    xxxx          xxxxx      2
1   6/8/2017   6/15/2017 zzzz    zzzz          zzzz       8
.....

A: As example. Create table:
 create table t
 (date_ datetime,
  status varchar(1));

And add data
  insert into t values ('2017-11-01','A');
  insert into t values ('2017-11-02','A');
  insert into t values ('2017-11-03','A');
  insert into t values ('2017-11-04','B');
  insert into t values ('2017-11-05','B');
  insert into t values ('2017-11-06','B');
  insert into t values ('2017-11-07','C');
  insert into t values ('2017-11-08','C');
  insert into t values ('2017-11-09','C');
  insert into t values ('2017-11-10','C');
  insert into t values ('2017-11-11','B');
  insert into t values ('2017-11-12','B');
  insert into t values ('2017-11-13','B');
  insert into t values ('2017-11-14','B');
  insert into t values ('2017-11-15','B');

And use this query
 select min(date_start),
           IFNULL(date_end,now()),
           status
    from
    ( select
      t1.date_ date_start,
      (select min(date_) from t t2 where t2.date_>t1.date_ and t2.status<>t1.status) - interval 1 day as 'date_end',
     t1.status status
    from t t1
      ) a
      group by date_end,status
      order by 1

http://sqlfiddle.com/#!9/96e27/11

A: You can do this with a difference of row numbers:
select ID, min(BegDate) as Begdate, max(EndDate) as max(EndDate),
       Field1, Field2, ...... Field20,
       datediff(day, min(BegDate), max(EndDate))
from (select t.*,
             row_number() over (partition by id order by begdate) as seqnum,
             row_number() over (partition by id, Field1, Field2, . . ., Field20 order by begdate) as seqnum_2
      from t
     ) t
group by id, (seqnum - seqnum_2), Field1, Field2, . . . Field20 ;

A: try below query (with 2 extra fields -  field1 and field2).
To handle you 20 fields add remaining column whereever you see field1,field2 with field1, field2, field3,......field20
    create table #tmp (RowNum int, id int,begdate datetime,EndDate datetime, field1 varchar(10),field2 varchar(10))

    insert into #tmp values(1,1,'2017-06-01','2017-06-01','xxxxx','xxxxx')
    insert into #tmp values(2,1,'2017-06-02','2017-06-02','xxxxx','xxxxx')
    insert into #tmp values(3,1,'2017-06-03','2017-06-03','xxxxx','xxxxx')
    insert into #tmp values(4,1,'2017-06-04','2017-06-04','yyyyy','yyyyy')
    insert into #tmp values(5,1,'2017-06-05','2017-06-05','yyyyy','yyyyy')
    insert into #tmp values(6,1,'2017-06-06','2017-06-06','xxxxx','xxxxx')
    insert into #tmp values(7,1,'2017-06-07','2017-06-07','xxxxx','xxxxx')
    insert into #tmp values(8,1,'2017-06-08','2017-06-08','zzzzz','zzzzz')
    insert into #tmp values(9,1,'2017-06-09','2017-06-09','zzzzz','zzzzz')
    insert into #tmp values(10,1,'2017-06-10','2017-06-10','zzzzz','zzzzz')

    insert into #tmp values(11,2,'2017-06-04','2017-06-04','yyyyy','yyyyy')
    insert into #tmp values(12,2,'2017-06-05','2017-06-05','yyyyy','yyyyy')
    insert into #tmp values(13,2,'2017-06-06','2017-06-06','xxxxx','xxxxx')
    insert into #tmp values(14,2,'2017-06-07','2017-06-07','xxxxx','xxxxx')

    insert into #tmp values(15,1,'2017-06-11','2017-06-11','xxxxx','xxxxx')
    insert into #tmp values(16,1,'2017-06-12','2017-06-12','xxxxx','xxxxx')
    insert into #tmp values(17,1,'2017-06-13','2017-06-13','zzzzz','xxxxx')
    insert into #tmp values(18,1,'2017-06-14','2017-06-14','zzzzz','xxxxx')
    insert into #tmp values(19,1,'2017-06-15','2017-06-15','yyyyy','xxxxx')
    insert into #tmp values(20,1,'2017-06-16','2017-06-16','zzzzz','xxxxx')

    select ID, min(BegDate) as Begdate, max(EndDate) as EndDate,
           Field1,Field2, /*Add all other fields here*/
           datediff(day, min(BegDate), max(EndDate))+1 As [Sum]
    from(
    select *,
                 row_number() over (partition by id order by begdate) as seqnum,
                 row_number() over (partition by id, Field1,field2 /*Add all other fields here*/ order by begdate) as seqnum_2
          from #tmp

        ) t
    group by id, (seqnum - seqnum_2), Field1,Field2 /*Add all other fields here*/
    order by ID,Begdate

    Drop table #tmp


text:
Q: Polygon to Polygon: new geometry, preserve attributes I have two sets of polygon cadastre parcel data with different attributes and slightly varying geometry. What I need to do is to transfer the attributes of Feature A (older) to the geometry of Feature B (newer). This will allow me to compare old attribute data against the updated cadastre. At first glance, this does not seem too complicated. However, A and B do not share the same unique identifier, and the lookup table provided with the datasets is incredibly unreliable. Therefore, I need to complete the attribute transfer through a spatial relationship. The process needs to be as automated as possible due to the size of the datasets.
The problem is further complicated in that not every parcel in Feature A will have a 1:1 relationship with a parcel in Feature B. However, I will focus on reconciling those parcels which do have a 1:1 relationship for now.
My first attempt in ArcGIS included using the Attribute Transfer Tool in the Spatial Adjustment toolbar. The steps I took something like this:

*

*Use Feature to Line to convert Feature A and B from polygons to lines. This step is necessary because the Attribute Transfer tool only accepts lines as input.

*Run Attribute Transfer Tool with A as the 'Source' feature and B as the 'Target' to transfer attributes of Feature A to the geometry of Feature B. Result: lines in Feature B (within a specified tolerance of lines in A) A now have the attributes of A.

*Run Feature To Polygon to convert these B's newly attributed lines back to polygons. However, the Feature to Polygon tool has a known bug – so attributes do not transfer to the new polygons although the geometry is created successfully.
So basically I need to find a way to preserve attribution when creating a polygon from attributed lines.
Other strategies I have attempted:

*

*Workaround using Spatial Join to join the lines of feature A to the polygons of B to the target geometry. However, the results were unreliable and did not produce the expected numbers of matched and unmatched features.

*I have also been fiddling with the "Production Feature Builder" but I have not found a way to use this tool in an automated fashion yet. I have over 16 000 polygons to transfer in total from A to B so a manual update is out of the question!

I'm also open to suggestion in FME, and will post details on what I've already tried there if requested