text:
Q: Can't login to hosted website because of Javascript I've tried to host my website to a provider but it looks like it doesn't want to login there.. On the localhost it works just fine, but uploaded at a provider it looks like it doesn't want to perform the login operation...I can successfully sign-up, change password, so basically I have database connection, but I just can't login to the website... Is it something I should modify? Here's my code:
If I'm entering for example https://example.com/login.php?enterID=123&password=123 in the website link,I can get a good response, but it looks like it doesn't allow me to login to the website..
Login.php:
<?php
        include "mysql-connect.php";

        //get Info from login.html
        $ID = $_GET['enterID'];
        $PW = $_GET['password'];
        $stmt = $connect->prepare("SELECT PW, userType, nickName FROM users WHERE ID = ?");
        $stmt->bind_param("s",$ID);
        $valid = $stmt->execute();
        if (!$valid){
            die("Could not successfully run query.". $connect->connect_error);
        }
        $result = $stmt->get_result();
        if ($result->num_rows==0){
            //display message of no such student/teacher/admin
            echo "Failed to find an account with the input ID.";
        } else {
            $row = $result->fetch_assoc();
            if ($PW == $row['PW']) {
                $type = $row['userType'];
                $nick = $row['nickName'];
                //save data, record cookie for 6hours
                setcookie("type", $type, time() + 21600, '/');
                setcookie("userID", $ID, time() + 21600, '/');
                setcookie("nickName", $nick, time() + 21600, '/');
                //login success - Request.responseText to checklogin.js
                echo $type;

            } else {
                //display message of password error
                echo "The input password does not match the account password.";
            }
        }
        $connect->close();
?>

checklogin.js:
function login() {
    var enterID = document.getElementById("enterID").value;
    var password = document.getElementById("password").value;
    if ((password != "") && (enterID != "")) {
        var Request = new XMLHttpRequest();
        var info = "?enterID=" + enterID + "&password=" + password;
        Request.open("GET", "php/login.php" + info, true);
        Request.send();
        Request.onload = function() {
            var respond = Request.responseText;
            if (respond == "admin") {
                window.location.href = "page/admin-system-management.php";
            } else if (respond == "student"){
                window.location.href = "page/student-dashboard.php";
            } else if (respond == "teacher"){
                window.location.href = "page/teacher-dashboard.php";
            } else{
                document.getElementById("errorMessage").innerText = respond;
            }
        }
    } else {
        document.getElementById("errorMessage").innerText = "Please fill in all the fields.";
    }
}

function redirect() {
    var Request = new XMLHttpRequest();
    Request.open("GET", "php/redirect.php", true);
    Request.send();
    Request.onload = function() {
        var respond = Request.responseText;
        if (respond != "not logged.") {
            if (respond == "admin") {
                window.location.href = "page/admin-system-management.php";
            } else if (respond == "student"){
                window.location.href = "page/student-dashboard.php";
            } else if (respond == "teacher"){
                window.location.href = "page/teacher-dashboard.php";
            }
        }
    }
}

Redirect.php:
<?php
    if (isset($_COOKIE["type"])){
        setcookie("type", $_COOKIE["type"], time() + 21600, "/");
        setcookie("userID", $_COOKIE["userID"], time() + 21600, "/");
        setcookie("nickName", $_COOKIE["nickName"], time() + 21600, "/");
        echo $_COOKIE["type"];
    } else {
        echo "not logged.";
    }
?>

TImeoutAndRedirect function:
function TimeoutAndRedirect(Type) {
    var Request = new XMLHttpRequest();
    Request.open("GET", "../php/redirect.php", true);
    Request.send();
    Request.onload = function() {
        var respond = Request.responseText;
        if (respond == "not logged.") {
            alert("Your login period has expired! Please login again!");
            window.location.href = "../login.html";
        } else if (respond != Type) {
            alert("You cannot access this page using your account!");
            if (respond == "admin") {
                window.location.href = "../page/admin-system-management.php";
            } else if (respond == "student"){
                window.location.href = "../page/student-dashboard.php";
            } else if (respond == "teacher"){
                window.location.href = "../page/teacher-dashboard.php";
            }
        }
    }
}


text:
Q: Prove that if $B \subseteq A$ be an ideal of $D$ then exists unique an ideal $C$ of $D$ such that $B = CA$.
Problem: Denote $D$ be an algebraic ring of algebraic number field. Let $A \ne 0$ be any ideal of $D$. Prove that if $B \subseteq A$ be an ideal of $D$ then exists unique an ideal $C$ of $D$ such that $B = CA$.

My attempt: Since $A$ be an ideal of $D$ and $A \ne 0$ then exists $k>0$ such that $A^k = (\alpha)$, $\alpha \in D, \alpha \ne 0$. Since $B \subseteq A \Rightarrow B A^{k-1} \subseteq A^k = (\alpha)$. We have $B A^{k-1} (\alpha^{-1}) \subseteq (\alpha)(\alpha^{-1}) = D$. Let $C = B A^{k-1} (\alpha^{-1})$. Then $C$ is an ideal of $D$ and $CA = B A^{k} (\alpha^{-1}) = AD = A$.
How to prove the uniqueness of $C$? Thank all!

A: Suppose $AC'=AC$.
If $A$ is not a principal ideal, then we can cancel $A$ in the ideal class group to get $C'-C=(\beta)$ is a principal ideal. But then we get $\beta A=0$. If $\beta \neq 0$ then $A=\beta^{-1}\beta A=0 \Rightarrow \Leftarrow$.
If $A$ is a principal ideal, say $A=(\gamma)$ with $\gamma \neq 0$, then $\gamma C' = \gamma C$. Hence $C'=C$.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Keycloak update role of user not reflect in flowable I am using the Flowable 6.7.2 version with Keycloak, I have created the realm from doc. although Flowable 6.7.2 docker-compose file has its own realm JSON in Keyloak YAML file.
After creating all the steps from the doc, while testing I changed the role of the user, but it does not reflect on the flowable for the user. For role updates, Flowable users need to re-login in the server.
Is there any config changes to fix this glitch, or its work like this only.


text:
Q: Modify only one field of the interface with the useState I defined this interface and hook with an initialization:
 interface userInterface {
  email:string
  name:string
  last_name:string
 }

 const [userData, setUserData] = useState <userInterface> ({
  email:"",
  name:"",
  last_name:"",

 })

then if you just wanted to change the name only. How should it be done with setUserData?
That is, I want to leave the email and the last_name as they are but only modify the name

A: Simple expample:
setUserData((prev) => ({ ...prev, name: 'Name you want' }));

const { useState } = React;

const DemoComponent = () => {
  const [userData, setUserData] = useState({
    email: "",
    name: "",
    last_name: ""
  });

  const handleBtnOnClick = (name) => {
    setUserData((prev) => ({ ...prev, name: name }));
  };

  return (

      <button
        onClick={() => {
          handleBtnOnClick("Jay");
        }}
      >
        Jay
      </button>
      <button
        onClick={() => {
          handleBtnOnClick("Andy");
        }}
      >
        Andy
      </button>
      <button
        onClick={() => {
          handleBtnOnClick("Olivia");
        }}
      >
        Olivia
      </button>

{JSON.stringify(userData, null, "\t")}

  );
}

ReactDOM.render(
  <DemoComponent />,
  document.getElementById("root")
);

A: @Jay Lu is correct.
I wanted to note a couple things.
Typescript Interfaces

*

*Interface name should use PascalCasing

*Key names should use camelCasing

*Prefer utility types where appropriate

*[optional] Interface name should be prefaced with a capital "I"

*

*This used to be a convention now more people are moving away from it. Your choice

Interface Update: 1) Naming Conventions
interface UserInterface {
  email:string
  name:string
  lastName:string
}

The next thing we want to do is use a utility type to simplify the verbosity of our code.
Interface Update: 2) Utility Type
We will actually change this interface to a type to easily use the utility type Record.
type UserInterface = Record<"email" | "name" | "lastName", string>;

As for your component, you didn't provide much detail there so I will provide details on setting state.
Functional Component: Updating State
It's very important to establish what variables or data you need to "subscribe" to changes. For instance, if the email and name are static (never changing) there is no need to have them in state which would result in a state variable defaulting to an empty string:
const [userData, setUserData] = useState("");

If that's not the case and you indeed need to update and manage the email, name, and lastName updating state is simple: spread the existing state with the updated value. You do this using the setter function provided in the tuple returned from useState. In this case that's setUserData. The setter function takes a value that is the same type as your default or it can accept a callback function where it provides you the current state value. This is really powerful and really useful for updating a state object variable. In your case we have:
setUserData((previous) => ({...previous, name: "Updated name value"});

What's happening here? The setUserData provides us the "previous" state if we pass it a callback. On the first call of this function "previous" is:
{
  email: "",
  name: "",
  lastName: ""
}

We are taking that value and spreading it over in a new object with the updated value. This is the same as Object.assign. If you spread a key that already exists in the object it will be replaced. After we spread our state object looks like:
{
  email: "", // didn't change because we didn't pass a new value
  lastName: "", // didn't change because we didn't pass a new value
  name: "Updated name value" // changed because we passed a new value
}

Which means, if you wanted to update the email you can by simply doing:
setUserData((previous) => ({...previous, email: "hello@world.com"});

Now your state object will be:
{
  email: "hello@world.com",
  lastName: "",
  name: "Updated name value"
}

And if you call setUserData with a callback again, the previous value with be that object above.
If you want to set it back to the original values you can update the entire state without using the callback. Why? Because we don't need to preserve any values since we want to overwrite it:
setUserData({ email: "", lastName: "", name: ""});

There is a slight improvement to that though. If we decide that at some point we want to "reset to default" we should store the default value in a variable and reuse it. Not 100% necessary but it might be a good update especially if you have a complex component.
Quick Note on the Power of Typescript
If you were to try and update state with a new key that you didn't have defined before let's say "helloWorld" typescript will give you an error because "helloWorld" is not defined in your UserData type.
Hopefully @Jay Lu's answer and some of this info helped. If you provide more details we might be able to offer more guidance.


text:
Q: Need help on using Google Maps in Vue JS I am trying to use google maps API on my VUE JS based project and I am getting below-mentioned errors. Any help is greatly appreciated.

This is the codebase that I am using.

Thank you so much in advance.
Regards,
Deepak


text:
Q: Project not found: 'my-app@dev' I am following
https://www.graph.cool/docs/1.0/quickstart/backend/typescript/typescript-rohd6ipoo4 for graphcool and I an getting the error
{
 "errors": [
  {
  "code": 3016,
  "requestId": "api:api:cjc7gf91e002v0180uq2hqace",
  "message": "Project not found: 'my-app@dev'"
}]}

for query and mutation. I am new to graphcool so don't have any idea why this is happening. I am following the step provided in the above link.
GraphqlServer:
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({
  ...req,
  db: new Graphcool({
  endpoint: 'http://localhost:60000/my-app/dev',
  secret: 'mysecret123',
    }),
  }),
})

$ graphcool info
Service Name: my-app

dev (cluster: `local`)

HTTP:       http://localhost:60000/my-app/dev
Websocket:  ws://localhost:60000/my-app/dev


text:
Q: Closest (plural) descendants I am working on a programming interface that has functions to give you the closest descendants (in a tree). But there are two categories of function: one gives you exactly one result and the other multiple results.
As a non-native speaker I was hoping for the existence of the word closests, so I would not spend so many characters in the function name.
What can I use instead?

A: In another context, a person's "closest descendant" is likely to be his or her heir, which happily is a noun and therefore pluralizable.

A: Daughters is common when talking about trees.  Children would also work.

A: Perhaps progeny

a descendant or the descendants of a person, animal, or plant; offspring:

This word  is treated as both singular and plural. I am not clear as to whether you need different forms for multiples.


text:
Q: BottomSheet DialogFragment getting covered by keyboard I've seen similar questions but none of the answers solved my problem.
I have a simple BottomSheetDialogFragment with an editText and a button, when I select the editText the keyboard covers the button.
I tested several answers from this question without any luck:
Bottom Sheet Fragment comes up with keyboard
My BottomSheetDialogFragment:
public class AddUserBottomSheetFragment extends BottomSheetDialogFragment {

    public static AddUserBottomSheetFragment newInstance() {
        return new AddUserBottomSheetFragment();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.bottom_sheet_add_user, container);
    }

}

The fragment dialog layout:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/bottomSheet"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/contacts_bottom_sheet_background"
    app:behavior_hideable="true"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
    app:behavior_peekHeight="500dp" >

    <EditText
        android:id="@+id/insert_user"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <Button
        android:id="@+id/add_user_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/contacts_add"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/insert_user" />

</androidx.constraintlayout.widget.ConstraintLayout>

And I'm showing it on my activity with this method with a simple linearLayout as argument:
public void showBottomSheet(View view) {
        AddUserBottomSheetFragment addDialogFragment = AddUserBottomSheetFragment.newInstance();
        addDialogFragment.show(getSupportFragmentManager(), "bottomSheetContainer");
    }


text:
Q: What is \$V_{ADJ}^{+}\$ and \$V_{ADJ}^{-}\$ for this adjustable delay schematic? Here is the adjustable delay schematic,and as i know,the \$V_{ADJ}^{+}\$ and \$V_{ADJ}^{-}\$ is off chip for testing flexibility.
But i'm curious that the delay is for the time delay,why should we feed the voltage to it?If we don't feed voltage to \$V_{ADJ}^{+}\$ and \$V_{ADJ}^{-}\$,is this schematic still a delay schematic?but if we don't feed it,where should i connect the gate of \$M_{PGm}\$ and \$M_{NGm}\$ to?

blue wave is \$V_{DLY}\$,output.Red line is \$V_{CP_PK}\$,input.
\$V_{ADJ}^{+}\$ connect ground,and \$V_{ADJ}^{-}\$ connect \$V_{DD}\$

A: The upper and lower MOSFETs in conjuntion with their respective 200 kohm resistors act like current sources. The voltages on their respective gates make the current they can provide higher or lower. So when one or the other middle MOSFETs activate, one or the other outer MOSFETs delivers current to charge up (or down) C\$_{ADJ}\$ and the current forms a ramping voltage.
If that current is variable then the ramp can be made quicker or slower thus it takes less or more time for the output MOSFETs to switch.
If you want a fast rate then connect -V\$_{ADJ}\$ to Vdd and +V\$_{ADJ}\$ to ground. If you want a slow rate then connect them both to midrail.


text:
Q: Pandas how do I compare columns for equality in a dataframe that have the same name except for a suffix? I have a dataframe that has a lot of columns in the following format:

id
col1_df1
col2_df1
col3_df1
col1_df2
col2_df2
col3_df2

A1
num
num
num
num
num
num

A2
num
num
num
num
num
num

A3
num
num
num
num
num
num

A4
num
num
num
num
num
num

A5
num
num
num
num
num
num

I need to compare the columns with the same name before the prefix. That is, I need to compare col1_df1 with col1_df2, col2_df1 with col2_df2, and so on. I need to check the percentage of equality in each "repeated" column (in each col1, in each col2, and so on). I can't do it manually because there are a lot of columns.
Is there a way to do that using Pandas functionality?
Thanks!

A: (df.groupby(lambda col: col.rpartition("_")[0], axis="columns")
   .diff().dropna(how="all", axis="columns")
   .eq(0).sum()
   .div(len(df)).mul(100)
   .rename(lambda idx: idx.rpartition("_")[0]))

*

*group the dataframe over columns' names before the last "_"

*take the difference of each group within itself

*

*since there's nothing left to first columns of each group, they will be NaNs, so drop them

*check where differences are equal to 0, i.e., repetition: sum gives the count

*then percentify it

*lastly obtain the group names (before the last _) for the end result

to get something like (for some random data)
col1    40.0
col2     0.0
col3    33.3
dtype: float64

A: Since there are already some reasonable answers, I'll take a guess and give a slightly different answer just in case it is useful.
Based on your column names it seems you are getting this dataframe from two dataframes where both have columns like: col1, col2, etc.  If that's the case, I would take a step back and do it like this:
In [33]: df1 = pd.DataFrame(np.random.randint(4, size=(5, 3)),
    ...:       columns=[f"col1", "col2", "col3"],
    ...:       index=["A1", "A2", "A3", "A4", "A5"])

In [34]: df2 = pd.DataFrame(np.random.randint(4, size=(5, 3)),
    ...:       columns=[f"col1", "col2", "col3"],
    ...:       index=["A1", "A2", "A3", "A4", "A5"])

In [35]: df1
Out[35]:
    col1  col2  col3
A1     0     0     1
A2     3     1     0
A3     0     2     3
A4     1     1     0
A5     3     0     1

In [36]: df2
Out[36]:
    col1  col2  col3
A1     1     2     3
A2     3     2     2
A3     3     0     3
A4     0     3     2
A5     2     0     1

In [37]: df2 == df1
Out[37]:
     col1   col2   col3
A1  False  False  False
A2   True  False  False
A3  False  False   True
A4  False  False  False
A5  False   True   True

In [38]: res = df2 == df1

In [39]: res.sum(axis=0)
Out[39]:
col1    1
col2    1
col3    2
dtype: int64

To get the above as percentage, you could do this:
In [40]: res.sum(axis=0) / len(res) * 100
Out[40]:
col1    20.0
col2    20.0
col3    40.0
dtype: float64

A: For instance let's say we have the following dataframe :
import pandas as pd

df = pd.DataFrame({'ID': ['A1', 'A2', 'A3', 'A4', 'A5'],
                   'col1_df1': [11, 11, 11, 11, 11],
                   'col2_df1': [10, 11, 12, 13, 14],
                   'col3_df1': [9, 11, 9, 11, 9],
                   'col1_df2': [8, 11, 7, 10, 6],
                   'col2_df2': [7, 8, 9, 10, 11],
                   'col3_df2': [6, 11, 6, 11, 6],
                   })

Visualization :
   ID  col1_df1  col2_df1  col3_df1  col1_df2  col2_df2  col3_df2
0  A1        11        10         9         8         7         6
1  A2        11        11        11        11         8        11
2  A3        11        12         9         7         9         6
3  A4        11        13        11        10        10        11
4  A5        11        14         9         6        11         6

Comparison with using of the following script :
r = (df.groupby(lambda x: x.split('_')[0], axis=1)
     .diff(axis=1)
     .dropna(how='all', axis=1)
     .rename(columns = {'col1_df2':'diff1', 'col2_df2':'diff2', 'col3_df2':'diff3'}, inplace = False))

And then r is :
   diff1  diff2  diff3
0     -3     -3     -3
1      0     -3      0
2     -4     -3     -3
3     -1     -3      0
4     -5     -3     -3

In r, 0 represents equality.
In r column named diff1 (comparison between col1_df1 and col1_df2), we get perc of 0 as follows :
perc = float(eval('{0}/{1}'.format(r['diff1'].value_counts()[0], len(r['diff1']))))

print(per)
# 0.2 (ie 1 out of 5)

Complete proposed script :
import pandas as pd

df = pd.DataFrame({'ID': ['A1', 'A2', 'A3', 'A4', 'A5'],
                   'col1_df1': [11, 11, 11, 11, 11],
                   'col2_df1': [10, 11, 12, 13, 14],
                   'col3_df1': [9, 11, 9, 11, 9],
                   'col1_df2': [8, 11, 7, 10, 6],
                   'col2_df2': [7, 8, 9, 10, 11],
                   'col3_df2': [6, 11, 6, 11, 6],
                   })

r = (df.groupby(lambda x: x.split('_')[0], axis=1)
     .diff(axis=1)
     .dropna(how='all', axis=1)
     .rename(columns = {'col1_df2':'diff1', 'col2_df2':'diff2', 'col3_df2':'diff3'}, inplace = False))

perc = float(eval('{0}/{1}'.format(r['diff1'].value_counts()[0], len(r['diff1']))))

print(per)
# 0.2 (ie 1 out of 5)


text:
Q: Exception of type 'Web.TPEngine.Providers.BadArgumentRetryNeededException' was thrown When users try to sign-in they receive "Your password is incorrect" but I know the username/password is valid.
I configured the user journey recorder and I'm receiving the following:

Exception of type 'Web.TPEngine.Providers.BadArgumentRetryNeededException' was thrown.

What does this error mean and how do I fix it?

A: @spottedmahn is 100% correct. For me, I missed the Grant Permissions part.
Also, you must do both of these

*

*configure the IdentityExperienceFramework permission

*click Grant Permissions

PS. Did I mention that if you don't click Grant Permissions nothing will work; seriously!

A: Turns out, when the ProxyIdentityExperienceFramework Azure AD App was created, it was created incorrectly.  It was created as a Web app / API, not a native app like it was supposed to be.

A: All of the above is absolutely correct:

*

*ProxyIdentityExperienceFramework application type MUST be Native

*MUST configure permission and do not forget to click "Grant Permissions"

Also what gets me almost every time is forgetting to paste the Application ID's for ProxyIdentityExperienceFramework and IdentityExperienceFramework into the XML policy, under the "login-NonInteractive" technical profile.
Like this:
<ClaimsProvider>
  <DisplayName>Local Account SignIn</DisplayName>
  <TechnicalProfiles>
    <TechnicalProfile Id="login-NonInteractive">
      <Metadata>
        <Item Key="client_id">xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</Item><!-- ProxyIdentityExperienceFramework -->
        <Item Key="IdTokenAudience">xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</Item><!-- IdentityExperienceFramework -->
      </Metadata>
      <InputClaims>
        <InputClaim ClaimTypeReferenceId="client_id" DefaultValue="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /> <!-- ProxyIdentityExperienceFramework -->
        <InputClaim ClaimTypeReferenceId="resource_id" PartnerClaimType="resource" DefaultValue="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /> <!-- IdentityExperienceFramework -->
      </InputClaims>
    </TechnicalProfile>
  </TechnicalProfiles>
</ClaimsProvider>


text:
Q: Emulator qemu: could not load initrd ' ' while trying to run android emulator I get this error each time while trying to run Android Emulator :
[2014-08-13 16:21:37 - GPSSerialFix] Android Launch!
[2014-08-13 16:21:37 - GPSSerialFix] adb is running normally.
[2014-08-13 16:21:37 - GPSSerialFix] Performing com.keyproj.project.projectname.MainActivity activity launch
[2014-08-13 16:21:37 - GPSSerialFix] Automatic Target Mode: Preferred AVD 'Motorolla' is not available. Launching new emulator.
[2014-08-13 16:21:37 - GPSSerialFix] Launching a new emulator with Virtual Device 'Motorolla'
[2014-08-13 16:21:38 - Emulator] qemu: could not load initrd ''

I tried Restarting but didn't help. Is there anyway I can fix this issue?

A: Actually I will solve my own issue. So I realized that this issue is because it is trying to emulate ARM processor and no kernel image for that or something like that, so I started to wonder why ARM processor.
Long story short, I had to go back to the Android Virtual Device (AVD) Manager and edit the Android Virtual Device and change CPU/ABI from ARM to Intel Atom (x86) and now the error message is gone and the Android emulation loads.


text:
Q: Cannot create any containers in Docker "Unable to find image 'all:latest' locally" After a recent update to Docker I find myself unable to create any new containers in Docker. I've already rebooted my operating system and Docker itself. I've tried specifying the tags to specific versions any way I could. I can manually pull the images I want with Docker. But it refuses to run or create any new containers. Already existing containers start up just fine. The full error message is below.
Unable to find image 'all:latest' locally
Error response from daemon: pull access denied for all, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
These aren't from private repositories. These are all public projects from Docker Hub. Any suggestions?

A: This is correct. You're trying to build using an image called all:latest but if you look on the docker registry that doesn't exist.
https://hub.docker.com/_/all
Are you sure you're not trying to build from a private repository?

A: I found the issue. I started taking my Docker command apart and found there was an environment variable that had the word "all" in it. Docker was completely ignoring whatever I had for the image and using the environment variable for the image. As soon as I removed this environment variable Docker started working again correctly.
The variable in question is -e NVIDIA_VISIBLE_DEVICES: "all" \ to make sure the Plex container can see that there is an nVidia GPU available. I was using the wrong guide and found out it's supposed to be -e NVIDIA_VISIBLE_DEVICES=all \ instead.


text:
Q: How to search for specific value in Registry keys How can I search for specific value in the registry keys?
For example I want to search for XXX in
HKEY_CLASSES_ROOT\Installer\Products

any code sample in C# will be appreciated,
thanks

A: This method will search a specified registry key for the first subkey that contains a specified value. If the key is found then the specified value is returned. Searchign is only one level deep. If you require deeper searching then I suggest modifying this code to make use of recursion. Searching is case-sensitive but again you can modify that if required.
private string SearchKey(string keyname, string data, string valueToFind, string returnValue)
{
    RegistryKey uninstallKey = Registry.LocalMachine.OpenSubKey(keyname);
    var programs = uninstallKey.GetSubKeyNames();

    foreach (var program in programs)
    {
        RegistryKey subkey = uninstallKey.OpenSubKey(program);
        if (string.Equals(valueToFind, subkey.GetValue(data, string.Empty).ToString(), StringComparison.CurrentCulture))
        {
            return subkey.GetValue(returnValue).ToString();
        }
    }

    return string.Empty;
}

Example usage
// This code will find the version of Chrome (32 bit) installed
string version = this.SearchKey("SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall", "DisplayName", "Google Chrome", "DisplayVersion");

A: In case you don't want to take a dependency on LogParser (as powerful as it is): I would take a look at the Microsoft.Win32.RegistryKey class (MSDN). Use OpenSubKey to open up HKEY_CLASSES_ROOT\Installer\Products, and then call GetSubKeyNames to, well, get the names of the subkeys.
Open up each of those in turn, call GetValue for the value you're interested in (ProductName, I guess) and compare the result to what you're looking for.

A: Help here...
Microsoft has a great (but not well known) tool for this - called LogParser
It uses a SQL engine to query all kind of text based data like the Registry,
the Filesystem, the eventlog, AD etc...
To be usable from C#, you need to build an Interop Assembly from the
Logparser.dll COM server using following (adjust LogParser.dll path)
command.
tlbimp "C:\Program Files\Log Parser 2.2\LogParser.dll"
/out:Interop.MSUtil.dll

Following is a small sample, that illustrates how to query for the Value
'VisualStudio' in the \HKLM\SOFTWARE\Microsoft tree.
using System;
using System.Runtime.InteropServices;
using LogQuery = Interop.MSUtil.LogQueryClass;
using RegistryInputFormat = Interop.MSUtil.COMRegistryInputContextClass;
using RegRecordSet = Interop.MSUtil.ILogRecordset;

class Program
{
public static void Main()
{
RegRecordSet rs = null;
try
{
LogQuery qry = new LogQuery();
RegistryInputFormat registryFormat = new RegistryInputFormat();
string query = @"SELECT Path from \HKLM\SOFTWARE\Microsoft where
Value='VisualStudio'";
rs = qry.Execute(query, registryFormat);
for(; !rs.atEnd(); rs.moveNext())
Console.WriteLine(rs.getRecord().toNativeString(","));
}
finally
{
rs.close();
}
}
}

A: @Caltor your solution gave me the answer I was looking for. I welcome improvements or a completely different solution that does not involve the registry. I am working with enterprise applications on Windows 10 with devices joined to Azure AD. I want/need to use Windows Hello for devices and for HoloLens 2 in a UWP app. My problem has been getting the AAD userPrincipal name from Windows 10. After a couple days searching and trying lots of code I searched the Windows Registry for my AAD account in the Current User key and found it. With some research it appears that this information is in a specific key. Because you can be joined to multiple directories there may be more than one entry. I was not trying to solve that issue, that is done with the AAD tenant Id. I just needed the AAD userPrincipal name.
My solution de-dups the return list so that I have a list of unique userPrincipal names. App users may have to select an account, this is tolerable for even HoloLens.
using Microsoft.Win32;
using System.Collections.Generic;
using System.Linq;

namespace WinReg
{
  public class WinRegistryUserFind
  {
    // Windows 10 apparently places Office/Azure AAD in the registry at this location
    // each login gets a unique key in the registry that ends with the aadrm.com and the values
    // are held in a key named Identities and the value we want is the Email data item.
    const string regKeyPath = "SOFTWARE\\Classes\\Local Settings\\Software\\Microsoft\\MSIPC";
    const string matchOnEnd = "aadrm.com";
    const string matchKey = "Identities";
    const string matchData = "Email";

    public static List<string> GetAADuserFromRegistry()
    {
      var usersFound = new List<string>();
      RegistryKey regKey = Registry.CurrentUser.OpenSubKey(regKeyPath);
      var programs = regKey.GetSubKeyNames();
      foreach (var program in programs)
      {
        RegistryKey subkey = regKey.OpenSubKey(program);
        if(subkey.Name.EndsWith(matchOnEnd))
        {
          var value = (subkey.OpenSubKey(matchKey) != null)? (string)subkey.OpenSubKey(matchKey).GetValue(matchData): string.Empty;
          if (string.IsNullOrEmpty(value)) continue;
          if((from user in usersFound where user == value select user).FirstOrDefault() == null)
            usersFound.Add(value) ;
        }
      }

      return usersFound;
    }
  }
}


text:
Q: How to validate api data with UI using cypress I have a requirement, where I have to validate the api body data with the values which are present in the application UI using Cypress automation tool.
Is this possible to validate with UI, if yes, please help me by providing any example.


text:
Q: How do I debug WSDL when WSDL2Java fails? We are upgrading our web services to use JAX-WS 2.1.
Our current web services was generated java-first and using Axis1 to auto-generate WSDL.
Now we have this auto-generated WSDL and need to generate JAX-WS compliant Java code from it.
I'm using Wsdl2java from Axis2 which should work fine, but when I try to run it on our WSDL I get multiple errors, indicating the generated WSDL was not really well-formed.
Being not so familiar with WSDL and XML name spaces, I find it hard to debug. Could anyone please lend me a hand here?
Currently I'm stuck with this error:
"[INFO] org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name AdbRuleException with namespace http://exception.common.adb.example.com"

If anyone have any idea where I can begin then I would be very happy! :)
This is the XML:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    xmlns:apachesoap="http://xml.apache.org/xml-soap"
    xmlns:impl="http://webservice.adb.example.com"
    xmlns:intf="http://webservice.adb.example.com"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:tns1="http://exception.common.adb.example.com"
    xmlns:tns2="http://exception.xml.adb.example.com"
    xmlns:tns3="http://sax.xml.org" xmlns:tns4="http://lang.java"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://webservice.adb.example.com">
<!--WSDL created by Apache Axis version: 1.3
    Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.adb.example.com">
        <import namespace="http://exception.common.adb.example.com"/>
        <import namespace="http://lang.java"/>
        <import namespace="http://xml.apache.org/xml-soap"/>
        <import namespace="http://exception.xml.adb.example.com"/>
        <import namespace="http://sax.xml.org"/>
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="AdConnexionException">
            <sequence/>
        </complexType>
        <complexType name="ArrayOf_soapenc_string">
            <complexContent>
                <restriction base="soapenc:Array">
                    <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/>
                </restriction>
            </complexContent>
        </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.apache.org/xml-soap">
        <import namespace="http://webservice.adb.example.com"/>
        <import namespace="http://exception.common.adb.example.com"/>
        <import namespace="http://lang.java"/>
        <import namespace="http://exception.xml.adb.example.com"/>
        <import namespace="http://sax.xml.org"/>
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="mapItem">
            <sequence>
                <element name="key" nillable="true" type="xsd:anyType"/>
                <element name="value" nillable="true" type="xsd:anyType"/>
            </sequence>
        </complexType>
        <complexType name="Map">
            <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
            </sequence>
        </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://exception.common.adb.example.com">
        <import namespace="http://webservice.adb.example.com"/>
        <import namespace="http://lang.java"/>
        <import namespace="http://xml.apache.org/xml-soap"/>
        <import namespace="http://exception.xml.adb.example.com"/>
        <import namespace="http://sax.xml.org"/>
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="AdbRuleException">
            <sequence>
                <element name="errorKey" nillable="true" type="soapenc:int"/>
                <element name="errorMessage" nillable="true" type="soapenc:string"/>
                <element name="exceptionKeyMap" nillable="true" type="apachesoap:Map"/>
            </sequence>
        </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://sax.xml.org">
        <import namespace="http://webservice.adb.example.com"/>
        <import namespace="http://exception.common.adb.example.com"/>
        <import namespace="http://lang.java"/>
        <import namespace="http://xml.apache.org/xml-soap"/>
        <import namespace="http://exception.xml.adb.example.com"/>
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="SAXException">
            <sequence>
                <element name="cause" nillable="true" type="xsd:anyType"/>
                <element name="exception" nillable="true" type="xsd:anyType"/>
                <element name="message" nillable="true" type="soapenc:string"/>
            </sequence>
        </complexType>
    </schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://exception.xml.adb.example.com">
        <import namespace="http://webservice.adb.example.com"/>
        <import namespace="http://exception.common.adb.example.com"/>
        <import namespace="http://lang.java"/>
        <import namespace="http://xml.apache.org/xml-soap"/>
        <import namespace="http://sax.xml.org"/>
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        <complexType name="AdConnexionRuleException">
            <complexContent>
                <extension base="tns3:SAXException">
                    <sequence/>
                </extension>
            </complexContent>
        </complexType>
    </schema>
</wsdl:types>

<wsdl:message name="getDeadlineExceptionsByMarketIdResponse">
   <wsdl:part name="getDeadlineExceptionsByMarketIdReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getDeadlinesResponse">
    <wsdl:part name="getDeadlinesReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getOrderStatusResponse">
    <wsdl:part name="getOrderStatusReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getStatusResponse">
    <wsdl:part name="getStatusReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="AdbRuleException">
    <wsdl:part name="fault" element="tns1:AdbRuleException"/>
</wsdl:message>
<wsdl:message name="requestResponse">
    <wsdl:part name="requestReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getDeadlinesByMarketIdResponse">
    <wsdl:part name="getDeadlinesByMarketIdReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="cancelOrderRequest">
    <wsdl:part name="in0" type="soapenc:int"/>
</wsdl:message>
<wsdl:message name="AdConnexionException">
    <wsdl:part name="fault" element="impl:AdConnexionException"/>
</wsdl:message>
<wsdl:message name="getDeadlinesByMarketIdRequest">
    <wsdl:part name="in0" type="soapenc:int"/>
</wsdl:message>
<wsdl:message name="getProductsByMarketIdRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getPackageInfoRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
    <wsdl:part name="in1" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="cancelOrderResponse">
    <wsdl:part name="cancelOrderReturn" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="getDeadlinesRequest">
    <wsdl:part name="in0" type="soapenc:int"/>
</wsdl:message>
<wsdl:message name="getRealEstatePlacementsResponse">
    <wsdl:part name="getRealEstatePlacementsReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getStatusRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
    <wsdl:part name="in1" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getRealEstatePlacementsRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="helloWorldResponse">
    <wsdl:part name="helloWorldReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getOrderStatusRequest">
    <wsdl:part name="in0" type="soapenc:int"/>
</wsdl:message>
<wsdl:message name="getProductsByMarketIdResponse">
    <wsdl:part name="getProductsByMarketIdReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getPlacementsResponse">
    <wsdl:part name="getPlacementsReturn" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="AdConnexionRuleException">
    <wsdl:part name="fault" element="tns2:AdConnexionRuleException"/>
</wsdl:message>
<wsdl:message name="helloWorldRequest">
</wsdl:message>
<wsdl:message name="getDeadlineExceptionsByMarketIdRequest">
    <wsdl:part name="in0" type="soapenc:int"/>
</wsdl:message>
<wsdl:message name="requestRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="getPlacementsRequest">
    <wsdl:part name="in0" type="soapenc:string"/>
    <wsdl:part name="in1" type="impl:ArrayOf_soapenc_string"/>
</wsdl:message>
<wsdl:message name="getPackageInfoResponse">
    <wsdl:part name="getPackageInfoReturn" type="soapenc:string"/>
</wsdl:message>

<wsdl:portType name="AdConnexionService">
    <wsdl:operation name="getPackageInfo" parameterOrder="in0 in1">
        <wsdl:input message="impl:getPackageInfoRequest" name="getPackageInfoRequest"/>
        <wsdl:output message="impl:getPackageInfoResponse" name="getPackageInfoResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="request" parameterOrder="in0">
        <wsdl:input message="impl:requestRequest" name="requestRequest"/>
        <wsdl:output message="impl:requestResponse" name="requestResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="helloWorld">
        <wsdl:input message="impl:helloWorldRequest" name="helloWorldRequest"/>
        <wsdl:output message="impl:helloWorldResponse" name="helloWorldResponse"/>
    </wsdl:operation>
    <wsdl:operation name="getRealEstatePlacements" parameterOrder="in0">
        <wsdl:input message="impl:getRealEstatePlacementsRequest" name="getRealEstatePlacementsRequest"/>
        <wsdl:output message="impl:getRealEstatePlacementsResponse" name="getRealEstatePlacementsResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getPlacements" parameterOrder="in0 in1">
        <wsdl:input message="impl:getPlacementsRequest" name="getPlacementsRequest"/>
        <wsdl:output message="impl:getPlacementsResponse" name="getPlacementsResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getProductsByMarketId" parameterOrder="in0">
        <wsdl:input message="impl:getProductsByMarketIdRequest" name="getProductsByMarketIdRequest"/>
        <wsdl:output message="impl:getProductsByMarketIdResponse" name="getProductsByMarketIdResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getStatus" parameterOrder="in0 in1">
        <wsdl:input message="impl:getStatusRequest" name="getStatusRequest"/>
        <wsdl:output message="impl:getStatusResponse" name="getStatusResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getDeadlines" parameterOrder="in0">
        <wsdl:input message="impl:getDeadlinesRequest" name="getDeadlinesRequest"/>
        <wsdl:output message="impl:getDeadlinesResponse" name="getDeadlinesResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getOrderStatus" parameterOrder="in0">
        <wsdl:input message="impl:getOrderStatusRequest" name="getOrderStatusRequest"/>
        <wsdl:output message="impl:getOrderStatusResponse" name="getOrderStatusResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="cancelOrder" parameterOrder="in0">
        <wsdl:input message="impl:cancelOrderRequest" name="cancelOrderRequest"/>
        <wsdl:output message="impl:cancelOrderResponse" name="cancelOrderResponse"/>
        <wsdl:fault message="impl:AdbRuleException" name="AdbRuleException"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
        <wsdl:fault message="impl:AdConnexionRuleException" name="AdConnexionRuleException"/>
    </wsdl:operation>
    <wsdl:operation name="getDeadlinesByMarketId" parameterOrder="in0">
        <wsdl:input message="impl:getDeadlinesByMarketIdRequest" name="getDeadlinesByMarketIdRequest"/>
        <wsdl:output message="impl:getDeadlinesByMarketIdResponse" name="getDeadlinesByMarketIdResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
    <wsdl:operation name="getDeadlineExceptionsByMarketId" parameterOrder="in0">
        <wsdl:input message="impl:getDeadlineExceptionsByMarketIdRequest" name="getDeadlineExceptionsByMarketIdRequest"/>
        <wsdl:output message="impl:getDeadlineExceptionsByMarketIdResponse" name="getDeadlineExceptionsByMarketIdResponse"/>
        <wsdl:fault message="impl:AdConnexionException" name="AdConnexionException"/>
    </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="AdConnexionServiceSoapBinding" type="impl:AdConnexionService">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getPackageInfo">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getPackageInfoRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getPackageInfoResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="request">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="requestRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="requestResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="helloWorld">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="helloWorldRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="helloWorldResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getRealEstatePlacements">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getRealEstatePlacementsRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getRealEstatePlacementsResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getPlacements">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getPlacementsRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getPlacementsResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getProductsByMarketId">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getProductsByMarketIdRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getProductsByMarketIdResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getStatus">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getStatusRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getStatusResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getDeadlines">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getDeadlinesRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getDeadlinesResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getOrderStatus">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getOrderStatusRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getOrderStatusResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="cancelOrder">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="cancelOrderRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="cancelOrderResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdbRuleException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdbRuleException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
        <wsdl:fault name="AdConnexionRuleException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionRuleException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getDeadlinesByMarketId">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getDeadlinesByMarketIdRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getDeadlinesByMarketIdResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getDeadlineExceptionsByMarketId">
        <wsdlsoap:operation soapAction=""/>
        <wsdl:input name="getDeadlineExceptionsByMarketIdRequest">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:input>
        <wsdl:output name="getDeadlineExceptionsByMarketIdResponse">
            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:output>
        <wsdl:fault name="AdConnexionException">
            <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="AdConnexionException" namespace="http://webservice.adb.example.com" use="encoded"/>
        </wsdl:fault>
    </wsdl:operation>
</wsdl:binding>

<wsdl:service name="AdConnexionServiceService">
    <wsdl:port binding="impl:AdConnexionServiceSoapBinding" name="AdConnexionService">
        <wsdlsoap:address location="http://adb.example.com/adbXmlService/webservice/AdConnexionService"/>
    </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

A: Because of these use="encoded" you should stick with Axis 1.4 (or other JAX-RPC compliant implementation). Axis2 (and CXF and JAX-WS-RI for that matter) doesn't support rpc/encoded style of web services.


text: Q: ONOS rest api configuration to handle cors error I am using reactjs to show ONOS data. But I am getting CORS error when fetching onos rest api url. How to configure rest api to overcome this problem. I did not find any documentation. Please helo me. Thanks in advance.


text:
Q: Kubernetes nodes on different datacenters causes slowness We have 2 datacenters (A and B) on 2 different regions (Eastern and Central). I've setup K8S single cluster where master is on datacenter A and few nodes on both datacenters. Our application contains 3 images (AppServer, DB, ReportingServer). Consider these 2 scenarios when the application is deployed:
1 - All 3 pods are created on the nodes belong to datacenter A. Everything works fine.
2 - DB pod or AppServer pod is created on a node belong to datacenter B and the other 2 pods are created on datacenter A. In this case application is very slow, takes 10-15 mins for it to be in running state (instead of 2-3 mins), login page loads very slowly and logging to the application usually throws error due to timeout.
My question: Is it normal for K8S to behave like this if nodes are in different datacenters? Or my setup is wrong?


text:
Q: HTML button don't submit I have this HTML code in a JSP page, but when I click it does not do anything
<button class="btn btn-grey" type="submit">Save device</button>

A: Do you have proper form tags in your html , correct form post should be :
 <form id="createMarkerForm"
    method="post"
    accept-charset="utf-8"
    action="servletUrl">

A: Hello Amadeu Cabanilles,
You have to put your button into form.
<form class="form-horizontal" method="post" modelAttribute="modelName" action="/submitSomeWhere">

    <button type="submit" class="btn-lg btn-primary pull- right">Update</button>

</form>


text:
Q: Jaccard similarity calculation in recommenderlab package of R What is the role of the parameter 'alpha' in the recommenderlab R package's use of Jaccard method in the recommender model for boolean user-preferences matrix? ie
method="Jaccard",param=list(...,alpha=0.5)

I saw the code for IBCF and they used a dissimilarity function. But the function is not defined in the official CRAN PDF for the recommenderlab package. Could someone please help?

A: It is a function defined in recommenderlab. Try:
library("recommenderlab")
? dissimilarity

A: From the documentation:
'''
"jaccard":
the number of items which occur in both elements divided by the total number of items in the elements (Sneath, 1957). This measure is often also called: binary, asymmetric binary, etc.
'''
So essentially, Jaccard = #(0 | 0) + #(1 | 1) similarities/ total.
Total is #(0 | 0) + #(1 | 1) + #(1 | 0) + #(0 | 1) ...ie, total number of rows. By # I mean number of matches, like COUNT in SQL. And my pipes, | , are meant as separators between two columns.
I had to first do ? dissimilarity, as recommended here by the documentation's author, Michael Hahsler (shout out!), and then go to dissimilarity {arules} documentation, which briefly describes the dissimilarity computations used in recommenderlab (cosine, pearson, and jaccard), as well as others.
Re: alpha... looks like it is used to help adjust bias related to highly popular items: https://stats.stackexchange.com/questions/104811/what-does-the-parameter-alpha-do-in-the-jaccard-method-for-binaryratingsmatri


text:
Q: How to increase quantity in magento based on dates attribute? I am building house rental website using magento. I am taking 2 dates from users. one is 'from' and another is 'till'. How can I calculate total number of days and change quantity in cart?

A: $from = new DateTime('2015-02-20');
$to = new DateTime('2015-02-26');
$interval = $from->diff($to);
$numberOfDays = (int) $interval->format('%R%a');


text:
Q: Link mylyn Jira task to Java source code comment in Eclipse I have pretty much the same question as in the link below except that I'm using the Jira mylyn connector.
I have my Jira Task Repository defined and was just wondering if this is possible.
Link to mylyn task in Java comment (Eclipse)
i.e. Something like //See JIRA-123 where the Jira issue number is a clickable link.
Thanks
Simon

A: There is no direct connection between JIRA and Eclipse possible. The reason for that is, that JIRA has no access to your local Eclipse installation. But there is a connection possible e.g. between JIRA and Subversion. So if you use Mylyn, and commit on a JIRA ticket in Mylyn, Mylyn will add automatically the active JIRA ticket ID to the commit message of Subversion. JIRA will then later read the commit message from the Subversion repository (if configured to do that), and will then display a backlink from the ticket to the Subversion Change Set (including diffs).
See the following resources for additional information:

*

*TortoiseSVN documentation shows how to link in your Subversion client tool to the JIRA issues.

*Integration JIRA with Subversion shows how to link from JIRA to Subversion repository.

You have to have a configuration management system to do that ...
After having read your question again, I think you will need an additional plugin for Mylyn, that interprets your sources and searches there for your JIRA issue ID patterns. But that is a totally different story (and I would not do that ... comments are forgotten, your issues is solved, but the ticket ID remains). Solving a ticket is something that has to do with commits in CM systems.


text:
Q: Select column called Titel where the id is the same from another Table Let's call this table person:
+------+----------+-----------------+------------+-------------+---------------+
| id   | Lastname | Firstname       | created_at | updated_at | Discriminator  |
+------+----------+-----------------+------------+------------+----------------+
|  52  | Bach     | Johann Sebastian| 21732312312|   666666666| Komponist      |
   125 | Beethoven| Ludwig van      | 74197212821| 44444444444| Komponist      |
   84  | Mozart   | Wolfgang        | 57128371293| 33333333333| Komponist      |
   241 | Rossini  | Gioacchino      | 97128371832| 77777777777| Komponist      |
   1   | David    | Beckham         | 97128371832| 77777777777| Member         |
   2   | Messi    | Lionel          | 97128371832| 77777777777| Member         |
   3   | Ronaldo  | Christiano      | 97128371832| 77777777777| Member         |
+------+----------+-----------------+------------+------------+----------------+

And this is table creation:
    +----+----------+---------------+------+
    | id | personId |    Titel      | Name |
    +----+----------+---------------+------+
    |  1 | 52       | Klavierkonzert| Non  |
    |  2 | 125      | Ballade et    | Non  |
    |  3 | 84       | Magnificat    | Non  |
    |  4 | 241      | Overtuer      | Non  |
    |  5 | 1        | Solo          | Non  |
    |  6 | 2        | Homemade      | Non  |
    |  7 | 3        | Random        | Non  |
    +----+----------+---------------+------+

I am Pretty new to mysql and databases please be patience.
How Do I select the Titel column in table creation, where the id in person equals the personId in creation and the Discriminator should be Komponist? So no Titels from Members.
Do i need multiple statements to do this?

A: select t1.titel
from creation t1
inner join person t2
  on t1.personId=t2.id
where t2.Discriminator='Komponist'

A: use inner join, where  like this
select c.Titel
from Person p inner join Creation c on p.id=c.PersonId
where p.Descriminator='Komponist'


text:
Q: Correlation coefficient for a Scatter plot I have plotted scatterplot for each country, and I am trying to add a correlation coefficient under the scatterplot, but I keep getting errors saying "Selections can't have missing values." even after using na.rm
Can someone help me with this??
I appreciate any help you can provide.

data link EuropeIndia

#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
#    http://shiny.rstudio.com/
#

library(shiny)
library(plotly)
library(DT)
library(tidyverse)
library(car)
library(ggpubr)
covid <- read.csv("EuropeIndia.csv")

title <- tags$a(href='https://ourworldindata.org/covid-vaccinations?country=OWID_WRL',
                'COVID 19 Vaccinations')

# Define UI for application
ui <- fluidPage(
  headerPanel(title = title),

  # Application title
  titlePanel("COVID vaccinations: Deaths Vs All variables"),

  # Sidebar with a slider input for number of bins
  sidebarLayout(
    sidebarPanel(
      selectInput("location", "1. Select a country",
                  choices = covid$location, selectize = TRUE, multiple = FALSE),
      br(),
      helpText("2. Select variables for scatterplot"),
      selectInput(inputId = "y", label = "Y-axis:",
                  choices = c("total_deaths", "new_deaths"),
                  selected = "Deaths",),
      br(),
      selectInput(inputId = "x", label = "X-axis:",
                  choices = names(subset(covid,select = -c(total_deaths,new_deaths,
                                                           iso_code, continent,date,location), na.rm =TRUE)),
                  selectize = TRUE,
                  selected = "Comparator variables")
    ),
    mainPanel(
      textOutput("location"),
      #plotOutput("Scatterplot"),
      tabsetPanel(
        type = "tabs",
        tabPanel("Scatterplot", plotlyOutput("scatterplot"),
                 verbatimTextOutput("correlation"),
                 verbatimTextOutput("interpretation")),
        tabPanel("Summary of COVID data", verbatimTextOutput("summary")),
        tabPanel("Dataset", DTOutput("dataset")))
    )
  )
)

# Define server logic
server <- function(input, output) {
  output$location <- renderPrint({locationfilter <- subset(covid, covid$location == input$location)})
  output$summary <- renderPrint({summary(covid)})
  output$dataset <- renderDT(
    covid, options = list(
      pageLength = 50,
      initComplete = JS('function(setting, json) { alert("done"); }')
    )
  )

  output$scatterplot <- renderPlotly({
    ggplotly(
      ggplot(subset(covid, covid$location == input$location),
             aes(y = .data[[input$y]], x = .data[[input$x]],col = factor(stringency_index)))+
        geom_smooth()+geom_point()+labs(col ="Stringency Index")
                )
  })

  output$correlation <- renderText({
    x= subset(covid, covid$location == input$location) %>% dplyr::select(as.numeric(!!!input$x, na.rm =TRUE))
    y= subset(covid, covid$location == input$location) %>% dplyr::select(as.numeric(!!!input$y, na.rm = TRUE))
    var(x,y, na.rm = T, use)
    cor(x,y, method = 'pearson', na.rm =T)
    })
}

# Run the application
shinyApp(ui = ui, server = server)

A: First of all you should select just one Country from the selection list.
For error checking I propose you the next code.
library(shiny)
library(plotly)
library(DT)
library(tidyverse)
library(car)
library(ggpubr)
covid <- read.csv("EuropeIndia.csv")

title <- tags$a(href='https://ourworldindata.org/covid-vaccinations?country=OWID_WRL',
            'COVID 19 Vaccinations')

# Define UI for application
ui <- fluidPage(
headerPanel(title = title),

# Application title
titlePanel("COVID vaccinations: Deaths Vs All variables"),

# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
  selectInput("location", "1. Select a country",
              choices = covid$location[1], selectize = TRUE, multiple = FALSE),
  br(),
  helpText("2. Select variables for scatterplot"),
  selectInput(inputId = "y", label = "Y-axis:",
              choices = c("total_deaths", "new_deaths"),
              selected = "Deaths",),
  br(),
  selectInput(inputId = "x", label = "X-axis:",
              choices = names(subset(covid,select = -c(total_deaths,new_deaths,
                                                       iso_code, continent,date,location), na.rm =TRUE)),
              selectize = TRUE,
              selected = "Comparator variables")
),
mainPanel(
  textOutput("location"),
  #plotOutput("Scatterplot"),
  tabsetPanel(
    type = "tabs",
    tabPanel("Scatterplot", plotlyOutput("scatterplot"),
             verbatimTextOutput("correlation"),
             verbatimTextOutput("interpretation")),
    tabPanel("Summary of COVID data", verbatimTextOutput("summary")),
    tabPanel("Dataset", DTOutput("dataset")))
)
)
)

# Define server logic
server <- function(input, output) {
output$location <- renderPrint({locationfilter <- subset(covid, covid$location == input$location)})
output$summary <- renderPrint({summary(covid)})
output$dataset <- renderDT(
covid, options = list(
  pageLength = 50,
  initComplete = JS('function(setting, json) { alert("done"); }')
 )
)

output$scatterplot <- renderPlotly({
ggplotly(
  ggplot(subset(covid, covid$location == input$location),
         aes(y = .data[[input$y]], x = .data[[input$x]],col = factor(stringency_index)))+
    geom_smooth()+geom_point()+labs(col ="Stringency Index")
  )
})

output$correlation <- renderText({
x <- covid[covid$location == input$location, input$x]
y <- covid[covid$location == input$location, input$y]
xy = data.frame(x,y)
xy = xy[complete.cases(xy),]
var(xy)
cor(xy,method = 'pearson')
})
}

# Run the application
shinyApp(ui = ui, server = server)


text:
Q: MS SSIS Initial & incremental load I have to replicate my source DB in MS SQL SERVER to target SQL SERVER. After an initial Transfer database task, I'm incrementally loading new or updated rows using lookup. The problem is I have to do this for each & every table in the database & my database has around 70-80 tables. Is there a way I could scroll through all the tables in the database & incrementally load each one of them or even better I could incrementally load on database level ?

A: This sounds like a good candidate for BiML, which lets you dynamically create SSIS packages based on meta data.
There is currently NO built-in way in SSIS to loop through tables that have different column structures and incrementally load them with the same set of SSIS objects.   You would have to build SSIS objects for every table.
Another thing you might look into is Replication, if you are using SQL Server on both sides of the ETL.  That would be the closest thing to "incrementally loading on the database level".


text:
Q: Error when trying to open Power BI (Analysis Services) ADOMD.NET connection using .NET Core 3.1 While using the Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64 library version 19.26.1.2 (also tried older version) and trying to connect to Power BI dataset using ADOMD.NET connection from .NET Core 3.1 (also tried 3.0) Azure Function app, on the line:
adomdConnection.Open();

I get this error message:

System.Private.CoreLib: Exception while executing function: Function1.
Microsoft.AnalysisServices.AdomdClient: This feature is supported for
a .NET Core client only on Windows systems and requires that the .NET
Core Desktop framework is installed.

However, I am running Windows 10 (and Visual Studio 2019) and I'm pretty sure I do have installed the mentioned .NET Core runtime:
dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

I've tried searching for this error message but I found nothing.
How can this issue be resolved?


text:
Q: Android - How to create a Permanent Notification I have created a notification in my "onCreate" activity method.
Everything runs smoothly, only that you can close it by pressing the "delete all" button.
How do I make this notification perma? as in it should just be more of an info rather than a notification..
This is my current code:
    private void showNotification() {
    // TODO Auto-generated method stub
    nMN = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    Notification n  = new Notification.Builder(this)
    .setContentTitle("Whip And Weep")
    .setContentText("Whip is On!")
    .setSmallIcon(R.drawable.ic_launcher)
    .build();
    nMN.notify(NOTIFICATION_ID, n);
}

A: ok add this in your code :
n.flags |= Notification.FLAG_NO_CLEAR;

A: On your notification builder use .setOngoing(true). This will prevent the user from removing your notification.
See the Notification Builder Documentation for more info:
http://developer.android.com/reference/android/app/Notification.Builder.html#setOngoing%28boolean%29


text:
Q: android webview with https connection and basic auth. How to get this working? I have researched and researched and researched this until I've gone grey and bald.
How on earth do I get a webview to work for a site that needs http basic authentication over an https connection on api level 8+
I have the following code
    String email = Util.getEmail(this);
    String pwd = Util.getPassword(this);
    webview.getSettings().setJavaScriptEnabled(true);
    webview.setHttpAuthUsernamePassword(Config.SERVER_BASE_URL, "Application", email, pwd);

//      webview.setWebViewClient(new MobileWebViewClient(this));
    webview.loadUrl(url);

As you can see I did have a web view client (Now commented out) that overrides the onReceivedHttpAuthRequest method which looks like this
@Override
public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm){
    String email = Util.getEmail(wvContext);
    String pwd = Util.getPassword(wvContext);
    if(!pwd.equalsIgnoreCase("-1") && !pwd.equalsIgnoreCase("-1")){
       handler.proceed(email, pwd);
    }
}

This was used without the webview.setHttpAuthUsernamePassword and works fine except that it means 2 requests are issued to the website - The first gets a 401 and then the client kicks in with the authorisation stuff This is fine for a small amount of website traffic but halving the amount of traffic (currently averaging 49 requests p/m) is the name of the game right now!
I read that I can pre-emptively supply the credentials by using
webview.setHttpAuthUsernamePassword(Config.SERVER_BASE_URL, "Application", email, pwd);

However this just results in Http Basic: Access denied errors
The server base url constant is the domain name for the site i.e. https://example.com (without the page) the actual url is https://example.com/some_pages.
It makes no difference whether I use the full url or the domain. I have checked the realm and I have that correct and I have used just empty strings providing only email and password.
Could this be something to do with the fact that the site is using https? My code seems to work fine on my dev box without https but that may be a red herring.!
The only stack overflow questions that seem to cover my requirements have not got accepted answers and the docs are no help that I can see.
I now have such a large dent in my head from banging it against a brick wall that I am thinking of getting a square hat.
Please if anyone can give me the solution to this I will be forever in your debt!
I might even e-Mail you an KitKat

A: This simple example abuses a page on HttpWatch since it's more fun with a working public example.
The resource in question, https://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?randomgarbage uses basic auth over HTTPS and can be loaded without authentication failure like this (tested using Android 2.3.7):
    WebView v = ...; // Your webview goes here.
    try {
        HashMap<String, String> map = new HashMap<String, String>();
        // This test service takes the username "httpwatch" and a random
        // password. Repeating a password can lead to failure, so we create
        // a decently random one using UUID.
        String usernameRandomPassword = "httpwatch:" + UUID.randomUUID().toString();
        String authorization = "Basic " + Base64.encodeToString(usernameRandomPassword.getBytes("UTF-8"), Base64.NO_WRAP);
        map.put("Authorization", authorization);
        v.loadUrl("https://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?" + System.currentTimeMillis(), map);
    } catch (UnsupportedEncodingException e) {}

This works on ICS and Gingerbread. Don't have access to anything older than that, but loadUrl(String, Map<String,String>) was introduced in API level 8, so I don't see why it shouldn't work for that to.
Clarification for Nappy:
To support authentication for subsequent requests you supply a WebViewClient and do the following:
    webView.setWebViewClient(new WebViewClient(){
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url, <your map containing the Authorization header>);
            return true;
        }
    });

A: It will work for https URL.In this if we are getting Untrusted_cer then we will ignore it
 webview.setWebViewClient(new WebViewClient(){
        @Override
        public void onReceivedHttpAuthRequest(WebView view,
                HttpAuthHandler handler, String host, String realm) {
            super.onReceivedHttpAuthRequest(view, handler, host, realm);
        }

        @Override
        public void onReceivedSslError(WebView view,
                SslErrorHandler handler, SslError error) {
            super.onReceivedSslError(view, handler, error);
            if(error.getPrimaryError()==SslError.SSL_UNTRUSTED){
                handler.proceed();
            }else{
                handler.proceed();
            }
        }

    });

I have no idea about second problem

A: for handling authorization on your site, just override the following method in your webViewClient and add username and password in its handler.
@Override
        public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
            handler.proceed(StringUtils.AUTH_NAME,StringUtils.AUTH_PASS);
        }


text:
Q: Exercise 3.1.2, Bosch's Algebraic Geometry and Commutative Algebra
Let $R$ be a ring and $\Gamma$ a finite group of automorphisms of $R$. Show that $R$ is an
integral extension of the fixed ring $R_{\Gamma}:= \{a \in R : \gamma(a) = a\ \forall \gamma\in\gamma\}$.

It seems to me that this exercise should be done constructively, but the only intuition that I have is that, taken an element $x\in R-R_{\Gamma}$, then at least one among the (finitely many) $r_{\gamma}:=x-\gamma(x)$, as $\gamma$ varies in $\Gamma$, is non-zero. This suggest me that, when it comes to find a polynomial $f(X)\in R_\Gamma[X]$ such that $p(x)=0$, the $r_\gamma$ could be linked to the coefficients of $p(X)$. However  I really couldn't think of anything more, and any path I tried was unsuccesfull. I would just like a hint more than a solution, thanks in advance


text:
Q: If (category / tag checked) then (display header2php) I have 3 headers (header.php, header2.php, and header3.php). I want to always display header.php at the top. Below header.php, I want a second header to display depending on what category the post is. If the post is Grizzly Bears, I want header2. If the post is Peace Pipes, I want header3.
I understand displaying 2 headers with:
<?php
get_header();
get_header(header2);
?>

But how can I make the second header dependent on if a category is tagged (or tag is added, to make this question complete)?
EDIT: Due to the help of jgraup and karpstrucking, I see this question is not complete:
Using ...
if ( has_category( 'Grizzly Bears' ) ) {
  get_header( 'header2' );
} else if ( has_category( 'Peace Pipes' ) ) {
  get_header( 'header3' );
}

... works only if the has_category is the child-most category. I would like to apply the condition to the parent-most category. This code fails for this. For example, I check parent category 'Grizzly Bears' and child category 'Grizzly Bears Fishing' and I can't use the code for 'Grizzly Bears'.
Thanks,
JM

A: You can use the has_category() function for this:
if ( has_category( 'Grizzly Bears' ) ) {
  get_header( 'header2' );
} else if ( has_category( 'Peace Pipes' ) ) {
  get_header( 'header3' );
}

You can add the has_tag function as well. Both accept an array of term IDs, names or slugs if you want to check multiples at once.
Edit: changed in_category to has_category for consistency and potential future deprecation

A: EDIT from COMMENTS

All I want to do, in this case, is display a header(header)2 -IF-a post has a certain category checked. I might have "Grizzly bears" only, or might have both "Grizzly bears" and its child "Grizzly bears fishing," or I might have another child "Grizzly bears eating" but as long as that "Grizzly bears" category is checked, I want the -THEN- statement to happen.

We can still use the same function that we have created in the ORIGINAL ANSWER, but we will aplly it a bit different. We will need to get the categories the post belongs to and then check if Grizzly bears are among them
$parent_cat  = 1, //Pass the ID, this will ID for 'Grizzly bears'
$descendants = get_term_descendants( $parent_cat );
$post_terms  = get_the_category( get_the_ID() );
$ids         = wp_list_pluck( $post_terms, 'term_id' );
if ( $decendants && !in_array( $parent_cat, $ids ) ) {
    if ( has_category( $decendants ) ) {
        // Post belongs to parent cat descendants but not parent cat
    }
} elseif ( in_array( $parent_cat, $ids ) ) {
    // Post belongs to the parent category
} else {
    // Post does not belong to parent cat or any of its decendants
}

ORIGINAL ANSWER
Your question is a bit hard to understand, but I will answer to how I read it.
If you need to apply a certain header to each to the top level term and all of its descendants, you can write your function using get_terms() to return all descendants from the given top level parent
FEW NOTES BEFORE CODE:

*

*The code is untested and might be buggy. Be sure to test this locally first with debug turned on

*The code requires at least PHP 5.4

*It can be quite verbose as we need to do a lot of work to get all the descendants from a top level term. Note, I have explained this, but for performance, make sure that you pass the ID rather than slug to the function, and do not use names
CODE
function get_term_descendants( $term = '', $taxonomy = 'category' )
{
    // First make sure we have a term set, if not, return false
    if ( !$term )
        return false;

    // Validate and sanitize taxonomy
    if ( 'category' !== $taxonomy ) {
        $taxonomy = filter_var( $taxonomy, FILTER_SANITIZE_STRING );
        // Make sure the taxonomy is valid
        if ( !taxonomy_exists( $taxonomy ) )
            return false;
        // Make sure our taxonomy is hierarchical
        if ( !is_taxonomy_hierarchical( $taxonomy ) )
            return false;
    }

    // OK, we have a term and the taxonomy is valid, now we need to validate and sanitize the term
    if ( is_numeric( $term ) ) {
        $term = filter_var( $term, FILTER_VAILDATE_INT );
    } else {
        $term_filtered = filter_var( $term, FILTER_SANITIZE_STRING );
        $term_object   = get_term_by( 'slug', $term_filtered, $taxonomy );
        $term          = filter_var( $term_object->term_id, FILTER_VAILDATE_INT );
    }

    // Everything is sanitized and validated, lets get the term descendants ids
    $term_descendants = get_terms( $taxonomy, ['child_of' => $term, 'fields' => 'ids'] );

    // Check if we have terms
    if ( !$term_descendants )
        return false;

    // We have made it, return the descendants
    return $descendants;
}

Our function get_term_descendants() will now either hold an array of descendant term ID's of the term passed to the function or will return false if the passed term dont have descendants
We can now use our function and pass the returned array of ids directly to has_category()
NOTE: You can either pass the parent term ID or slug to the function. Do not use names as hierarchical terms can have duplicate names accross different hierarchies. Also note, passing the slug to the function is a bit more expensive because we will use get_term_by() to get the term ID from the slug. For performance, try to always pass the ID
$parent_cat = 1, //Pass the ID, can pass the slug, but reread the note above
$descendants = get_term_descendants( $parent_cat );
if ( $decendants ) {
    $term_array = array_merge( $parent_cat, $descendants );
} else {
    $term_array = $parent_cat;
}
// Now we can check if the post belongs to the parent cat or one of his descendants
if ( has_category( $term_array, $post ) ) {
    // Post belongs to parent cat or one of his descendants
} else {
    // Post does not belong to the parent or any of his descendants
}

A: For all categories (wp_get_post_categories)

The function wp_get_post_categories() retrieve a list of categories for a post.

get_header('header');

Conditional based on has_category

Check if the current post has any of the given categories. The given categories are checked against the post's categories' term_ids, names and slugs. Categories given as integers will only be checked against the post's categories' term_ids.

if(has_category('bears', $post)) {
    get_header('header2');
}
else if(has_category('pipes', $post)) {
    get_header('header3');
}


text:
Q: On the regularity of any reparametrezation of a regular curve According to Differential Geometry by Pressley:

$\mathsf{Proposition}\:\mathsf{1.3}$
Any reparametrisation of a regular curve is regular.

Proof $\it{1.3}$
Suppose that $\gamma$ and $\tilde{\gamma}$ are related as in Definition 1.5, let $t=\phi(\tilde{t})$, and let $\psi=\phi^{-1}$ so that $\tilde{t}=\psi(t)$. Differentiating both sides of the equation $\phi(\psi(t))=t$ with respect to $t$ and using the chain rule gives $${{\raise{0.3pt}{d\phi}}\above{0.5pt}{d\tilde{t}}} \frac{d\psi}{\lower{1pt}{dt}}=1.$$ This shows that $d\phi/d\tilde{t}$ is never zero. Since $\tilde{\gamma}(\tilde{t})=\gamma(\phi(\tilde{t}))$, another application of the chain rule gives $${{\raise{0.3pt}{d\tilde{\gamma}}}\above{0.5pt}{d\tilde{t}}}=\frac{d\gamma}{\lower{1pt}{dt}}{{\raise{0.3pt}{d\phi}}\above{0.5pt}{d\tilde{t}}},$$ which shows that $d\tilde{\gamma}/d\tilde{t}$ is never zero if $d\gamma/dt$ is never zero. $\hspace{6.2cm}\square$

Now suppose the parabola $y=x^2$ and the parametrazation $\gamma(t) = (t, t^2)$ and also reparametrazation $\delta(t)=(t^3, t^6)$. Obviously the function $\phi(t)=t^3$ is strictly monotone and continuously differentiable. Nonetheless, $\gamma(t)$ is regular but $\delta(t)$ is not! What did I do wrong? Or is the proof incorrect?
Maybe the following definition from the same book is wrong; that is, it must include that $d\phi/dt $ is never zero in all its domain?

$\mathsf{Definition}\:\mathsf{1.5}$
A parametrised curve $\tilde{\gamma}:(\tilde{\alpha},\tilde{\beta})\to\mathbf{R}^n$ is a reparametrisation of a parametrised curve $\gamma:(\alpha,\beta)\to\mathbf{R}^n$ if there is a smooth bijective map $\phi:(\tilde{\alpha},\tilde{\beta})\to(\alpha,\beta)$ (the reparametrisation map) such that the inverse map $\phi^{-1}:(\alpha,\beta)\to(\tilde{\alpha},\tilde{\beta})$ is also smooth and $$\tilde{\gamma}(\tilde{t})=\gamma(\phi(\tilde{t}))\:\:\text{for all}\:\:\tilde{t}\in(\tilde{\alpha},\tilde{\beta}).$$

A: See definition 1.3.1 in Pressley's textbook:

For him, a reparametrization is a smooth bijective map whose inverse is also smooth. That does not occur with $t\mapsto t^3$.

A: Yes, if $\phi$ is a diffeomorphism (a smooth bijection with a smooth inverse) then $\frac{d\phi}{dt} \ne 0$.
This is because $\phi \circ \phi^{-1} = \text{id}$ so $$1 = \frac{d(\text{id})}{dt} = d(\phi^{-1} \circ \phi) = \frac{d\phi^{-1}}{d\phi} \frac{d\phi}{dt}$$
In particular we see that $\frac{d\phi}{dt} \ne 0$.


text: Q: Is the EDM of a fundamental particle T-odd? Is the EDM of a fundamental (or almost) particle (e.g. electron, neutron) T-odd? On wikipedia it says that it is not (check the diagram). But I found some papers (e.g. this review and the references within) which claims that the EDM is T-odd (check the second page). I am confused now. Of course I trust that paper (more than 100 citations) over Wikipedia, but I was wondering, am I miss-understanding something? Can someone help me? Thank you!


text:
Q: pyqt QTableView printing (4 line c++ code translate to python) i have a Qt code writed in C++ . i want translate it to python code, but i have a problem in 4 line:
all code is:
void TableView::print(QPainter* painter, const QRect& area)
{
    const int rows = model()->rowCount();
    const int cols = model()->columnCount();

    // calculate the total width/height table would need without scaling
    double totalWidth = 0.0;
    for (int c = 0; c < cols; ++c)
    {
        totalWidth += columnWidth(c);
    }
    double totalHeight = 0.0;
    for (int r = 0; r < rows; ++r)
    {
        totalHeight += rowHeight(r);
    }

    // calculate proper scale factors
    const double scaleX = area.width() / totalWidth;
    const double scaleY = area.height() / totalHeight;
    painter->scale(scaleX, scaleY);

    // paint cells
    for (int r = 0; r < rows; ++r)
    {
        for (int c = 0; c <; cols; ++c)
        {
            QModelIndex idx = model()->index(r, c);
            QStyleOptionViewItem option = viewOptions();
            option.rect = visualRect(idx);
            itemDelegate()->paint(painter, option, idx);
        }
    }
}

// printer usage
QPainter painter(&printer);
tableView->print(&painter, printer.pageRect());

// test on pixmap
QPixmap pixmap(320, 240);
QPainter painter(&pixmap);
tableView->print(&painter, pixmap.rect());
pixmap.save("table.png", "PNG");

but problem is here:
for (int c = 0; c < cols; ++c)
{
    QModelIndex idx = model()->index(r, c);
    QStyleOptionViewItem option = viewOptions();
    option.rect = visualRect(idx);
    itemDelegate()->paint(painter, option, idx);
}

please help me . thank you so much :)

A: It would be nice if you explain the problem.
Let's see...
for (int c = 0; c < cols; ++c)
{
    QModelIndex idx = model()->index(r, c);
    QStyleOptionViewItem option = viewOptions();
    option.rect = visualRect(idx);
    itemDelegate()->paint(painter, option, idx);
}

A straightforward translation would be:
for c in range(cols):
    idx = model.index(r, c)
    option = self.viewOptions()
    option.rect = self.visualRect(idx)
    self.itemDelegate().paint(painter, option, idx)

Not sure about the option.rect = ... (haven't tested). Is there where you've got the problem?

A: c++ CODE TO PYTHON  is :
def printTable(self,printer,painter,area):
    model = self.model
    myTableView = self.view
    printer = painter #self.myprinter
    rows = model.rowCount();
    columns = model.columnCount();
    totalWidth = 0.0;
    totalPageHeight = 0.0;
    totalHeight = 0.0;
    for c in range(columns):
        totalWidth += myTableView.columnWidth(c)

    for p in range(45):
        totalPageHeight += myTableView.rowHeight(p);

    for r in range(rows):
        totalHeight += myTableView.rowHeight(r);

    xscale = area.width() / totalWidth;
    yscale = area.height() / totalHeight;
    pscale = area.height() / totalPageHeight;
    painter.scale(xscale, pscale);
    painter.translate(area.x() + xscale, area.y() + yscale);

    x=0
    #QStyleOptionViewItem option;

    for r in range(rows):
        ++x
        for c in range(columns):
            idx = model.index(r,c);
            option = myTableView.viewOptions();
            option.rect = myTableView.visualRect(idx);
            if r % 2 == 0:
                brush= QtGui.QBrush(QtGui.QColor(220, 220, 220), QtCore.Qt.SolidPattern);
                painter.fillRect(option.rect, brush);
            myTableView.itemDelegate().paint(painter, option, idx);

        if (x == 45):
            ok = printer.newPage();
            x=0;
            painter.translate(0, -1350);


text:
Q: Allow Remote Users to Add/Remove Printers This is driving me up the wall! I feel I'm so close, but I'm probably missing just one tiny detail.
I have a Ubuntu desktop setup to be a CUPS server. I need to add printers via the GUI interface, rather than the CUPS web-interface. When I'm logged in locally to the server, no problem, works great!
However, when I start a remote session via X2Go, with the same user, I can open and see printers that are already attached to the server, but that's its. I can't do anything else. No adding. No removing. No editing. Nothing. (There is one tiny exception to this: If I start a remote session via X2Go, logging in as root, this works. I can modify printers. Not sure on that one what the reason is.)
The "Unlock" icon in the top-right corner of the Printer GUI is greyed out and I get the "System policy prevents changes" when I hover over it. I've done enough research to know that this is something to do with the polkit in Ubuntu; however, I evidently don't have the .pkla file just right as nothing I put in it seems to makes a difference.
This is my current .pkla file:
[Modify printers remotely]
Identity=unix-user:{remote_user}
Action=org.opensuse.cupspkhelper.mechanism.printeraddremove
ResultInactive=auth_self
ResultActive=auth_self

It's stored in: /etc/polkit-1/localauthority/50-local.d.
Am I missing anything in the file that would prevent a remote-connected user from modifying the printers via GUI? Is this just not something that polkit is supposed to support? I'm completely out of ideas.
Server is running Ubuntu 20.04, CUPS 2.3.1, and pkaction version 0.105
Thanks everyone for any help!

A: This same issue was also giving me conniptions! I have a very similar configuration and experienced the inability to unlock printer settings when running a remote session from RDP on Windows. As you noted, the guidance from researching the existing materials wasn't particularly helpful either. It only got me to about the same place as you — i.e., not quite solving the issue completely.  One would think modifying printers remotely is such a common task so as to have a solution in place already ... but apparently not.
However, just today, it seems like I've identified the final step that's needed to get over the finish line.  It's only a minor adjustment from what you had, but the result is the ability to unlock printer settings remotely.
More data can be found in polkit man page (this link is to the Focal Fossa docs but should be quite similar for other versions).
The slightly modified file contents is as follows, right after you can find details about why this configuration:
[Modify printers remotely]
Identity=unix-user:{remote_user}
Action=org.opensuse.cupspkhelper.mechanism.*
ResultAny=auth_admin_keep

Inside square brackets there is title that must be unique inside the file.
The Identity key specify to which user or groups this rule applies.
In your example you used the two keys ResultActive and ResultInactive: both are referring to a local session, not a remote one; instead the key ResultAny refers to any subject. By testing on Ubuntu 20.04 LTS (Focal Fossa) I determined that adding only ResultAny does not affect the local session, so if you connect locally you do not have to enter admin password to edit printers (keep in mind that anyway this wold be limited to the user specified in the Identity).
I changed the Action key to a glob value org.opensuse.cupspkhelper.mechanism.* that includes more actions than just adding, editing or deleting a printer. You can see individual actions that are being allowed by running pkaction | grep org.opensuse.cupspkhelper.mechanism..
The location of the pkla file should be /etc/polkit-1/localauthority/50-local.d/. As far as the name of the file it could be anything you like, keeping in mind that, if there are multiple files, these are evaluated in order (for better understanding see man page linked above) — I happen to use "99-printing.pkla".
Note that polkit will recognize these settings immediately once the pkla file is created in the directory given above. When the pkla file is saved, it is immediately effective (no need to logout and login). In subsequent remote sessions the user will be able to unlock the printer settings by authenticating. If authenticating is deemed unnecessary, just replace auth_admin_keep in the pkla file with yes and the unlock step can be bypassed completely instead.
I hope this is useful!


text:
Q: Highcharts Dynamic Column color based on data comparison Here's a snippet of what I'm trying to do, basically I have 2 values I'm feeding into the graph I want to change the color of the column based on the comparison. Basically if value is greater than target be green, else be blue. But the target values are different for each column.
column: {
                zones: [{
                    value: data[1] >= data[2],
                    color: 'green'
                }, {
                    color: 'blue'
                }]
            }

A: zones is a data array, and therefore the calculation won't happen procedurally.  You'd need to compute that outside of the array, for example create a function to do the computation and call that to return the color:
column: {
            zones: [{
                color: getComputedColor(data)
            }, {
                color: 'blue'
            }]
        }
....

function getComputedColor(data)
{   if (data[1] >= data[2])
       return "green";
    return "blue";
}