text:
Q: Are there issues with running user pods on a Kubernetes master node? Many of the run-throughs for deploying Kubernetes master nodes suggest you use --register-schedulable=false to prevent user pods being scheduled to the master node (e.g. https://coreos.com/kubernetes/docs/latest/deploy-master.html). On a very small Kubernetes cluster it seems somewhat a wasteful of compute resources to effectively prevent an entire node from being used for pod scheduling unless absolutely essential.
The answer to this question (Will (can) Kubernetes run Docker containers on the master node(s)?) suggests that it is indeed possible to run user pods on a master node - but doesn't address whether there are any issues associated with allowing this.
The only information that I've been able to find to date that suggests there might be issues associated with allowing this is that it appears that pods on master nodes communicate insecurely (see http://kubernetes.io/docs/admin/master-node-communication/ and https://github.com/kubernetes/kubernetes/issues/13598). I assume that this would potentially allow a rogue pod running on a master node to access/hijack Kubernetes functionality not normally accessible to pods on non-master nodes. Probably not a big deal with if only running pods/containers developed internally - although I guess there's always the possibility of someone hacking access to a pod/container and thereby gaining access to the master node.
Does this sound like a viable potential risk associated with this scenario (allowing user pods to run on a Kubernetes master node)? Are there any other potential issues associated with such a setup?

A: Running pods on the master node is definitely possible.
The security risk you mention is one issue, but if you configure service accounts, it isn't actually much different for all deployed pods to have secure remote access to the apiserver vs. insecure local access.
Another issue is resource contention. If you run a rogue pod on your master node that disrupts the master components, it can destabilize your entire cluster. Clearly this is a concern for production deployments, but if you are looking to maximize utilization of a small number of nodes in a development / experimentation environment, then it should be fine to run a couple of extra pods on the master.
Finally, you need to make sure the master node has a sufficiently large pod cidr allocated to it. In some deployments, the master only gets a /30 which isn't going to allow you to run very many pods.

A: Now Kubernetes and some Kubernetes distribution have what it calls taint.
taint can decide if the master can run a pod or not.
although running the pod on the master node is not the best practice but it's possible to do so. medium
in Kubernetes, we can read the explanation about taint here and I believe this is also related to scheduler
in Kubernetes or K3S, we can check if the nodes set the taint or not by describing the nodes.
# kubectl describe nodes | grep Taints
Taints:             node.kubernetes.io/unreachable:NoExecute
Taints:             node.kubernetes.io/unreachable:NoSchedule
Taints:             node.kubernetes.io/unreachable:NoExecute
Taints:             <none>

NoSchedule: Pods that do not tolerate this taint are not scheduled on the node.
PreferNoSchedule: Kubernetes avoids scheduling Pods that do not tolerate this taint onto the node.
NoExecute: Pod is evicted from the node if it is already running on the node, and is not scheduled onto the node if it is not yet running on the node.
source
if you want to specify one of your nodes, rather master or agent, just mention the nodes
# kubectl describe nodes agent3 | grep Taints
  Taints:             <none>
# kubectl describe nodes master | grep Taints
  Taints:             <none>

this is how you apply the taint to your nodes
kubectl taint nodes agent1 key1=value1:NoSchedule
kubectl taint nodes agent2 key1=value1:NoExecute

when your nodes are not running automatically it will show NoSchedule or NoExecute, make sure to check your nodes before checking the taint.

A: @robert have given a clear answer. I'm just trying to explain in a metaphorical way with a real-time example.
Your company's MANAGER is a better coder. If he starts coding, your company's MANAGER kind of work will be stalled/less efficient, because he can handle one thing in an efficient way. that will put your entire company at risks.
To operate efficiently, Hire more devs to code and don't make your MANAGER code(in order to get the works for the amount you are paying him).


text:
Q: Connection string from EA to nHibernate I'm writing addin to EA and I have problem with connection string.
How to use connection string from EA.Repository in nHibernate? Or how to extract connection details from EA.
I can have user id, db type but for example I don't know how to extract name of database.

A: DBMS connection strings are tough beasts to tame, because the format is extensible and thus in order to parse one properly you need to take into account whatever extensions the various DBMS providers have thought to implement. EA doesn't make matters any easier, and in fact overloads the connection strings.
You can retrieve what EA refers to as a connection string from the Repository.ConnectionString property. In the case of an EAP file, this is simply the file name. In the DBMS case, it is a string on the form EAConnectString:<name> --- DBType=<type_nr>;Connect=<connection_string>.
<name> is a symbolic name which can be anything at all, it is not required or guaranteed to be the name of a specific database. <type_nr> is EA's internal numeric identity for the DBMS type. These are undocumented, but can be sussed out with a bit of testing. Repository.RepositoryType() might help there. <connection_string>, finally, is the DBMS connection string.
So if you chop off everything up to and including Connect= you should end up with a connection string that ODBC will recognize. Inside this "proper" connection string you'll find Data Source=<source> and Initial Catalog=<db_name>. <source> is typically a server and a port, and <db_name> is the name of the database.
Note that EA supports "lazy loading" mode when connecting to a DBMS. In this mode, contents of the database are only read when they're needed (ie, when expanding a node in the project browser or opening a diagram). If the repository has been opened in this mode, the connection string ends with LazyLoad=1;, so you need to chop that out too.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Why is Cognito rejecting my SAML assertion? I'm doing a proof of concept for federating SAML into Cognito.  I've setup Shibboleth v3, and once I finally got the log level set, I can see the SAML being sent back to Cognito, which just redirects to my configured page with ?error_description=Error+in+SAML+response+processing%3A+Invalid+SAML+metadata.+&error=server_error in the URL.  The user pool in Cognito is set to require an email address, and I think I've got the attribute mapping set correctly, but it's not really easy to tell.  Here's the SAML I'm seeing in the logs (minus a couple of URLs for anonymization's sake):
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:Response
    Destination="https://{DOMAIN}.auth.us-east-1.amazoncognito.com/saml2/idpresponse"
    ID="_cc28aebe7ae433f549a7df77e8a2fbaa"
    InResponseTo="_d34b0821-c6eb-408d-b687-5fb2b71422dd"
    IssueInstant="2019-06-10T18:00:23.314Z" Version="2.0"
    xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://idp1.example.com:8443/idp/shibboleth
  </saml2:Issuer>
  <ds:Signature
      xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
      <ds:CanonicalizationMethod
          Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
      <ds:SignatureMethod
          Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
      <ds:Reference
          URI="#_cc28aebe7ae433f549a7df77e8a2fbaa">
    <ds:Transforms>
      <ds:Transform
              Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
      <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <ec:InclusiveNamespaces PrefixList="xsd" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
          </ds:Transform>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
    <ds:DigestValue>3wL9vw0MsEuSGO+0bir/6GQV1FVNQHw4fLgAXteHQK0=</ds:DigestValue>
      </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>
      LvCSLdm87hWsK480jhv/8JXBciPmGmAeUVxkGpAKUal5omnmpASXflSBHutkRwyPzD6mXMgSk3xL
      f0IfWwspbA3ixmbbeEwQciel+2Y4WxwPpWreV1aLHMLYSj8x8ZdiDSioczMwRpQSqVo6RCX98ayo
      riTBwTaoIQTHcE6xdDb98zDVCL+tCvrgkT3fhl0Z9HBxDvdy/YyrEuv0QVTj9SHiTI6heY5AhvA8
      3qCAaGdbsNc0jqvy6AUAp1VBy8QJGpWMvChXJnO8srUEKkVBhGRfScCaO2uDcpa90zAlSuD1B7Q7
      vVVrahRCB2lJHEmAyM2XeNNwN+DbyFU2Lcz4Kg==
    </ds:SignatureValue>
    <ds:KeyInfo>
      <ds:X509Data>
        <ds:X509Certificate>MIIDVDCCAjygAwIBAgIUIBWSFzIstjdAx2yVXLC40xKOIYAwDQYJKoZIhvcNAQELBQAwJzElMCMG
    A1UEAwwcaXAtMTAtMjAzLTEwLTkxLmVjMi5pbnRlcm5hbDAeFw0xOTA2MDQyMTU1MDhaFw0zOTA2
    MDQyMTU1MDhaMCcxJTAjBgNVBAMMHGlwLTEwLTIwMy0xMC05MS5lYzIuaW50ZXJuYWwwggEiMA0G
    CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCaaLJ5lqB8eWuIiKPhDVsxOBncTnVS7wjjQOJ6pkSJ
    El8G1MnMIb5xaQBv9luwq88+EcmWIZDzt4Yj326tmz4lwweWa4VI3iVfk6eZl7Zpwlcj57dtvA8B
    MhcmbqX56Kb3pmTLf4VAI8hPoHdmKNYFapy+uM4b6ubvLx1NxlzgWfZ3o0ZrTuOpNpFgXJB+FGMS
    au4lOCvOVchU7ymch2qwP/iFSUnNcviL9k/M4tSIkbf+Tb9o9SQrJhwcBMdQDfsLKnDhEtvovX12
    H70smzVCg/H3AVUE+Qne5Cget90xKKRtQcSV2Q4jIS0mRGc5XVEQEiVzOLvx6DyLXUs926JxAgMB
    AAGjeDB2MB0GA1UdDgQWBBT0+FXPDXOe+gtZsNA+dnzPvJysWzBVBgNVHREETjBMghxpcC0xMC0y
    MDMtMTAtOTEuZWMyLmludGVybmFshixodHRwczovL2lkcDEuZXhhbXBsZS5jb206ODQ0My9pZHAv
    c2hpYmJvbGV0aDANBgkqhkiG9w0BAQsFAAOCAQEAaM1kS0CoKBy4l1wRihbvsfX78FCmKk4woWEk
    a0st/c42ntf7nU8b/4C6SV9Jl7rhij18um6tF6dv+pVsH5KrDQbdH3xwF24ekDqosEaHSxcmY79k
    1TePd00xH8/udeKRFc+78LnkygnzulZZ748XKj9/ehUkfbrhWhGP3333Nruj5Ptlv7d4upCxtQ+g
    dYmHIzFt26MHR5jxcwYWPd/4M1ElakevscWOBjKTpScOnMYOikzyZpS+p7hD5/z4OfKv6AWLPdek
    eWVXGlZhRKhtp15tRrUpQucZFMh+YNOm9IlBRBeh5Qw4KQgg1KvkNy1+iA9vfptn+f2CtPhF+cxx
    3Q==
    </ds:X509Certificate>
      </ds:X509Data>
    </ds:KeyInfo>
  </ds:Signature>
  <saml2p:Status>
    <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>
  </saml2p:Status>
  <saml2:Assertion ID="_4df74e3ced3d853e5a0c329e0f7c83cb"
           IssueInstant="2019-06-10T18:00:23.314Z" Version="2.0" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
    <saml2:Issuer>https://idp1.example.com:8443/idp/shibboleth</saml2:Issuer>
    <saml2:Subject>
      <saml2:NameID
          Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
          NameQualifier="https://idp1.example.com:8443/idp/shibboleth" SPNameQualifier="urn:amazon:cognito:sp:us-east-1_MyLIE83bf">AAdzZWNyZXQxrczu0aLzz4zQafYgy5VN8rTutrL827I6iPTAGPVAGJlJKAcQIHAdkWP1uqtsYqAccnsy0GPpTNx8GgTudWw6Q5ovEh/zSlYq+A/eExrAuT5sJlatEGua7boJDq63t1fESo4qOmz3uW+Pbik=
      </saml2:NameID>
      <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
        <saml2:SubjectConfirmationData Address="10.203.10.25"
                       InResponseTo="_d34b0821-c6eb-408d-b687-5fb2b71422dd"
                       NotOnOrAfter="2019-06-10T18:05:23.730Z" Recipient="https://{DOMAIN}.auth.us-east-1.amazoncognito.com/saml2/idpresponse"/>
      </saml2:SubjectConfirmation>
    </saml2:Subject>
    <saml2:Conditions NotBefore="2019-06-10T18:00:23.314Z" NotOnOrAfter="2019-06-10T18:05:23.314Z">
      <saml2:AudienceRestriction>
        <saml2:Audience>urn:amazon:cognito:sp:us-east-1_MyLIE83bf</saml2:Audience>
      </saml2:AudienceRestriction>
    </saml2:Conditions>
    <saml2:AuthnStatement AuthnInstant="2019-06-10T18:00:12.508Z" SessionIndex="_c1e143fa5c01b3642d1ce4573bfe9465">
      <saml2:SubjectLocality Address="10.203.10.25"/>
      <saml2:AuthnContext>
        <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
      </saml2:AuthnContext>
    </saml2:AuthnStatement>
    <saml2:AttributeStatement>
      <saml2:Attribute FriendlyName="mail" Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
        <saml2:AttributeValue>bob@example.com</saml2:AttributeValue>
      </saml2:Attribute>
      <saml2:Attribute FriendlyName="Role" Name="https://aws.amazon.com/SAML/Attributes/Role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
        <saml2:AttributeValue
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">arn:aws:iam::{ACCOUNT}:role/FederationWorkshop-ReadOnly,arn:aws:iam::{ACCOUNT}:saml-provider/idp1   </saml2:AttributeValue>
      </saml2:Attribute>
      <saml2:Attribute FriendlyName="RoleSessionName" Name="https://aws.amazon.com/SAML/Attributes/RoleSessionName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
        <saml2:AttributeValue
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">bob</saml2:AttributeValue>
      </saml2:Attribute>
    </saml2:AttributeStatement>
  </saml2:Assertion>
</saml2p:Response>

Is there something simple I'm missing (the intricacies of SAML and SSO are definitely not my wheelhouse at this point in time).

A: Question: "Why is Cognito rejecting my SAML assertion?"
Quick Response:
Three potential root causes of this issue:
(1) Your SAML assertion does NOT carry/deliver all the attributes required by Cognito (see the detailed answer and resolution below).
(2) Attributes do NOT meet the format required by Cognito.
For example, (Note that please replace "ACCOUNT_NUMBER" with your aws id assigned by Amazon AWS (e.g., 123456789012))
attribute #1: awsRoles
attribute #1 value: arn:aws:iam::ACCOUNT_NUMBER:role/shibbolethidp,arn:aws:iam::ACCOUNT_NUMBER:saml-provider/Shibboleth-IdP
attribute #2: awsRoleSessionName
attribute #2 value: winston.hong@example.com

(3) Attribute values do NOT registered at Cognito through ADMIN console of Amazon AWS (see (II) Important Remarks on Role later on).
Remarks
(1) Adding SAML Identity Providers to a User Pool states that Audience URI/SP Entity ID of User Pool (NOT Identity Pool) is urn:amazon:cognito:sp:your-User-Pool-ID.
(2) How to enable secure access to Kibana using AWS Single Sign-On describes how to utilize AWS SSO to access Kibana (Amazon Elasticsearch Service, an AWS internal service).
An example of two important SAML SP parameters for User Pool (NOT Identity Pool) is provided below.
(I) Application ACS URL: https://<Elasticsearch domain name>.auth.<AWS region>.amazoncognito.com/saml2/idpresponse

(II) Application SAML audience: urn:amazon:cognito:sp:<user pool id>

Question: "The user pool in Cognito is set to require an email address, and I think I've got the attribute mapping set correctly, but it's not really easy to tell."
Answer:
Your SAML response indicates that your attribute mapping is NOT set correctly.
(1) Attribute "RoleSessionName" carried by your Shibboleth IdP v3 SAML response to Cognito is NOT required by Cognito.
<saml2:Attribute FriendlyName="RoleSessionName" Name="https://aws.amazon.com/SAML/Attributes/RoleSessionName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">bob</saml2:AttributeValue>
</saml2:Attribute>

The correct attribute "RoleSessionName" carried by Shibboleth IdP v3 SAML response to Cognito should be your E-mail address "bob@example.com" instead of your given name "bob".
<saml2:Attribute FriendlyName="RoleSessionName" Name="https://aws.amazon.com/SAML/Attributes/RoleSessionName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">bob@example.com</saml2:AttributeValue> </saml2:Attribute>

(2) Resolution:(minor revision may be required depending on your data repository such as LDAP)
Add attribute resolution
    <resolver:AttributeDefinition id="awsRoles" xsi:type="ad:Simple" sourceAttributeID="employeeType">
        <resolver:Dependency ref="myLDAP"/>
        <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="https://aws.amazon.com/SAML/Attributes/Role"
    friendlyName="Role" />
    </resolver:AttributeDefinition>

    <resolver:AttributeDefinition id="awsRoleSessionName" xsi:type="ad:Simple" sourceAttributeID="mail">
        <resolver:Dependency ref="myLDAP"/>
        <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="https://aws.amazon.com/SAML/Attributes/RoleSessionName"
    friendlyName="RoleSessionName" />
    </resolver:AttributeDefinition>

into "attribute-resolver-full.xml" or "attribute-resolver.xml" (depending on your Shibboleth IdP configuration). Shibboleth IdP Attribute Resolver Example.
Note that OpenLDAP attribute "employeeType" is used to carry the role of Amazon AWS. Your data store/repository may use different attribute to carry the role of Amazon AWS.
(I) The following OpenLDAP attributes have been mapped with AWS configuration through AWS administration console.
mail: winston.hong@example.com
employeeType: arn:aws:iam::ACCOUNT_NUMBER:role/shibbolethidp,arn:aws:iam::ACCOUNT_NUMBER:saml-provider/Shibboleth-IdP

(II) We provide the official link of configuring Amazon AWS with Google G Suite  to describe SAML IdP configuration steps (performed through AWS administration console):
Cognito Configuring Your Identity Pool for a SAML Provider states that
Before configuring your identity pool to support a SAML provider, you must first configure the SAML identity provider in the IAM console. For more information, see Integrating third-party SAML solution providers with AWS in the IAM User Guide.

Integrating third-party SAML solution providers with AWS states that
Amazon Web Services cloud application – This article on the Google G Suite Administrator Help site describes how to configure G Suite as a SAML 2.0 IdP with AWS as the service provider.

Access the link of Google G Suite Amazon Web Services cloud application, and then Click "Step 1: Set up Amazon Web Services as a SAML 2.0 service provider (SP)", you can get the following SAML configuration steps of Amazon AWS for Cognito.
4. log in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.
5. In the navigation pane, select identity providers and then click Create SAML Provider.
6. Select SAML as the Provider Type, and give it a name such as GoogleApps.
7. Upload the IDP metadata you saved earlier from the Google Admin console SAML settings.
8. Click Next Step and on the following page, click Create.
9. Click the Roles tab on the left sidebar and click Create a New Role to create a role which will define the permissions.
10. Select Set role name. This name will be displayed next to the login name on the AWS console.
11. Select Role for Identity Provider Access.
12. Select Grant Web Single Sign-On (WebSSO) access to SAML providers. Click Next Step.
13. Leave the Establish trust settings as they are. Click Next Step.
14. Use the Attach policy settings to define the policies your Federated Users will have. Click Next Step.
15. On the following page, review your settings, then click Create the Role.
16. Select your Google service from the identity providers list and note the Provider ARN. This contains your AWS Account ID and the name of the provider (example: arn:aws:iam::ACCOUNT_NUMBER:saml-provider/GoogleApps).
17. Click Save to save the Federated Web single sign-on configuration details.

Important Remarks on Role
(a) OpenLDAP attribute "employeeType" is Role in my validation experiment with AWS console.
(b) Ensure that OpenLDAP attribute "employeeType" is mapped with your AWS configuration setting "Role"**
(c) Replace "GoogleApps" with "Shibboleth-IdP" for Provider Type
(d) Set role name  (e.g., shibbolethidp or googleapps, which will be converted by AWS into arn:aws:iam::ACCOUNT_NUMBER:role/shibbolethidp or arn:aws:iam::ACCOUNT_NUMBER:role/googleapps)
(III) For your convenience, I have made the 9th commit to upload the Amazon AWS SP metadata and corresponding SAML configuration to How to build and run Shibboleth SAML IdP and SP using Docker container.
Note that I have logged in to Amazon AWS account ("ACCOUNT_NUMBER", e.g., 123456789012) with username "winston.hong@example.com" successfully using Shibboleth IdP running with Docker Container with the 9th commit.
By performing the Shibboleth SAML IdP configuration with reference to the 9th commit to How to build and run Shibboleth SAML IdP and SP using Docker container, you can log in to your Amazon AWS account ("ACCOUNT_NUMBER", e.g., 123456789012) with your username (such as "winston.hong@your-company.com") federated by Shibboleth IdP..
(IV) My SAML response for successful login to AWS is provided below for your reference.
<saml2p:Response Destination="https://signin.aws.amazon.com/saml"
                 ID="_fc89710799c4c2c540341e94bf7132d5"
                 IssueInstant="2019-06-11T18:49:38.300Z"
                 Version="2.0"
                 xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
                 >
    <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://idp.example.com/idp/shibboleth</saml2:Issuer>
    <saml2p:Status>
        <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    </saml2p:Status>
    <saml2:Assertion ID="_91749d5ecb8512c0c5d658a77cb25928"
                     IssueInstant="2019-06-11T18:49:38.300Z"
                     Version="2.0"
                     xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
                     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                     >
        <saml2:Issuer>https://idp.example.com/idp/shibboleth</saml2:Issuer>
        <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
            <ds:SignedInfo>
                <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
                <ds:Reference URI="#_91749d5ecb8512c0c5d658a77cb25928">
                    <ds:Transforms>
                        <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
                        <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                            <ec:InclusiveNamespaces PrefixList="xsd"
                                                    xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
                                                    />
                        </ds:Transform>
                    </ds:Transforms>
                    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                    <ds:DigestValue>mDAgwb9ZJxc+01sC99lAlAIAOEoiTgzHVTm4F9bdn/0=</ds:DigestValue>
                </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>
LWiL3+CdU6y86zBLx3vG6na1o46EUgiN7iV+b4J2lPvZK7+Oeu6XSenJlzo/cUMT19pYYrDMM652
3lDAJCuOKPx4zTRIcabGrgzTKgmen0SHqWPxeL7t23RB6+v5AUvVw02tXqQhlggKEe3H+1T1k5q0
cGc1xw5CQtI8zE6GK7nG1INnU7mo872H9x+zM1zy3yyvrWOkHHhVFqQQ1Tu+0ev4BIhTQaVgC+pM
/ZvpctNjDMl1q4RSt1qumC+KFsYZlbrsLG7AvGJuR39wt/HV7F8Je3AUGGwMtGjkpRDuN1lIHrMq
VzFf/5eKUv20rEk3aOxoV/sMfcuhWo27+NjE1g==
</ds:SignatureValue>
            <ds:KeyInfo>
                <ds:X509Data>
                    <ds:X509Certificate>MIIDPDCCAiSgAwIBAgIVALPPoC598LJ6ZJJJXCA2ESASlN4AMA0GCSqGSIb3DQEBCwUAMB8xHTAb
BgNVBAMMFGlkcXNhbWwuaWRxdWFudGEuY29tMB4XDTE3MDYwMjIxNDI0NloXDTM3MDYwMjIxNDI0
NlowHzEdMBsGA1UEAwwUaWRxc2FtbC5pZHF1YW50YS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAs4ml4G592b059YDgyD/MLWQKaKrc0/24Ufbl/JY7wOI1RpxW8DlbCvibzQge6Tu
/8LVy4GIDb8QLxmCfFKYn97HC68TgXVJ+m+sQm+e4SVg6V2q+JY94LLcoFVe8+78ZIYT23KLkTv2
RlHzes/sL1YaPSK4UuN+/ezppyX2t9BGNfuiUKA0KCf7wMFuQ07Fr65FTcGXQyxhPyaNrXjrNMJa
LqwpCaesVdVzoqPevYVN3+nzAvOWoEbi6IcwnF07D0FYren/GPRXPAk5sP6fF3X0rJCkSq+d5t5P
0gWONlvm9WlUrKadmeiibCtR2lGQ/dZGmyUzIILsuOwu4yp/EsI3AgMBAAGjbzBtMB0GA1UdDgQW
BBREpZrZlnm8YrbSFcl59WRR5IY2FTBMBgNVHREERTBDghRpZHFzYW1sLmlkcXVhbnRhLmNvbYYr
aHR0cHM6Ly9pZHFzYWQCV63ubc+tsfzCvL48k35RzLAD15DIdbS9pZHAvc2hpYmJvbGV0aDANBgk
AAOCAQEAEvrdnSvK2C2rcRr7kXn4Q/NaEovuUeqaNs1k/2+dSqs8rroM+m3Iq8RlBcmKnP/+mET3
wwUaWRxc2FtbC5pZHF1YW50YS5jb20wggEiLRXay9y1uJXyZx37RDkGu8SD7+zf8znM+TCsX/qAP
6Ve95WAeX4uB8Aeol3LULe1dePsRb/1RNpKsm8NomVzCwBXK9vyv8t3IVN40jZMaaTtR0YR22fTu
qTyIMarMPO0Eh0f1FHraYaXfyop1OJcYlISpYe+c4vNvAXwEtHkZD2Iu/2aEMGcvBo3uq6OYVDXO
fI3CvoB7sRtxURtj+vVSZKjDe6s7+lRcE1tpDkwOEEuDzA==</ds:X509Certificate>
                </ds:X509Data>
            </ds:KeyInfo>
        </ds:Signature>
        <saml2:Subject>
            <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
                          NameQualifier="https://idp.example.com/idp/shibboleth"
                          SPNameQualifier="urn:amazon:webservices"
                          xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
                          >AAdzZWNyZXQx/wu+MEcVaUwjGOXhDKAO/5KXLD2AcDGnu1DyoP2C4ztOF01Su6tTJDytykrsv7W2dSV4FkL42ORYDiipBEuwiRSbnvViKbFBkHYN4YUmQzttx3DPNW/w42tMjLrY2iyn7sAUgQSVNGRHyMAH</saml2:NameID>
            <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <saml2:SubjectConfirmationData Address="192.168.150.10"
                                               NotOnOrAfter="2019-06-11T18:54:38.412Z"
                                               Recipient="https://signin.aws.amazon.com/saml"
                                               />
            </saml2:SubjectConfirmation>
        </saml2:Subject>
        <saml2:Conditions NotBefore="2019-06-11T18:49:38.300Z"
                          NotOnOrAfter="2019-06-11T18:54:38.300Z"
                          >
            <saml2:AudienceRestriction>
                <saml2:Audience>urn:amazon:webservices</saml2:Audience>
            </saml2:AudienceRestriction>
        </saml2:Conditions>
        <saml2:AuthnStatement AuthnInstant="2019-06-11T18:49:38.041Z"
                              SessionIndex="_79ee919a4e3fcd2f6d13702b60bfd357"
                              >
            <saml2:SubjectLocality Address="192.168.150.10" />
            <saml2:AuthnContext>
                <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
            </saml2:AuthnContext>
        </saml2:AuthnStatement>
        <saml2:AttributeStatement>
            <saml2:Attribute FriendlyName="Role"
                             Name="https://aws.amazon.com/SAML/Attributes/Role"
                             NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
                             >
                <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                      xsi:type="xsd:string"
                                      >arn:aws:iam::my-aws-id:role/shibbolethidp,arn:aws:iam::my-aws-id:saml-provider/Shibboleth-IdP</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="RoleSessionName"
                             Name="https://aws.amazon.com/SAML/Attributes/RoleSessionName"
                             NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
                             >
                <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                      xsi:type="xsd:string"
                                      >winston.hong@example.com</saml2:AttributeValue>
            </saml2:Attribute>
        </saml2:AttributeStatement>
    </saml2:Assertion>
</saml2p:Response>

(3) Amazon AWS provides the configuration guide How to Use Shibboleth for Single Sign-On to the AWS Management Console.
Shibboleth provides the configuration guide Shibboleth IdP with Amazon Cognito
(4) How to build and run Shibboleth SAML IdP and SP using Docker container at GitHub repository provides the instruction on building a SAML-based Authentication/Authorization Provider using Shibboleth SAML IdP and OpenLDAP.

*

*Shibboleth SAML IdP is responsible for identity federation.

*OpenLDAP is responsible for identity authentication.
(I) I have validated SAML Single Sign-On (SSO) provided by Docker-running Shibboleth SAML IdP (Identity Provider) and OpenLDAP for the following enterprise applications. In other words, I leveraged Docker-running Shibboleth SAML IdP and OpenLDAP to log in to the following enterprise applications successfully.
Microsoft Office 365
Google G Suite
Salesforce
Dropbox
Box
Amazon AWS
OpenStack
Citrix NetScaler
VMware vCloud Director
Oracle NetSuite

(II) I have validated Shibboleth IdP with Amazon AWS Management Console with reference to How to Use Shibboleth for Single Sign-On to the AWS Management Console
(III) We developed our former version of Zero-Password Authentication and Authorization System in Java and leveraged Shibboleth IdP to provide SAML SSO for enterprise applications.
We developed our current version of Zero-Password Authentication and Authorization System with scalability and high availability in Scala to provide SAML SSO natively for enterprise applications without Shibboleth IdP.
Another StackOverflow question "Setting up a new Shibboleth IdP to work with an existing SAML SP" provides valuable information and discussions on Shibboleth SAML configuration.

A: I used PHP, LightSaml for my SSO SP Initiated
I had my service which I wanted to be an IdP and outside service which were a SP.
After I wrote my own script for receiving SAMLRequest, sending SAMLResponse and sent XML Metadata to the SP owner (he configured Cognito by this)
I had the same error in the browser console
error_description:Error in SAML response processing: Invalid SAML metadata.

So there are few steps which caught my attention while fighting with this error:

*

*Check if all data in XML Metadata are correct

*Check if your SAMLResponse include relayState and "InResponseTo" parameter  in < samlp:Response > (which is ID of SAMLRequest)

*Check if nameID format is correct and it is the same as server needs

*Check if EntityId is correct in all places

*Check attribute mapping in Cognito


text:
Q: do is anyway to detect Tablets Pills package is empty or not? do infrared sensor can pass through transparent plastic and work?

A: Your eyes cannot see IR but your (phone) camera can!
Grab your TV remote as an IR source and while pressing a button on the remote look at the remote through your phone's camera (actually almost any digital camera will do).
Chances are you will see the IR transmitter LED in the TV remote flashing like so:

Now hold the pills package in between and check if you can still see the IR LED flashing.
If yes: then the IR light can pass through the holes in the package.
However, the aluminium (?) foil in the pills package will block IR very effectively. If that foil is not removed then the IR light will not pass through.
Only if there is a clear visible hole left (through which you can see light pass through) can this work reliably as a pill present/not present detector.


text:
Q: c# Authentication failed Google ReCaptcha I'm trying to include Google ReCaptcha validation on my project, so in my C# class a have the following code doing the request to validate the key:
try
{
    string Response = Request["g-recaptcha-response"];

    bool Valid = false;

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3;
    ServicePointManager.ServerCertificateValidationCallback = delegate
    {
        return true;
    };

    HttpWebRequest req = (HttpWebRequest)WebRequest.Create
    ("https://www.google.com/recaptcha/api/siteverify?secret=MYKEY&response=" + Response);

    using (WebResponse wResponse = req.GetResponse())
    {

        using (StreamReader readStream = new StreamReader(wResponse.GetResponseStream()))
        {
            string jsonResponse = readStream.ReadToEnd();

    ...
}
    }
}
catch (WebException ex)
{
    ...
}

But I keep getting the exception bellow. As I'm including the SecurityProtocol switch I didn't expect to receive this kind of error. Am I missing something here? My project is based on .NET framework 4.5. I already had this kind of error but it was resolved by including the SecurityProtocol switch, but not this time.

The underlying connection was closed: An unexpected error occurred on a send. System.IO.IOException: Authentication failed because the remote party has closed the transport stream. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async)

A: Just resolved the issue by removing those lines.
ServicePointManager.ServerCertificateValidationCallback = delegate
{
    return true;
};


text:
Q: Drawing a second ball from a randomly selected box Suppose I have 3 boxes. Box $i$ has $b_i$ black balls and $w_i$ white balls (all the boxes contain the same number of balls).
A box is selected randomly out of the three, and a ball is selected randomly.
Given that the randomly selected ball is white, and given that the ball is not returned to the box, what is the probability to draw a second white ball from the same box?
I want to solve this using only conditional probability.
My attempt:
The probability to draw a first white ball ($W_1$) is given by the law of total probability:
$$
P(W_1) = P(A_1)P(W_1|A_1) + P(A_2)P(W_1|A_2) + P(A_3)P(W_1|A_3) = \frac{1}{3}\left(\frac{w_1}{w_1+b_1} + \frac{w_2}{w_2+b_2} + \frac{w_3}{w_3+b_3}\right)
$$
For the second white ball, $W_2$, its probability is given by
$$
P(W_2|W_1) = \frac{P(W_2\cap W_1)}{P(W_1)}
$$
but I am having troubles calculating $P(W_1\cap W_2)$

A: Try
$$ P(W_2\cap W_1)=\frac{1}{9}\left(\frac{w_1}{w_1+b_1}\frac{w_1-1}{w_1+b_1-1} + \frac{w_2}{w_2+b_2}\frac{w_2-1}{w_2+b_2-1} + \frac{w_3-1}{w_3+b_3-1}\frac{w_3}{w_3+b_3}\right)$$

A: It's fairly obvious what the final result will be. Calculating it
two ways gives you an opportunity to check how well you apply Bayes's Theorem, at least in principle, though it's not clear that this
particular problem is a particularly good test of that ability.
In order to compute the probability of two white balls, you could use
\begin{align}
P(W_1 \cap W_2) & = P(W_1 \cap W_2 \mid A_1) P(A_1)\\
&\qquad {} + P(W_1 \cap W_2 \mid A_2) P(A_2) \\
&\qquad {} + P(W_1 \cap W_2 \mid A_3) P(A_3).
\end{align}
The probability $P(W_1 \cap W_2 \mid A_1)$ is the probability that
both balls will be white if you pull two balls from a box
containing $b_1$ black balls and $w_1$ white balls.
One way to look at this is that there are
There are $\binom{b_1 + w_1}{2}$ equally likely pairs of balls to draw,
of which $\binom{w_1}{2}$ pairs are two white balls, so
$$
P(W_1 \cap W_2 \mid A_1) = \frac{\binom{w_1}{2}}{\binom{b_1 + w_1}{2}}
= \frac{w_1 (w_1 - 1)}{(b_1 + w_1)(b_1 + w_1 - 1)},
$$
which is the same result you get by using the "obvious" values
of $P(W_2 \mid A_1 \cap W_1)$ and $P(W_1 \mid A_1)$ in
$$
P(W_2 \cap W_1 \mid A_1) = P(W_2 \mid W_1 \cap A_1) P(W_1 \mid A_1).
$$
(The "obvious" values are
$P(W_2 \mid A_1 \cap W_1) = \frac{w_1 - 1}{b_1 + w_1 - 1}$
and $P(W_1 \mid A_1) = \frac{w_1}{b_1 + w_1}$,
as already indicated in other answers.)


text:
Q: Index not used on filterd aggregate query I need to increase performance of the following query, which filters on column status_classification and aggregrates on classification -> 'flags' (a jsonb field in the form: '{"flags": ["NO_CLASS_FOUND"]}'::jsonb):
SELECT SUM(CASE WHEN ("result_materials"."classification" -> 'flags') @> '["NO_CLASS_FOUND"]' THEN 1 ELSE 0 END) AS "no_class_found",
    SUM(CASE WHEN ("result_materials"."classification" -> 'flags') @> '["RULE"]' THEN 1 ELSE 0 END) AS "rule",
    SUM(CASE WHEN ("result_materials"."classification" -> 'flags') @> '["NO_MAPPING"]' THEN 1 ELSE 0 END) AS "no_mapping"
FROM "result_materials"
WHERE "result_materials"."status_classification" = 'PROCESSED';

To improve performance i created an index on status_classification, but the query plan shows that the index was never hit, and a Seq Scan was performed:
 Aggregate  (cost=1010.15..1010.16 rows=1 width=24) (actual time=19.942..19.946 rows=1 loops=1)
   ->  Seq Scan on result_materials  (cost=0.00..869.95 rows=6231 width=202) (actual time=0.024..4.660 rows=6231 loops=1)
         Filter: ((status_classification)::text = 'PROCESSED'::text)
         Rows Removed by Filter: 5
 Planning Time: 1.212 ms
 Execution Time: 20.187 ms

I've tried (all sql at the end of question):

*

*adding an index to status_classification

*adding a GIN index to classification -> 'flags'

*adding a multi field GIN index, with classification -> 'flags' and status_classification (see here)

The index is still not hit, and performance suffers on as the table grows.  Cardinality is low in status_classification field, but the entries in classification -> 'flags' are quite rare, so i would have thought an index very practical here.
Why is the index not used?  What am i doing wrong?
SQL to recreate my db:
create table result_materials (
  uuid int,
  status_classification varchar(30),
  classification jsonb
);

insert into result_materials(uuid, classification, status_classification)
select seq
  , case(random() *2)::int
    when 0 then '{"flags": ["NO_CLASS_FOUND"]}'::jsonb
    when 1 then '{"flags": ["RULE"]}'::jsonb
    when 2 then '{"flags": ["NO_MAPPING"]}'::jsonb end
        as dummy
  , case(random() *2)::int
    when 0 then 'NOT_PROCESSABLE'
    when 1 then 'PROCESSABLE' end
        as sta
from generate_series(1, 150000) seq;

Indexes attempted:
-- status_classification
create index other_testes on result_materials (status_classification);

-- classification -> 'flags'
CREATE INDEX idx_testes ON result_materials USING gin ((classification -> 'flags'));

-- multi field gin
-- REQUIRES you to run: CREATE EXTENSION btree_gin;
CREATE INDEX idx_testes ON result_materials USING gin ((classification -> 'flags'), status_classification);

A: The query takes 20ms and only removes 5 rows of 6k, yes a scan it's a good choice.
Try adding more rows to the table, and check the cardinality of your clause.


text:
Q: ELI5: What is an $l^p$ space I have already asked a similar question. Still, I have been thinking about $l^p$ spaces all summer, and I still don't have a grasp of it. I thought $l^p$ spaces are a generalization of Euclidean space. If that is the case, I don't understand the relationship between an Lp space and this famous graph:
https://en.wikipedia.org/wiki/Lp_space#/media/File:Vector-p-Norms_qtl1.svg
If  $l^p$spaces are not a generalization of Euclidean space, could someone please tell me what  $l^p$ spaces are and how the linked graph motivates understanding?
To all those who may contribute, I thank you, in advance, VERY much for your insight.

A: The $l^p$ space is a special case of Minkowski space, all these "non-Euclidean "geometries have been derived based on using the first four Euclidean postulates together with various negations of the fifth. take a look at https://www.cambridge.org/core/books/minkowski-geometry/BEB8FE99553CABD2BECD623887C879B8
imagine you are in a space that is not homogenous, so distance is not the same in every direction. try to have a look on the spherical geometries and also the hyperbolic plane.
in the Euclidean plane the minimal distance between two points is just the segment when you are in $l^p$ space the minimal distance are arcs of the $l^q$ disk passing through the two points (such that l^q is the dual of l^p)
in general, when your unit disk is the euclidean disc everything is Clair (humain are euclidean) you can compute angles, area, perimeter, curvature the orthogonality between two vectors ...
when your unit disk is just a convex body you lose a lot of things, first the symmetry of the orthogonality ....


text:
Q: Majorana fermions - Scattering amplitude/Feynman rules I am looking at 4 field scattering processes ($\phi \phi \rightarrow \psi \psi$) given by the Lagrangian is
\begin{equation}
    \mathcal{L}_i \supset \frac{\lambda_s}{\Lambda} \overline{ \psi} \psi |\phi|^2+ \frac{\lambda_a}{\Lambda} \overline{ \psi}\gamma_5 \psi |\phi|^2
\end{equation}
and it is straightforward to write the scattering matrix for the case of a Dirac fermion being
\begin{equation}
    \mathcal{M}_s = \frac{\lambda_s}{\Lambda} \overline u_s  (p)  v_{s'} (q)
\end{equation}
and
\begin{equation}
    \mathcal{M}_a = i \frac{\lambda_a}{\Lambda} \overline u_s  (p) \gamma_5 v_{s'} (q)
\end{equation}
and I would like to know how this changes in the case of a Majorana field. I think both interactions are allowed since are both $C$ invariant but I don't see how knowing that the Majorana field has the constraint $\psi^c=\psi$ can change the result.
I think what I am missing is how to write the external legs for a Majorana fermion, do you have any suggestions? Or any references that you could to recommend?


text:
Q: Java - H2 Database - getGeneratedKeys() not returning any results Ok, what am I missing?
I have a table as such:
CREATE TABLE PUBLIC.RESULTS
(RESULTID IDENTITY NOT NULL,
SOURCEID INTEGER NOT NULL,
PARENTID INTEGER,
NAME VARCHAR(25) NOT NULL,
VALUE CLOB NOT NULL,
PRIMARY KEY (RESULTID))

I've tried having RESULTID both be a INTEGER with AUTO_INCREMENT and as a type IDENTITY.
I'm using prepared statements, and no mater what I do, I keep throwing a "no data" exception when trying to set the value of a:
String sql = "INSERT INTO RESULTS (SOURCEID, PARENTID, NAME, VALUE) VALUES (?, ?, ?, ?)";
PreparedStatement stmt = null;
stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
... {Truncated setting of values} ...

stmt.executeUpdate();
conn.commit();
ResultSet rs2 = stmt.getGeneratedKeys();
rs2.next();
Integer a = rs2.getInt(1);

When I actually look in the database, the data is inserted properly, with the next value set for the RESULTID field just fine, I just can't seem to return the value.
I have to be doing something silly, since this should work. Any ideas?
Since someone asked the full stack trace is below:
org.h2.jdbc.JdbcSQLException: No data is available [2000-170]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
    at org.h2.message.DbException.get(DbException.java:169)
    at org.h2.message.DbException.get(DbException.java:146)
    at org.h2.message.DbException.get(DbException.java:135)
    at org.h2.jdbc.JdbcResultSet.checkOnValidRow(JdbcResultSet.java:2957)
    at org.h2.jdbc.JdbcResultSet.get(JdbcResultSet.java:2963)
    at org.h2.jdbc.JdbcResultSet.getInt(JdbcResultSet.java:307)
    at com.cigital.db.DefaultDb.storeValue(DefaultDb.java:147)
    at com.cigital.db.DefaultDb.processResult(DefaultDb.java:115)
    at com.cigital.db.DefaultDb.importScan(DefaultDb.java:84)
    at com.cigital.gui.Default.jButImportActionPerformed(Default.java:373)
    at com.cigital.gui.Default.access$400(Default.java:26)
    at com.cigital.gui.Default$6.actionPerformed(Default.java:131)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6289)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6054)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4652)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4482)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4482)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
    at java.awt.EventQueue.access$000(EventQueue.java:85)
    at java.awt.EventQueue$1.run(EventQueue.java:603)
    at java.awt.EventQueue$1.run(EventQueue.java:601)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$2.run(EventQueue.java:617)
    at java.awt.EventQueue$2.run(EventQueue.java:615)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

A: You need to get the generated keys before committing the connection, and not after.


text:
Q: Is there a file besides /etc/passwd that contains/defines my UID? Trying to learn about UIDs and GIDs.
Various online reading led me to believe that my UID is saved in /etc/passwd, but this doesn't appear to be the case on a server where I work:
$ whoami
user1
$ cat /etc/passwd | grep user1
$

Is there a(nother) file besides /etc/passwd that could contain my UID?
(I'm assuming UID is similar to GID in that there is a file somewhere that contains it. I've found the GID I'm interested in in the file /etc/group)
I know that I can get my UID with the command id -u, but for this question, I'm specifically interested in learning whether there's a file that contains it.

A: Yes /etc/passwd is one of many ways the user account database can be stored and queried.
In many Unix-like systems, the Name Service Switch (initially from Solaris) is responsible for translating some system names to/from ids using a number of methods.
Its configuration is usually stored in /etc/nsswitch.conf.
In there, you'll find entries for a number of databases and how they are handled (group, passwd, services, hosts, networks...). For the hosts database which is used to translate host names to network protocol addresses, you'll find that DNS and sometimes mDNS are generally queried in addition to /etc/hosts.
When a process requests information about a user name such as with the getpwnam() standard function, the methods to use are looked up in that file for the passwd entry.
If such a method is the files method, /etc/<db> will be looked up. On GNU systems, that's typically done by some /lib/<system>/libnss_files.so.<version> dynamically loaded module.
But you can have many more, such as NIS+, LDAP, SQL. Some of those methods are included with the GNU libc, some can be installed separately. On Debian or derivatives, see the output of apt-cache search 'NSS module' for instance.
In enterprise environments, where the user database is centralised, the most popular central DB was NIS, then NIS+ while these days, it's rather LDAP or Microsoft's Active Directory (or its clones for Unix).
If present, the get{pw/host/grp}...() functions of the GNU libc will also query a name service caching daemon via /run/nscd/socket instead of invoking the whole NSS stack and query the backend DBs directly. Then the querying will be done by nscd and cached to speed up later queries. Some NSS modules can can also do their caching themselves.
On GNU/Linux systems, a popular method is using System Security Services (sss). That comes with a separate daemon (sssd) that handles the requests and despatches them to other databases (such as LDAP / AD) while also doing some caching. Then /etc/nsswitch.conf will have a sss method for most DBs, and the backends are configured in the sssd configuration. PAM (responsible for authentication) also typically queries sssd in that case.
That should help clarify why querying /etc/passwd (or /etc/group or /etc/hosts...) to get account (or group/host...) information from the command line is wrong in the general case. Most modern systems will have a getent command instead for that (also from Solaris), or more portably, you can use perl's interface to all the standard get<db>*() functions.
$ getent passwd bin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
$ perl -le 'print for getpwnam("bin")'
bin
x
2
2

bin
/bin
/usr/sbin/nologin

$ getent services domain
domain                53/tcp
$ perl -le 'print for getservbyname("domain", "tcp")'
domain

53
tcp
$ perl -le 'print for getservbyname("domain", "udp")'
domain

53
udp

A: technically yes there is some file somewhere that contains the uid for every given username.
If you make simple local accounts in linux then it would be in /etc/passwd in field #3 between the :'s.
But if linux uses ActiveDirectory authentication then it would get all the username/uid info from another server, and then is that stored in some [text] file on your linux system I don't know, it might just be stored in memory; I would be very interested in knowing this detail.
There are a few login or authentication schemes that linux supports, AD for one, also LDAP.  Where LDAP stores the username and uid mapping I do not know, but I would also be interested in knowing.
So... Is there a file besides /etc/passwd that contains/defines my UID? yes.  It depends on all the different login/authentication methods linux supports, besides the simple traditional local /etc/passwd method and which method is being used.  So your next question might be what are all the login authentication methods linux supports and how do I tell which is being used..


text:
Q: Read values from a .csv file into a list dictionary I have a .csv file with one column called Trigger and two other columns called void1 and void2.
The data looks like this:
Trigger;void1;void
good;not good;not to good;

I would like to use this data to create a dictionary that looks like this:
dictionary ={"good":["not good", "not to good"]}

I used the following code to start:
df = pd.read_csv('dictionary.csv', sep =";")

for index, row in df.iterrows():
    dictionary[row['trigger']] = row['void1']

Which works. However when I try:
df = pd.read_csv('dictionary.csv', sep =";")

for index, row in df.iterrows():
    dictionary[row['trigger']] = row['void1', 'void2']

It doesn't work. Any ideas how I can get the output I am looking for?

A: Assuming Numpy works like standard Python Lists, you need to change this line:
    dictionary[row['trigger']] = row['void1', 'void2']

To:
    dictionary[row['trigger']] = [row['void1'], row['void2']]

Also assuming that your CSV File actually looks like this:
    Trigger;void1;void2
    good;not good;not to good;

instead of this:
    Trigger;void1;void
    good;not good;not to good;

Also notice that your first example does not save the entries as you wanted it to. You are storing a String as dictionary value instead of an array.

A: Please access only one column from row at a time:
for index,row in df.iterrows():
    dictionary[row['trigger']] = [row['void1'], row['void2']]

A: In pandas you can have a list inside the index operator ([]) in order to select the columns you want. You were almost there with the row['void1', 'void2'] syntax, you just need a second group of brackets:
dictionary[row['trigger']] = row[['void1', 'void2']].tolist()

You then call tolist because row[['void1', 'void2']] will return a Series object instead of a plain list.


text:
Q: Clojure -- what is the correct way to apply functions in sequence to an argument? I'm not clear on the difference between -> and ->> in Clojure: from the API reference, it seems like the latter would be the correct way to apply several functions in sequence, i.e. (->> x h g f) would result in f(g(h(x))).
This is related to how Lisp-like language differentiate f(x, y) and (f(x))(y), whereas Haskell does not, correct? (Using math notation; commas intended to imply n-ary functions, not tupling).
Thanks in advance!
Edit
I'm wrong, neither work except on simple functions like (def inc #(+ 1 %)), where they both work.
Here's an example of a function that doesn't work with -> or ->>,
(defn mkinc [amnt] (fn [x] (+ x amnt)))
(-> 3 (mkinc 2))
; ERROR -- Wrong number of args (2) passed to: sandbox58780$fn--58797$mkinc
((mkinc 2) 3)
; 5

A: -> inserts the prev form into the 2nd position. Whereas ->> inserts into the last position. Taking a page from Joy of Clojure, note the insertion point marked by ,,,
(-> x (f ,,, 1) (g ,,, 2) (h ,,, 3))

(->> x (f 1 ,,,) (g 2 ,,,) (h 3 ,,,))

A: -> and ->> are equivalent if all the functions take only one argument. Otherwise, -> passes the value being threaded as the first argument to the function where as ->> passes it as the last argument. The following example should make this clear:
(-> x
    (f 1 2)
    (g 3 4)
    (h 5 6))

becomes
(h (g (f x
         1 2)
      3 4)
   5 6)

or h(g(f(x, 1, 2), 3, 4), 5, 6)
(->> x
     (f 1 2)
     (g 3 4)
     (h 5 6))

becomes
(h 5 6
   (g 3 4
      (f 1 2 x)))

or h(5, 6, g(3, 4, f(1, 2, x)))
Edit: (Responding to the Edit in the question, copying this from the comments).
The example doesn't work because the -> macro inserts the 3 as the first arg of mkinc.
See (macroexpand-1 '(-> 3 (mkinc 2))) to understand this better.
This does work: (-> 3 ((mkinc 2))).
See (macroexpand-1 '(-> 3 ((mkinc 2)))) to understand why.

A: In case there's no solution, I managed to hack it with syntax macros,
(defmacro fwcomp [& fcns] `(comp ~@(reverse fcns)))
(defmacro |> [x & fcns] `((fwcomp ~@fcns) ~x))

Usage:
(|> x h g f) ; equal to f(g(h(x)))


text:
Q: "Invalid file format" from device pulled *.db file in Nexus 4 - Android 5.1.1 I'm learning Android developement. And I receive always this error while opening a pulled database file from device: "Invalid file format"
I use this commands to pull the
adb shell "run-as package chmod 666 /data/data/package/files/database"
adb exec-out run-as package cat files/database > C://test/database

I thik, the file size is correct, and when I open it in with a text editor I can read the content, with special characters, of course. But the sqliteBrowser can't read it.

A: I had a same problem with android 4.2, although I used ubuntu 16.04 and sqlite browser instead.
I found only one way that I could access my not rooted phone's file system and finally I could open the database file.
Install SSHDroid on your phone
adb -d shell "run-as your.package.name cat databases/database_name.db > /mnt/sdcard/database_name.db"

just for sure, you can check whether the file is there
$ adb shell
shell@android:/ $ cd /mnt/sdcard
shell@android:/mnt/sdcard $ ls

if you don't know the exact name of your package then
adb shell 'pm list packages -f'

start the SSHDroid
the default username is root and the default password is admin. It makes sense to change the password.

start FileZilla
open the Site Manager and add a new site with the settings of the SSHDroid's ssh server.

set /mnt/sdcard as default remote directory

and connect to your phone via SFTP protocol


text:
Q: What is the relation between spring-security-oauth2-client and spring-security-oauth? There is a spring project spring-security-oauth
http://projects.spring.io/spring-security-oauth/docs/oauth2.html
dev guide
Source code
And then under spring-security,
there is also oauth
Source code
In springboot doc, it uses spring-security-oauth2-client, which is from spring-security
And in springboot OAuth2 tutorial , it uses yet another org.springframework.security.oauth.boot
What are the differences? And when to use which?

A: There's currently a transition period where spring-security-oauth2 has been put in maintenance mode while functionality is being consolidated from there and some other places into the new OAuth2 part of Spring Security 5.
See this post from the Spring team for detailed information!

A: Be careful that spring can handle the old protocol OAuth (V1), too. So you have to be shure which version you are using, both are not compatible to each other.
For securing your application, refer to this guide: https://ordina-jworks.github.io/microservices/2017/09/26/Secure-your-architecture-part1.html
It provides information for many spring components and their interaction. Here, of course, OAuth2 is used.


text:
Q: aria-invalid= "false" для чего используется? Не разобрался в английской документации зачем этот артибут нужен aria-invalid
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid. Часто в полях input вижу эту настройку  aria-invalid="false" . Можете своими словами объяснить что это за атрибут и почему ему false ставят?

A:
Атрибут aria-invalid используется для указания того, что значение, введенное в поле ввода, не соответствует формату или значению, которое примет приложение. Это может включать такие форматы, как адреса электронной почты или номера телефонов. aria-invalid также может использоваться для указания того, что обязательное поле пусто.
...
Атрибут должен быть установлен с помощью JavaScript в результате процесса проверки. Если значение определено как недопустимое или выходящее за пределы диапазона, установите aria-invalid="true" и сообщите пользователю об ошибке. Для улучшения пользовательского опыта предоставьте предложения о том, как можно исправить ошибку. Не устанавливайте aria-invalid="true" для пустых обязательных элементов до тех пор, пока пользователь не попытается отправить форму. Возможно, они все еще работают над его заполнением.
...
В настоящее время существует четыре значения: в дополнение к true и false у нас есть grammar, который можно использовать при обнаружении грамматических ошибок, и spelling для орфографических ошибок. Если атрибут отсутствует, или его значение равно false, или его значение представляет собой пустую строку, применяется значение по умолчанию false. Любое другое значение обрабатывается так, как если бы было установлено значение true. Вполне возможно, что в будущем будет добавлено больше значений.

"вырезка" из статьи aria-invalid - Accessibility | MDN / перевод через Яндекс.Переводчик

Если и так не понятно, то:
Если input invalid, то устанавливаем через JS area-invalid="true", если присутствует грамматическая ошибка (допустим), то ставим area-invalid="grammar" или же area-invalid="spelling" - если орфографическая. Ну а если и не то и не другое, то area-invalid="false" или же вовсе удалить атрибут.


text:
Q: Spark Creates Less Partitions Then minPartitions Argument on WholeTextFiles I have a folder which has 14 files in it. I run the spark-submit with 10 executors on a cluster, which has resource manager as yarn.
I create my first RDD as this:
JavaPairRDD<String,String> files = sc.wholeTextFiles(folderPath.toString(), 10);

However, files.getNumPartitions()gives me 7 or 8, randomly. Then I do not use coalesce/repartition anywhere and I finish my DAG with 7-8 partitions.
As I know, we gave argument as the "minimum" number of partitions, so that why Spark divide my RDD to 7-8 partitions?
I also run the same program with 20 partitions and it gave me 11 partitions.
I have seen a topic here, but it was about "more" partitions, which did not help me at all.
Note: In the program, I read another folder which has 10 files, and Spark creates 10 partitions successfully. I run the above problematic transformation after this successful job is finished.
File sizes:
1)25.07 KB
2)46.61 KB
3)126.34 KB
4)158.15 KB
5)169.21 KB
6)16.03 KB
7)67.41 KB
8)60.84 KB
9)70.83 KB
10)87.94 KB
11)99.29 KB
12)120.58 KB
13)170.43 KB
14)183.87 KB
Files are on the HDFS, block sizes are 128MB, replication factor 3.

A:
It would have been more clear if we have size of each file. But code will not be wrong. I am adding this answer as per spark code base

*

*First off all, maxSplitSize will be calculated depends directory size and min partitions passed in wholeTextFiles
    def setMinPartitions(context: JobContext, minPartitions: Int) {
      val files = listStatus(context).asScala
      val totalLen = files.map(file => if (file.isDirectory) 0L else file.getLen).sum
      val maxSplitSize = Math.ceil(totalLen * 1.0 /
        (if (minPartitions == 0) 1 else minPartitions)).toLong
      super.setMaxSplitSize(maxSplitSize)
    }
    // file: WholeTextFileInputFormat.scala

link

*As per maxSplitSize splits(partitions in Spark) will be extracted from source.
    inputFormat.setMinPartitions(jobContext, minPartitions)
    val rawSplits = inputFormat.getSplits(jobContext).toArray // Here number of splits will be decides
    val result = new Array[Partition](rawSplits.size)
    for (i <- 0 until rawSplits.size) {
      result(i) = new NewHadoopPartition(id, i, rawSplits(i).asInstanceOf[InputSplit with Writable])
    }
    // file: WholeTextFileRDD.scala

link
More information available at CombineFileInputFormat#getSplits class on reading files and preparing splits.

Note:
I referred Spark partitions as MapReduce splits here, as Spark
  borrowed input and output formatters from MapReduce


text:
Q: Connect to shared network drive from Azure Functions I have the File System connector working fine in Power Automate, it allows our flows to read from and write to several network drives. It does so via a gateway installed on one of our company's VMs. These are subfolders on mapped network drives such as \server0\subfolder0 and \server1\subfolder1, for example.
Now I'm trying to do the same in Azure Functions, ideally using that same gateway. However, my initial reading on the subject has left me a bit overwhelmed. There are plenty of docs talking about setting up a gateway in the Azure portal, as well as virtual networks, Azure File Share, Azure Storage, and so on.
In summary, how can I read from and write to various network drives in an Azure Function?


text:
Q: WP Как выводить дату обновления для таксономии? Есть ли возможность в WordPress выводить время когда была обновлена категория (кастомная) ? Пробовал так
<p class="vendor_box__time">Последнее обновление рубрики:
<time datetime="<?php the_modified_date('c'); ?>"><?php the_modified_date('j.m.Y'); ?></time>
</p>

Не работает. Оно вообще куда-то пишет данные в базе?


text:
Q: C Programming: After making 2 dimensional array, how to assign a set of integers to a row by row? I am practicing a 2 dimensional array.
Although I want to assign a set of numbers to a row by row, which of 2 dimensional array has already been made, my code can not be compiled.
How can I achieve my purpose, and what is my mistake?
Thank you for your reading my question.
#include <stdio.h>
#include <stdlib.h>

int main(void)
{

    int **animation;
    int rows = 3;
    int cols = 7;
    int y, x;
    int frame;

    animation = (int **) malloc(rows * sizeof(int *));
    if (animation == NULL) {
        puts("array animation rows: allocation failure!");
        return 1;

    }

    for (y = 0; y < rows; y = y + 1) {
        animation[y] = (int *) malloc(cols * sizeof(int));

        if (animation[y] == NULL) {
            printf("array animation[%d]: allocation failure!", y);
            return 1;
        }

    }

    int animation[0] = {0, 40, 48, 118, 48, 41, 0};
    int animation[1] = {40, 48, 118, 48, 41, 0, 0};
    int animation[2] = {40, 48, 118, 48, 41, 0, 0};

    for (frame = 0; frame != 3; frame = frame + 1) {

        printf("%s\n", animation[frame]);

    }

    for (y = 0; y < rows; y = +1) {
        free(animation[y]);
    }

    free(animation);

    return 0;

}

A: You do everything fine, up until int animation[0]= ...
int animation[0]= ... declares a new array variable of size zero elements. Your compiler will complain about this because there is already an int **animation variable.
Because you allocate the array dynamically using malloc, you cannot initialize it with static initializers. It means you have to initialize them "by hand", for example
animation[0][0]= 0;
animation[0][1]= 40;
/// etc.

A: You can use an array with the initial values and the memcpy function, like this:
#define ROWS 3
#define COLS 7

int initialValues[ROWS][COLS] = {
    {0, 40, 48, 118, 48, 41, 0},
    {40, 48, 118, 48, 41, 0, 0},
    {40, 48, 118, 48, 41, 0, 0}};
...
for (y = 0; y < ROWS; y++) {
    memcpy(animation[y], initialValues[y], sizeof initialValues[y]);
}

A: Your code has three main issues.
1.
int animation[0] = {0, 40, 48, 118, 48, 41, 0};
int animation[1] = {40, 48, 118, 48, 41, 0, 0};
int animation[2] = {40, 48, 118, 48, 41, 0, 0};

is a mix of attempting to declare new arrays and initialize them instead of to initialize the memory animation points to properly. I recommend you to read a chapter of good C book again about how to declare and initialize arrays in C.
Use instead:
animation[0][0] = 40;
animation[0][1] = 48;
animation[0][2] = 118;
animation[0][3] = 48;
animation[0][4] = 41;
animation[0][5] = 0;
animation[0][6] = 0;

for (int i = 1; i < rows; i++)
    memcpy(animation[i], animation[i-1], sizeof(int) * cols);

2.
printf("%s\n", animation[frame]);

%s is only to print character strings. Not int arrays! Please learn more about strings.
Use
for (frame = 0; frame != 3; frame = frame + 1) {
    for (int i = 0; i < cols; i++)
        printf("%d ", animation[frame][i]);

    printf("\n");
}

3.
for (y = 0; y < rows; y = +1) {
    free(animation[y]);
}

free(animation);

You attempt to free memory several times due to the faulty y = +1. Change it to y++.

Full corrected code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (void)
{

    int **animation;
    int rows = 3;
    int cols = 7;
    int y;
    int frame;

    animation = (int **) malloc(rows * sizeof(int *));
    if (animation == NULL) {
        fputs("array animation rows: allocation failure!",stderr);
        return 1;

    }

    for (y = 0; y < rows; y = y + 1) {
        animation[y] = (int *) malloc(cols * sizeof(int));

        if (animation[y] == NULL) {
            fprintf(stderr,"array animation[%d]: allocation failure!", y);
            return 1;
        }

    }

    animation[0][0] = 40;
    animation[0][1] = 48;
    animation[0][2] = 118;
    animation[0][3] = 48;
    animation[0][4] = 41;
    animation[0][5] = 0;
    animation[0][6] = 0;

    for (int i = 1; i < rows; i++)
        memcpy(animation[i], animation[i-1], sizeof(int) * cols);

    for (frame = 0; frame < rows; frame = frame + 1) {
        for (int i = 0; i < cols; i++)
            printf("%d ", animation[frame][i]);

        printf("\n");
    }

    for (y = 0; y < rows; y++) {
        free(animation[y]);
    }

    free(animation);

    return 0;
}

Execution/Output (Online Example):
./a.out
40 48 118 48 41 0 0
40 48 118 48 41 0 0
40 48 118 48 41 0 0

Please learn more about C from a good starting book. The issues you made show that you currently ain't got sufficient knowledge.
A list of good books you can find here:

*

*The Definitive C Book Guide and List


text:
Q: Can I and should I pass a Context to a static method outside of the UI? I've looked around but never found a straightforward answer to this question. I'm wondering what would happen if I use a pattern that requires me to pass a Context to static methods to do things on the backend. For instance:
public static Observable<CreateThing> createNewThing(String thingName, Context context) { // Passing Context in
    return RestNetworker.handleResponse(ServiceGenerator.createService(Service.class).createThing(thingName))
            .doOnNext(response -> DatabaseHelper.getInstance(context).createThing(new Thing(response.getThingId(), thingName))); // context used to get instance of DatabaseHelper
}

This method makes an API call and then writes the object to the database locally after a success response. However, I need to pass a Context to create the instance of the database helper. I could alternatively pass the database helper itself, but then I'd be creating the instance (rather getting it, since it's singleton) in the Activity code and I'd rather not do that either.
My question really is: If, say, a user exits the Activity while the API call is in progress, will this Context instance get GC'd and result in an NPE when the response comes back? I've done this kind of thing before and never noticed that issue, but it really seems that there should be some consequence of doing this. I know that other developers must do some things off the UI thread that require a Context, so this should be a relatively easy question to answer.
Thanks guys! Please let me know if you need any more information to provide better context. Heh.

A: The rule is that you do not pass an instance of the Activity to some object that may keep a reference to it outside of the lifecycle of the Activity. This will cause a memory leak, as the GC will not be able to free the memory allocated to the Activity and the entire view tree contained within. In those instances you pass getApplicationContext().
In cases where the context will only be referenced for the duration of the method call, passing the Activity as this is fine.
In your case, it seems like DatabaseHelper may store a reference to the context, so I would use getApplicationContext() Note that you would not get NPE because the reference was GC if you passed an Activity, that doesn't make sense - if the DatabaseHelper was storing a strong reference, this could not occur (at least on the reference to the Activity itself).


text:
Q: APFS Fusion Drive with external USB on 2018 Mac Mini For fun, I've bought a USB thumbdrive from a reputable brand, and was able to build an APFS fusion drive (with the internal SSD as the main, and the USB thumbdrive as the secondary) on my 2018 Mac Mini, which came with Mojave, as follows:

*

*Reboot into Mojave's recovery

*In Startup Security Utility, choose "Medium Security" and choose "Allow booting from external or removable media"

*In Terminal, list all disks

$ diskutil list | head -40

*

*Then delete the APFS volume:

$ diskutil apfs deleteContainer disk0s2

*

*Then create a Core Storage Fusion Drive:

$ diskutil cs create "Fusion LVG" disk0 disk4
$ diskutil cs createVolume <identifier> jhfs+ "Fusion" 100%

*

*Exit Terminal and go to Disk Utility. Format the drive as APFS.

*Reboot into internet recovery mode with Opt-Cmd-R and install Catalina.

The problem is as follows. The installation finishes correctly, and leaves you with a running system. However data gets corrupted when the fusion drive contains too much data to solely exist on the internal drive. I've checked this by copying one file multiple times and then checking the MD5 sum.
Why have I been able to create a fusion drive that actually corrupts data? Why did it go wrong?

A: This is a bad idea for lots of reasons. You're lucky that the Mac can boot from a Fusion drive that's half T2 and half external USB.
I suspect the T2 disk controller is at the root of the problem. Possibly because of its built-in encryption. Perhaps the Fusion magic moves encrypted blocks off the SSD without decrypting them?
Even if it did work, using a USB thumb drive is going to massively compromise the speed of the  fast internal portion.
I don't think that 'expanding' the internal storage into a bigger logical volume, either with Fusion or RAID is going to be workable.


text:
Q: Is there a way to get the current URL with current port number in Symfony2? Is there a function in Symfony 2.7 which returns the current absolute URL with the current port number?

A: You can directly use {{ app.request.uri }} in your twig template.
Ex: If current URI is http://www.example.com:8080/page?q=test&p=2 then {{ app.request.uri }} will return the same string.

A: The Request object holds both URI and port. So from within a Controller you can
public function indexAction(Request $request)
{
    $uri = $request->getUri();
    $port = $request->getPort();
}

If you're not in a Controller make sure to inject the RequestStack in your class an then fetch uri and port from the master-request
$requestStack->getMasterRequest()->getUri();

A: Generating an absolute url should include the port.
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
...

public function indexAction(Request $request)
{
    $link = $this->generateUrl(
        'route_name', [
            'route'=>'params'
        ],
        UrlGeneratorInterface::ABSOLUTE_URL
    );

    return $this->render('template', [
        'link' => $link;
    ]);
}


text:
Q: How to connect to a third party VPN from Google Cloud Platform? Requirements

*

*I am trying to connect to a third party VPN from my back end on Google Cloud Platform.

*Since my IP has to be whitelisted by the third party, the source IP for all requests must be a single static IP address.
My plan so far...
Currently I plan to run a Kubernetes service that runs as a "proxy", such that the service is connected to the VPN and the rest of my back end can send requests to the proxy. Requests from my back end to the proxy service should obviously not run via the VPN, but requests from the proxy service to the third party should run on the VPN.
The challenge
I know how to reserve an IP address, but I don't even know where to begin to set up a VPN client.
Any help would be greatly appreciated!


text:
Q: GMSPlacePicker iOS 9 issue - ios - EXC_BAD_ACCESS In iOS 9 GMSPlacePicker getting crashed as soon as we press back button without selecting any location on the picker view, while working fine with iOS 8.
Error

*** -[UIWindow _shouldAnimatePropertyWithKey:]: message sent to deallocated instance

Code
@interface GMSViewController ()

@property(nonatomic,strong) GMSPlacePicker *placePicker;

@end

@implementation GMSViewController{}

- (instancetype)init {
if ((self = [super init])) {
    CLLocationCoordinate2D southWestSydney = CLLocationCoordinate2DMake(-33.8659, 151.1953);
    CLLocationCoordinate2D northEastSydney = CLLocationCoordinate2DMake(-33.8645, 151.1969);
    GMSCoordinateBounds *sydneyBounds =
    [[GMSCoordinateBounds alloc] initWithCoordinate:southWestSydney coordinate:northEastSydney];
    GMSPlacePickerConfig *config =
    [[GMSPlacePickerConfig alloc] initWithViewport:sydneyBounds];
    _placePicker = [[GMSPlacePicker alloc] initWithConfig:config];
}
return self;}

- (void)viewDidLoad {
[super viewDidLoad];
UITextView *textView = [[UITextView alloc] initWithFrame:self.view.bounds];
textView.delegate = self;
textView.editable = NO;
[self.view addSubview:textView];
__weak UITextView *weakResultView = textView;
[_placePicker pickPlaceWithCallback:^(GMSPlace *place, NSError *error) {
    UITextView *resultView = weakResultView;
    if (resultView == nil) {
        return;
    }
    if (place) {
        NSMutableAttributedString *text =
        [[NSMutableAttributedString alloc] initWithString:[place description]];
        [text appendAttributedString:[[NSAttributedString alloc] initWithString:@"\n\n"]];
        [text appendAttributedString:place.attributions];
        resultView.attributedText = text;
    } else if (error) {
        resultView.text =
        [NSString stringWithFormat:@"Place picking failed with error: %@", error];
    } else {
        resultView.text = @"Place picking cancelled.";
    }
}];}

Can anyone help ?


text:
Q: Question about Fourier transform and its itegrability Let $n\geq 1$ an integer. Let $f\in L^1(\mathbb{R}^n)$ be an integrable function. Then its Fourier transform $\widehat{f}$ is defined as
$$\widehat{f}(\xi)= \int_{\mathbb{R}^n} f(x) e^{-2\pi i x\cdot \xi} dx,$$
where $\cdot$ denotes the scalar product.
The Fourier transform has many properties and there is an extensive theory about it. It is known that if $\widehat{f}$ integrates against polynomials then this implies that $f$ is differentiable up to some order.
My question is the following:
If $f$ is such that $\widehat{f}\in L^p(\mathbb{R}^n)$ for some $p>1$. Does this tell us anything about $f$ itself? Like for instance if $f$ is bounded, continuous or any other thing?
Thanks a lot! :)

A: From the Hausdorff-Young inequality, we know that $\mathcal {F} : L^p \to L^{p'} $ is bounded for $1\leq p \leq 2$. It is easy to see that the same holds for the inverse Fourier transform.
Hence, if $\hat {f} \in L^p $ for some $1\leq p \leq 2$, then $f =\mathcal {F}^{-1}\hat {f } \in L^{p'} $.


text:
Q: JS PopUp windows from different sources I need make a simple JS popup to view specific content of each link (team stats). For that I've got basic HTML set up which should popup mentioned content.

          #1
          HK Sršňe Košice

          #2
          HK KVP Represent

          #3
          HK Spartan Warriors

etc...
at the end there is popup opening code:

<button data-js="open">Open popup</button>

$team_name (team name, which was selected for links above should be displayed)

<button name="close">Close popup</button>

JavaScript code:
function popupOpenClose(popup) {

/* Add div inside popup for layout if one doesn't exist */
if ($(".wrapper").length == 0){
    $(popup).wrapInner("

");
}

/* Open popup */

$(popup).show().this;

/* Close popup if user clicks on background */
$(popup).click(function(e) {
    if ( e.target == this ) {
        if ($(popup).is(':visible')) {
            $(popup).hide();
        }
    }
});

/* Close popup and remove errors if user clicks on cancel or close buttons */
$(popup).find("button[name=close]").on("click", function() {
    if ($(".formElementError").is(':visible')) {
        $(".formElementError").remove();
    }
    $(popup).hide();
});
}

$(document).ready(function () {
$("[data-js=open]").on("click", function() {
    popupOpenClose($(".popup"));
  });
});

Could someone help me and advise how can I sort those links to open popup window related to each link? Maybe sort it with some ID or so?
Appreciate

A: I have 2 solutions:

*

*in html create hidden popups for all teams with id="popup-team-1", and in your link add additional attribute <a data-id="1".. , in javascript do something like this:

var id = $(this).attr("data-id");
 $("#popup-team-"+id).show();

*load content of popup from server
$.get(url).done(function (content) {
     $(".popup").html(content).show();
})


text:
Q: Does $\mathrm{Im}(f(z))$ bounded above $\implies$ $|f|$ is bounded, for analytic $f$? If $f$ is analytic on $\Omega$ s.t. $\mathrm{Im}(f(z))$ is bounded from above, then does this imply that $|f|$ is itself bounded?
I know that if $\Omega = \mathbb{C}$, then the result follows as a result of Liouvilles's Theorem; however, I'm here looking at an arbitrary $\Omega$ that isn't necessarily equal to $\mathbb{C}$.

A: No. Let $\Omega = \{z \in \Bbb C : |\operatorname{Im}(z)| < 1\}$, $f(z) = z$. Obviously $\operatorname{Im}(f(z))$ is bounded on $\Omega$, but $|f(z)|$ isn't.


text:
Q: Undoing a Fast-Forward Merge I had a bad merge, I did not know it was a bad merge until I pushed it to GitHub and now I do not know how to undo/revert it.
The story goes like this:
I opened two distinct branches and committed several changes to those branches. After a while, I decided to merge those branches back to master branch and I use $ git merge branch_name for this purpose. I merged the first branch and checked out the log of master branch afterwards: all commits on that branch were on master. Then I proceeded with the merging of second branch by the same command. Then I checked the log of master again, where I saw the commits on the branch I merged including a commit with the following comment: "merge branch branch_name". A comment like this was not included when I merged the other branch.
Long story short, the problem is that git merged the commits of the first branch to master like they are the commits of the master already. When you examine the network graph from 'GitHub' or the graph from 'gitg', there is no trace of the first branch left, but its commits are shown as the commits of master branch. There is no problem with the second branch: it is shown separately and it is merged as expected. Also note that, after running the merge commands, I went on deleting the branches by $ git branch -d branch_name, like it was the most urgent thing to do, unfortunately.
Now I want to go back to the position just before I ran two consecutive merges. Any help is appreciated. If you comment on why this has happened, it will be pleasing as well.

A: *

*Find the commits that were the heads of the old topic branches that you deleted.  They should be the two parents of the merge commit.  Make them into branches again (git branch or git checkout -b will do the trick nicely).

*Move master back to its old position with git reset.  At this point, you're back where you started before you merged.

*Next time when you merge, use git merge --no-ff.  This will create a merge commit even if Git doesn't need to.
I almost always use git merge with either --ff-only or --no-ff.


text:
Q: how to display configurable image in wishlist sidebar today I'm fighting with Magento again :)
how to display configurable image in wishlist sidebar
I use the code
<?php $_product = Mage::getModel('catalog/product'); ?>
    <?php $_product->load($_product->getIdBySku($_item['sku'])); ?>

<img src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(70, 87); ?>" />

but is not working.
Thanks in advance.

A: Try the following
<?php
if($_product->getTypeId()=='simple'){
    $parentIds = Mage::getResourceSingleton('catalog/product_type_configurable')
    ->getParentIdsByChild($_product->getId());
    $parentProduct = Mage::getModel('catalog/product')->load($parentIds[0]);
?>
    <img src="<?php echo Mage::helper('catalog/image')->init($parentProduct, 'small_image')->resize(70, 87); ?>" />
<?php }else{ ?>
    <img src="<?php echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(70, 87); ?>" />
<?php } ?>


text:
Q: Weak reference with a condition / timeout is it possible in Java to create a weak reference whose object can be sent to garbage collector only if a specified condition returns true?
Let's say that I have something like a cache which maps ID numbers to some data:
Map<Integer, SomeData> cache = new HashMap<>();

SomeData have two important methods - void updateTime(), which just sets an internal variable to current time, and boolean canBeDeleted(), which checks if the object have or haven't been used in last 10 minutes (simply by comparing current time and the saved time plus 10 minutes). If it haven't been used for this certain amount of time, the method returns true and the object can be removed from the cache...
However, when I create a cache with weak references instead of strong:
Map<Integer, WeakReference<SomeData>> cache = new HashMap<>();

Then the only thing WeakReference checks are probably possible strong references to the object, but I would like if it also checked my condition canBeDeleted() and didn't remove the reference if it returned false. Is there a way how to do this?
(On top of that, there's a memory leak and I'm not sure how to solve it... When the object inside the WeakReference is deleted, the map still contains unnecessary key/value pair).
Thanks in advance.

A: You can use LinkedHashMap#removeEldestEntry though It does not provide you way to remove based on amount of time entry is inside Cache, it does provide you a way to  remove entries based on whether it was accessed or not.

It provides the implementer with the opportunity to remove the eldest entry each time a new one is added. This is useful if the map represents a cache: it allows the map to reduce memory consumption by deleting stale entries.

protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
  return size() > limit;

Also remember you need to initialize LinkedHashMap with accessOrder true.

accessOrder - the ordering mode - true for access-order, false for insertion-order.

So putting it all together source should be like below
public class Cache<K, V> extends LinkedHashMap<K, V> {
    private final int MAX_ENTRIES = 100;
    public Cache() {
        super(16, 0.75f, true);// accessOrder is true
    }
    @Override
    protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
        return size() > MAX_ENTRIES;
    }
}

A: You can just remove the key in cache where the condition is true.


text:
Q: accesing nsmutable string of one class in another class results null-objective c I am working on a very simple app just for learning.This convert celcius value into fahrenheit value.It has a single view with two UITextFields and a button.After entering a celcius value in 1st uitextfield and clicking on the button a function with argument as "-(void)requestCelciusandresponseFrnht:(NSString *)textfieldstring"  is called.This method is in my NSOBject class named "WebServiceCall". webservice is sent, xml is parsed and the result is populated in a nsstring variable named "soapResults".Below is the structure of my code:
i am having a NSObject class with variable as "soapresults":
@interface WebServiceCall : NSObject <UITextFieldDelegate,NSXMLParserDelegate> {
NSString *msgLength;
//web service access
NSMutableData *webData;//contains modifiable data in form of bytes
NSMutableString *soapResults;//To hold the value of fahrenheit from parsed xml resulting thrugh webservice
BOOL elementFound;
ends
NSURLConnection *conn;
NSXMLParser *xmlParser;

}
@property (nonatomic,retain) NSMutableString *soapResults;

-(void)requestCelciusandresponseFrnht:(NSString *)textfieldstring;
the implementation code starts as:
#import "WebServiceCall.h"

@implementation WebServiceCall
@synthesize soapResults,test;
-(void)requestCelciusandresponseFrnht:(NSString *)textfieldstring{

//here the code goes for soap message,NSMUtableRequest,http heade,body & NSURLconnection
}
EDIT:
-(void) parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
NSLog(@"the value of soap result is as : %@",soapResults);//**i am able to get fahrenheit value here**

WebServicesAppDelegate *appDelegate=(WebServicesAppDelegate *)[[UIApplication sharedApplication]delegate];

appDelegate.results=[[NSString alloc]init];

appDelegate.results=soapResults;

NSLog(@"appDelegate.results value of NSObject class  is :%@",appDelegate.results);

//**i am able to set fahrenheit value here in appDelegate.results**

}
Edit:Now according to your suggestion changes in my app delegate class as:
The header file .h:-
@class WebServicesViewController;

@interface WebServicesAppDelegate : NSObject  {
    NSMutableString *results;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet WebServicesViewController *viewController;
@property (nonatomic, retain) NSMutableString *results;
@end
the implementation file .m as:
#import "WebServicesAppDelegate.h"
#import "WebServicesViewController.h"

@implementation WebServicesAppDelegate
@synthesize window=_window;
@synthesize results;
now i am trying to access the soapResults variable in my view controller some thing like this:
-(IBAction) buttonClicked:(id) sender

{   NSLog(@"button clicked and celcius value sent as argument");
clsvarWebServiceCall=[[WebServiceCall alloc]init];

[clsvarWebServiceCall requestandresponsewithfrnhtReq:txtcels.text];

WebServicesAppDelegate *appDelegate=(WebServicesAppDelegate *)[[UIApplication sharedApplication]delegate];

NSLog(@"appDelegate.results of viewController is %@",appDelegate.results);

here i am getting soapResults Value as null
EDIT:my whole nslog/trace :`2011-09-07 15:03:22.948 WebServices[1717:207] view controller loaded
2011-09-07 15:03:41.266 WebServices[1717:207] button clicked and celcius value sent as argument
2011-09-07 15:03:41.291 WebServices[1717:207] appDelegate.results of viewController is (null)
2011-09-07 15:03:41.299 WebServices[1717:207] soapResults of viewController is (null)
2011-09-07 15:03:42.091 WebServices[1717:207] didreceiveresponse method called in nsobject class
2011-09-07 15:03:42.098 WebServices[1717:207] didReceiveData method called in nsobject class
2011-09-07 15:03:42.103 WebServices[1717:207] connectionDidFinishLoading method called in nsobject class
2011-09-07 15:03:42.112 WebServices[1717:207] didStartElement method called in nsobject class
2011-09-07 15:03:42.117 WebServices[1717:207] didStartElement method called in nsobject class
2011-09-07 15:03:42.122 WebServices[1717:207] didStartElement method called in nsobject class
2011-09-07 15:03:42.127 WebServices[1717:207] didStartElement method called in nsobject class
2011-09-07 15:03:42.133 WebServices[1717:207] foundCharacters method called in nsobject class
2011-09-07 15:03:42.139 WebServices[1717:207] didEndElement method called in nsobject class
2011-09-07 15:03:42.146 WebServices[1717:207] the value of soapResult in NSObject class is as : 122
2011-09-07 15:03:42.159 WebServices[1717:207] appDelegate.results value of NSObject class  is :122
2011-09-07 15:03:42.175 WebServices[1717:207] didEndElement method called in nsobject class
2011-09-07 15:03:42.179 WebServices[1717:207] the value of soapResult in NSObject class is as : 122
2011-09-07 15:03:42.184 WebServices[1717:207] appDelegate.results value of NSObject class  is :122
2011-09-07 15:03:42.190 WebServices[1717:207] didEndElement method called in nsobject class
2011-09-07 15:03:42.196 WebServices[1717:207] the value of soapResult in NSObject class is as : 122
2011-09-07 15:03:42.200 WebServices[1717:207] appDelegate.results value of NSObject class  is :122
2011-09-07 15:03:42.204 WebServices[1717:207] didEndElement method called in nsobject class
2011-09-07 15:03:42.208 WebServices[1717:207] the value of soapResult in NSObject class is as : 122
2011-09-07 15:03:42.329 WebServices[1717:207] appDelegate.results value of NSObject class  is :122`
if you look at the nslog the soapREsults orappDelegate.soapResults of view controller is called first and i thik thats why it is null and the result from the soap result is coming later and it is unable to update the soap result value in view controller?
any suggestion?

A: One thing you can do is declare one global string in appDelegate
NSMutableString *results;
and set properties and synthesize it.after that when you get the result in WebServiceCall set that result to string declared in appDelegate
YourAppDelegateName *appDelegate=(YourAppDelegateName *)[[UIapplication sharedApplication]delegate];
appDelegate.results=[[NSString alloc]init];
appDelegate.results=soapResults;
and after doing this you can able to access this on any class in application.so after
[clsvarWebServiceCall requestandresponsewithfrnhtReq:txtcels.text];//sending celcius value as argument to the method of NSObject class named WebServiceCall
write this
YourAppDelegateName *appDelegate=(YourAppDelegateName *)[[UIapplication sharedApplication]delegate];
NSLog(@"result is  %@",appDelegate.results);
or other approach is when you are able to get soapResults
just after that write
[soapResults retain];
or you can use singleton class.check this document
http://www.galloway.me.uk/tutorials/singleton-classes/

A: Try assigning the result string via property and access it like this
self.soapResults = @"someValue"; //We are setting via property where it will be retained

and access it from your view controller.

A: `

`Another thing you can do is Declare object of viewcontroller in NSObject class.
NSobject.h

YourViewControllerName *viewController;

declare the properties and synthesize it in .m file

Declare one string in viewcontroller file

NSMutableString *getResult;

and when you get the result in NSObject class
after that do this

viewController=[[YourViewControllerName alloc]init];
viewController.getResult=[[NSMutableString alloc]init];
viewControoler.getResult=soapResults;

and try to  access from viewcontroller when control returns to viewcontroller after getting soapResults.


text:
Q: Strong solutions to PDEs Let $(E)$ be the equation :
$$\partial _t u + (u \cdot \nabla_x) u + \nabla _x p = \Delta _x u $$ with $\nabla \cdot u =0$ where $f: [0,T] \times \mathbb{R}^3 \to \mathbb{R}$ (Navier-Stokes equations)
Generally $u$ is sait to be a strong solution when $u$ belongs to $C^1([0,T],H^1(\mathbb{R}^3))$ which implicitly means that $u$ is viewed as a function $u : t \in [0,T] \mapsto u(t) \in H^1(\mathbb{R}^3) $.
In my opinion a strong solution should be a $u : [0,T] \times \mathbb{R}^3 \to \mathbb{R}^3$ satisfying $\mapsto u(t, \cdot ) \in H^1$ for all $t$ and $u(\cdot , x) \in C^1$ for all $x$.
Is there a link between these two définitions ? Intuitively there are the same but I am not able to prove this (I considered the function $F : (t,x) \mapsto u (t)(x)$ for exemple)
If you have experienced this question please tell me what do I hold back of this question and if there is documents on the internet explaining it.
Thank you.


text:
Q: Component passed to constructor doesn't display I've created a class that creates a panel, and in the constructor I'm passing a button with an action listener attached.
This is the code for the button:
JButton back = new JButton("Back");
back.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent arg0) {
        menus.show(contentPane, "Main");
    }
});

It's then passed to a constructor like so:
lightsPane = new lightsPane(back).contents;
tasksPane = new Tasks(tasksBack).contents;
tvPane = new TV(tvBack).contents;

Inside the classes the button is added to a JPanel and that JPanel is then added to contents. Like so:
public class lightsPane{
JPanel contents;

lightsPane(JButton back){
    contents = new JPanel(new BorderLayout);

    //add back button to lower right of panel
    JPanel backPane = new JPanel();
    backPane.setLayout(new BorderLayout());
    backPane.add(back, BorderLayout.CENTER);

    contents.add(backPane, BorderLayout.SOUTH);
       }
 }

I know the constructor is working right as when I create a button inside it to add to contents it displays fine. What's going on here? Can I pass this button to the constructor or not? If I can why isn't this displaying?

A: yes, you can pass a button to a constructor as you are passing a reference which you used in another class it is perfectly fine.

A: There is nothing wrong with passing the JButton through the constructor if it is used properly. The class either is not using it at all or is using it but in the wonge way.


text:
Q: How to find all invertible elements in $F_3/(f(x))$ Is there a algorithm or smt like this? For example, $F_3/f(x) = \{ax^3 + b x^2+c x+d | a,b,c,d \in F_3\}$ where $f(x)=x^4+2x^2+x+2$ and $F_3=Z/3Z$. Am I right that there are 8 zero-divisors

A: Hint:
In a finite commutative ring every non-zero element is either a zero-divisor or a unit. So instead of finding a unit we can aim at finding the zero divisors (which might be easier).
Let $R=\mathbb{F}_3[x]/\langle f(x) \rangle$. First observe that in $\mathbb{F}_3$ we have
$$f(x)=x^4+2x^2+x+2=(x+2)^2(x^2+2x+2)$$
Say $g(x)$ is a zero divisor. Then $\exists \, \text{ nonzero } h(x)$ such that $g(x)h(x) \equiv 0 \pmod{f(x)}$. This also means we want
\begin{align*}
g(x)h(x) &\equiv 0 \pmod{(x+2)^2}\\
g(x)h(x) &\equiv 0 \pmod{x^2+2x+2}
\end{align*}
So we need to find zero divisors in $\mathbb{F}_3[x]/\langle x^2+2x+2 \rangle$ and also in $\mathbb{F}_3[x]/\langle (x+2)^2 \rangle$.
Since $x^2+2x+2$ is irreducible in $\mathbb{F}_3[x]$, so this ring is a field. Hence all non-zero elements are units in this ring. So no zero divisors.
But for $\mathbb{F}_3[x]/\langle (x+2)^2 \rangle$, $x+2$ is an obvious zero divisor. Check if there are others!!
Hopefully now you can complete it.


text:
Q: Exception: Correlation failed. Unknown location Exception: An error was encountered while handling the remote login All of a sudden Google Authentication does not work with my ASP.NET Core 3.1 App
  services.AddAuthentication()
                    .AddGoogle(opts =>
                {
                    opts.ClientId = Configuration.GetSection("GoogleLogin").GetSection("ClientId").Value;
                    opts.ClientSecret = Configuration.GetSection("GoogleLogin").GetSection("ClientSecret").Value;
                    opts.Events = new OAuthEvents
                    {
                        OnCreatingTicket = context =>
                        {
                            var profileUrl = context.User.GetProperty("picture").ToString();
                            context.Identity.AddClaim(new Claim("picture", profileUrl));
                            return Task.FromResult(0);
                        }
                    };
                });