Q: VB.NET - Problem with transparent background PNG and ImageSharp quantizer I am trying to make a WinForms app in VB.NET (Framework 4.7.2) that optimizes an electronic signature using ImageSharp, and I am running into a problem.  When I try to use the OctreeQuantizer to decrease the number of colors in the PNG, I get an inverted / negative image if the source has a transparent background.  This is a problem since the signature will need to be transparent when it is applied to a document.
Application Window - Top is original signature
Original Save Dialog from Paint.NET
As you can see, I saved the original image as an 8bpp PNG with transparency using Paint.NET
Here's my quantize function:
    Public Shared Function QuantizeImageGrayscalePNG(ByVal vstrSource As String, ByVal vintMaxColors As Integer) As Bitmap
        Dim poqQuant As New OctreeQuantizer()
        Dim pencPNG As New PngEncoder() With {.BitDepth = PngBitDepth.Bit8, .ColorType = PngColorType.GrayscaleWithAlpha}

        vintMaxColors = Math.Min(256, vintMaxColors)
        If vstrSource IsNot Nothing AndAlso IO.File.Exists(vstrSource) AndAlso vintMaxColors > 0 Then
            Using piNew As Image = Image.Load(vstrSource),
                  pstOutput As New IO.MemoryStream()

                poqQuant.Options.MaxColors = vintMaxColors

                piNew.Mutate(Sub(x) x.Quantize(poqQuant))
                piNew.Save(pstOutput, pencPNG)

                Return Bitmap.FromStream(pstOutput)
            End Using
        Else
            Return Nothing
        End If
    End Function

If I use an image with no transparency as the source, the issue does not occur.  I also tried commenting out the Mutate function, and it "works" but of course does not change the number of colors or image size.

A: Answer from JimBobSquarePants on GitHub:

Octree only supports a single transparent color . For Png you need to use the Wu quantizer which is the default quantizer.
However, if you are trying to reduce the colors in a png you should be saving it in indexed format by setting the PngColorType in the encoder along with a custom Wu quantizer with your max color count.

Not sure that is a full answer, but my issue was closed so that's all I'm getting.


Q: Kotlin / Native c interop with reduced visibility Is it possible to generate c stabs with internal visibility?
When using c interop with Kotlin/Native the generated stabs for c functions and structures have public visibility. As far as I understand, that means that if someone would use this Kotlin code as a library, the generated stabs will be visible in the target project as well. That fact makes it difficult to create a Kotlin wrapper over the c library.

A: I am sorry, but this behavior is not supported for now.
First of all, as cinterop tool produce bindings as a .klib file, it is associated with the separate module. So, it won't help if you somehow will mark them as internal.
The .klib with the bindings is just another source set of the project.
Then, it should be available to connect it with different kinds of dependencies. Now because of some language limitations, one cannot use the implementation dependency kind to connect Kotlin/Native libraries, only api one. But it probably will become available someday.
For now, the best option I can recommend is to name the package as internal or something, to let the consumer know about its practical nature.


Q: TypeError: Tag.find_all() missing 1 required positional argument: 'self' from bs4 import BeautifulSoup as soup
import numpy as np
import pandas as pd
import requests
import random

headers = {
    'authority': 'www.zillow.com',
    'accept': '*/*',
    'accept-language': 'en-US,en;q=0.9',
    'sec-ch-ua': '"Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' + str(random.randint(1, 1000)), #IF YOU RATELIMIT AND GET CAPTCHA, CHANGE USERAGENT
}

with requests.session() as i:
    #user input
    city = str(input("City To Search In: ")) + "/"

    #initializers
    page = 1
    end_page = 10
    url = ""
    url_list = []
    request = ""
    request_list = []

    while page <= end_page:
        url = "https://www.zillow.com/homes/for_sale/" + city + str(page) + "_p"
        url_list.append(url)
        page += 1

    for j in url_list: #can change j to "url" if you want but i like "j" for simplicity
        request = i.get(j, headers=headers)
        request_list.append(request)

#another two initializers (seperating this felt more organized to me, sorry if it looks messy)
rawInfo = ""
rawInfoList = []

for r in request_list: #can change r to "request" if you want but i like "r" for simplicity
    rawInfo = soup(r.content, "html.parser")

    rawInfoList.append(rawInfo)

cleanedList = []

for rawInfo in rawInfoList:
    for i in rawInfo:
        address = soup.find_all (class_= "list-card-addr")

This is some code I am using to scrape info from zillow search pages. Wheen I use soup.find_all to find all of the addresses listed from the raw info I pulled, it gives this error: "TypeError: Tag.find_all() missing 1 required positional argument: 'self'". Anyone know what I did wrong?
I was expecting it to spit out all of the addresses it found in the first 10 pages of results. You can do print(rawInfoList) to see the raw info.


Q: An iterative argument involving $f(n + 1) - f(n) $ I am working with an argument involving an inequality of the form:
$$ f(n + 1) \leq f(n) + C (f(n))^{1 - \frac{1}{\gamma}} (\ast)$$
where  $f$ is a positive function, $\gamma > 0$ and $C > 0$. It is know (but no proved explicitly) that $(\ast)$ leads to the bound
$$ f(n) \leq n^{\gamma} ( \forall n > n_0 ) (\ast \ast)$$ for a certain $n_0$ to be choosen.  My question is: How to prove $(\ast \ast)$, being that we have $(\ast)$. My failed attemp was to use a telescopic sum
to obtain $f(n + \ell) - f(n) \leq C \sum_{k = 0 }^{ \ell - 1}(f(n + k))^{1 - \frac{1}{\gamma}}$ but, this no leads to $(\ast \ast)$ straight.

A: If you think about the case $f(n)=n^\gamma$ you get
$$(n+1)^\gamma\leq n^\gamma+Cn^{\gamma-1}$$
Or equivalently
\begin{align}\label{1}
(n+1)^\gamma- n^\gamma\leq Cn^{\gamma-1}
\end{align}
Now, $(n+1)^\gamma- n^\gamma\leq \gamma (n+1)^{\gamma-1}$ (if $\gamma>1$).
So, the inequality above will be satisfied for $n$ big enough if $C>\gamma$.
This is what makes me think that if $f(n)=n^\gamma+\hbox{small error}$,  will satisfy the recursive inequality if $C>\gamma$. And therefore the inequality $f(n)\leq n^\gamma$ wouldn't be true.
Maybe what you want is $f(n)\ll n^\gamma$ or $f(n)\ll n^{\gamma+\epsilon}$ because that seems the case.


Q: How can I suppress viewing / listing all file types EXCEPT html files using .htaccess? Basically I want to go beyond simple "Options +Indexes" display on a server, set using the .htaccess file.
I ONLY want to see .html files in a given directory, and suppress display of ALL OTHER file types.
Why? I am happy to show directory listing pages on a testing server, so a client can select different page design versions, for instance...
BUT I would prefer they just see the '.html' files on the directory listing, NOT any other image files, favicon files and so on.
Any clues much appreciated, not that familiar with .htaccess possibilities.
thanks!

A: The only way is to use IndexIgnore carefully .
For example ,if you put the following code :
Options +Indexes
IndexIgnore  *

The directory listing will be on but nothing will be shown so the use of IndexIgnore is to hide what you want when directory listing is done .
Another example is to do the following :
Options +Indexes
IndexIgnore  *.php *.jpg *.png  *.txt *image

The code above will hide all files with these extensions as well as image folder  , so you should exclude all folderes and files that you don't want them to be shown  , .html  files are not listed above so,they will be shown.


Q: search and count specific phrases with special characters in text files I have a list of search phrases where some are single words, some are multiple words, some have a hyphen in between them, and others may have both parentheses and hyphens. I'm trying to process a directory of text files and search for 100+ of these phrases, and then count occurrences.
It seems like the code below works in 2.7x python until it hits the hyphenated search phrases. I observed some unexpected counts on some text files for at least one of the hyphenated search phrases.
kwlist = ['phraseone', 'phrase two', 'phrase-three', 'phrase four (a-b-c) abc', 'phrase five abc', 'phrase-six abc abc']
for kws in kwlist:
    s_str = kws
    kw = re.findall(r"\b" + s_str +r"\b", ltxt)
    count = 0
    for c in kw:
        if c == s_str:
            count += 1
    output.write(str(count))

Is there a better way to handle the range of phrases in the search, or any improvements I can make to my algorithm?

A: You could achieve this with what I would call a pythonic one-liner.
We don't need to bother with using a regex, as we can use the built-in .count() method, which will from the documentation:

string.count(s, sub[, start[, end]])
Return the number of (non-overlapping) occurrences of substring sub in string s[start:end]. Defaults for start and end and interpretation of negative values are the same as for slices.

So all we need to do is sum up the occurrences of each keyword in kwlist in the string ltxt. This can be done with a list-comprehension:
output.write(str(sum([ltxt.count(kws) for kws in kwlist])))

Update
As pointed out in @voiDnyx's comment, the above solution writes the sum of all the counts, not for each individual keyword.
If you want the individual keywords outputted, you can just write each one individually from the list:
counts = [ltxt.count(kws) for kws in kwlist]
for cnt in counts:
    output.write(str(cnt))

This will work, but if you wanted to get silly and put it all in one-line, you could potentially do:
[output.write(str(ltxt.count(kws))) for kws in kwlist]

Its up to you, hope this helps! :)

If you need to match word boundaries, then yes the only way to do so would be to use the \b in a regex. This doesn't mean that you cant still do it in one line:
[output.write(str(len(re.findall(r'\b'+re.escape(kws)+r'\b'))) for kws in kwlist]
Note how the re.escape is necessary, as the keyword may contain special characters.


Q: Field Labels missing from my magento 2.3 site Suddenly the labels for all of the fields of my magento 2.3 site is blank.
https://prnt.sc/p00avw
How to solve this?
Please help


Q: Building an app made with Intel-xdk with Cordova Cli I'm evaluating Intel-xdk, the idea is using this tool in my IT classes (people from 15 to 18 y.o.), I'm on Ubuntu 16.04 and installed XDK 3759 Linux 32.
A couple of days ago, as I installed an update I also installed nodejs, npm and cordova because as far as june Xdk will no more provide the cloud build service, anyway, after installing android sdk tools, build tools and platform tools, when I try to compile a simple project I've got this error
Error: /home/prof/prova-xdk/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/prof/android-sdk/build-tools/25.0.2/aapt: 3: /home/prof/android-sdk/build-tools/25.0.2/aapt: Syntax error: Unterminated quoted string
FAILURE: Build failed with an exception.

*

*What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Can someone please explain me the error? May I check my code? But which file? Thanks everybody! Alessandro

A: I recommend you update to 3900 (hotfix coming very soon to address login and several other issues) and use the "Cordova export" feature to build apps. The ZIP that is generated by that export can be provided directly to PhoneGap Build, using the one free private slot. This will be a much simpler build process than having your students install node, Cordova CLI and the Android build tools.


Q: Setting NGINX TLS with certificate/key loaded by initContainer I've found several pages describing how to set NGINX to use HTTPS/TLS.
However, all suggest setting a secret tls with the key & cert.
We want to be able to use TLS but ask NGINX to load the key/cert via init-container which in this case implemented by acs-keyvault-agent.
Any ideas?

A: If your only goal is to obtain the TLS key/cert from Azure Key Vault, then you're probably better of going with the Key Vault FlexVolume project from Azure. This would have the advantage of not using init containers at all and just dealing with volumes and volume mounts.
Since you explicitly want to use Hexadite/acs-keyvault-agent and in default mode (which uses volume mounts btw) there is a full example of how to do this in the projects examples folder here: examples/acs-keyvault-deployment.yaml#L40-L47.
Obviously you need to build, push, and configure the container correctly for your environment. Then you will need to conifgure Nginx to use the CertFileName.pem and KeyFilename.pem from the /secrets/certs_keys/ folder.
Hope this helps.


Q: SQL Syntax error in CREATE TABLE statement in MS Access VBA subroutine I am working on a subroutine in Microsoft Access VBA.  The intended purpose of my program is to create a new table called newTableName and then perform a join on the two tables tableName1 and tableName2.  The result of this join should be stored in newTableName.  From my research online, I am led to believe that I cannot create an empty table to store the joined data in.  So, I have attempted to duplicate tablenName2 and store its data in newTableName until the join is performed.
However, I get the following error when I run my program:

Run-time error '-2147217900 (80040e14)':
Syntax error in CREATE TABLE statement.

From this line:
CurrentProject.Connection.Execute strNewTableQuery

Which was tested with user input resulting in this query:
CREATE TABLE [UNIX_lob] AS SELECT * FROM UNIX

Here is my code:
Option Compare Database

Public Sub JoinWithIIMMModule()

    Dim sqlNewTableQuery    As String
    Dim sqlJoinQuery        As String
    Dim tableName1          As String
    Dim tableName2          As String
    Dim newTableName        As String
    Dim commonField         As String

    ' Set the common field used to join the two tables '
    commonField = "[code]"

    ' Set the tableName1 to be used in the join. '
    tableName1 = "IIMM"

    ' Acquire name of table to be joined with table1 from the user'
    tableName2 = InputBox("Enter name of the table which you would like to join with " + tableName1 + ":", _
             "Table to split", "UNIX")

    ' Set the name of the new table where the joins will be stored.'
    newTableName = "[" + tableName2 + "_lob]"

    ' Create newTableName, which is a duplicate of the tableName2 table.'
    ' This is where the joined data will reside.'
    sqlNewTableQuery = "CREATE TABLE " + newTableName + " AS SELECT * FROM " + tableName2
    Debug.Print sqlNewTableQuery
    CurrentProject.Connection.Execute sqlNewTableQuery

    ' Join tableName1 and tableName2 on commonField, and store the joined data in newTableName'
    sqlJoinQuery = "SELECT " + tableName1 + ".*, " + tableName2 + ".*" & _
                 "INTO " + newTableName & _
                 "FROM " + tableName1 & _
                 "INNER JOIN " + tableName2 & _
                 "ON " + tableName1 + "." + commonField + " = " + tableName2 + "." + commonField + ";"
    Debug.Print sqlJoinQuery
    CurrentDb.Execute sqlJoinQuery

End Sub

Does anybody know what might be causing this error?


Q: How do I 'expect' a chain of methods using Rspec where the first method takes a parameter? I have a method call in a ruby model that looks like the following:
Contentful::PartnerCampaign.find_by(vanityUrl: referral_source).load.first

Within the models spec.rb file, I'm trying to mock that call and get a value by passing in a param. But I'm having trouble figuring out the correct way of calling it.
At the top of my spec.rb file I have:
 let(:first_double) {
   double("Contentful::Model", fields {:promotion_type => "Promotion 1"})
 }

Within the describe block I've tried the following:
expect(Contentful::PartnerCampaign).to receive_message_chain(:find_by, :load, :first).
                                       and_return(first_double)

expect(Contentful::PartnerCampaign).to receive_message_chain(:find_by, :load, :first).with(vanityUrl: 'test_promo_path').
                                       and_return(first_double)

expect(Contentful::PartnerCampaign).to receive_message_chain(:find_by => vanityUrl: 'test_promo_path', :load, :first).
                                       and_return(first_double)

As you can probably guess, none of these are working. Does anyone know the correct way to do this sort of thing? Is it even possible?

A: Generally speaking, I prefer not to use stub chains, as they are often a sign that you are violating the Law of Demeter. But, if I had to, this is how I would mock that sequence:
let(:vanity_url) { 'https://vanity.url' }
let(:partner_campaigns) { double('partner_campaigns') }
let(:loaded_partner_campaigns) { double('loaded_partner_campaigns') }

let(:partner_campaign) do
  double("Contentful::Model", fields {:promotion_type => "Promotion 1"}
end

before do
  allow(Contentful::PartnerCampaign)
    .to receive(:find_by)
    .with(vanity_url: vanity_url)
    .and_return(partner_campaigns)

  allow(partner_campaigns)
    .to receive(:load)
    .and_return(loaded_partner_campaigns)

  allow(loaded_partner_campaigns)
    .to receive(:first)
    .and_return(partner_campaign)
end

A: This is what I would do. Notice that I split the "mocking" part and the "expecting" part, because usually I'll have some other it examples down below (of which then I'll need those it examples to also have the same "mocked" logic), and because I prefer them to have separate concerns: that is anything inside the it example should just normally focus on "expecting", and so any mocks or other logic, I normally put them outside the it.
let(:expected_referral_source) { 'test_promo_path' }
let(:contentful_model_double) { instance_double(Contentful::Model, promotion_type: 'Promotion 1') }

before(:each) do
  # mock return values chain
  # note that you are not "expecting" anything yet here
  # you're just basically saying that: if Contentful::PartnerCampaign.find_by(vanityUrl: expected_referral_source).load.first is called, that it should return contentful_model_double
  allow(Contentful::PartnerCampaign).to receive(:find_by).with(vanityUrl: expected_referral_source) do
    double.tap do |find_by_returned_object|
      allow(find_by_returned_object).to receive(:load) do
        double.tap do |load_returned_object|
          allow(load_returned_object).to receive(:first).and_return(contentful_model_double)
        end
      end
    end
  end
end

it 'calls Contentful::PartnerCampaign.find_by(vanityUrl: referral_source).load.first' do
  expect(Contentful::PartnerCampaign).to receive(:find_by).once do |argument|
    expect(argument).to eq({ vanityUrl: expected_referral_source})

    double.tap do |find_by_returned_object|
      expect(find_by_returned_object).to receive(:load).once do
        double.tap do |load_returned_object|
          expect(load_returned_object).to receive(:first).once
        end
      end
    end
  end
end

it 'does something...' do
  # ...
end

it 'does some other thing...' do
  # ...
end

If you do not know about ruby's tap method, feel free to check this out

A: I think you need to refactor the chain in two lines like this:
model    = double("Contentful::Model", fields: { promotion_type: "Promotion 1" })
campaign = double

allow(Contentful::PartnerCampaign).to receive(:find_by).with(vanityUrl: 'test_promo_path').and_return(campaign)
allow(campaign).to receive_message_chain(:load, :first).and_return(model)

Then you can write your spec that will pass that attribute to find_by and check the chain.


Q: Why do we not include contributions from $\delta(x)$ in the energy eigenvalue of the delta potential bound state? Consider a delta function potential $V(x)=-\alpha \delta(x)$. There is a bound state
$$\psi(x) = \frac{\sqrt{m\alpha}}{\hbar} \exp\left(-\frac{m\alpha|x|}{\hbar^2}\right),$$
with energy eigenvalue
$$E=-\frac{m\alpha^2}{2\hbar^2}.$$
However, if we plug the wavefunction into
$$E=\langle\psi|H|\psi\rangle,$$
then we get
$$E=\left\langle\psi\middle|\frac{p^2}{2m}\middle|\psi\right\rangle-\alpha\langle\psi|\delta(x)|\psi\rangle\\
= -\frac{m\alpha^2}{2\hbar} - \frac{m\alpha}{\hbar^2}\int \exp\left(-\frac{2m\alpha|x|}{\hbar^2}\right)\delta(x)\, dx\\
=-\frac{3m\alpha^2}{2\hbar^2},$$
which is not equal to the eigenvalue. So how do we get around not including the contribution from $\delta(x)$ in $\langle\psi|H|\psi\rangle$?

A: The derivative of $\left|x\right|$ is not $1$, as seems to be required for the calculation of your eigenvalue to be $-\frac{m\alpha^{2}}{2\hbar^{2}}$
Instead, the right derivative in the sense of distributions, is,
$$
\frac{d}{dx}\left|x\right|=\theta\left(x\right)-\theta\left(-x\right)
$$
with $\theta$ being Heaviside's step function. When differentiating again, you get,
$$
\frac{d^{2}}{dx^{2}}\left|x\right|=\delta\left(x\right)+\delta\left(-x\right)
$$
You should be alright if you redo the calculation with these prescriptions.


Q: Continuously checking connection to MySQL Database Is there an effective way to continuously check if a connection to the database is established? For example, if the network drops or the server computer is turned off, then there is no obvious database available. My idea was to create a Timer that would poll every 10 seconds or so to determine an available connection but that just seems like another "hack". Another idea is to check connectivity before any user input. Here is the  sample code that would check  for a connection:
    public bool isDbAvail()
    {
        using (MySqlConnection conn = new MySqlConnection(TimeClock.Properties.Settings.Default.timeclockConnectionString))
        {
            try
            {
                conn.Open();
                return true;
            }
            catch (MySqlException ex)
            {
                Console.WriteLine(ex.Message);
                return false;
            }
        }
    }

Any input would be great on what would be the best approach.


Q: QProcess, Cannot Create Pipe I am running a QProcess in a timer slot at 1 Hz. The process is designed to evoke a Linux command and parse it's output.
The problem is this: after the program runs for about 20 minutes, I get this error:
QProcessPrivate::createPipe: Cannot create pipe 0x104c0a8: Too many open files
QSocketNotifier: Invalid socket specified

Ideally, this program would run for the entire uptime of the system, which may be days or weeks.
I think I've been careful with process control by reading the examples, but maybe I missed something. I've used examples from the Qt website, and they use the same code that I've written, but those were designed for a single use, not thousands. Here is a minimum example:
class UsageStatistics : public QObject {
    Q_OBJECT
public:
    UsageStatistics() : process(new QProcess) {
       timer = new QTimer(this);
       connect(timer, SIGNAL(timeout()), this, SLOT(getMemoryUsage()));
       timer->start(1000); // one second
    }

    virtual ~UsageStatistics() {}

public slots:

    void getMemoryUsage() {
        process->start("/usr/bin/free");
        if (!process->waitForFinished()) {
            // error processing
        }

        QByteArray result = process->realAll();
        // parse result

        // edit, I added these
        process->closeReadChannel(QProcess::StandardOutput);
        process->closeReadChannel(QProcess::StandardError);
        process->closeWriteChannel();
        process->close();
    }
}

I've also tried manually deleting the process pointer at the end of the function, and then new at the beginning. It was worth a try, I suppose.
Free beer for whoever answers this :)

A: QProcess is derived from QIODevice, so I would say calling close() should close the file handle and solve you problem.

A: I cannot see the issue, however one thing that concerns me is a possible invocation overlap in getMemoryUsage() where it's invoked before the previous run has finished.
How about restructuring this so that a new QProcess object is used within getMemoryUsage() (on the stack, not new'd), rather than being an instance variable of the top-level class?  This would ensure clean-up (with the QProcess object going out-of-scope) and would avoid any possible invocation overlap.
Alternatively, rather than invoking /usr/bin/free as a process and parsing its output, why not read /proc/meminfo directly yourself? This will be much more efficient.

A: First I had the same situation with you. I got the same results.
I think that QProcess can not handle opened pipes correctly.
Then, instead of QProcess, I have decided to use popen() + QFile().
class UsageStatistics : public QObject {
Q_OBJECT
public:
UsageStatistics(){
   timer = new QTimer(this);
   connect(timer, SIGNAL(timeout()), this, SLOT(getMemoryUsage()));
   timer->start(1000); // one second
}

virtual ~UsageStatistics() {}

private:
    QFile freePipe;
    FILE *in;

public slots:

void getMemoryUsage() {

    if(!(in = popen("/usr/bin/free", "r"))){
            qDebug() << "UsageStatistics::getMemoryUsage() <<" << "Can not execute free command.";
            return;
    }

    freePipe.open(in, QIODevice::ReadOnly);
    connect(&freePipe, SIGNAL(readyRead()), this, SLOT(parseResult()) );
    // OR waitForReadyRead() and parse here.
}

void parseResult(){
    // Parse your stuff
    freePipe.close();
    pclose(in); // You can also use exit code by diving by 256.
}
}

A: tl;dr:
This occurs because your application wants to use more resources than allowed by the system-wide resource limitations. You might be able to solve it by using the command specified in [2] if you have a huge application, but it is probably caused by a programming error.
Long:
I just solved a similar problem myself. I use a QThread for the logging of exit codes of QProcesses. The QThread uses curl to connect to a FTP server uploads the log. Since I am testing the software I didn't connect the FTP server and curl_easy_perform apparently waits for a connection. As such, my resource limit was reached and I got this error. After a while my program starts complaining, which was the main indicator to figure out what was going wrong.
[..]
QProcessPrivate::createPipe: Cannot create pipe 0x7fbda8002f28: Too many open files
QProcessPrivate::createPipe: Cannot create pipe 0x7fbdb0003128: Too many open files
QProcessPrivate::createPipe: Cannot create pipe 0x7fbdb4003128: Too many open files
QProcessPrivate::createPipe: Cannot create pipe 0x7fbdb4003128: Too many open files
[...]
curl_easy_perform() failed for curl_easy_perform() failed for disk.log
[...]

I've tested this by connecting the machine to the FTP server after this error transpired. That solved my problem.
Read:
[1] https://linux.die.net/man/3/ulimit
[2] https://ss64.com/bash/ulimit.html
[3] https://bbs.archlinux.org/viewtopic.php?id=234915


Q: No default constructor exists for the class I know this question has already been ask, but I couldn't figure it out.
I have two classes Point and Line, and 2 Points are members of Line. However in the Line constructor I get "no default constructor exists for the class" error. How can I fix this problem?
#include <cstdlib>
#include <cmath>
#include "PointClass.h"
using namespace std;
class Line {
public:

    Line(const Point& p1, const Point& p2) {
        this->point1 = p1;
        this->point2 = p2;
    }
    Point point1;
    Point point2;

    static double Distance(Point p1, Point p2, Point p3) {
        double distance = (abs((p1.y - p2.y) * p3.x - (p2.x - p1.x) * p3.y + p2.x * p1.y - p2.x * p1.x) / (sqrt(pow((p2.y - p1.y), 2.0) + pow((p2.x - p1.x), 2.0))));
            return distance;
    }

};

class Point {
public:
    Point(double a, double b) {
        this->setCoord(a, b);
    }
    double x;
    double y;
    void setCoord(double a, double b)
    {
        this->x = a;
        this->y = b;
    }

};

A: The reason for you error, is that this code calls the Point default constructor (which doesn't exist)
Line(const Point& p1, const Point& p2) {
    this->point1 = p1;
    this->point2 = p2;
}

instead you should write it like this
Line(const Point& p1, const Point& p2) : point1(p1), point2(p2) {
}

Your version calls the Point default constructor and then assigns the point values. My version initialises the points by calling the Point copy constructor

A: The error message says "no default constructor", so you should add ones.
class Line {
public:
    Line() {} // add this

    Line(const Point& p1, const Point& p2) {

class Point {
public:
    Point() {} // add this
    Point(double a, double b) {

or ones with initialization (safer):
class Line {
public:
    Line() : point1(), point2() {} // add this

    Line(const Point& p1, const Point& p2) {

class Point {
public:
    Point() : x(0), y(0) {} // add this
    Point(double a, double b) {

or constructors with default arguments:

A: The core reason you are getting that error. Is because Line constructor doesn't know how to initialize point1 and point2 prior to your assignment statements in the constructor.  That's what constructor initialization lists are for.  It's usually better to do initial member initialization in the constructor initialization list instead of in the constructor body.  Without a constructor initialization list, point1 and point2 get constructed with the default constructor (error because it's missing) and then immediate updated with additional code in constructor body.  You can avoid the need for a default constructor on Point by having Line constructor defined as follows:
Line(const Point& p1, const Point& p2) : point1(p1), point2(p2)
{}

That will resolve your compiler error.  Further, it's still not a bad idea to have a default constructor for Point.  It's the type of class where it's often useful to have such a constructor.    And some point later, you might need to have a collection of Point instances and the compiler will complain again without it.  MakeCAT's answer is correct in that regards.
Aside: Your Distance function is passing Point parameters by value.  This means the compiler needs to construct 3 new instances of Point each time Distance is invoked.  Change your function signature for Distance as follows.  If this doesn't make the compiler happy, it will at the very least, generate more efficient code.
static double Distance(const Point& p1, const& Point p2, const& Point p3) {
        double distance = (abs((p1.y - p2.y) * p3.x - (p2.x - p1.x) * p3.y + p2.x * p1.y - p2.x * p1.x) / (sqrt(pow((p2.y - p1.y), 2.0) + pow((p2.x - p1.x), 2.0))));
            return distance;
    }

A: The problem is that you don't have a default constructor for that class and therefore when you create the points you don't know what values their variables will take.
The easiest and fastest way of solutions is to give default values to the constructor when it does not receive parameters
class Point {
public:
//only modification here
Point(double a = 0, double b = 0) {
    this->setCoord(a, b);
}
double x;
double y;
void setCoord(double a, double b)
{
    this->x = a;
    this->y = b;
}

};

A: The default constructor is the constructor without parameters. If you have a user provided constructor taking parameters (like your Line constructor taking two Points) then you don't automatically get the default constructor, you need to add it yourself.
I suggest changing your classes

*

*to use in-class initializers

*to use member initialization instead of setting in the constructor body

*defaulting the default constructor (which requires step 1)

You can compare the IsoCppCoreguidelines for a more detailed explanation on these changes.

class Point {
public:
    Point() = default;
    Point(double a, double b) : x{a}, y{b} {}
    double x{};
    double y{};
};

class Line {
public:
    Line() = default;
    Line(const Point& p1, const Point& p2) : point1{p1}, point2{p2} {}
    Point point1{};
    Point point2{};
};


Q: Many of metrics are empty when setting up istio 1.2.1 - what did i do wrong? I’m getting started with Istio (1.2.1) on k8s v1.15.0 - and everything looks good except many of the attributes are empty or “unknown”. Using the bookinfo sample app fields like destinationName, destinationApp, destinationWorkload, sourceName, sourceWorkload, etc are empty (or set to unknown), while other metrics are set. The log lines below were taken from the telemetry container on the telemetry pod while I curl’d the URL 100.96.76.176:9080/productpage.
All the pods have app and version labels set, and I’m not sure where else to look.
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.625780Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.140”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“details.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“details:9080”,“latency”:“2.511893ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:677,“referer”:"",“reporter”:“destination”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:178,“responseTimestamp”:“2019-07-24T16:52:24.628198Z”,“sentBytes”:313,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/details/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.625458Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.6.140”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“details.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“details:9080”,“latency”:“3.060349ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:342,“referer”:"",“reporter”:“source”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:178,“responseTimestamp”:“2019-07-24T16:52:24.628457Z”,“sentBytes”:307,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/details/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.631186Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.6.152”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“reviews.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“reviews:9080”,“latency”:“14.927949ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:342,“referer”:"",“reporter”:“source”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:375,“responseTimestamp”:“2019-07-24T16:52:24.646069Z”,“sentBytes”:549,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/reviews/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.640811Z”,“instance”:“tcpaccesslog.logentry.istio-system”,“connectionDuration”:“0s”,“connectionEvent”:“open”,“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.5.90”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“mongodb.g-demo.svc.cluster.local”,“destinationWorkload”:"",“protocol”:“tcp”,“receivedBytes”:0,“reporter”:“source”,“requestedServerName”:"",“responseFlags”:"",“sentBytes”:0,“sourceApp”:"",“sourceIp”:“100.97.8.150”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“totalReceivedBytes”:0,“totalSentBytes”:0}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.644777Z”,“instance”:“tcpaccesslog.logentry.istio-system”,“connectionDuration”:“4.38701ms”,“connectionEvent”:“close”,“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.5.90”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“mongodb.g-demo.svc.cluster.local”,“destinationWorkload”:"",“protocol”:“tcp”,“receivedBytes”:351,“reporter”:“source”,“requestedServerName”:"",“responseFlags”:"",“sentBytes”:429,“sourceApp”:"",“sourceIp”:“100.97.8.150”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“totalReceivedBytes”:351,“totalSentBytes”:429}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] 2019-07-24T16:52:25.771171Z warn input set condition evaluation error: id=‘4’, error=‘lookup failed: ‘destination.service.host’’
[istio-telemetry-56d5966d6b-qj9z2 telemetry] 2019-07-24T16:52:25.771376Z warn input set condition evaluation error: id=‘4’, error=‘lookup failed: ‘destination.service.host’’
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.641665Z”,“instance”:“tcpaccesslog.logentry.istio-system”,“connectionDuration”:“0s”,“connectionEvent”:“open”,“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.5.90”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:"",“destinationWorkload”:"",“protocol”:“tcp”,“receivedBytes”:277,“reporter”:“destination”,“requestedServerName”:"",“responseFlags”:"",“sentBytes”:0,“sourceApp”:"",“sourceIp”:“100.97.8.150”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“totalReceivedBytes”:277,“totalSentBytes”:0}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.644179Z”,“instance”:“tcpaccesslog.logentry.istio-system”,“connectionDuration”:“3.633777ms”,“connectionEvent”:“close”,“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.5.90”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:"",“destinationWorkload”:"",“protocol”:“tcp”,“receivedBytes”:351,“reporter”:“destination”,“requestedServerName”:"",“responseFlags”:"",“sentBytes”:429,“sourceApp”:"",“sourceIp”:“100.97.8.150”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“totalReceivedBytes”:351,“totalSentBytes”:429}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.636470Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.8.150”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“ratings.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“ratings:9080”,“latency”:“7.978662ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:693,“referer”:"",“reporter”:“destination”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:48,“responseTimestamp”:“2019-07-24T16:52:24.644258Z”,“sentBytes”:166,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/ratings/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.631485Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.152”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“reviews.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“reviews:9080”,“latency”:“14.298546ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:677,“referer”:"",“reporter”:“destination”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:375,“responseTimestamp”:“2019-07-24T16:52:24.645688Z”,“sentBytes”:555,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/reviews/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.619969Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.4.119”,“destinationName”:"",“destinationNamespace”:“g-demo”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“productpage.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“100.96.76.176:9080”,“latency”:“28.389479ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:647,“referer”:"",“reporter”:“destination”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5179,“responseTimestamp”:“2019-07-24T16:52:24.648264Z”,“sentBytes”:5324,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/productpage",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.619518Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.4.119”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“productpage.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“100.96.76.176:9080”,“latency”:“29.187307ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:224,“referer”:"",“reporter”:“source”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5179,“responseTimestamp”:“2019-07-24T16:52:24.648640Z”,“sentBytes”:5318,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/productpage",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] gc 74945 @116322.022s 10%: 0.015+35+105 ms clock, 0.12+3.6/8.2/36+845 ms cpu, 15->16->7 MB, 16 MB goal, 8 P
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:24.635940Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“unknown”,“destinationApp”:"",“destinationIp”:“100.97.8.150”,“destinationName”:"",“destinationNamespace”:"",“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“ratings.g-demo.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:"",“httpAuthority”:“ratings:9080”,“latency”:“8.73426ms”,“method”:“GET”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:362,“referer”:"",“reporter”:“source”,“requestId”:“5662e4c0-8cd8-4212-b4e3-6fe8be75d3f5”,“requestSize”:0,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:48,“responseTimestamp”:“2019-07-24T16:52:24.644626Z”,“sentBytes”:160,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:“g-demo”,“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/ratings/0",“userAgent”:“curl/7.58.0”,“xForwardedFor”:“0.0.0.0”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.628982Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“4.039738ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1152,“referer”:"",“reporter”:“destination”,“requestId”:“242c989e-1d28-447b-b382-b194574cbdd7”,“requestSize”:825,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.632940Z”,“sentBytes”:141,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.6.140”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.630094Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“3.013082ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1806,“referer”:"",“reporter”:“destination”,“requestId”:“219ef409-2f09-4c89-acb2-d5da0ef45169”,“requestSize”:1475,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.633022Z”,“sentBytes”:141,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.4.119”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.640448Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“1.354099ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:964,“referer”:"",“reporter”:“destination”,“requestId”:“968c7073-d926-43f7-b8bc-3c45e273c95c”,“requestSize”:637,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.641721Z”,“sentBytes”:141,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.8.150”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.642777Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“129.565696ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:827,“referer”:"",“reporter”:“destination”,“requestId”:“7758c475-47ea-4dab-8240-0a9bf3f08839”,“requestSize”:501,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.772309Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.5.90”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.647082Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“125.353066ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1201,“referer”:"",“reporter”:“destination”,“requestId”:“344b3520-0a89-427a-95f2-dcd83eb8c302”,“requestSize”:874,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.772387Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.6.152”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.648757Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“123.705739ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1180,“referer”:"",“reporter”:“destination”,“requestId”:“3830bb1e-ee4a-4747-9b85-aa8632a05f10”,“requestSize”:849,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.772425Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.4.119”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.644416Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“128.10414ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1158,“referer”:"",“reporter”:“destination”,“requestId”:“7ff3a60a-b806-4f09-9c12-28dc5652a413”,“requestSize”:831,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.772461Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.8.150”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.648347Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“124.187413ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1163,“referer”:"",“reporter”:“destination”,“requestId”:“678d4923-e1d8-450b-a0c4-620c89e6e088”,“requestSize”:840,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.772496Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.6.157”}
[istio-telemetry-56d5966d6b-qj9z2 telemetry] {“level”:“info”,“time”:“2019-07-24T16:52:25.644908Z”,“instance”:“accesslog.logentry.istio-system”,“apiClaims”:"",“apiKey”:"",“clientTraceId”:"",“connection_security_policy”:“none”,“destinationApp”:"",“destinationIp”:“100.97.6.136”,“destinationName”:"",“destinationNamespace”:“istio-system”,“destinationOwner”:"",“destinationPrincipal”:"",“destinationServiceHost”:“istio-telemetry.istio-system.svc.cluster.local”,“destinationWorkload”:"",“grpcMessage”:"",“grpcStatus”:“0”,“httpAuthority”:“mixer”,“latency”:“221.122459ms”,“method”:“POST”,“permissiveResponseCode”:“none”,“permissiveResponsePolicyID”:“none”,“protocol”:“http”,“receivedBytes”:1188,“referer”:"",“reporter”:“destination”,“requestId”:“780ce5c5-df66-47a8-abcf-349ff7a9cf3e”,“requestSize”:861,“requestedServerName”:"",“responseCode”:200,“responseFlags”:"-",“responseSize”:5,“responseTimestamp”:“2019-07-24T16:52:25.866003Z”,“sentBytes”:143,“sourceApp”:"",“sourceIp”:“0.0.0.0”,“sourceName”:"",“sourceNamespace”:"",“sourceOwner”:"",“sourcePrincipal”:"",“sourceWorkload”:"",“url”:"/istio.mixer.v1.Mixer/Report",“userAgent”:"",“xForwardedFor”:“100.97.6.152”}

Thank you,
Mike

A: I am posting @ShreeGrossOptum's answer from the comments for better visibility and due to lack of response from the OP:

Sir please check once about attributes I hope you ll get your
  answers like why mostly attributes are unknown and empty.


Q: htaccess mod_rewrite good in IE, but downloads web page in other browsers (Chrome, Firefox) I am trying to modify an .htaccess file so that file extensions are omitted-- mainly .html  It seems to be working fine in IE written like this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
AddType text/html .html

But in Chrome or Firefox (haven't tried any others) the web page immediately downloads instead of displays without the extension.
I have never modified this file before-- I got the above Rewrite lines from another site but I cannot seem to find any solution to prevent the files from downloading in those browsers. This site is hosted on Amazon Web Services.
Thanks


Q: If Sauron had triumphed, would the Witch King have been reincarnated? If Sauron had managed to regain the One Ring and defeated the forces of the West, would the naked disembodied spirit of the Witch King of Angmar be given a new form after his corporeal/spiritual existence was undone by the dagger of westernesse and Eowyn's coup de grace?
To clarify: I am asking the dual questions of: if Sauron, in possession of the Ruling Ring, would have any further use of the Ringwraiths after his total victory, and did this ownership allow him to reincarnate his chief captain?
(I apologize in advance for any improper form, format, or spoilers in my first question here)

A: Yes, Sauron still had use for the Nazgûl even with the One Ring, and although there's nothing in the texts that confirms it, I would like to believe that yes, maybe Sauron could restore the Witch-king after regaining the Ring.
The first part of this answer can be explained by the fact that the Nazgûl were "made" in the Second Age, while Sauron had the One Ring and was in his full power. And even in victory and with his might fully restored, he will always need or want servants to command. So yes, he would still have uses for the Nazgûl.
As for my reasoning for the second part of this answer, it has mostly to do with the fact that, contrary to what people here posted, the Witch-king didn't actually die when he was struck down by Eowyn and Merry. According to Tolkien in one of his letters, he had been "reduced to impotence". Given that they were ultimately chained to Sauron's will via their Nine Rings, which were in turn enslaved to the One, I think it's plausible that Sauron may have restored the Chief of the Nazgûl had he regained the Ring.
I will add also that we do not know if the Nazgûl died as mortal Men do when Sauron was ultimately overthrown, or if, having become servants of evil, they fell into the Void along with their Master, the nothingness, as Gandalf suggested would be the case when he faced the Witch-king in Minas Tirith.

A: Does Sauron have any use of the Witch King after regaining the One Ring? Yes.
Sauron wants to dominate and control the Free Peoples of Middle Earth. He did that by having the Rings of Power forged, gifting them to the lords of the Free Peoples, then forging the One Ring, through which he could control said lords and by extension all of the Free Peoples. It was not possible to do so all by his lonesome, hence why he had those Rings forged.
To rule Middle Earth, he had to address each of the three races:

*

*The Elves: By the end of the Third Age, the last of the Elves had begun to depart for Valinor. They depended upon their Rings to halt the fading of the Elves and sustain the might and splendour of their realms from Ages gone by. With the One Ring restored to its true master, the Elves had to give up on their Rings or become his slaves. They are no longer capable of defeating Sauron on their own by the end of the Third Age, so they are of little consequence to Sauron at this point, once he regains his full power.

*The Dwarves: Sauron had hoped to control them through their seven Rings but they proved resistant to his will. However, the Rings amplified their lust for mineral wealth, and that worked just fine for Sauron. The Dwarves removed themselves from worldly affairs, increasingly losing interest and concern for the fates of the Free Peoples. They are effectively taken out of the fight, and could be easily conquered once the rest of Middle Earth is lost to Sauron.

*The Men: These are the only ones capable of resisting Sauron from here on out. Had the War of the Ring ended with Sauron's victory and his One Ring restored to his possession, we would see the last Númenorean kingdom-in-exile of Gondor fall, and the rest of Man lacks the strength of mind and spirit to resist his Nazgûl, now at full power with Sauron fully rejuvenated. Just like back when Sauron first wielded the One Ring.

So, to achieve his goals, controlling Man is key. He does so by ruling them through fear - fear of his Ring-wraiths, the fallen kings of Man. And there is none more feared than the Witch King. There, hence, we can see the Witch King's value to Sauron in the ages to come.
Can Sauron reincarnate the Witch King? No.
The most important argument here draws from precedent: The story of Lúthien and Beren. Lúthien and Beren died and passed to the Halls of Mandos. By the beauty of Lúthien's song of grief, Mandos was moved to pity and desired to return them to life. Eventually, by the grace of Eru Ilúvatar, Beren was returned to life and Lúthien joined him in Middle-earth to live and die with him as a Man.
Another point to raise is that the Ainur all possess the power to create physical forms, albeit for their own spirits to inhabit in. Sauron could do that too. Thus far, there's no evidence that they could create new bodies for others - after all, the dead has no need for a new body. Sauron definitely has the means to create bodies, especially after he regains his Ring, the only question being whether he can do so for the Witch King.
Putting all that we know altogether, though, we can boil it all down to the following conclusions:

*

*The Witch King was not dead nor undead. He was a mortal Man who was kept unnaturally alive by his Ring. That meant that he suffered a mortal's death.

*The Witch King, as a Man, is not bound to Arda like Saruman or Sauron. So upon his death, he would (in his perspective) suffer the Doom of Man just like any other good or evil Man. The Witch King's spirit would have therefore departed Arda, never to return until the end of time.

*Even if he was still in the Halls of Mandos when Sauron regained his Ring, the latter has no power to bring the Witch King's spirit back - that power alone belongs to Mandos, a Vala, and even he does not possess the authority to do so - that belongs to Eru alone.

Therefore, the Witch King is not coming back.
There is a part in the Hobbit movies where Saruman remarked that there is no such thing as necromancy. I am not sure if those words were uttered by anyone in the books but by the above points, it stands to reason that this statement should be true nonetheless.


Q: Columna alternativa para usar en un JOIN en MySQL Yo tengo una tabla llamada liturgia_calendario con la siguiente estructura:
calendario_id     ff_yy      ff_mm      ff_dd      id_liturgia      pre
1                  2018       06         01          198            0
2                  2018       06         02          199            360

Y necesito unirla con otra tabla llamada liturgia para usar los datos de col1, col2, .... La estructura de dicha tabla es más o menos esta:
id_liturgia     col1      col2...
198
199
...
360

Lo que quiero es que:

*

*Si la columna pre en liturgia_calendario es igual a 0, me use el valor de la columna id_liturgia para hacer el join.

*Si la columna pre en liturgia_calendario es distinta de 0, me use el valor de dicha columna para hacer el join.
En el caso de la 1ª fila, el join se haría usando el valor 198 y en el caso de la 2ª fila, se usaría el valor 350.
Yo puedo obtener uno u otro valor de la tabla liturgia_calendario. Por ejemplo esta consulta funciona para obtener alternativamente una u otra columna bajo el alias id_liturgia:
SELECT CASE WHEN (pre = 0)
            THEN id_liturgia
            ELSE pre
       END AS id_liturgia
FROM liturgia_calendario
WHERE f_yy=2018 and f_mm=6;

Resultado:
id_liturgia
198
360

Pero cuando lo intento con el JOIN no me funciona.
Si escribo la consulta así:
SELECT CASE WHEN (pre = 0)
            THEN id_liturgia
            ELSE pre
       END AS id_liturgia
FROM liturgia_calendario lc
INNER JOIN liturgia l ON lc.id_liturgia=l.id_liturgia
WHERE lc.f_yy=2018 and lc.f_mm=6;

Me da el error:

Column 'id_liturgia' in field list is ambiguous

Si le doy otro alias a la columna resultante del CASE me da el mismo error:
SELECT CASE WHEN (pre = 0)
            THEN id_liturgia
            ELSE pre
       END AS id_liturgiaz
FROM liturgia_calendario lc
INNER JOIN liturgia l ON lc.id_liturgiaz=l.id_liturgia
WHERE lc.f_yy=2018 and lc.f_mm=6;

No sé por qué ocurre esto o si hay una mejor forma de lograr lo que quiero.

A: Los dos problemas que tienes parten de un mismo origen: los alias de columnas y como estos son procesados por el motor:

*

*Cuando usas el mismo nombre de la columna como alias como parte del JOIN, el motor no identifica a que te refieres ya que hay dos tablas con el mismo nombre de columna y al no indicar el alias de la tabla te dice que el nombre es ambiguo.

*Cuando usas otro nombre como alias la consulta no te funciona, por que los alias de columna, el motor los "materializa" bien al final del proceso de la consulta. Es decir, en la instancia del JOIN, id_liturgiaz no existe.
La solución posible pasa por usar una subconsulta para materializar el nuevo alias:
SELECT  *
    FROM ( SELECT   CASE WHEN (pre = 0)
                        THEN id_liturgia
                        ELSE pre
                   END AS id_liturgia
                   FROM liturgia_calendario
                   WHERE f_yy=2018 and f_mm=6
    ) lc
    INNER JOIN liturgia l
        ON lc.id_liturgia=l.id_liturgia

O bien repitiendo el CASE en el ON
SELECT l.id_liturgia
FROM liturgia_calendario lc
INNER JOIN liturgia l
    ON l.id_liturgia=(CASE WHEN (lc.pre = 0) THEN lc.id_liturgia ELSE lc.pre END)
WHERE lc.f_yy=2018 and lc.f_mm=6;

A: Basta con meter la condición en el JOIN/WHERE:
SELECT l.id_liturgia
  FROM liturgia_calendario lc
  INNER JOIN liturgia l
    ON ((lc.pre = 0 AND lc.id_liturgia = l.id_liturgia) OR lc.pre = l.id_liturgia)
  WHERE lc.f_yy=2018 and lc.f_mm=6;

Ejemplo


Q: Play Console Unable To Click Create New Release Button My Application is published in the play store but I want to update my app but I am unable to update my app in Google Play Console


Q: Change Image Button in Adapter Listview Can Anyone help me. Where is my fault?
I have an adapter listview is:
db = Database.getReadableDatabase();
            String queryString = "SELECT * from TBL_CHECKIN WHERE FLAG='1' and NOCUST='" + ListViewCallplan.get(position).gettxid() + "'";
            Cursor c = db.rawQuery(queryString, null);
            if (c.getCount() == 0) {
                System.out.println("ok1");
                notifyDataSetInvalidated();
                holder.image .setImageResource(R.mipmap.cekin);
                holder.image.setOnClickListener(new View.OnClickListener() {
  @Override
                        public void onClick(View v) {
                            Intent logtent = new Intent(context, Cls_Checkin.class);
                            logtent.putExtra("custcode", ListViewCallplan.get(position).gettxid());
                            context.startActivity(logtent);
                        }
                    });
    //                notifyDataSetChanged();
                }
                if (c.getCount() > 0) {
                    System.out.println("okcekot");
                    notifyDataSetInvalidated();
                    holder.image .setImageResource(R.mipmap.cekout);
                    holder.image.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            Intent logtent = new Intent(context, Cls_Checkout.class);
                            context.startActivity(logtent);
                        }
                    });
    //                notifyDataSetChanged();
                }

I want to change image the button with that condition, but when me open again it's not do nothing. Stay in same display. The image in button always show checkin for the example.


Q: SharePoint Approval I need to add sharepoint approval to a list... and I was hoping to use the default approval process... but...  I need to run some code once an item is approved.  Do I have to then use VS to create a custom workflow?
I need to run some code that currently runs in an event reciever.  I need to move the code to another function (as we are moving the processing out of event reciever code and now based on item approval).  This code would execute after the item is approved and can be hosted as a service or .net code.

A: Full commented source to a state-machine based approval workflow comes with the MOSS SDK 1.5 in the samples directory.
http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9
-Oisin


Q: Unable to cast object of type 'OpenQA.Selenium.Chrome.ChromeDriver' to type 'OpenQA.Selenium.Remote.RemoteWebDriver' I am trying to use WebDriverManager Package for .Net for automatically managing the chromedriver.exe version while executing a test case. But when ever I try to type cast ChromeDriver object to RemoteDriverObject it is showing me below error.
Unable to cast object of type 'OpenQA.Selenium.Chrome.ChromeDriver' to type 'OpenQA.Selenium.Remote.RemoteWebDriver'.

I will write the methods and the code that I am using below:
public IWebDriver WebInit()
{
     ChromeOptions options = new ChromeOptions();
     options.AddArguments("--test-type");
     options.AddArguments("--start-maximized");
     options.AddArguments("--disable-infobars");
     options.AddArguments("--disable-extensions");
     options.AddAdditionalCapability("useAutomationExtension", false);
     options.AddArguments("--ignore-certificate-errors");
     options.AddExcludedArgument("enable-automation");
     options.AddUserProfilePreference("credentials_enable_service", false);
     options.AddUserProfilePreference("profile.password_manager_enabled", false);
     options.AddAdditionalCapability("useAutomationExtension", false);
     options.AddUserProfilePreference("download.prompt_for_download", false);
     options.AddUserProfilePreference("download.default_directory", downloadFilepath);
     options.AddUserProfilePreference("safebrowsing.enabled", true);
     options.AddArguments("window-size=1600,900");
     new DriverManager().SetUpDriver(new ChromeConfig(), VersionResolveStrategy.MatchingBrowser); //this is the code used from the mentioned Github Repository
     _driver = new ChromeDriver(options);
}

public void FunctionWhereIAmCallingTheWebInitFucntion()
{
     _driver = WebInit()
     ICapabilities capabilities = ((RemoteWebDriver)_driver).Capabilities; //whenever this line gets executed it throws the exception that is mentioned
}

Below are the Package versions that I am using
<PackageReference Include="Selenium.Support" Version="4.1.1" />
<PackageReference Include="Selenium.WebDriver" Version="4.1.1" />
<PackageReference Include="WebDriverManager" Version="2.12.4" />

Please can anyone from the community can guide me where am I making a mistake? Thank you very much!!

A: Ok, based on your response in the comments, I think this is what you are going for.
The ChromeDriver object has a Capabilities property you can use to request the name and version.
As long as you are working with a ChromeDriver directly and not an IWebDriver that property is accessible like follows:
string? versions = driver.Capabilities.GetCapability("browserVersion").ToString();
string? name = driver.Capabilities.GetCapability("browserName").ToString();

I modified your program a little bit based on what it seems like you are trying to do and printed the result to the console:
private static ChromeDriver WebInit()
{
    // set up options
    ChromeOptions options = new ChromeOptions();
    options.AddArguments("--start-maximized");

    // download latest chromedriver
    new DriverManager().SetUpDriver(new ChromeConfig(), VersionResolveStrategy.MatchingBrowser); //this is the code used from the mentioned Github Repository

    // initialize the driver
    ChromeDriver driver = new ChromeDriver(options);

    return driver;
}

public static void Main()
{
    ChromeDriver driver = WebInit();

    // get the capabilities
    string? versions = driver.Capabilities.GetCapability("browserVersion").ToString();
    string? name = driver.Capabilities.GetCapability("browserName").ToString();

    Console.WriteLine(versions);
    Console.WriteLine(name);

    Console.ReadKey();
}

The above example works for me in .Net 6.0 with the following NuGet packages installed:

*

*Selenium.Support (4.1.1)

*Selenium.WebDriver (4.1.1)

*WebDriverManager (2.13.0)


Q: move up and down a treeview I'm populating a tkinter treeview in python using Os.walk() but after populating it I want to be able to reorder the tree leaves using buttons.
The command for moving up the tree works just fine (I want to be able to move multiple leaves at once)
def moveUp():
    leaves = Tree.selection()
    for i in leaves:
        Tree.move(i, Tree.parent(i), Tree.index(i)-1)

But when I reversed it to go down the tree I get a weird bug
def moveDown():
    leaves = Tree.selection()
    for i in leaves:
        Tree.move(i, Tree.parent(i), Tree.index(i)+1)

I can only move a single leaf down, if I select an odd number of leaves then the lowest one moves down, and if I pick an even number of leaves none of them move.

A: As suggested in the comments going through leaves in the reverse order using reversed() fixes the problem. (Would be a comment but I don't have the reputation)
def moveDown():
    leaves = Tree.selection()
    for i in reversed(leaves):
        Tree.move(i, Tree.parent(i), Tree.index(i)+1)

A: Note, for moveUp, reversing the leaves would result in nothing actually changing in the tree. Simply iterating through the leaves in order is the ticket.
def moveUp():
    leaves = Tree.selection()
    for i in leaves:
        Tree.move(i, Tree.parent(i), Tree.index(i)-1)


Q: Slow SQL: Select count of Table1 values missing from Table2 I am trying to return a count of the number of values from Table1 WHERE NOT EXISTS in Table2, I've got a query that seems correct but it's extremely slow to run:
SELECT count(container_no)
FROM pier_data
WHERE NOT EXISTS(
    SELECT 1
    FROM Iron_mountain_data
    WHERE pier_data.container_no = iron_mountain_data.[Customer Box Nbr]
    );

Is there any way I can speed this up?
Edit: For whatever reason I believe this LEFT JOIN business gave me the most expedient results in MS Access:
SELECT Count(container_no) AS boxes_missing_from_IM
FROM pier_data AS pd LEFT JOIN iron_mountain_data AS imd ON pd.container_no =
imd.[Customer Box Nbr]
WHERE imd.[Customer Box Nbr] Is Null;

A: This might be better, try it :
SELECT COUNT(container_no) FROM pier_date
WHERE container_no NOT IN
(
     SELECT [Customer Box Nbr] FROM iron_mountain_data
);

Also, as it has been suggested, you could use a left join with a where clause like this :
SELECT COUNT(container_no) FROM pier_date pd
LEFT JOIN iron_mountain_data imd ON pd.container_no = imd.[Customer Box Nbr]
WHERE imd.[Customer Box Nbr] IS NULL

The use of keyword 'DISTINCT' might be useful too like
COUNT(DISTINCT container_no)

or
SELECT DISTINCT [Customer Box Nbr]

A: Assuming [container_no] and [Customer box nbr] captures the same information
    SELECT  COUNT(container_no)
    FROM pier_date pd
    WHERE   container_no NOT IN (
                                    SELECT DISTINCT [Customer Box Nbr]
                                    FROM            iron_mountain_data
                                )

A: Your query is fine, although I would use COUNT(*) and table aliases:
SELECT COUNT(*)
FROM pier_data as pd
WHERE NOT EXISTS (SELECT 1
                  FROM Iron_mountain_data as imd
                  WHERE pd.container_no = imd.[Customer Box Nbr]
                 );

(These changes have no impact on performance, except for a very, very, very minor check that container_no is not NULL for the COUNT().)
For performance, you want an index on Iron_mountain_data([Customer Box Nbr]):
create index idx_iron_mount_data_customer_box_nbr on Iron_mountain_data([Customer Box Nbr];

This should work for almost any way that you write the query.


Q: How to test the appearance of a child component within an ngIf Statement in Angular 8 I have a parent component where one of two child components are displayed, depending on the value of a variable (workHistoryState.ViewType):

        <app-job-list></app-job-list>

        <app-assignment-list ></app-assignment-list>

The value in workHistoryState.ViewType is updated by another child component. It calls this method on the workHistoryState service:
public ViewTypeChanged(viewType: string) {
    this.ViewType = viewType;
}

In my test code for the parent component I have to use mocks for the child components. The mocks are as follows:
import { Component } from "@angular/core";
@Component({
    selector: 'app-assignment-list',
    template: '
Mock Assignment List Component
'
})
export class AssignmentListComponentMock {}

import { Component } from "@angular/core";
@Component({
    selector: 'app-job-list',
    template: '
Mock Job List Component
'
})
export class JobListComponentMock {}

So my test code is as follows (and both of the tests fail):
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WorkHistoryParentComponent } from './work-history-parent.component';
import { JobListComponentMock } from '../component-mocks/job-list.component.mock';
import { AssignmentListComponentMock } from '../component-mocks/assignment-list.component.mock';
import { IndustryDropDownComponentMock } from '../component-mocks/industry-drop-down.component.mock';
import { RoleTypeDropDownComponentMock } from '../component-mocks/role-type-drop-down.component.mock';
import { ViewTypeSelectComponentMock } from '../component-mocks/view-type-select.component.mock';
import { By } from '@angular/platform-browser';
import { APP_BASE_HREF } from '@angular/common';

describe('WorkHistoryParentComponent', () => {
    let component: WorkHistoryParentComponent;
    let fixture: ComponentFixture<WorkHistoryParentComponent>;
beforeEach(async(() => {
  TestBed.configureTestingModule({
  declarations: [WorkHistoryParentComponent, JobListComponentMock, AssignmentListComponentMock, IndustryDropDownComponentMock, RoleTypeDropDownComponentMock, ViewTypeSelectComponentMock],
  providers:[
    { provide: APP_BASE_HREF, useValue : '/' },

],
}).compileComponents();
}));

beforeEach(() => {
  fixture = TestBed.createComponent(WorkHistoryParentComponent);
  component = fixture.componentInstance;
  fixture.detectChanges();
});

it('should not find job list by css when detailed view is chosen', () => {
    component.workHistoryState.ViewTypeChanged("detailed");

    let jobList = fixture.debugElement.query(By.css('.jobList'));

    expect(jobList).toBeNull();
});

it('should not find job list when detailed view is chosen', () => {
    component.workHistoryState.ViewTypeChanged("detailed");

    let jobList = fixture.debugElement.query(By.directive(JobListComponentMock));

    expect(jobList).toBeNull();
    });
});

Does anybody know why they are failing?

A: I needed to call fixture.detectChanges() after changing the value in the service. So the tests should have been:
it('should not find job list by css when detailed view is chosen', () => {
  component.workHistoryState.ViewTypeChanged("detailed");
  fixture.detectChanges();

  let jobList = fixture.debugElement.query(By.css('.jobList'));

  expect(jobList).toBeNull();
});

it('should not find job list when detailed view is chosen', () => {
  component.workHistoryState.ViewTypeChanged("detailed");
  fixture.detectChanges();

  let jobList = fixture.debugElement.query(By.directive(JobListComponentMock));

  expect(jobList).toBeNull();
});


Q: I'm trying to add a List-Unsubscribe header to my e-mail header using php-mailer I want to show unsubscribe links beside the email headers of email providers like Gmail, yahoo, and outlook.
This is how its called in PHP-mailer:(I have tried by following ways)
1st way:
$mail->AddCustomHeader("List-Unsubscribe:<mailto:example@yopmail.com>,<https://myexample.com/unsubscribe.php?identifier=1599&type=s&campaignid=99>");

2nd way:
$mail->AddCustomHeader("List-Unsubscribe:<mailto:example@yopmail.com?subject=unsubscribe>,<https://myexample.com/unsubscribe.php?identifier=1599&type=s&campaignid=99>");

By this code, it sends the header List-Unsubscribe with the email but the unsubscribe link is not showing there. I don't know this is the process or not.
I have DKIM: PASS record.
In the mail raw header of Gmail, outlook, and yahoo it shows, List-Unsubscribe: List-Unsubscribe: mailto:example@yopmail.com?subject=unsubscribe,https://myexample.com/unsubscribe.php?identifier=1599&type=s&campaignid=99. Do we need to do some email server configuration for this to show link in emails header ? I can not find the solution for this.


Q: Run Celery tasks on Railway I deployed a Django project in Railway, and it uses Celery and Redis to perform an scheduled task. The project is successfully online, but the Celery tasks are not performed.
If I execute the Celery worker from my computer's terminal using the Railway CLI, the tasks are performed as expected, and the results are saved in the Railway's PostgreSQL, and thus those results are displayed in the on-line site. Also, the redis server used is also the one from Railway.
However, Celery is operating in 'local'. This is the log on my local terminal showing the Celery is running local, and the Redis server is the one up in Railway:
-------------- celery@MacBook-Pro-de-Corey.local v5.2.7 (dawn-chorus)
--- ***** -----
-- ******* ---- macOS-13.1-arm64-arm-64bit 2023-01-11 23:08:34
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app:  suii:0x1027e86a0
- ** ---------- .> transport:  redis://default:**@containers-us-west-28.railway.app:7078//
- ** ---------- .> results:
- *** --- * --- .> concurrency: 10 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery  exchange=celery(direct) key=celery
[tasks]
. kansoku.tasks.suii_kakunin

I included this line of code in the Procfile regarding to the worker (as I saw in another related answer):
worker: python manage.py qcluster --settings=my_app_name.settings

And also have as an environment variable CELERY_BROKER_REDIS_URL pointing to Railway's REDIS_URL. I also tried creating a 'Periodic task' from the admin of the live aplication, but it just doesn't get executed. What should I do in order to have the scheduled tasks be done automatically without my PC?


Q: while changing SDK 33 XML autocompletion is not working I hv version bubble bee Android after changing SDK 33 XML auto complete is not working plz help. when I change version 33 then Android application execute but XML auto complete doesn't work
I have tried all possible ways but i unable to find and solution


Q: AJAX POST JSON Array Javascript NOT JQUERY
In this screenshot, a JSON array is being passed to PHP via AJAX without a POST body. I am using this code to implement it:
with(x=new XMLHttpRequest()) open("POST", "http://myweb/api/mobile/v1/jobeventadd?key=cfff"), setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), send("%7B%0A%22SessionID%22%3A%22hn0oqa0u687avsrnev6f5t2nh7%22%2C%0A%22ObjectID%22%3A%226460%22%2C%0A%22ItemName%22%3A%22UologiciPhone%20test%20event%22%2C%0A%22ActivityFrom%22%3A%2201-01-2013%2012%3A00%3A00%22%0A%7D");

But it's not working. How can I do it via XMLHttpRequest? No JQUERY PLEASE

A: Use the onreadystatechange property to get the response after the success state, and then store the data in a custom header to troubleshoot issues with the POST body:
with(new XMLHttpRequest)
  {
  open("POST",{},true);
  setRequestHeader("Foo", "Bar");
  send("");
  onreadystatechange = handler;
  }

function handler(event)
 {
 !!event.target && !!event.target.readyState && event.target.readyState === 4 && ( console.log(event) );
 }

References

*

*XMLHTTPRequest Living Standard

*Fetch Living Standard

A: It was same as GET
with(new XMLHttpRequest)
  {
  open("POST","http://google.com",true);
  send("hello=world&no=yes");
  onreadystatechange = function(){};
  }


Q: django: generic views + custom template tags or custom views + generic/normal template tags This is more of a best-practices question, and given that I'm quite tired it mightn't make much sense.
I've been putting together a blog app as a learning experience and as an actual part of a website I am developing.
I've designed it like most apps so that you can list blog posts by multiple criteria i.e.
/blog/categories/
/blog/authors/
/blog/tags/
/blog/popular/
etc.

On each page above I also want to list how many entries are a part of that criteria
i.e. for "categories", I want /blog/categories/ to list all the different categories, but also mention how many blog posts are in that category, and possibly list those entries.
Django seems to give you lots of ways of doing this, but not much indication on what's best in terms of flexibility, reusability and security.
I've noticed that you can either
A: Use generic/very light views, pass a queryset to the template, and gather any remaining necessary information using custom template tags.
i.e. pass the queryset containing the categories, and for each category use a template tag to fetch the entries for that category
or B: Use custom/heavy views, pass one or more querysets + extra necessary information through the view, and use less template tags to fetch information.
i.e. pass a list of dictionaries that contains the categories + their entries.
The way I see it is that the view is there to take in HTTP requests, gather the required information (specific to what's been requested) and pass the HTTP request and Context to be rendered. Template tags should be used to fetch superflous information that isn't particularly related to the current template, (i.e. get the latest entries in a blog, or the most popular entries, but they can really do whatever you like.)
This lack of definition (or ignorance on my part) is starting to get to me, and I'd like to be consistent in my design and implementation, so any input is welcome!

A: I'd say that your understanding is quite right. The main method of gathering information and rendering it via a template is always the view. Template tags are there for any extra information and processing you might need to do, perhaps across multiple views, that is not directly related to the view you're rendering.
You shouldn't worry about making your views generic. That's what the built-in generic views are for, after all. Once you need to start stepping outside what they provide, then you should definitely make them specific to your use cases. You might of course find some common functionality that is used in multiple views, in which case you can factor that out into a separate function or even a context processor, but on the whole a view is a standalone bit of code for a particular specific use.


Q: How do I set up a Jenkins CI server to run automated BDD selenium tests using a remote webdriver? I'm new to Jenkins and am trying to set up a server to run selenium tests from a GitHub repo. I'm sure that I'm doing something wrong, likely several things, but haven't been able to figure it out.
I have configured the selenium plugin to use the default Selenium hub port 4444.
Project GitHub Configuration
Can't figure out why I'm getting this error. The credentials match the created username and ssh key. I can even access the repo by clicking on GitHub in the project dashboard.
Project Shell Execution Steps
The before-build execution steps. These are the commands I use in the terminal to run the tests locally.
When I build the job it gives the following log:
 Started by <user>
 Building in workspace /Users/Shared/Jenkins/Home/workspace/Tutorial
 > git rev-parse --is-inside-work-tree # timeout=10
 Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/<repo address>.git # timeout=10
 Fetching upstream changes from https://github.com/<repo address>.git
 > git --version # timeout=10
 using GIT_SSH to set credentials
 > git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*
 ERROR: Error fetching remote repo 'origin'
 hudson.plugins.git.GitException: Failed to fetch from https://github.com/<repo address>.git
 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
 at hudson.scm.SCM.checkout(SCM.java:496)
 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
 at hudson.model.Run.execute(Run.java:1728)
 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
 at hudson.model.ResourceController.execute(ResourceController.java:98)
 at hudson.model.Executor.run(Executor.java:405)
 Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
 stdout:
 stderr: remote: Invalid username or password.
 fatal: Authentication failed for 'https://github.com/<repo address>.git/'

 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
 ... 11 more
 ERROR: null
 Finished: FAILURE

A: If you are using SSH key for Jenkins to authenticate try using SSH version e.g. git@github.com:FOO/BAR.git instead of HTTPS one.


Q: Change Multiple (Including No) File Extensions If I have a directory of files, where some files have an extension like .html and some files have no extension, how do I change them all to, e.g. .txt?

A: Believe this should work for you (probably more elegant ways to do this with sed).
for file in *; do
  base=`echo "${file%.*}"`
  mv -- "${file}" "${base}.txt"
done

A: To rename all of them in the shell would be something like this:
for file in *; do
  mv -- "${file}" "`basename -- "${file}"`.txt"
done

You may want to test the type with file or other checks to determine the extensions.

A: Not necessarily more elegant, but for completeness, here's a sed solution:
for file in *; do
  mv "$file" "$(echo "$file" | sed 's/^\(.*\)\.\?.*$/\1.txt/')"
done

The sed bit grabs everything before the last dot in the filename, and replaces the dot and whatever follows with '.txt'. If there is no dot in the filename, then '.txt' is just appended to the whole thing.
The quotes around the variables are important for handling filenames with spaces and such, regardless of which method you go with.


Q: Spark Session Error: java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a running MetricsSystem I am unable to build a SparkSession in Scala without an error. I am using Maven as my build tool. I have Spark 3.3.0 installed locally. I also have an Azure Databricks 3.3.0 cluster. Whenever I pass the databricks master URL it bombs out with this error:
Error: java.lang.IllegalArgumentException: requirement failed: Can only call getServletHandlers on a running MetricsSystem
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>sample</groupId>
    <artifactId>sample</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <spark.version>3.3.0</spark.version>
        <scala.version.major>2.12</scala.version.major>
        <scala.version.minor>12</scala.version.minor>
        <scala.version>${scala.version.major}.${scala.version.minor}</scala.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_${scala.version.major}</artifactId>
            <version>${spark.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-sql_${scala.version.major}</artifactId>
            <version>${spark.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-streaming_${scala.version.major}</artifactId>
            <version>${spark.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-mllib_${scala.version.major}</artifactId>
            <version>${spark.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <version>1.34</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

package sample

import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

object SparkMain extends App {

  val sparkConf = new SparkConf()
    .setMaster("local[1]")
    .setAppName("ScalaSparkDF-Test")
    .set("spark.driver.allowMultipleContexts", "false")
    .set("spark.ui.enabled", "false")

  val spark = SparkSession.builder()
    .config(sparkConf)
    .getOrCreate()

  val df = spark.read.option("header","true")
    .csv("/Users/")

}


Q: Do metatheoretic results carry between mutually interpretable theories? If two theories A and B are mutually interpretable, in the sense of there existing a translation procedure from A to B and from B to A, does it follow that whatever metatheoretic results (e.g., categoricity) hold for one theory hold for the other?
If it is not true generally, does it hold for some subset of metatheoretic results? For instance, I know that mutual interpretability implies equiconsistency (see, e.g., Colin McLarty's second comment here). Intuitively, it seems like categoricity should carry over if it is right to think of failure of categoricity as resulting from a lack of expressive power (like how first order theories often lack categoricity due to an inability to discriminate between different sized infinite models and thus admitting of Skolemized models). Is this much right, at least?

A: If $T$ is the theory of a field with $2$ elements and $S$ is the theory of fields of characteristic $2$, then $T$ and $S$ are mutually interpretable, $T$ is categorical and $S$ is not categorical.


Q: Angular: get request i have an issue with displaying data in console. I am trying to retrieve log data in the console but i am getting null without knowing what the problem is. This is my code:
Service.ts
 getItemById(id:number): Observable<any> {
    return this.http.get<any>(`${this.API}/${id}`).pipe(catchError(this.handleError
    ));
  }

  private handleError(httpErrorResponse:HttpErrorResponse){
    if(httpErrorResponse.error instanceof ErrorEvent){
      console.error(httpErrorResponse.error.message)
    }
    return of(null)
  }

Component.ts
showItem(id: any) {

    this.ItemService.getItemById(id).subscribe((data: any) => {
      console.log(data)

      this.log = data;

    })
  }

html button
        <button class="btn btn-block btn-primary" (click)="showItem(log.id)">{{buttonName}}</button>

when i click the button the response is giving 200 in the network section

but the console is returning a null, it does not return the payload.

Any solutions ?

A: Since you have an error, try first with a simpler solution:
Service.ts
getItemById(id:number): Observable<any> {
   return this.http.get(`${this.API}/${id}`);
}

Component.ts
showItem(id: any) {

   this.ItemService.getItemById(id)
   .subscribe(
      (data: any) => {
         console.log(data);
         //this.log = data;
    });

}

After this, see if your API works (if it gets data).
Once you check this,

*

*If it doesn't return anything, your solution was right, and the problem is in the back.

*If it is returning data, there was a problem. Then, in order to find out what is going on, you can try to left this simplified version and try the error directly in the subscription, with catchError or simply managing the "path" of error (something like this:)
this.ItemService.getItemById(id)
   .subscribe(
      (data: any) => {
         console.log(data);
         //this.log = data;
      },
      err => {console.log(err);} // You'll get the whole object,
                                 // If you get [object object] you shoud use the specifics fields, something like console.log(err.error.message) or something like that... (look them up on the internet)
    );

A: I just figured out that i had to add the responseType to the url in the service.ts.
This link was useful :   Angular HttpClient "Http failure during parsing"