text:
Q: Why does getCoordinates return long coordinates? After click on the map I got long coordinates values as:
[5364981.75481758, 7224346.2294111]

Code line is:
  const geom = (
    this.editFeaturePointClone.getGeometry() as any
  ).getCoordinates();

So, I need to pass these coordinates to any map (Google as example) to view the object. But I got the wrong coordinates.
How to fix it?
I have tried this:
 const [lon, lat] = evt.coordinate;
        const coordReprojected = Proj.transform(
          [lon, lat],
          'EPSG:4326',
          'EPSG:3857'
        );

        (
          this.drawingService.editFeaturePoint.getGeometry() as any
        ).setCoordinates(coordReprojected);


text:
Q: Prove that two sets A and B with $A \cap B=\emptyset$, $\sup A = \sup B$, $\sup A \notin A$ and $\sup B \notin B$ cannot exist. I have to show that it is either possible or impossible to have two such sets. I understand intuitively that they cannot exist (correct me if I'm wrong, please), but can't seem to figure out how to even put it in words, let alone prove it.
I was thinking of assuming all of these things and showing that it leads to a contradiction, but I got stuck several times. Could someone please give me some pointers as to how to begin?

A: Consider $\Bbb Q \cap (0,1)$ and $(\Bbb R \setminus \Bbb Q )\cap (0,1)$.

A: Let $A:=\left\{1-\frac{1}{2n-1}\mid n\in\left\{1,2,\dots\right\}\right\}.$
Let $B:=\left\{1-\frac{1}{2n}\mid n\in\left\{1,2,\dots\right\}\right\}.$

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to know which vnode a table is in when using TDengine? I am use TDengine now. I know that TDengine likes Cassandra that both use virtual node as virtualization. How can I know which vnode a table is in? I tried to use describe tbname, but I got no information like below:
enter image description here

A: you can use "show vgroups" to check how many vnodes you have
taos> show vgroups;
    vgId     |   tables    |  status  |   onlines   | v1_dnode | v1_status | compacting  |
==========================================================================================
           3 |        1000 | ready    |           1 |        1 | master    |           0 |
           4 |        1000 | ready    |           1 |        1 | master    |           0 |
           5 |        1000 | ready    |           1 |        1 | master    |           0 |
           6 |        1000 | ready    |           1 |        1 | master    |           0 |
           7 |        1000 | ready    |           1 |        1 | master    |           0 |
           8 |        1000 | ready    |           1 |        1 | master    |           0 |
           9 |        1000 | ready    |           1 |        1 | master    |           0 |
          10 |        1000 | ready    |           1 |        1 | master    |           0 |
          11 |        1000 | ready    |           1 |        1 | master    |           0 |
          12 |        1000 | ready    |           1 |        1 | master    |           0 |
Query OK, 10 row(s) in set (0.001933s)

From the output, you know the vgroup id, then you can use "show tables like tbname" to get which vnode the table is in.
taos> show tables like "d8645";
           table_name           |      created_time       | columns |          stable_name           |          uid          |     tid     |    vgId     |
==========================================================================================================================================================
 d8645                          | 2022-04-24 14:43:23.183 |       4 | meters                         |      2814763207660351 |         801 |          10 |
Query OK, 1 row(s) in set (0.009541s)

From the output, you know that table d8645 is in vgroup 10


text:
Q: Table typesetting with pgfplotstable I have two questions concerning pgfplotstable and number formatting with pgf.
Consider the following piece of code:
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{amsmath}

\begin{document}
\pgfplotstableread{
A     B        C
1.1   12       1300000
21.1  200000   214300000
}\mytable
\pgfplotstabletypeset[columns={A, B, C},
  columns/A/.style={postproc cell content/.append style={
    /pgfplots/table/@cell content/.add={}{ s}}, fixed zerofill, precision=1
  },
  columns/C/.style={postproc cell content/.append style={
    /pgfplots/table/@cell content/.add={}{ s${}^{-1}$}}, fixed zerofill, precision=1
  }
]\mytable

\end{document}

I would like to:

*

*align the content of the column A at the decimal separator (obviously I've tried dec sep align but the it messes up with the postproc cell content (it adds the " s" before the dec sep "." - e.g. : 21 s.1 s), other than that it aligns fine,

*print the number using engineering notation (the powers of ten must be multiples of three) for the column B - e.g. : $200\:\cdot\:10^{3}$ instead of $2\:\cdot\:10^{5}$)

*do all these for the column C: append content, print using engineering notation, align on the \cdot of the engineering notation (like sci sep align)

Do you know some way(s) to achieve any of those goals ?
EDIT
Thanks to Jake's answer, I've got almost what I want, however I have one last problem with siunitx. The following piece of code compiles (note the alias to make it compile, otherwise siunitx fails..)
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\pgfplotstableset{
  alias/as/.initial=d,
}
\pgfplotstableread{
d
7000000
}\loadedtable
\pgfplotstabletypeset[columns={as},
  columns/as/.style={
    column name={$2 \times 3d$},
  }
]\loadedtable
\end{document}

This next piece doesn't:
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\pgfplotstableset{
  alias/as/.initial=d,
}
\pgfplotstableread{
d
7000000
}\loadedtable
\pgfplotstabletypeset[columns={as},
  columns/as/.style={
    column name={$2 \times 3d$},
    column type={S[round-mode=places, round-precision=1, scientific-notation=engineering, table-format=5.1e1, exponent-product = \cdot]},
    string type
  }
]\loadedtable
\end{document}

How to avoid siunitx parse the headers ? (that would also, I guess, make it possible to use column identifiers with the letters 'e' and 'd')

A: You could let siunitx take care of the of the alignment and of formatting the numbers: Since version 2.4, siunitx can format numbers to engineering notation.

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{siunitx}

\begin{document}
\pgfplotstableread{
A     B        C
1.1   12       1300000
21.1  200000   214300000
}\mytable
\pgfplotstabletypeset[columns={A, B, C},
  columns/A/.style={
    column type={S[table-format=2.1]},
    string type,
    postproc cell content/.append style={
        /pgfplots/table/@cell content/.add={}{\,s}
    }
  },
  columns/B/.style={
    column type={S[round-mode=figures, round-precision=3, scientific-notation=engineering, table-format=3e1]},
    string type,
    postproc cell content/.append style={
        /pgfplots/table/@cell content/.add={}{\,\si{\per\second}}
    }
  },
  columns/C/.style={
    column type={S[round-mode=figures, round-precision=3, scientific-notation=engineering, table-format=5.2e1]},
    string type,
    postproc cell content/.append style={
        /pgfplots/table/@cell content/.add={}{\,s}
    }
  },
]\mytable

\end{document}

May I suggest a slight alteration to your table setup? Instead of repeating the unit symbol with each value, I would put it into the header. Here's one example of how that can be accomplished. I've also used the booktabs package to make the table a bit easier to grasp:
\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\pgfplotstableread{
A     B        C
1.1   12       1300000
21.1  200000   214300000
}\mytable
\pgfplotstabletypeset[columns={A, B, C},
  columns/A/.style={
    column type={S[table-format=2.1]},
    string type
  },
  columns/B/.style={
    column type={S[round-mode=figures, round-precision=3, scientific-notation=engineering, table-format=3e1]},
    string type
  },
  columns/C/.style={
    column type={S[round-mode=figures, round-precision=3, scientific-notation=engineering, table-format=3.2e1]},
    string type
  },
  every head row/.style={
    before row={\toprule},
    after row={\si{\second} & \si{\per\second} & \si{\second}\\ \midrule}
  },
  every last row/.style={after row=\bottomrule}
]\mytable

\end{document}

To stop siunitx from trying to parse the column names, issue the key multicolumn names. This will wrap the cells in the head row in \multicolumn{1}{c}{<column name>}, which protects them.

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}
\pgfplotstableread{
d
7000000
}\loadedtable
\pgfplotstabletypeset[
    multicolumn names,
    columns/d/.style={
        column name=$\gamma \times \epsilon$,
        column type={
            S[
                round-mode=places,
                round-precision=1,
                scientific-notation=engineering,
                table-format=1.1e1,
                exponent-product = \cdot
            ]
        },
        string type
  }
]\loadedtable
\end{document}


text:
Q: How to pass argument to ENTRYPOINT with variable expansion? I'm building a docker image based on some other image that is out of my control. The base image sets an ENTRYPOINT I want to use by simply passing arguments via the CMD command. I also need to use runtime variable expansion in the arguments. Here's my Dockerfile
FROM base # I do not control base, but I need to call its ENTRYPOINT.

# The "as default parameters to ENTRYPOINT" form. Does not expand variables.
CMD [ "--port", "$PORT" ]

# The "exec" from. I can't use it, because I do not know path to the executable as the base image is outside my control.
CMD [ "executable", "--port", "$PORT" ]

# The "shell" form. Won't even build because "--port" is interpreted as flag of "CMD".
CMD --port $PORT

As explained in the code, none of the three forms offered by the docs works in my use case.
There are already similar question here on SO, but neither answers this particular use case. This one doesn't comprise variable expansion. And this one doesn't account for the inability to change the ENTRYPOINT.

A: You can't use CMD with variable expansion in this case.
Docker on its own doesn't know how to expand variables in the container command.  As you note, there are two syntaxes:

*

*CMD ["cmd", "$option"] literally passes cmd and $option as arguments with no expansion at all

*CMD cmd $option just wraps that string in a shell invocation, equivalent to CMD ["sh", "-c", "cmd $option"], and depends on that shell to do the expansion.

In a comment you mention a specific image.  If you look at its generated history this uses the "container as command" pattern, where the ENTRYPOINT is a command to launch and the CMD is arguments to that command.  Unless the command specifically expects to receive sh and -c as options, this won't work; but the sh -c wrapper is the only way Docker has to cause variable expansion at startup time.

You more specifically are trying to pass a --port option.  That affects the port the process inside the container listens on.  Since the container runs in an isolated network namespace, there's not usually a reason to need to change this: even if you have a dozen containers all listening on the standard HTTP port 80, they won't conflict.
If you want to connect from outside Docker to the container, you only need to change the docker run -p port mapping.  Again, the image documentation suggests launching the image with docker run -p 8080:80 to cause it to be accessible from host port 8080; if you want a different host port, change that number, and leave the second port number the same.


text:
Q: What does the parameter of 1 mean in `listen(1)` method of socket module in python? What does the parameter of 1 mean in the listen(1) method of socket. I am using the socket module in python 2.7 and I have created a basic server that I want to connect to multiple clients (all on a local machine) and transmit data between them. I know there a simpler ways of doing this but I want practice for when the clients would not all be on the same machine and may need to retrieve something from the server first so could not bypass it. I was wondering if the 1 in listen referred to the amount of connections the server would make at a single time and if not what it did mean. I really want to understand in detail how parts of the process work so any help would be appreciated.

A: It defines the length of the backlog queue, which is the number of incoming connections that have been completed by the TCP/IP stack but not yet accepted by the application.
It has nothing whatsoever to do with the number of concurrent connections that the server can handle.


text:
Q: Exception in case statement How would you throw an exception in a case statement? I believe signal is the correct statement. The case statement is when the word 'corp' is found in the name then have a 1 in the column but I want an exception if the word 'dollar' is in the name
Name                     Is_comp
Dollar Tree Corp
First Hand Corp           1

Select
when name like 'corp'
then 1
end as is_comp

A: I think, based on what you are looking for, you just need a fancier CASE statement:
SELECT
    CASE
        WHEN
            name LIKE ANY ('%corp%','%llc%','%inc%') /*list of names with wildcards*/
            AND name not like '%Finch%' /*don't match on finch%/
            AND name not like ANY ('%Finch%','%Brian%') /*or optionally don't match on any of these name substrings*/
            THEN 1
        END 'is_comp'
FROM <table>


text:
Q: Project Summary Web part Provisioning in sharepoint I am working on "Project Summary web part" Provisioning in wiki page as well as publishing page too.
Below is my code :
  ProjectSummaryWebPart newprojectSummaryWebPart = (ProjectSummaryWebPart)newWebPart;
                        Microsoft.SharePoint.Portal.WebControls.ProjectSummaryWebPart projectSummaryWebPart = new Microsoft.SharePoint.Portal.WebControls.ProjectSummaryWebPart();

                        projectSummaryWebPart.ID = webpartId;
                        projectSummaryWebPart.Title = newprojectSummaryWebPart.Title;
                        projectSummaryWebPart.AllowMinimize = newprojectSummaryWebPart.AllowMinimize;
                        projectSummaryWebPart.AllowZoneChange = newprojectSummaryWebPart.AllowZoneChange;
                        projectSummaryWebPart.AllowHide = newprojectSummaryWebPart.AllowHide;
                        projectSummaryWebPart.AllowClose = newprojectSummaryWebPart.AllowClose;
                        projectSummaryWebPart.ListId = newprojectSummaryWebPart.listID;

                        #region Set Panels In Project Summary Webpart
                        ProjectSummaryPanelConfig panelConfig = new ProjectSummaryPanelConfig();
                        panelConfig.IsLatePanel = newprojectSummaryWebPart.IsLatePanel;
                        if (newprojectSummaryWebPart.DaysToSearch > 0)
                        {
                            //Set DaystoSearch value to display tasks as per the latest due date.
                            //If due date is after 3 days and set value is 3 than only those task displayed in web part which has a due date after 3 days.
                            panelConfig.Enabled = true;
                            panelConfig.DaysToSearch = newprojectSummaryWebPart.DaysToSearch;

                        }
                        projectSummaryWebPart.Panels.Add(panelConfig);

I Want to set Panels value in web part. If i am provisioning web part without panel Values than it is working superb. But when i am set panels Value using "ProjectSummaryPanelConfig object" code gives me below error:

Error : System.NullReferenceException: Object reference not set to an
  instance of an object.

Can u help me out as soon as possible.


text:
Q: Sorting hashof array of datetime string in Perl I was trying to sort datetimes in Perl. The datetime string is in a hash of arrays. After lots of googling I used Perl's sort function. To my surprise it worked. My code & input is below:
use strict;
use warnings;

my %hashofarrays;

$hashofarrays{'joe tribiani'} = ['16/3/28 13:42','XII','99.93%'];
$hashofarrays{'Ross'} = ['16/3/28 13:43','XII','76.93%'];
$hashofarrays{'sue grace'} = ['11/7/5 12:07','VI','77.58%'];

foreach my $key (   sort{$hashofarrays{$a}[0] cmp $hashofarrays{$b}[0]}      keys %hashofarrays ) {
print "$key =>", join (", ", @{$hashofarrays{$key}}), "\n";
}

Am I doing this correctly? If I am, how is this working?
If it is wrong then what should I do to sort the date time string?
The result should list records sorted in ascending order by datetime.
The datetime format is 'YY/MM/DD' or 'YY/M/D'
My data:
joe tribiani, 16/3/28 13:42,XII,99.93%
Ross,16/3/28 13:43,XII,95.93%
sue grace,11/7/5 12:07,VI,77.58%

My excepted output:
sue grace =>11/7/5 12:07, VI, 77.58%
joe tribiani =>16/3/28 13:42, XII, 99.93%
Ross =>16/3/28 13:43, XII, 76.93%

A: What your code does
foreach my $key (
    sort { $hashofarrays{$a}[0] cmp $hashofarrays{$b}[0] }
    keys %hashofarrays
) {
    print "$key =>", join (", ", @{$hashofarrays{$key}}), "\n";
}

This uses the keys of the hash to sort the elements of the hash on the first element of the array reference that's inside of that key in the hash. It uses cmp, which is an ascii-betical sorting rather than a numerical one. That means that 10 will come before 2 because 1 is a lower character than 2.
For date sorting, this makes sense. But because your date format is not consistently with two digits for months and days, it will not sort properly.
18/5/1    # sorted last
18/10/1   # sorted first

For those two dates, the later October date will be sorted first which is wrong.
What you need to do instead
If you cannot clean up the input data, you need to process it to figure out the value behind the date instead of relying on the presentation for sorting. Parsing dates is its own problem, and we'll use Time::Piece to do it, which has been in the Perl core for a while now.
We could do it like this pseudo-code:
sort { parse($a) <=> parse($b) } ...

That would work, but would be slow, especially for a larger number of records, because it parses the date with every comparison. If you don't know how sorting works internally, it compares values to each other, maybe changes position of the two values, and repeats.
There is a way of making this more efficient, but it's a bit more complex.
use strict;
use warnings;
use Time::Piece;

my %values = ( 'joe tribiani' => [ '16/3/28 13:42', 'XII', '99.93%' ],
               'Ross'         => [ '16/3/28 13:43', 'XII', '76.93%' ],
               'sue grace'    => [ '11/7/5 12:07',  'VI',  '77.58%' ], );

my @sorted_keys = map { $_->[1] }
    sort { $a->[0] <=> $b->[0] }
    map {
        [ Time::Piece->strptime( $values{$_}->[0], '%y/%m/%d %H:%M' )->epoch, $_ ]
    }
    keys %values;

use Data::Dumper;
print Dumper @sorted_keys;

This is called the Schwartzian transform. It essentially processes the values once, puts them into another array reference, together with the actual values that are being sorted. It then sorts on the pre-processed values, and then puts them back.
This is way more efficient, and because of the parsing it will work on all dates that might show up in your values without sorting them in the wrong way.
Note we need to use the numerical comparison operator <=> now, because we are sorting on epoch values, which are just numbers (lots of seconds from 1970-01-01T00:00:00).


text:
Q: Flutter Firebase Functions: An error occured while calling function I recently started developing an app using Flutter and Firebase. I use Firebase Emulator to test Authentication and Cloud Functions. Most of my code is in the Firebase Cloud Functions which I use for all CRUD for Firestore and RTDB. While adding some new features, I got this error in my app. I tried searching a lot but could not find any solution. The following is the error is receive:
An error occured while calling function profile-get
Error Details: null
Message: An internal error has occurred, print and inspect the error details for more information.
Plugin: firebase_functions
Stacktrace: null

My API class in Flutter:
class Api {

  Api(this.functions);
  final FirebaseFunctions functions;

  static Api init() {
    FirebaseFunctions functions = FirebaseFunctions.instance;
    if (emulator) functions.useFunctionsEmulator(origin: host);
    return Api(functions);
  }

  Future<ApiResult> call(String name, {
    Map<String, dynamic> parameters,
  }) async {
    try {
      HttpsCallable callable = functions.httpsCallable(name);
      HttpsCallableResult results = await callable.call(parameters);
      return ApiResult(new Map<String, dynamic>.from(results.data));
    } on FirebaseFunctionsException catch (e) {
      print('An error occurred while calling function $name.');
      print('Error Details: ${e.details}\nMessage: ${e.message}\nPlugin: ${e.plugin}\nStacktrace: ${e.stackTrace}');
      return ApiResult({
        'status': 'error',
        'message': 'An error occured',
        'code': 'unknown'
      });
    }
  }

  static String get host => Platform.isAndroid ? 'http://10.0.2.2:2021' : 'http://localhost:2021';

}

I tried running the functions directly from their local URL and they work fine.

A: As mentioned in the comments defore you are reating a cloud function with onRequest. Those are not callable using an SDK but only trough https URL.
To create a callable function that you can call trough Firebase SDKs you would need to refactor your functions to use the onCall.
It should look something like this:
exports.yourFunctionName= functions.https.onCall((data, context) => {
  // receive the data
  const text = data.text;

  // return a response
  return {
    test:'test'
  }
});

Here you have more information how the callable functions work.

A: Are you using a different region than the standard us-central1? This is often the case, so you need to change the region you are calling from
HttpsCallable callable = FirebaseFunctions.instanceFor(region:"your_region").httpsCallable(name);


text:
Q: VB.net changing text in onPaint sub Hey all i have the following code that works just fine when my form loads up:
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    Dim custFont As New PrivateFontCollection()
    Dim solidBrush As New SolidBrush(Color.FromArgb(255, 0, 0, 255))
    Dim string2 As String = "AntiAlias"

    custFont.AddFontFile("C:\aFont.ttf")
    e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias
    e.Graphics.DrawString(string2, New Font(custFont.Families(0), 100, FontStyle.Regular, GraphicsUnit.Pixel), solidBrush, New PointF(10, 60))
End Sub

However, i need a way to update that font text whenever i push a button(s) on the form itself. I tried making a sub like so:
Public Sub changeText(ByVal e As System.Windows.Forms.PaintEventArgs, ByVal theText as string)
    Dim custFont As New PrivateFontCollection()
    Dim solidBrush As New SolidBrush(Color.FromArgb(255, 0, 0, 255))

    custFont.AddFontFile("C:\aFont.ttf")
    e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias
    e.Graphics.DrawString(theText, New Font(custFont.Families(0), 100, FontStyle.Regular, GraphicsUnit.Pixel), solidBrush, New PointF(10, 60))
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    changeText(Me.OnPaint, "just a test")
End Sub

But i end up having an error:
Overload resolution failed because no accessible 'OnPaint' accepts this number of arguments.
on line:
changeText(Me.OnPaint, "just a test")
Any help would be great! Thanks!

A: Move the string out to class level so you can change it:
Imports System.Drawing.Text
Public Class Form1

    Private string2 As String = "AntiAlias"
    Private custFont As New PrivateFontCollection()

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        custFont.AddFontFile("C:\aFont.ttf")
    End Sub

    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
        Using solidBrush As New SolidBrush(Color.FromArgb(255, 0, 0, 255))
            Using fnt As New Font(custFont.Families(0), 100, FontStyle.Regular, GraphicsUnit.Pixel)
                e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias
                e.Graphics.DrawString(string2, fnt, solidBrush, New PointF(10, 60))
            End Using
        End Using
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        string2 = "just a test"
        Me.Refresh()
    End Sub

End Class


text:
Q: Shading in a simple closed curve I started thiking about this today and I have an answer I feel I can justify intuitively but not rigorously.
Let $\mathbb{S} = \{(x,y) \ | \ f(x,y)=c\}$ define the points on a simple closed curve (at least I think this is the right terminology; examples would be a circle, elipse or heart curve).
Is it always the case that set of points contained within the curve (i.e. the points that "shade it in") are equal to $\mathbb{S^*}=\{(x,y) \ | \ f(x,y) \lt c\}$
This seems to be true "intuitively" since you are making the $x, y$ values smaller and so $f(x,y)$ shrinks as well.  Can we perform some type of derivative on the curve to prove this?
Also, any help with terminology/notation would be greatly appreciated.  I think this falls under Topology but I'm not sure.

A: Take $f(x,y) = \dfrac{1}{x^2 + y^2}$. The set $\{(x,y) : f(x,y) = 1\}$ is still the unit circle, but the region $\{(x,y) : f(x,y) < 1\}$ describes the outside of the circle.

A: This isn't the case if we just play around with the usual parametrisation of the circle as $\{x\in\mathbb{R}^2 \mid \|x\|=c\}$. If we instead define a curve to be $$\{x\in\mathbb{R}^2 \mid \|x\|^{-1}=c\}$$ then this defines a circle of radius $c^{-1}$ and the region $\{x\in\mathbb{R}^2 \mid \|x\|^{-1}<c\}$ is equal to $\{x\in\mathbb{R}^2 \mid \|x\|>c^{-1}\}$ which is the region we would normally call the exterior of the circle.

A: Note that taking $g(x,y) = 2 - f(x,y)$, we have $g$ equal to $1$ in exactly the same places as $f$, but the region where $f$ is less than one is precisely the region where $g$ is greater than one (and vice versa).
Also, discontinuous functions are perfectly legitimate functions! So actually if I tell you where $f$ takes the value $1$, I don't really tell you anything else about $f$. It's quite reasonable to have a function $f$ that is $1$ on the unit circle, then $7/8$ on a square around that, and everywhere else it's $\pi^{\pi^{7000}}$.

A: With a few additional assumptions your statement becomes true.
Suppose $f$ is continuous. You've assumed that $S$ is a simple closed curve, so by the Jordan curve theorem, the complement of $S$ in the plane consists of two components, one unbounded and one bounded. The bounded component is what you are calling the points inside the curve. Let's write $B$ for the bounded component and $U$ for the unbounded component.
Suppose that at least one point $(x,y)$ in $B$ satisfies $f(x,y)<c$. Then all points in $B$ satisfy this inequality, since $B$ is connected (definition of component), and $S$ by assumption contains all points with $f(x,y)=c$. And if one point in $U$ satisfies $f(x,y)>c$, then all points in $U$ do too (same reasoning).
So if (1) $f$ is continuous, and (2) one point in the bounded component satifies $f(x,y)<c$, and (3) one point in the unbounded component satifies $f(x,y)>c$, then your statement is true.
If any one of these assumptions is dropped, the statement no longer holds. Here's an example where (1) and (2) hold but not (3). Let $f(P)$ be the distance from $P$ to the origin if that distance is $\leq 1$. If the distance to the origin is $>1$, say $r$, then let $f(P)=1/r$. Then $S=\{P:f(P)=1\}$ is the unit circle, but the locus of $f(P)<1$ is everything else.


text:
Q: Can we develop homotopy theory choosing another space instead of $[0,1]$? An homotopy between two continous maps $F,G:X\to Y$ is a continous map
$$\mathscr{H}:X\times [0,1]\to Y,$$
such that $\mathscr{H}(-,0)=F$ and $\mathscr{H}(-,1)=G$. I was wondering whether it was interesting to use other spaces instead of $[0,1]$ in the definition.
More explicitely, given a topological space $J$ and two disjoint subspaces $J_0$ and $J_1$, we could define an $(J,J_0,J_1)$-homotopy between $F$ and $G$ as a continous map
$$\mathscr{O}:X\times J\to Y,$$
such that $\mathscr{O}(-,j_0)=F$ for all $j_0\in J_0$ and $\mathscr{O}(-,j_1)=G$ for all $j_1\in J_1$.
I thought that clearly ,for this definition to be interesting, it should induce an equivalence relation on the set of continous functions from $X$ to $Y$ just as classical homotopies (i.e. $([0,1],\{0\},\{1\})$-homotopies).
Reflexivity is clearly not a problem. Symmetric and transitive properties may be a problem.
Is this interesting? Or is it just a funny thought?

A: Consider triples $(J,J_0,J_1)$, where $J$ is a topological space and $J_0,J_1\subseteq J$ are disjoint, non-empty, closed subspaces. Then, we define a $(J,J_0,J_1)$-homotopy between two continuous maps $f,g\colon X\rightarrow Y$ of topological spaces to be a map $H\colon X\times J\rightarrow Y$, such that $H(-,j_0)=f$ for all $j_0\in J_0$ and $H(-,j_1)=g$ for all $j_1\in J_1$. If $(J,J_0,J_1)=([0,1],\{0\},\{1\})$, this is just the usual notion of homotopy. Obviously, $(J,J_0,J_1)$-homotopy is a reflexive relation on the space of maps $X\rightarrow Y$. Note if $J_0,J_1$ were not disjoint, this would be the identity relation and if $J_0$ or $J_1$ were empty, this would be the trivial relation, whence we exclude those cases.
The condition that $J_0,J_1\subseteq J$ be closed is slightly restrictive, but easily motivated: Assume that $Y$ is Hausdorff. Let $j\in\overline{J_0}$ and $(j_{\alpha})_{\alpha}$ be a net in $J_0$, such that $j_{\alpha}\rightarrow j$. Then, for each $x\in X$, $H(x,j_{\alpha})=f(x)$ on one hand and $H(x,j_{\alpha})\rightarrow H(x,j)$ on the other hand. By the uniqueness of limits in Hausdorff spaces, $H(x,j)=f(x)$. Since $x$ was arbitrary, this means $H(-,j)=f$ for all $j\in\overline{J_0}$. Analogously, $H(-,j)=g$ for all $j\in\overline{J_1}$. This means that a $(J,J_0,J_1)$-homotopy is automatically a $(J,\overline{J_0},\overline{J_1})$-homotopy and the converse holds trivially, so we may WLOG assume that $J_0,J_1\subseteq J$ are closed (it is not forced that $\overline{J_0}$ and $\overline{J_1}$ are disjoint, but if they aren't, we again just obtain the identity relation). In case the codomain isn't Hausdorff, the assumption may lose generality, but who cares about generalities of non-Hausdorff spaces.
Now, replace $(J,J_0,J_1)$ by the triple $(J/\sim,J_0/\sim,J_1/\sim)$, where $\sim$ is the relation on $J$ that identifies each $J_0$ and $J_1$ to a point respectively. Note that $J_0/\sim,J_1/\sim\subseteq J/\sim$ are closed points. Every $(J/\sim,J_0/\sim,J_1/\sim)$-homotopy induces a $(J,J_0,J_1)$-homotopy by pullback. Conversely, $J\rightarrow J/\sim$ is a closed map (here, we crucially need that $J_0,J_1\subseteq J$ were assumed closed), so that $X\times J\rightarrow X\times J/\sim$ is a closed map, whence a quotient map, for any topological space $X$. This implies that any $(J,J_0,J_1)$-homotopy factors through  a $(J/\sim,J_0/\sim,J_1/\sim)$-homotopy. Thus, we may assume WLOG that $J_0=\{j_0\}$ and $J_1=\{j_1\}$ are points.
Thus, we are working in the category whose objects are bipointed spaces $(J,j_0,j_1)$, i.e. $J$ is a topological space and $j_0,j_1\in J$ are distinct, closed points. A bipointed map $\varphi\colon(J,j_0,j_1)\rightarrow(K,k_0,k_1)$ is a continuous map $\varphi\colon J\rightarrow K$, such that $\varphi(j_0)=k_0$ and $\varphi(k_0)=k_1$. If there is a bipointed map $(J,j_0,j_1)\rightarrow(K,k_0,k_1)$, then every $(K,k_0,k_1)$-homotopy induces a $(J,j_0,j_1)$-homotopy by pullback, when $(J,j_0,j_1)$-homotopy is a coarser relation than $(K,k_0,k_1)$-homotopy.
The category of bipointed spaces has a relevant endofunctor. If $(J,j_0,j_1)$ is a bipointed space, consider the quotient $J\vee J=J\sqcup J/\sim$, where $\sim$ is the equivalence relation generated by $(j_1,0)\sim(j_0,1)$ (in this notation, we interpret the disjoint union as $J\sqcup J=J\times\{0\}\cup J\times\{1\}$). This yields a bipointed space $(J\vee J,[j_0,0],[j_1,1])$. The construction is functorial.
Let's say a coalgebra (in this context) is a bipointed space $(J,j_0,j_1)$ together with a bipointed map $(J,j_0,j_1)\rightarrow(J\vee J,[j_0,0],[j_1,1])$. A morphism of coalgebras is a bipointed map between the underlying bipointed spaces compatible with those given bipointed maps. Note that $([0,1],0,1)$ is a coalgebra with the bipointed map $([0,1],0,1)\rightarrow([0,2],0,2)$ given by multiplication with $2$ (here, we identified $[0,1]\vee[0,1]\cong[0,2]$). Now, it is a theorem of Peter Freyd that this object is terminal in the category of coalgebras. A reference is Theorem 2.2 in Tom Leinster's A general theory of self-similarity. The statement is actually fairly intuitive, but it's explained there and I'm already writing too much.
Now, assume that $(J,j_0,j_1)$-homotopy is a transitive relation. Consider the $(J,j_0,j_1)$-homotopy $\{j_0\}\times J\rightarrow J\vee J,\,(j_0,j)\mapsto[j,0]$ and the $(J,j_0,j_1)$-homotopy $\{j_0\}\times J\rightarrow J\vee J,\,(j_0,j)\mapsto[j,1]$. The first proves that the maps $j_0\mapsto[(j_0,0)]$ and $j_0\mapsto[(j_1,0)]$ and the second proves that the maps $j_0\mapsto[(j_0,1)]$ and $j_0\mapsto[(j_1,1)]$ are $(J,j_0,j_1)$-homotopic, all as maps $\{j_0\}\rightarrow J\vee J$. Taking into account that $[(j_0,1)]=[j_1,0]$ (this is precisely how we glued) and that the relation of $(J,j_0,j_1)$-homotopy was assumed transitive, there exists a homotopy $H\colon\{j_0\}\times J\rightarrow J\vee J$, such that $H(j_0,j_0)=[j_0,0]$ and $H(j_0,j_1)=[j_1,1]$, i.e. $H(j_0,-)\colon J\rightarrow J\vee J$ is a bipointed map. In other words, if $(J,j_0,j_1)$-homotopy is a transitive relation, $(J,j_0,j_1)$ supports the structure of a coalgebra, in particular the theorem of Freyd implies the existence of a bipointed map $(J,j_0,j_1)\rightarrow([0,1],0,1)$.
Summa summarum, if we assume that $(J,J_0,J_1)$-homotopy is a transitive relation, then it is a coarser relation than regular homotopy. Note that if we further assume that $J$ is path-connected, then there is a bipointed map $([0,1],0,1)\rightarrow(J,J_0,J_1)$, so in that case $(J,J_0,J_1)$-homotopy is the same equivalence relation as regular homotopy (in particular, automatically symmetric). This is perhaps quite surprising.


text:
Q: Proving the induction principle? Suppose we have a language that just consists of a term "a" and a successor function s(x). We know that p(a) is true and we know that $\forall x: p(x) \to p(s(x))$ is true. Suppose we don't have the induction rule: p(a), $\forall x: p(x) \to p(s(x)) \vdash \forall x: p(x)$. Then we couldn't prove the conclusion $\forall x: p(x)$, could we?
I ask because in some course the prof says: For the language introduced above, our rule of inference [induction rule] is sound. Suppose we know that a schema is true of a and suppose that we know that, whenever the schema is true of an arbitrary ground term τ, it is also true of the term s(τ). Then, the schema must be true of everything, since there are no other terms in the language.
IMO he can't write that because he basically claims he can prove the soundness of the induction rule beyond. But as far as I understand you cannot prove the soundness of this rule beyond, i.e. you have to assume (per axiom) it and then you can prove it trivially from the assumption (and of course the assumption could be always wrong so you could never be sure the "schema must be true of everything". Am I right?

A: You are right. Counterexample to the argument that $\forall x \ p(x)$ logically follows from $p(a)$ and $\forall x (p(x) \to p(s(x)))$:
Take as the domain all non-negative integers, interpret $a$ as $1$, $s$ as the successor function, and $p(x)$ as $x$ is a positive integer. Then the premises hold, but since $0$ is not a positive integer, the conclusion does not.

A:
We know that $p(a)$ is true and we know that $\forall x: p(x) \to p(s(x))$ is true.

If there also exists $b$ in the domain of discussion that is distinct from $a$, then, without the induction schema, you could not rule out $s(a)=a$, $s(b)=b$ and $\neg p(b)$. It would be vacuously true that $p(b) \to p(s(b))$.
EDIT: In answer to your follow-up question: What if $a$ is the only object in the domain of discussion? Then $P(x)$ will be true for all $x$ in the domain of discussion. Here, $U(x)$ means that $x$ is an object in the domain of discussion.
Proof: (Induction not required)

A: It depends on what else the professor said, since there is a specific sense in which he is correct.
It is true that we cannot possibly justify induction in a non-circular way. See this post for more details, but I wish to quote a single key part of that post:

The second [circularity] is the understanding of the arithmetic on the natural numbers including induction. This boils down to the understanding of "repeat". If you do not know the meaning of "repeat" or "again" or other forms, no explanation can pin it down.

Think about it; there is no way to explaining how to repeat something an arbitrary finite number of times without relying on prior understanding of natural numbers including induction.
However, we can justify adding the induction axiom schema to PA$^-$, though this justification will rely on meta-induction on the length of finite strings. Specifically, if you can define the natural numbers to be exactly those that can be written in the form "$0+1+\cdots+1$" for some number of "$+1$"s, then the natural numbers also obey the induction axiom schema. See this post for details. Note that such a definition requires assumptions that are at least as strong as induction.
For example, in ZFC we can construct the intersection of all inductive sets, using the one given by the axiom of infinity. But such a construction is in fact impredicative, which is even less philosophically justifiable than induction; if you doubt induction holds for natural numbers, you will certainly not believe that the axiom of infinity plus such impredicative constructions are valid.
On the other hand, we can assume that we can construct the set of strings that can be generated starting from "$0$" by appending "$+1$". This is equivalent to having induction, but some logicians prefer this generative form (also known as inductive constructions) to the axiomatic form (i.e. the induction schema).
To summarize the intuitive reasoning in the linked post:

If every natural number is of the form "$0+1+\cdots+1$" for some number of "$+1$"s, then the induction rule is sound because the conclusion it gives us is true for every natural number $k$, since we can construct a proof that uses the induction step $k$ times to deduce the desired statement about $k$.

Constructing such a proof of course requires induction, but hopefully you can see why it is possible if you believe in the existence of the set of all strings of the form "$0+1+\cdots+1$" for some number of "$+1$"s. So I think that the professor is referring to the term model. Indeed, if there is only one constant-symbol $0$ and one function-symbol $s$ in the language (and no others) and there is a term model, then for any first-order property $Q$ over the language, if that term model satisfies ( $Q(0) ∧ ∀k ( Q(k) ⇒ Q(s(k)) )$ ) then it also satisfies $∀k ( Q(k) )$, precisely for the reason that every element in the term model is generated by $s$ from $0$.
Also note that the meta-reasoning only tells us that there exists a proof for each natural $k$, and not that there is a proof for the universal statement, and furthermore the existence of a proof does not imply truth unless you also assume the soundness of the system without induction.


text:
Q: Error: bad 'S3method' directive: S3method(plot) in R I am writing a R package using devtools. Now I have a generic function plot that can take different classes (e.g. plot.fact, plot.numer, etc.). In the .R file of plot.fact, I use #' comment for documentations in a roxygen way. Besides other items, I specify the following comments:
#' @rdname plot
#' @method plot fact
#' @S3method plot fact
#' @export

However, when I run check('pkg') the following error message appear: Error: bad 'S3method' directive: S3method(plot). Is there anything wrong with how I write the comments? Or do I have to write a plot <- function(x,...) UseMethod("plot") before the function plot.fact? Thanks!
UPDATE
To be more precise, my plot.fact function does not have a single argument x; instead, it has many extra parameters to customize the plot. The arguments are
plot.fact <- function(x, conf.env=0.95, data.note="", leg.cex=1, ...)
According to Hadley's suggestion, I use
#' @rdname plot
#' @method plot fact
#' @export

But the error is still bad 'S3method' directive... Do I need to write down
plot <- function(x, conf.env=0.95, data.note="", leg.cex=1, ...) {
  UseMethod("plot")
}

before the definition of plot.fact? Thanks!

A: *

*If you want to document the method use @method plot fact + @export.

*If you don't want to document it, use @s3method plot fact.

You shouldn't ever have @method and @s3method in the same block.


text:
Q: Basic Hosting Postgresql in Virtualbox + Ubuntu 14.04 I have configured Postgres to accept network connections from anywhere:
In pg_hga.conf:
host    all             all             0.0.0.0/0            md5

In postgresql.conf:
listen_addresses = '*'

I can see the server is listening:
vagrant@vagrant-ubuntu-trusty-64:~$ sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address     Foreign Address   State    PID/Program name
<snip>
tcp        0      0 0.0.0.0:5433      0.0.0.0:*         LISTEN   1570/postgres

I've configured iptables to allow incoming TCP connections to 5433:
vagrant@vagrant-ubuntu-trusty-64:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:5433

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

From an ssh session in the VM, I can run telnet 10.0.2.15 5433 and it works. I can also connect with the full psql client. From my host, if I run the same telnet command or the same psql command, I can't connect.
What can be wrong and what can I check?

A: The network adapter of your VM is by default in NAT mode. This means you can't ssh/telnet/etc to you VM from outside of it. Switch to Bridged in the VM settings and it should work.


text:
Q: Are the relations $\ln (e^{\widehat A}) = \widehat A$ and $e^{\ln \widehat A} = \widehat A$ true for operators? For the real numbers, $x\in \mathbb R$, we have the relations $$\ln (e^x) = x = e^{\ln x}.$$ Since operators aren't numbers, these equations don't necessarily hold for operators, that is, if we replace $x$ with an operator $\widehat A$. So my question is: Are these relations valid for operators? And why / why not?
My attempt to far:
As far as I know, operator functions used in quantum mechanics are defined as a power series expansion of that function, using the operator as the argument:
$$e^{\widehat B} \equiv \sum_{n=0}^\infty \frac{{\widehat B}^n}{n!}.$$
For  $\ln x$  I found different power series for different domains of $x$, for example the series
$$\ln x = \sum_{n=1}^\infty \frac{2}{2n-1} \left(\frac{x-1}{x+1}\right)^{2n-1},$$
which is valid for $x>0$ . But my attempt to use these power series (and I'm not even sure what it would mean for an operator to be greater than $0$, as required by this log series) goes nowhere useful:
\begin{align*} e^{\ln \widehat A} &= \sum_{n=0}^\infty \frac{(\ln\widehat A)^n}{n!}\\
&= \sum_{n=0}^\infty \frac{1}{n!}\left( \sum_{k=1}^\infty \frac{2}{2k-1} \left(\frac{\widehat A-1}{\widehat A+1}\right)^{2k-1} \right)^n \\
&\stackrel ?= \widehat A
\end{align*}
I can't see whether those power series reduce to just $\widehat A$ or not. Any help or clarification is greatly appreciated!

A: In QM most operators are Hermitean, and thus diagonalizable, $\hat A= U^\dagger D U$, for some unitary U and real diagonal D. So all your series expressions $f(\hat A)=0$ are essentially $U^\dagger f(D) U=0$, that is, a tower of the same relations for each diagonal component of D, each eigenvalue.
If it so happens that all eigenvalues of $\hat A$ are positive definite, your equation holds (if your respective expansion expression held for each one of them), otherwise you must be very careful with logarithms, a tall order: hardly realistic. (Exponentials, however, are normally fine, since they are
single-valued functions. It is the logarithms that are dangerous. See WP article linked.)
If you are sure $\hat A$ has no null eigenvectors, but have doubts about the sign of its real eigenvalues, consider $\hat {A} \hat A $ instead, whose eigenvalues are guaranteed to be positive definite.
To get a grip on your procedures, practice with, e.g. $\hat A = \sigma_1$, so $D=\sigma_3$, and $\hat A \hat A = 1\!\!1$. You readily see how your hyperbolic tangent expansion is aggressively ill-defined for $\hat A$ but fine, and trivial, for its square.

A: In general, the Taylor expansion does not work with operators for many reasons (especially problem with domains), unless the operator is (a) everywhere defined and (b) bounded.
In this case, $e^A$ can be safely defined via Taylor expansion, whereas $\ln A$ also requires $||A-I||< 1$ (exactly as for complex numbers and I am thinking here of the standard expansion of $\ln(1+y)$ for $|y| <1$, your series needs a more difficult analysis because it is not a power series and one cannot automatically extend the popular results from complex numbers to operators). The inversion formulas are valid accordingly.
In case $A: D(A) \to H$ is closed and normal ($D(A)$ is a dense subspace of $H$ and normal means $A^\dagger A = AA^\dagger$, and this is true in particular if $A$ is selfadjoint) then one can exploit the standard functional calculus based on the spectral theorem.
Under the said hypotheses, the spectral decomposition holds
$$A = \int_{\sigma(A)} z dP^{(A)}(z)$$
where $\sigma(A) \subset \mathbb{C}$ is the spectrum of $A$.
Here one can define
$$e^A := \int_{\sigma(A)} e^z dP^{(A)}(z)$$
and (paying attention to to the fact that $\ln$ is multivalued on $\mathbb{C}$, so that some precautions need if $\sigma(A)$ for instance includes the semiaxis $Re z <0$),
$$ \ln A := \int_{\sigma(A)} \ln z dP^{(A)}(z)\:.$$
Regarding domains, it turns out that
$$D(f(A)) = \left\{x \in H \:\left|\: \int_{\sigma(A)} |f(z)|^2 d\mu_{x,x}(z)\right.< +\infty\right\}$$
where the complex measure appearing in the right-hand side is defined as
$$\mu_{x,y}(E) = \langle x|P^{(A)}_E y\rangle$$
for every Borel set  $E \subset \mathbb{C}$.
It turns out that, if $D(A)=H$ and $||A|| <+\infty$, then the above definition coincides to the Taylor-expansion definition.
Since, when the written composition makes sense, it holds
$$\int_{\sigma(A)} f(g(z)) dP^{(A)}(z) = \int_{\sigma(A)} f(z) dP^{(g(A))}(z) $$
you can conclude that
$e^{\ln A}= A$ and $\ln e^A =A$
provided the relevant left-hand side is well defined, according to the discussion above.


text:
Q: Capture double click on Home button I have Samsung Galaxy S2 and here I can double click Home button to run an app (i.e. Voice Talks)
I wonder if it is possible to create an application (broadcast or activity with Intent Filters) which will capture double click on home button?

A: I am not sure if there is default functionality for capturing double click of home button, but you can try this

*

*Capture home button click

*Start a timer on first home button click for a fixed period (say 2 seconds)

*Wait for the time period, and listen for next home button click

*If second click is observed in given time period, do the double click functionality else stick to default functionality of home button


text:
Q: Classe que anteriormente já fez referência a um stackpane parece "perder" essa referência no futuro no JAVA Salve, programadores!
Peço ajuda com um código de JavaFX do Java:
- eu tenho a classe controladora onde estão declarados todos os elementos gráficos com vários @FXML, inclusive uma variável stackPane. Eu passo esse stackPane como referência para a classe GUIboard quando eu a instâncio, de modo que dentro dessa última terei um "link" pro stackPane.
- Ainda dentro da GUIBoard, certa hora que quero carregar uma posição de xadrez no tabuleiro (especificado na string FENatual), eu chamo o método "drawBoard" abaixo (que está dentro da GUIBoard.java):
public void drawBoard(String FENatual, StackPane stackPane2) {
      drawEmptyBoard(stackPane2);
      refreshBoardImage(stackPane2, boardModel.getBoardASCII());
  }

O lance é que: se eu não passar a referência do stackPane no método da drawBoard a partir da minha classe controladora, ele não encontra o stackPane da classe GUIBoard que eu relacionei quando eu instanciei o objeto "boardGUI" também dentro da classe controladora:
//Classe controladora:
public class ConstructChessBoard {
    private StackPane stackPane;

    public ConstructChessBoard() {
        boardGUI = new GUIboard(boardModel, stackPane);
    }

public class GUIboard {
    private StackPane stackPane;
    public GUIboard(BoardModel boardModel, StackPane stackPane) { //Método construtor da GUIBoard
        this.stackPane = stackPane;
    }

A mensagem de erro é:
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.layout.StackPane.getChildren()" because "stackPane" is null
    at groupId/groupId.artifactId.view.GUIboard.drawEmptyBoard(GUIboard.java:278)
    at groupId/groupId.artifactId.view.GUIboard.drawBoard(GUIboard.java:552)
    at groupId/groupId.artifactId.controller.ConstructChessBoard.lambda$0(ConstructChessBoard.java:278)
    at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
    at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
    at javafx.graphics/javafx.scene.Scene$KeyHandler.process(Scene.java:4098)
    at javafx.graphics/javafx.scene.Scene.processKeyEvent(Scene.java:2157)
    at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2625)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:248)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
    at javafx.graphics/com.sun.glass.ui.View.handleKeyEvent(View.java:547)
    at javafx.graphics/com.sun.glass.ui.View.notifyKey(View.java:971)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    at java.base/java.lang.Thread.run(Thread.java:832)

O erro da  se refere à:
public void drawEmptyBoard(StackPane stackPane) {
    gridPane = new GridPane();
    stackPane.getChildren().add(gridPane); //O Erro .....drawEmptyBoard(GUIboard.java:278) é gerado nessa linha
}

A: Seguindo a dica do Tiago Dinis chei o "erro"! : debugando e acompanhando a instanciação do objeto:
    public ConstructChessBoard() {
        boardGUI = new GUIboard(boardModel, stackPane); //É aqui que a classe
//Controller do FXML instância um objeto a partir do qual eu chamo o método
//drawBoard() que vai desenhar no meu stackPane
    }

verifiquei que quando a classe controller do FXML está executando seu método construtor ele ainda não tem de fato instâncias dos nodes/objetos que foram declarados no seu corpo (ou seja: apesar de eu ter declarado no corpo do ConstructChessBoard.java:
@FXML private StackPane stackPane;
ele só tem uma instância desse objeto DEPOIS de executar sua classe construtora.
Utilizando o método:
    public void initialize() {
        boardGUI = new GUIboard(boardModel, stackPane);
    }

dentro da classe ConstructChessBoard permite que eu salve a referência do meu stackPane dentro da classe GUIboard, pois quando executa o initialize() ele já tem os objetos "montados realmente".
Obrigado mais uma vez Tiago Dinis!


text:
Q: Python proper hierarchy of abstract classes I have the next code defined below.
This sample has a 2 architcet problems:

*

*Concrete class Post has a warning because doesn't implement (it's impossible) some abstract methods

*Abstract class are inheritor of concrete class.

I know a few solutions but they all are not perfect:

*

*Remove abstract classes at all.

*Remove intermediate LogicA (Post) class at all.

*Make multiple inheritance for final classes (may not help but apparently will reduce damage)

*Split this classes in a huge amount of small classes.

Why they all are not perfect:

*

*I need abstract classes because this methods as alias use another classes (dependency injection)

*Will force me to repeat a code in every final concrete class, violates DRY

*Multiple inheritance are evil

*Will easily increase number of classes X2, from 6 to ~(12-18

The common hierarchy is:
Base abstract class AbstractA with methods which has every FINAL subclass ->
Concrete class LogicA (inheritor of AbstractA class)  that partially implements methods which has a common logic and exactly the same code inside ->
Another abstract class FinalAbstractA (inheritor of LogicA) with some specific abstract methods only for this class ->
Another abstract class FinalAbstractB (inheritor of LogicA) with some specific abstract methods only for this class ->
Final concrete class FinalLogicA (inheritor of FinalAbstractA).
Final concrete class FinalLogicB (inheritor of FinalAbstractB).
In short:
AbstractA -> LogicA -> (FinalAbstractA -> FinalLogicA + FinalAbstractB -> FinalLogicB)

class AbstractPost(ABC):
    """Abstract Intermediate class with common methods for all inheritors"""
    @abstractmethod  # Method that has every final inheritor but not an intermediate
    def read(self):
        raise NotImplementedError

    @classmethod  # A common method for all subclasses
    def post_from_callback(cls, current_user: classes.users.User, callback: CallbackQuery) -> Post | None:
        raise NotImplementedError

class Post(AbstractPost):  # Warning on this line that not all abstract methods defined.
    """
    Implementation of intermediate class with common methods for all inheritors
    This class not supposing to has an instances, only type hint
    "read" function can't be implemented here because `post` instanse not defined in DB doesn't has.
    "read" function has a common signature but should be impleneted in concrete class because has different sql queries.
    """
    @classmethod
    def post_from_callback(cls, current_user: classes.users.User, callback: CallbackQuery) -> Post | None:
        post = cls.read(user=current_user, post_id=abs(int(callback.data.split()[-1])))
        if post is not None and post.validate(data=int(callback.data.split()[-2])):
            return post

class AbstractPublicPost(Post):
    """Abstract class with some methods which has only this class"""
    @abstractmethod
    def public_post_method_only(self):
        raise NotImplementedError

class PublicPost(AbstractPublicPost):
    """Implementation of abstract class with some  methods which has only this class"""
    def public_post_method_only(self):
        ...

class AbstractPersonalPost(Post):
    """Abstract class with some methods which has only this class"""
    @abstractmethod
    def personal_post_method_only(self):
        raise NotImplementedError

class PersonalPost(AbstractPersonalPost):
    """Implementation of abstract class with some  methods which has only this class"""
    def personal_post_method_only(self):
        ...

A: It looks like you are over complicating this.  Just because a class is a base class, does not mean you cannot implement a method, which is then inherited by other classes.
You could move post_from_callback from Post to AbstractPost with no issues and eliminate Post altogether.
class AbstractPost(ABC):
    """Abstract Intermediate class with common methods for all inheritors"""
    @abstractmethod
    def read(self):
        pass

    @classmethod
    def post_from_callback(cls, current_user: classes.users.User, callback: CallbackQuery):
        post = cls().read(user=current_user, post_id=abs(int(callback.data.split()[-1])))
        if post is not None and post.validate(data=int(callback.data.split()[-2])):
            return post

class AbstractPublicPost(AbstractPost):
    """Abstract subclass for public posts"""
    @abstractmethod
    def public_post_method_only(self):
        raise NotImplementedError

class PublicPost(AbstractPublicPost):
    def public_post_method_only(self):
        ...

class AbstractPersonalPost(AbstractPost):
    """Abstract subclass for personal posts."""
    @abstractmethod
    def personal_post_method_only(self):
        pass

class PersonalPost(AbstractPersonalPost):
    def personal_post_method_only(self):
        ...


text:
Q: Yosemite Finder Window: See Item count/selection and available size I've just upgraded to Yosemite (10.10.2) and would love to know if anyone can help me figure out how to make my finder window display a line at the bottom letting me know how many files i have in each given folder as well as remaining space left in my mac (like i used to have with version 10.9.5).
I know about the command+shift+i, but was wondering if there was this more fixed way of having that info always hanging out on my finder window!
Thanks in advance for your help,

A: To show this information in Yosemite, do the following:

*

*Open a Finder window

*Go to the View menu -> Show Status Bar

*Information should now appear at the bottom of the window.

Alternatively,  Cmd ⌘   /  will toggle it on/off.


text:
Q: QuickFix/n : Tag not defined in order I am trying to prepare a Quote request using quickFix/n but the tag order is automatically sorted by quickfix/n. Can anyone suggest how can I manually specify tag orders in my application?
Below is the message that is automatically sorted by quickfix/n:
8=FIX.4.2
9=207
35=R
34=20
49=XXXXXXXXXX
52=20140822-21:38:13.632
56=XXXXXXX
131=041053e4-45c2-4287-8662-dbe8193adf42
146=1
55=AUD/CHF
1=fixrfq
15=CHF
38=10000
6365=150
6366=RFQ_SINGLE_QUOTE_STREAM
6368=SPOT
10=237

Below is the actual message which I want to construct:
8=FIX.4.2
9=207
35=R
49=XXXXXX
56=XXXXXXXXS
34=20
52=20140822-21:38:13.632
131=041053e4-45c2-4287-8662-dbe8193adf42
146=1
55=AUD/CHF
38=10000
15=CHF
6368=SPOT
1=fixrfq
6365=150
6366=RFQ_SINGLE_QUOTE_STREAM
10=237

Is it possible to add fields to a message in a specific order?


text:
Q: MacOS notarization on command line returning 'unsupported url' when getting status The issue is when getting the notarization status after uploading a request
It's like this, I've got an older kernel extension, with the latest mac update notarizing it will be required and I'm trying to get this done in an automated way (command line).
First thing I wanted to do was see if I could get anything to upload and get any status back.
So after building the kext in xcode, I used ditto to create the archive that needs to be sent to apple:
cd <builddir> && ditto -c -k --keepParent "MyApp.kext" "MyApp.kext.zip"

Once that is done I upload it:
xcrun altool --notarize-app --primary-bundle-ip "com.myapp.." --username "user@example.com" --password "mypassword" -asc-provider "MyProvider" --file MyApp.kext.zip

This returns the request id that I need
So the above steps work, the next step is what's giving me issues, getting the status of the request, tried both the specific request as fetching them all
xcrun altool --notarization-info <id> -u "user@example.com" -p "mypassword" -asc-provider "MyProvider"

OR
xcrun altool --notarization-history 0 -u "user@example.com" -p "mypassword" -asc-provider "MyProvider"

The two commands both give me:
*** Error: Connection failed! Error Message - unsupported URL
*** Error: Apple Services operation failed. unsupported URL

On google I'm not having any luck on finding any error with "unsupported URL"
Does anyone have any experience with this?

A: I've seen this error before, I forget what exactly caused it, but it definitely would have been a mistake in the way I submitted the command. Unfortunately, altool does not appear to have been written with user-friendliness in mind and does not seem to do much in the way of command line validation.
With that in mind, taking a closer look at your command lines, I notice:

*

*It should be --asc-provider, not -asc-provider. Two hyphens, not one.

*The --notarization-info sub-command actually does not need the --asc-provider option as the UUID is unambiguous for identifying the notarisation transaction you're after.

Tips for anyone finding this answer after a web search for this error message:

*

*Compare xcrun altool --help with your actual command. Check number of hyphens, and make sure the command you're running requires or supports the arguments you are passing.

*Check that all strings (user name, provider, bundle IDs, password (I strongly recommend the keychain provider over providing the literal password on the command line!), etc.) are correctly escaped and surrounded by quotes for good measure.


text:
Q: Firebase Auth Fail I am making a simple chat application using Firebase. But it is not adding a new user with signinwithEmailandPassword function. My code is like this
createBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            String dname = displayName.getText().toString();
            String email_str = email.getText().toString();
            String pwd = password.getText().toString();

            register_user(dname,email_str,pwd);
        }
    });

private void register_user(String dname, String email, String password){
    mAuth.createUserWithEmailAndPassword(email, password)
            .addOnCompleteListener(RegisterActivity.this, new OnCompleteListener<AuthResult>() {
                @Override
                public void onComplete(@NonNull Task<AuthResult> task) {

                    Toast.makeText(RegisterActivity.this,"Inside function",Toast.LENGTH_SHORT).show();

                    if (task.isSuccessful()) {
                        Intent mainIntent = new Intent(RegisterActivity.this, MainActivity.class);
                        startActivity(mainIntent);
                        finish();
                    }
                    else{
                        Toast.makeText(RegisterActivity.this, "Authentication Failed",Toast.LENGTH_SHORT).show();
                    }
                }
            });
}


text:
Q: How many solutions has $x^\alpha =\ln x$? I have to determine the number of real solutions of $x^\alpha = \ln  x$ on varying of $\alpha > 0$.
How would you proceed?

A: For $\alpha>0$, you can see that $g(x)=x^\alpha-lnx$ is a continuous function in $(0,\infty)$. By taking a derivative you can see that the function has one minimum which is $\frac{1}{\alpha}(1+\ln(\alpha))$. Now if minimum is negative, it has two real root, if it is positive there is no root and for zero-minimum there is one root and it is the minimum point. $\alpha=\frac{1}{e}$ is the point below which there is two roots.

A: Here is a solution

$$\large {{\rm e}^{-{\frac {{W_k} ( -\alpha ) }{\alpha}}}}. $$

See here for related problem.

A: Some hints:
$$f(x):=x^\alpha-\log x\implies f'(x)=\alpha x^{\alpha-1}-\frac1x\ge0\iff\alpha x^\alpha\ge1\iff$$
$$\iff x\ge\frac1{\alpha^{1/\alpha}}\;\;\;\text{(we have}\;\;x,\alpha>0)$$
We thus see $\;f(x)\;$ is monotone descending for $\;x< \alpha^{-1/\alpha}\;$ and zero or ascending otherwise, thus
$$f\left(\alpha^{-1/\alpha}\right)=\frac1\alpha+\log\alpha$$
Observe though that
$$\lim_{x\to 0^+}f(x)=+\infty\;,\;\;\lim_{x\to\infty} f(x)=+\infty\;,\;\;\text{so:}$$
If the above value is positive there are zero solutions, if it is zero...etc.


text:
Q: Process start won' t work on ils release server Im trying to print a generated pdf on my web app in c# asp.net.
Im using iis.
I need to print the file on a specific printemps over our network. The fact is that in my dev server environnement, in debug, everything works well.
I use process.start(foxitreader exe, the file, and the printer)
But when i release the app, on the prod server ,no more printing. All i got is the process of the terminal and foxit reader showing in task manager, but that' it.
My question is : is there a way to print my file with This configuration ?
I tried to launch the powershell command directly in terminal, it worked on Both server.
I tried to launch a ..bat file directly that open the powershell script, it worked as well.
But from the app, i still can't figure how to make it work


text:
Q: How to activate jquery function when loading from external file? Jquery function is not working when i am loading content from external file.
Index.php

 Load Div

code.php
<input type="text" id="datepicker" value="">

When i am trying to load div from code.php datepicker jquery function is not working. But when i am trying to paste code to index.php itself it is working. Like
Working Code

<input type="text" id="datepicker" value="">

So please help me to correct this Error.

A: Try to call datepicker once the load is complete :
$("#sub_page").load('/function/code.php?con='+ con + "&id=" + id, function() {

    $('#datepicker').datetimepicker({
        yearOffset:0,
        lang:'en',
        timepicker:false,
        format:'d/m/Y',
        formatDate:'Y/m/d',
        minDate:'-2013/01/01', // yesterday is minimum date
        maxDate:'+2015/01/01' ,// and tommorow is maximum date calendar
        mask:'99/19/3939'
    });

});


text:
Q: Why postfix does MX lookup for relayhost? I have in the postfix conf:

relayhost = my.internal.relay.example.org

All the mails transit through this relay.
by default, postfix will try to do a MX lookup on my.internal.relay.example.org
Why ?
It's not the purpose of MX record. I just  want to send through this host, not to the domain.
I know how to fix it (with [] or postfix config).
postfix manuals says how to change the behaviour but not the reason.

A: For SMTP servers delivering mail to MX records comes very naturally.
By also supporting a MX record in the relayhost setting you also automatically get the native fall-over, load balancing and redundancy that MX records can provide.
Supporting only a single ip-address or hostname is all fine and dandy when you only have a single relay machine.
When you want to prevent a single point of failure setting up two or more machines using MX records is fairly trivial way to achieve redundancy and HA, compared to setting up a cluster with either fail-over and/or a load balancer on that relayhost ip-address/hostname. Using MX records is probably also easier than adding a failover support in Postfix with for instance a optional setting for a backup_relayhost.


text:
Q: Is using top a robust way of measuring system CPU usage? I got confused while reading this question on stack overflow. The asker says:

"'top' will simply not do, as there is a delay between cpu dumps, it requires 2 dumps and several seconds, which hangs my program".

What the asker is talking about? I've always assumed that top does exactly the same thing that the accepted answer recommends. And his claim that top "hangs his program" doesn't make any sense to me, but no one called him out on it in the comments.
Typically I need to get overall CPU utilization for a large group of processes running on a single machine. Usually I just run top with a fairly long sampling rate (usually 10 seconds) while running my processes under a worst case load and determine an average load estimate. Is getting a measurement this way totally wrong?
Note: While getting my measurements I also ensure that no other unnecessary services or user space processes are running.

A: The poster of that comment is probably referring to this:

Description of problem: When I use a particular option to the 'top'
  command, specifically, -b -n1, I do not get the proper output.
When running top in regular mode, it keeps updating and the values on
  the Cpu(s) line changes with each update. However, when running top
  with the -bn1 switches (batch mode, 1 iteration), the Cpu(s) line does
  not change from run to run over seconds, minutes or even hours.

The 1st iteration of top -b returns the percentages since boot, we therefore need at least two iterations (-n 2) to get the current percentage. So, as long as you run top once before using it to gather your data you will be fine.


text:
Q: Match all instances of a certain character inside every word preceded by a certain word and not delimited by a space Given a string such as below:
word.hi. bla. word.
I want to construct a regex which will match all "."s preceded by "word" and any other non space character
So, in the above example I would want the the first, second and last dots to be matched.
While matching the first and last dots would be easy with global flag (/(?:word.*)\K./gU), I'm not sure how to construct a regex that would also match the second dot.
Appreciate any pointers.

A: You might match word and then get all consecutive matches using the \G anchor excluding matching whitespace chars or a dot.
(?:\bword|\G(?!\A))[^.\s]*\K\.

In parts

*

*(?: Non capture group

*

*\bword Match word preceded by a word boundary

*| Or

*\G(?!\A) Assert the position at the end of the previous match, not at the start

*) Close non capture group

*[^.\s]* Match 0+ occurrences of any char except . or a whitespace char

*\K Clear the match buffer (forget what is matched until now)

*\. Match a dot

Regex demo


text:
Q: What is the probability distribution of linear formula? What is the distribution name when probability values have a linear increasing of the form:
$p(i)= \frac{2}{N(N+1)}i;  0 \leq i \leq N $

A: It is a valid distribution if $i$ is integer, otherwise it isn't as @Alexis points out. When integer, if we sum over all possibilities, we get $1$:
$$\sum_{i=1}^N{\frac{2}{N(N+1)}}i=\frac{2}{N(N+1)}\sum_{i=1}^N{}i=\frac{2}{N(N+1)}\frac{N(N+1)}{2}=1$$
Wikipedia entry for List of Probability Distributions doesn't associate this with a special name, however it is being used in some sources as Discrete Triangular Distribution, although the name has also been used to describe the probability distribution of two dice, in which the distribution is symmetric around a mean. As continuous case refers generally to asymmetric version of the triangle shape (which also includes $b=c$, i.e. right triangle), the discrete version can also do this, which makes the name valid practically.

A: I think you intend this to be a discrete distribution.
If $N=5$ you have $P(X = i) = \frac{2i}{30} = \frac{i}{15}.$ Notice that, whatever $N$ you choose, $P(X = 0) = 0.$
You need to check that the probabilities add to $1:$ that is, $\sum_{i=0}^{5} P(X = i) = 1.$
For that, you might want to look at this Wikipedia page.
Here is a plot of the PDF (or PMF) of this distribution.


text:
Q: Using GitHub GraphQL API programmatically, getting a Bad Request with RestTemplate.execute, but works ok on Postman I'm trying to consume GitHub's v4 API using GraphQL from within a Spring Boot application (namely, my app is a server that is trying to consume the API on a Service as part of resolving a GET request on one of the app's controllers).
I tried the following test POST request on Postman, getting the data I was expecting successfully:
POST /graphql HTTP/1.1
Host: api.github.com
Content-Type: application/json
Authorization: Bearer [MY PERSONAL GITHUB TOKEN]
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 55f54f00-83f6-4acb-a6f8-4a3bde9147e7,abb6f600-8b79-4697-bd31-e04836386a24
Host: api.github.com
Accept-Encoding: gzip, deflate
Content-Length: 264
Connection: keep-alive
cache-control: no-cache

query{repository(owner:"ccjmk", name:"super-happiness"){object(expression:"master"){... on Commit{history{totalCount}}}}}

Response:
{"data":{"repository":{"object":{"history":{"totalCount":19}}}}}

(I don't see any notable headers but I could add anything that might be valuable)
Then, on the Java end, I tried this in the service: (I also tried hitting the v3 API successfully, adding the method used on the service too for reference)
    @Override
    public String fetchCommitsv3(String ownerUsername, String repository) {

        final String uri = String.format("https://api.github.com/repos/%s/%s/commits", ownerUsername, repository);

        RestTemplate restTemplate = new RestTemplate();
        String result = restTemplate.getForObject(uri, String.class);
        return result;
    }

    @Override
    public ResponseEntity<String> fetchCommitsv4(String ownerUsername, String repository) {

        final String uri = String.format("https://api.github.com/graphql");
        String query = "query{repository(owner:\""+ownerUsername+"\", name:\""+repository+"\"){object(expression:\"master\"){... on Commit{history{totalCount}}}}}";

        String gitHubToken = [MY GITHUB TOKEN];

        RestTemplate restTemplate = new RestTemplate();
        restTemplate.setRequestFactory(new HttpComponentsAsyncClientHttpRequestFactory());
        HttpHeaders headers = new HttpHeaders();
        //headers.add("Authorization", "Bearer "+gitHubToken);
        headers.set("Authorization","Bearer "+gitHubToken);
        headers.setContentType(MediaType.APPLICATION_JSON);
        HttpEntity<String> entity = new HttpEntity<>(query, headers);

        ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.POST, entity, String.class);
        return result;
    }

That's triggering a 400 Bad Request reponse, at the end the full post. To me, both requests look the same, but they are surely different, only I can't pin-point where! Any help would be much appreciated, because I'm sure

SpringBoot Log:
2020-01-07 16:48:24.419 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/tdd/insights/github/v4/commits/ccjmk/super-happiness]
2020-01-07 16:48:24.432 DEBUG 21236 --- [nio-8088-exec-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /tdd/insights/github/v4/commits/ccjmk/super-happiness
2020-01-07 16:48:24.450 DEBUG 21236 --- [nio-8088-exec-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.http.ResponseEntity com.penguin.formula.tdd.web.controller.InsightsController.commitsv4(java.lang.String,java.lang.String) throws java.lang.Exception]
2020-01-07 16:48:24.451 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/tdd/insights/github/v4/commits/ccjmk/super-happiness] is: -1
2020-01-07 16:51:35.166 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.client.RestTemplate              : Created POST request for "https://api.github.com/graphql"
2020-01-07 16:51:35.169 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.client.RestTemplate              : Setting request Accept header to [text/plain, application/json, application/*+json, */*]
2020-01-07 16:51:35.182 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.client.RestTemplate              : Writing [query{repository(owner:"ccjmk", name:"super-happiness"){object(expression:"master"){... on Commit{history{totalCount}}}}}] as "application/json" using [org.springframework.http.converter.StringHttpMessageConverter@7dcd6967]
2020-01-07 16:51:35.404 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.client.protocol.RequestAddCookies  : CookieSpec selected: default
2020-01-07 16:51:35.607 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.client.protocol.RequestAuthCache   : Auth cache not set in the context
2020-01-07 16:51:35.644 DEBUG 21236 --- [nio-8088-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {s}->https://api.github.com:443][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
2020-01-07 16:51:35.861 DEBUG 21236 --- [nio-8088-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 0][route: {s}->https://api.github.com:443][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 10]
2020-01-07 16:51:35.889 DEBUG 21236 --- [nio-8088-exec-1] o.a.http.impl.execchain.MainClientExec   : Opening connection {s}->https://api.github.com:443
2020-01-07 16:51:35.928 DEBUG 21236 --- [nio-8088-exec-1] .i.c.DefaultHttpClientConnectionOperator : Connecting to api.github.com/140.82.118.5:443
2020-01-07 16:51:35.930 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Connecting socket to api.github.com/140.82.118.5:443 with timeout 0
2020-01-07 16:51:35.983 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
2020-01-07 16:51:35.988 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
2020-01-07 16:51:35.993 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Starting handshake
2020-01-07 16:51:36.648 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Secure session established
2020-01-07 16:51:36.651 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  negotiated protocol: TLSv1.2
2020-01-07 16:51:36.654 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
2020-01-07 16:51:36.658 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  peer principal: CN=*.github.com, O="GitHub, Inc.", L=San Francisco, ST=California, C=US
2020-01-07 16:51:36.661 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  peer alternative names: [*.github.com, github.com]
2020-01-07 16:51:36.665 DEBUG 21236 --- [nio-8088-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  issuer principal: CN=DigiCert SHA2 High Assurance Server CA, OU=www.digicert.com, O=DigiCert Inc, C=US
2020-01-07 16:51:36.700 DEBUG 21236 --- [nio-8088-exec-1] .i.c.DefaultHttpClientConnectionOperator : Connection established 192.168.1.98:48784<->140.82.118.5:443
2020-01-07 16:51:36.702 DEBUG 21236 --- [nio-8088-exec-1] o.a.http.impl.execchain.MainClientExec   : Executing request POST /graphql HTTP/1.1
2020-01-07 16:51:36.705 DEBUG 21236 --- [nio-8088-exec-1] o.a.http.impl.execchain.MainClientExec   : Proxy auth state: UNCHALLENGED
2020-01-07 16:51:36.743 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> POST /graphql HTTP/1.1
2020-01-07 16:51:36.745 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Accept: text/plain, application/json, application/*+json, */*
2020-01-07 16:51:36.747 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Authorization: Bearer {{MY PERSONAL TOKEN}}
2020-01-07 16:51:36.748 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Content-Type: application/json
2020-01-07 16:51:36.752 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Accept-Charset: big5, big5-hkscs, cesu-8, euc-jp, euc-kr, gb18030, gb2312, gbk, ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145, ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277, ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500, ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864, ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp, iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9, jis_x0201, jis_x0212-1990, koi8-r, koi8-u, shift_jis, tis-620, us-ascii, utf-16, utf-16be, utf-16le, utf-32, utf-32be, utf-32le, utf-8, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, windows-31j, x-big5-hkscs-2001, x-big5-solaris, x-compound_text, x-euc-jp-linux, x-euc-tw, x-eucjp-open, x-ibm1006, x-ibm1025, x-ibm1046, x-ibm1097, x-ibm1098, x-ibm1112, x-ibm1122, x-ibm1123, x-ibm1124, x-ibm1166, x-ibm1364, x-ibm1381, x-ibm1383, x-ibm300, x-ibm33722, x-ibm737, x-ibm833, x-ibm834, x-ibm856, x-ibm874, x-ibm875, x-ibm921, x-ibm922, x-ibm930, x-ibm933, x-ibm935, x-ibm937, x-ibm939, x-ibm942, x-ibm942c, x-ibm943, x-ibm943c, x-ibm948, x-ibm949, x-ibm949c, x-ibm950, x-ibm964, x-ibm970, x-iscii91, x-iso-2022-cn-cns, x-iso-2022-cn-gb, x-iso-8859-11, x-jis0208, x-jisautodetect, x-johab, x-macarabic, x-maccentraleurope, x-maccroatian, x-maccyrillic, x-macdingbat, x-macgreek, x-machebrew, x-maciceland, x-macroman, x-macromania, x-macsymbol, x-macthai, x-macturkish, x-macukraine, x-ms932_0213, x-ms950-hkscs, x-ms950-hkscs-xp, x-mswin-936, x-pck, x-sjis_0213, x-utf-16le-bom, x-utf-32be-bom, x-utf-32le-bom, x-windows-50220, x-windows-50221, x-windows-874, x-windows-949, x-windows-950, x-windows-iso2022jp
2020-01-07 16:51:36.755 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Content-Length: 121
2020-01-07 16:51:36.757 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Host: api.github.com
2020-01-07 16:51:36.759 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Connection: Keep-Alive
2020-01-07 16:51:36.760 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_232)
2020-01-07 16:51:36.762 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 >> Accept-Encoding: gzip,deflate
2020-01-07 16:51:36.770 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "POST /graphql HTTP/1.1[\r][\n]"
2020-01-07 16:51:36.773 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]"
2020-01-07 16:51:36.774 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Authorization: Bearer {{MY PERSONAL TOKEN}}[\r][\n]"
2020-01-07 16:51:36.776 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Content-Type: application/json[\r][\n]"
2020-01-07 16:51:36.781 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Accept-Charset: big5, big5-hkscs, cesu-8, euc-jp, euc-kr, gb18030, gb2312, gbk, ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145, ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277, ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500, ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864, ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp, iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9, jis_x0201, jis_x0212-1990, koi8-r, koi8-u, shift_jis, tis-620, us-ascii, utf-16, utf-16be, utf-16le, utf-32, utf-32be, utf-32le, utf-8, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, windows-31j, x-big5-hkscs-2001, x-big5-solaris, x-compound_text, x-euc-jp-linux, x-euc-tw, x-eucjp-open, x-ibm1006, x-ibm1025, x-ibm1046, x-ibm1097, x-ibm1098, x-ibm1112, x-ibm1122, x-ibm1123, x-ibm1124, x-ibm1166, x-ibm1364, x-ibm1381, x-ibm1383, x-ibm300, x-ibm33722, x-ibm737, x-ibm833, x-ibm834, x-ibm856, x-ibm874, x-ibm875, x-ibm921, x-ibm922, x-ibm930, x-ibm933, x-ibm935, x-ibm937, x-ibm939, x-ibm942, x-ibm942c, x-ibm943, x-ibm943c, x-ibm948, x-ibm949, x-ibm949c, x-ibm950, x-ibm964, x-ibm970, x-iscii91, x-iso-2022-cn-cns, x-iso-2022-cn-gb, x-iso-8859-11, x-jis0208, x-jisautodetect, x-johab, x-macarabic, x-maccentraleurope, x-maccroatian, x-maccyrillic, x-macdingbat, x-macgreek, x-machebrew, x-maciceland, x-macroman, x-macromania, x-macsymbol, x-macthai, x-macturkish, x-macukraine, x-ms932_0213, x-ms950-hkscs, x-ms950-hkscs-xp, x-mswin-936, x-pck, x-sjis_0213, x-utf-16le-bom, x-utf-32be-bom, x-utf-32le-bom, x-windows-50220, x-windows-50221, x-windows-874, x-windows-949, x-windows-950, x-windows-iso2022jp[\r][\n]"
2020-01-07 16:51:36.783 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Content-Length: 121[\r][\n]"
2020-01-07 16:51:36.785 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Host: api.github.com[\r][\n]"
2020-01-07 16:51:36.787 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2020-01-07 16:51:36.789 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_232)[\r][\n]"
2020-01-07 16:51:36.791 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2020-01-07 16:51:36.793 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "[\r][\n]"
2020-01-07 16:51:36.795 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 >> "query{repository(owner:"ccjmk", name:"super-happiness"){object(expression:"master"){... on Commit{history{totalCount}}}}}"
2020-01-07 16:51:37.070 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "HTTP/1.1 400 Bad Request[\r][\n]"
2020-01-07 16:51:37.077 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Date: Tue, 07 Jan 2020 16:51:36 GMT[\r][\n]"
2020-01-07 16:51:37.083 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Content-Type: application/json; charset=utf-8[\r][\n]"
2020-01-07 16:51:37.087 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Content-Length: 89[\r][\n]"
2020-01-07 16:51:37.091 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Server: GitHub.com[\r][\n]"
2020-01-07 16:51:37.094 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Status: 400 Bad Request[\r][\n]"
2020-01-07 16:51:37.097 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Cache-Control: no-cache[\r][\n]"
2020-01-07 16:51:37.099 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-OAuth-Scopes: read:enterprise, read:org, read:packages, read:repo_hook, read:user, repo[\r][\n]"
2020-01-07 16:51:37.101 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-Accepted-OAuth-Scopes: repo[\r][\n]"
2020-01-07 16:51:37.103 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-GitHub-Media-Type: unknown, github.v4[\r][\n]"
2020-01-07 16:51:37.105 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-RateLimit-Limit: 5000[\r][\n]"
2020-01-07 16:51:37.107 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-RateLimit-Remaining: 5000[\r][\n]"
2020-01-07 16:51:37.109 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-RateLimit-Reset: 1578419496[\r][\n]"
2020-01-07 16:51:37.112 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type[\r][\n]"
2020-01-07 16:51:37.114 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Access-Control-Allow-Origin: *[\r][\n]"
2020-01-07 16:51:37.116 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Strict-Transport-Security: max-age=31536000; includeSubdomains; preload[\r][\n]"
2020-01-07 16:51:37.118 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-Frame-Options: deny[\r][\n]"
2020-01-07 16:51:37.119 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
2020-01-07 16:51:37.121 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
2020-01-07 16:51:37.123 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin[\r][\n]"
2020-01-07 16:51:37.125 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "Content-Security-Policy: default-src 'none'[\r][\n]"
2020-01-07 16:51:37.127 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "X-GitHub-Request-Id: BE90:B6DD:27E5493C:2F86CC08:5E14B718[\r][\n]"
2020-01-07 16:51:37.129 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2020-01-07 16:51:37.131 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.wire                     : http-outgoing-0 << "{"message":"Problems parsing JSON","documentation_url":"https://developer.github.com/v4"}"
2020-01-07 16:51:37.175 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << HTTP/1.1 400 Bad Request
2020-01-07 16:51:37.177 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Date: Tue, 07 Jan 2020 16:51:36 GMT
2020-01-07 16:51:37.178 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Content-Type: application/json; charset=utf-8
2020-01-07 16:51:37.180 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Content-Length: 89
2020-01-07 16:51:37.182 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Server: GitHub.com
2020-01-07 16:51:37.184 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Status: 400 Bad Request
2020-01-07 16:51:37.185 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Cache-Control: no-cache
2020-01-07 16:51:37.187 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-OAuth-Scopes: read:enterprise, read:org, read:packages, read:repo_hook, read:user, repo
2020-01-07 16:51:37.189 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-Accepted-OAuth-Scopes: repo
2020-01-07 16:51:37.191 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-GitHub-Media-Type: unknown, github.v4
2020-01-07 16:51:37.192 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-RateLimit-Limit: 5000
2020-01-07 16:51:37.194 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-RateLimit-Remaining: 5000
2020-01-07 16:51:37.195 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-RateLimit-Reset: 1578419496
2020-01-07 16:51:37.197 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type
2020-01-07 16:51:37.199 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Access-Control-Allow-Origin: *
2020-01-07 16:51:37.200 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2020-01-07 16:51:37.202 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-Frame-Options: deny
2020-01-07 16:51:37.204 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-Content-Type-Options: nosniff
2020-01-07 16:51:37.206 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-XSS-Protection: 1; mode=block
2020-01-07 16:51:37.207 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2020-01-07 16:51:37.209 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << Content-Security-Policy: default-src 'none'
2020-01-07 16:51:37.210 DEBUG 21236 --- [nio-8088-exec-1] org.apache.http.headers                  : http-outgoing-0 << X-GitHub-Request-Id: BE90:B6DD:27E5493C:2F86CC08:5E14B718
2020-01-07 16:51:37.288 DEBUG 21236 --- [nio-8088-exec-1] o.a.http.impl.execchain.MainClientExec   : Connection can be kept alive indefinitely
2020-01-07 16:51:37.336 DEBUG 21236 --- [nio-8088-exec-1] o.s.web.client.RestTemplate              : POST request for "https://api.github.com/graphql" resulted in 400 (Bad Request); invoking error handler
2020-01-07 16:51:37.375 DEBUG 21236 --- [nio-8088-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection [id: 0][route: {s}->https://api.github.com:443] can be kept alive indefinitely
2020-01-07 16:51:37.377 DEBUG 21236 --- [nio-8088-exec-1] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-0: set socket timeout to 0
2020-01-07 16:51:37.380 DEBUG 21236 --- [nio-8088-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 0][route: {s}->https://api.github.com:443][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 10]

A: So, thanks to Wim Deblauwe hinting that Content-Lenghts were off on the JSON request, I noticed the following:
I was using the GraphQL body mode on Postman, which (unbeknownst to me, you gotta read the documentation kids!) actually JSONifies the body before sending it.
Sending this (the GraphQL raw body) as a JSON:
query{repository(owner:"ccjmk", name:"super-happiness"){object(expression:"master"){... on Commit{history{totalCount}}}}}

Returns 400 Bad Request:
{
    "message": "Problems parsing JSON",
    "documentation_url": "https://developer.github.com/v4"
}

...where instead, if you send it send it as a JSON-encoded body as the documentation calls for:
{"query":"query{repository(owner:\"ccjmk\", name:\"super-happiness\"){object(expression:\"master\"){... on Commit{history{totalCount}}}}}"}

It replies the expected 200 OK and JSON data:
{
    "data": {
        "repository": {
            "object": {
                "history": {
                    "totalCount": 19
                }
            }
        }
    }
}