Gödel's incompleteness theorem proof: What exactly are our assumptions?

Question: I'm a middle school student that is missing some parts to understand Gödel's incompleteness theorem.
We have a statement "a" such that "a" says that "statement b cannot be proved from the axioms." Now it is time for assuming that the statement is false to reach the contradiction. My question is: which statement are we assuming false, is it "a" or "b"? or is "a" the same as "b"? and how to complete the proof from this point? Can you apply these steps to the statement "x=y" as an example?
Sorry for the naive question but I haven't studied set theory or logic yet and I want to understand this theorem.
Comment: [Veritasium](https://youtu.be/HeQX2HjkcNo) recently came out with a video that as far as I can tell explained the basic intuition pretty well.
Comment: I strongly endorse Veritasium's video.
Comment: If you read through the puzzle "machines that talk about themselves" starting on page 193 of [this book](http://www.logic-books.info/sites/default/files/lady-or-the-tiger-and-other-logic-puzzles.pdf)  and its solution on page 201, you'll find a non-technical argument that captures the essence of Godel's proof.
Comment: Here's my two-penn'orth on this: you **can't** understand the incompleteness theorem without understanding some elementary mathematical logic. The sense in which one statement can refer to another or to itself is uselessly vague until you understand enough mathematical logic to see how syntax can be encoded in arithmetic and understand what that means. I find popularisations like those of Smullyan amusing but unhelpful.
Comment: I watched it and also watched Numberphile's video but the language is unclear between the two choices. Anyways thanks for your help.
Answer: I strongly recommend this expository article by Rosser. It's what I learned from initially.

In fact, what we need is a "somewhat self-referential" sentence. Specifically, working in an "appropriate" axiom system $T$ (let's ignore the details here for the moment), we want a sentence $\varphi$ with the following property:

$(*)\quad$ $T$ proves "$\varphi$ iff [$\varphi$ is not $T$-provable]."

That is, in a sense $\varphi$ says "I am $T$-unprovable." So we're not just considering some random sentence, or some $a$ and $b$ which are unrelated to each other.
In the interest of completeness (hehe), let me say that - for the purposes of this answer - "$T$ is appropriate" means something along the lines of "$T$ is reasonably simple, sufficiently strong, and doesn't prove anything false." (Actually it turns out that if we look at "For every $T$-proof of $\varphi$ there is a shorter $T$-disproof of $\varphi$" we can weaken our hypotheses on $T$ - this was observed by Rosser after Godel's original argument - but I think this isn't worth focusing on at first.)

Now let me say a little bit about how we use $(*)$, which I hope will demystify things a little bit.
If we can find such a $\varphi$, then we can argue roughly as follows:

If $T$ proves $\varphi$ then $T$ can verify its own prove of $\varphi$ and so prove "$T$ does prove $\varphi$" - combining this with $(*)$ above, we get a contradiction in $T$. On the other hand, if $T$ disproves $\varphi$ then - via $(*)$ again - we get that $T$ proves "$T$ proves $\varphi$," and so $T$ is incorrect since it doesn't prove $\varphi$ (well if it does, it's inconsistent, hence obviously incorrect) but thinks that it does. So - under the assumption that $T$ is "appropriate," whatever that means - $T$ can neither prove nor disprove $\varphi$.

There are of course several subtleties here, going all the way back to $(*)$ itself. The big ones in my opinion are:

Why can $T$ talk about $T$-provability?

Even given $T$'s ability to talk about $T$-provability, why should a sentence with property $(*)$ exist? That is, why is self-reference possible?

Each of these is nontrivial (to put it mildly); interestingly, while the second bulletpoint is in my opinion far more mysterious, it's also significantly easier to prove (it's an instance of the diagonal lemma, the proof of which is extremely short if very slippery).


Invariant knot for finite group actions on $S^3$

Question: Inspired by the Smith conjecture, is there a finite group action on $S^3$ (by smooth or analytic diffeomorphisms) which possesses an invariant knotted circle?
Comment: Certainly. To get a simple example, take any toric knot, i.e. something given by equation $z_1^p=z_2^q$ in the unit sphere $|z_1|^2+|z_2|^2=1$. For any such knot there is a (linear) circle action on $S^3$ that preserves the knot, and you can take any finite subgroup of this circle.
Comment: Since  invariant knot include knot Group, Other conventions consider knots to be embedded in the 3-sphere, in which case the knot group is the fundamental group of its complement in $S^3$
Comment: Probably you want a nontrivial action, and then the question reduces to faithful actions of cyclic groups of prime order. Any knot in Euclidean $\mathbf{R}^3$ or in the round sphere, with nontrivial isometry group, yields an example. For example, the usual representation of the trefoil knot has a isometry group of order $6$.
Comment: Turning your question around a little, you are indirectly asking about the symmetry groups of knots in $S^3$.  These are readily computed, by the techniques of Sakuma as mentioned.  But you can also compute them for hyperbolic knots fairly rapidly with SnapPea. This was originally done by Jeff Weeks, at essentially the same time as Sakuma.   I believe Sakuma's table of symmetry groups for "small" knots is in the back of Kawauchi's reference book on knot theory. A nice feature of the Snappea approach is you can algorithmically describe the fixed point sets.
Answer: I think the comments answered the question, but it seems like some pictures would be helpful as well. There are many examples, but one of my favorites is this paper by Sakuma which concludes with a table of knots preserved by orientation-preserving involutions on $S^3$ which reverse the orientation on $K$.
I also want to point out that in general studying prime order group actions is not sufficient. For example, you may ask if the figure eight knot $4_1$ is preserved by a symmetry which reverses the orientation on $S^3$, but preserves the orientation on $4_1$. This is the case, but the symmetry has order 4 (and there is no such order 2 symmetry). Visually, this can be seen in the following image as a $\pi/2$ rotation within the plane of the diagram followed by a reflection across an $S^2$ intersecting the diagram in the shown dotted green circle.
Comment: Fair enough - edited to include a better diagram.
Comment: +1, but i suggest you to use inkscape for drawings. I discovered it this year and changed my drawing quality (in my thesis I had very poor graphics XD)


Does switching the keyboard language (literally) works?

Question: I've used US format keyboard along all my life, a couple days ago I bought a Macbook Pro 13' mid 2012 in in Mexico it was way more cheaper and with no issues at all with the computer, but I'm not used to that keyboard keys, I wanted to know if it's possible to swap the keyboard language not just on software but in hardware as well.
Comment: Welcome to Ask Different.  Your question is confusing.  Do you mean you want to change each individual key?
Comment: If you change the keybord language with finder, it should be for every program you use afterward. Then you can switch the letter on your keyboard if you want to...
Answer: If you want to replace your existing hardware keyboard, you need to contact an Apple store or other service operation directly yourself and ask whether that is possible and what the cost would be.  Whether the right parts are available somewhere for a 7-year old machine is hard to know.
An easier solution would be to try using a "skin" over the existing keys or otherwise mark them to meet your needs.
Answer: There are stickers to change the language. Here one example I could quickly find: https://keyshorts.com/products/us-english-bilingual-keyboard-sticker - the site also has stickers to completely change the whole keys.
Be aware that you need to have the correct enter key.


Public-facing SharePoint 2007 portal - authentication question

Question: I am involved in developing a portal with a public-facing side. For this i created a web application with windows authentication for intranet zone and after that, I created an extension for an internet zone with fba. In the internet extension we have the following requirement:
- able to acess to sharepoint backoffice using fba.
- have a authentication mecanism for portal visitors, where they can authenticate and acess to a page where they can subscribe the newsletter and define some site appearance (this users can't acess to sharepoint backoffice).
My idea is use the aspnet membership provider to authenticate both users and create diferente roles for them. Anyone suggests another approach? Is there any way to ensure that visitors (2 case) do not enter the backoffice portal?
Thanks
Answer: Yes you should be able to achieve what you want through permissions and FBA. You can great a couple of security groups, one for guest visitors, one for 'backoffice' visitors.
Assign the guests group permission to see the public section of the site, and the backoffice visitors can get permission to see the backoffice section.


Galaxy s5 stuck in reboot loop after root

Question: Today I tried to root my galaxy s5 with Kingo Root for android. My phone restarted during the rooting process, but it keeps looping over and over. I have tried resetting the cache and even factory resetting it (by booting it up in recovery mode), but after the reset the same reboot logo appears. Any help at this point would be great.
Answer: Your device is bricked, this means that unless you have a custom recovery installed then you cannot access your device. If your phone is still under warranty, then you may be able to get it fixed for a low cost, as this is a quick fix with the right equipment.
If you want to attempt the fix yourself, here are some articles:
MakeUseOf
XDA


Cast Double to Integer in Java

Question: Any way to cast java.lang.Double to java.lang.Integer?
It throws an exception

"java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"
Answer: You need to explicitly get the int value using method intValue() like this:
Double d = 5.25;
Integer i = d.intValue(); // i becomes 5

Or
double d = 5.25;
int i = (int) d;

Answer: A Double is not an Integer, so the cast won't work.  Note the difference between the Double class and the double primitive.  Also note that a Double is a Number, so it has the method intValue, which you can use to get the value as a primitive int.
Comment: just call `intValue()` then.
Comment: Note that this merely returns the integer part of the Double, so for 13.666667 or even 13.9, you'll get 13, not 14. If you want the _nearest_ integer, refer to my answer: http://stackoverflow.com/a/24816336/1450294
Comment: Don't forget to handle nulls.
Comment: Ok not to cast. I need to get Integer object from Double, not 13.22222 but 13, for example.
Comment: if you look at the implementation of `intValue()`, it just casts the `double` to an `int`.
Comment: Thank you! This worked for me: `int sum = listOfDoubles().stream().mapToInt(Double::intValue).sum()`;
Comment: `int anInt = aDoubleObj.intValue()`
Answer: I think it's impossible to understand the other answers without covering the pitfalls and reasoning behind it.
You cannot directly cast an Integer to a Double object. Also Double and Integer are immutable objects, so you cannot modify them in any way.
Each numeric class has a primitive alternative (Double vs double, Integer vs int, ...). Note that these primitives start with a lowercase character (e.g. int). That tells us that they aren't classes/objects. Which also means that they don't have methods. By contrast, the classes (e.g. Integer) act like boxes/wrappers around these primitives, which makes it possible to use them like objects.
Strategy:
To convert a Double to an Integer you would need to follow this strategy:

Convert the Double object to a primitive double. (= "unboxing")
Convert the primitive double to a primitive int. (= "casting")
Convert the primitive int back to an Integer object. (= "boxing")

In code:
// starting point
Double myDouble = Double.valueOf(10.0);

// step 1: unboxing
double dbl = myDouble.doubleValue();

// step 2: casting
int intgr = (int) dbl;

// step 3: boxing
Integer val = Integer.valueOf(intgr);

Actually there is a shortcut. You can unbox immediately from a Double straight to a primitive int. That way, you can skip step 2 entirely.
Double myDouble = Double.valueOf(10.0);
Integer val = Integer.valueOf(myDouble.intValue()); // the simple way

Pitfalls:
However, there are a lot of things that are not covered in the code above.
The code-above is not null-safe.
Double myDouble = null;
Integer val = Integer.valueOf(myDouble.intValue()); // will throw a NullPointerException

// a null-safe solution:
Integer val = (myDouble == null)? null : Integer.valueOf(myDouble.intValue());

Now it works fine for most values. However integers have a very small range (min/max value) compared to a Double. On top of that, doubles can also hold "special values", that integers cannot:

1/0 = +infinity
-1/0 = -infinity
0/0 = undefined (NaN)

So, depending on the application, you may want to add some filtering to avoid nasty Exceptions.
Then, the next shortcoming is the rounding strategy. By default Java will always round down. Rounding down makes perfect sense in all programming languages. Basically Java is just throwing away some of the bytes. In financial applications you will surely want to use half-up rounding (e.g.:  round(0.5) = 1 and round(0.4) = 0).
// null-safe and with better rounding
long rounded = (myDouble == null)? 0L: Math.round(myDouble.doubleValue());
Integer val = Integer.valueOf(rounded);

Auto-(un)boxing
You could be tempted to use auto-(un)boxing in this, but I wouldn't. If you're already stuck now, then the next examples will not be that obvious neither. If you don't understand the inner workings of auto-(un)boxing then please don't use it.
Integer val1 = 10; // works
Integer val2 = 10.0; // doesn't work

Double val3 = 10; // doesn't work
Double val4 = 10.0; // works

Double val5 = null;
double val6 = val5; // doesn't work (throws a NullPointerException)

I guess the following shouldn't be a surprise. But if it is, then you may want to read some article about casting in Java.
double val7 = (double) 10; // works
Double val8 = (Double) Integer.valueOf(10); // doesn't work
Integer val9 = (Integer) 9; // pure nonsense

Prefer valueOf:
Also, don't be tempted to use new Integer() constructor (as some other answers propose). The valueOf() methods are better because they use caching. It's a good habit to use these methods, because from time to time they will save you some memory.
long rounded = (myDouble == null)? 0L: Math.round(myDouble.doubleValue());
Integer val = new Integer(rounded); // waste of memory

Comment: this in my opinion is the best answer
Answer: I see three possibilities. The first two cut off the digits, the last one rounds to the nearest Integer.
double d = 9.5;
int i = (int)d;
//i = 9

Double D = 9.5;
int i = Integer.valueOf(D.intValue());
//i = 9

double d = 9.5;
Long L = Math.round(d);
int i = Integer.valueOf(L.intValue());
//i = 10

Comment: There's no need for the Integer.valueOf if you are going to store the result in a primitieve int. Your code forces Java to perform an unnecessary box and unbox.
Answer: Indeed, the simplest way is to use intValue(). However, this merely returns the integer part; it does not do any rounding. If you want the Integer nearest to the Double value, you'll need to do this:
Integer integer = Integer.valueOf((int) Math.round(myDouble)));

And don't forget the null case:
Integer integer = myDouble == null ? null : Integer.valueOf((int) Math.round(myDouble)));

Math.round() handles odd duck cases, like infinity and NaN, with relative grace.
Comment: Why do you need Integer.valueOf if you cast Math.round result to int?
Comment: @EranH.: As of Java 1.5, you probably don't—autoboxing means the code likely ends up doing the same thing either way. But I think this code is clearer for people who haven't quite grasped objects and primitives yet.
Comment: Whomever down-voted this answer: You'll help the community a lot more if you explain why, and it might even help you find out why it didn't work for you. Down-voting without explanation, OTOH, is unhelpful for everyone, and it comes across as cowardly.
Answer: Like this:
Double foo = 123.456;
Integer bar = foo.intValue();

Answer: double a = 13.34;
int b = (int) a;

System.out.println(b); //prints 13

Comment: The question was specifically about the wrapper classes. This answer is about primitives.
Answer: Simply do it this way...
Double d = 13.5578;
int i = d.intValue();
System.out.println(i);

Answer: Double d = 100.00;
Integer i = d.intValue();

One should also add that it works with autoboxing.
Otherwise, you get an int (primitive) and then can get an Integer from there:
Integer i = new Integer(d.intValue());

Comment: Don't use `new Integer(int)`, instead use `Integer.valueOf(int)` , which has a cache for small integers, such as this one.
Answer: Call intValue() on your Double object.
Comment: Seems like a repeat of the earlier answers.
Answer: You can do that by using "Narrowing or Explicit type conversion",
double → long → int. I hope it will work.
double d = 100.04;
long l = (long)d; // Explicit type casting required
int i = (int)l;    // Explicit type casting required

PS: It will give 0 as double has all the decimal values and nothing on the left side. In case of 0.58, it will narrow it down to 0. But for others it will do the magic.
Answer: Try this one
double doubleValue = 6.5;Double doubleObj = new Double(doubleValue);int intResult = doubleObj.intValue();

Answer: Double and Integer are wrapper classes for Java primitives for double and int respectively. You can cast between those, but you will lose the floating point. That is, 5.4 casted to an int will be 5. If you cast it back, it will be 5.0.
Answer: Alternatively, one can first cast to primitive double, then cast to int, letting it be autoboxed to Integer.
Double d = 20.3;
Integer i = (int) (double) d; //20
//To obtain primitive:
int i2 = (int) (double) d;

Answer: Use the doubleNumber.intValue(); method.
Comment: Seems like a repeat of the other answers.
Answer: Simply use the intValue method of Double
Double initialValue = 7.12;
int finalValue = initialValue.intValue();

Comment: Seems like a repeat of the other answers.
Answer: First thing you should use Double not double.
Example
int intResult = newDoubleObj.intValue();
Answer: Memory efficient, as it will share the already created instance of Double.
Double.valueOf(Math.floor(54644546464/60*60*24*365)).intValue()

Comment: is there any reason for the `Math.floor(...)` ?  `intValue()` always floors anyway.
Answer: It's worked for me. Try this:
double od = Double.parseDouble("1.15");
int oi = (int) od;

Cast Double to Integer in Java


Comparing Treasury Inflation Protected Securities (TIPS) vs Certificates of Deposit

Question: I was wondering what the pros and cons are of choosing one versus the other. There are TIPS that seem to have a better yield than CDs and would therefore make for better places to park savings.
Comment: Have you considered the tax implications of each security?  TIPS' principal adjustments can cause some additional taxes though you don't see the money until the TIPS matures.
Answer: I think the best answer will depend on your needs for this money rather than the interest rate each offers.
If you need capital preservation regardless of the time period you end up holding this deposit/investment, then bank CDs offer the best guarantee. Most CDs offer a small-to-modest penalty of a few months interest in the case of early withdrawal. TIPS on the other hand fluctuate in value and if you have to sell early you could lose some of your money. Principal is only guaranteed if held to maturity.
I assume the rates you are seeing for TIPS include the inflation component which is guaranteed for at least 6-months. Predicting the rate after that is not so simple so it's very possible TIPS will have worse returns than a CD if we enter a period of deflation.
By the way, have you checked out Series I Savings Bonds lately? I see them as a hybrid between CDs and TIPS and look very attractive these days for savings vehicles. They pay an inflation component just like the TIPS but their value is guaranteed as early withdrawal incurs a penalty of a few months of interest. However, you must hold the savings bond for at least 1 year as they have no value until after that first year has passed.
Comment: I bonds have a ridiculously small cap on how much you can invest in them


On the Bell Numbers

Question: Edit (first version was incorrectly stated.  Thank you Douglas and others for your corrections)  Let $B_n$ be the $n$th Bell number (the number of partitions of a set with $n$ members).  For each $n > 3$, I have a set $A_n$ of size $|A_n|=B_n$.  I then have a subset $A'_n \subset A_n$ where $|A'_n|=B_n-B_{n-1}$. I would like to say something about the size of $A'_n$ relative to the size of $A_n$.  For instance, it seems that $lim_{n \to \infty} \frac{B_{n-1}}{B_n}=0$.  Can I make a stronger statement about the ratio of successive Bell numbers? How can I formalize the statement "for sufficiently large $n$, most of $A_n$ is in $A'_n$."
Comment: That conjecture is very far off. Do you mean ordinary partitions instead of set partitions? The asymptotics are known for both.
Comment: The conjecture is true for ordinary partitions of integers.
Answer: It's easy to see that $B_n \ge 2 B_{n-1}$ since we always have a choice of whether to add $n$ to the same part as $n-1$ or not. Since the number of parts in a typical set partition of size $n-1$ grows, the choices for adding $n$ to a new or existing part grow, so
$$\lim_{n\to\infty} B_{n-1}/B_n = 0.$$
There are asymptotics in the Wikipedia article on the Bell numbers, but it may not be obvious how to work with the Lambert $W$-function in that expression, or how to bound $B_{n-1}/B_n$. A faster proof that the limit is $0$ can be obtained from Dobiński's formula, that $B_n$ is the $n$th moment of a Poisson distribution with mean $1$:
For any $c \in \mathbb R$, the Poisson distribution has positive probability of being greater than $c$. So, for large enough $n$, the  $n$th moment $B_n$ is at least $c^n$. By Jensen's inequality, the moments satisfy
$$B_n^{\frac{n+1}{n}} \le B_{n+1}$$
$$c \le \sqrt[n]{B_n} \le \frac {B_{n+1}}{B_n}$$
Answer: A precise estimate of the relative ratios of consecutive Bell numbers is proved by Asai, Nobuhiro; Kubo, Izumi; Kuo, Hui- Hsiung in Acta Appl. Math. 63 (2000), no. 1-3, 7987:
$$1\leq \frac{B(n)B(n+2)}{B^2(n+1)}\leq \frac{n+2}{n+1}$$
Comment: The sequence $C(n)=2^n$ satisfies $C(n)C(n+2)/C^2(n+1)$=1, but this tells us little about $C(n-1)/C(n)$.

On the Bell Numbers


Changing url of author page

Question: I have author page on my website: https://inwestujfinanse.pl/author/admin/ when I try to change it normally in https://inwestujfinanse.pl/wp-admin/profile.php nothing happens. Is there any way I can change it in the database or something? I don't want to install any additional plugin. Please help me.
Answer: Yes, if you really want to just change it directly in the database, you are looking for the user_nicename field (column) in the users table.
This is the value that WP uses for author archive URLs.

Changing url of author page


Test that predicts group membership from multi-variate data?

Question: Context: Zoology undergrad dissertation. The format of my results will be % time individual birds spent doing certain activities (and possibly number of times an activity such as pecking was performed). There is no external way to tell whether the individual bird is male or female, so my hypothesis is that males and females will have different activity budgets. Neither myself and my dissertation supervisor know what statistical test to perform - what test can be used for this?
Comment: The data is continuous observations, sorry I didn't include that!
Comment: It will help if you edit your answer to include that! The more specific you can be about your data the better. Also, Bjorn's suggestion of clustering sounds good to me. If you don't know which birds are male and female, I don't see how you can test if males and females have different behaviours! So the other option is to cluster your data (in some way) and see if you get two clear groups. You might be able to infer the two groups are male and female. If you can get a male/female label for any of the data, though, that would be much better!
Comment: Can you edit your answer to clarify exactly what data you have? e.g. discrete observations at fixed time intervals, or continuous observations, or something else?
Answer: You could try clustering the behaviour patterns in an unsupervised way using e.g. UMAP (available in several softwares: python had umap-learn, R has a package accessing the python package - watch e.g. this YouTube video for a nice explanation or the article for more details) or t-SNE. You can then see whether you get two clusters that are sized in about the right ratio for the ZZ vs. ZW chromosome ratio, characterize what the clusters are like and then speculate whether they might be clusters by ZZ vs. ZW.
Can you get a feather or other DNA sample in some way? Getting a read on that on a at least a few individuals that way would help a lot to see whether that matches up with the theory. I believe DNA tests on feathers are pretty cheap nowadays.
Comment: I'll look into that, thank you! I can't get any DNA samples unfortunately.


How to mark a page as a language copy?

Question: I have a SharePoint Online site, where I need to translate some pages into different target languages. My site's default language is English, thus the source language of a page is always English. The language copies created go into the respective folders (the automatically created folders with the 2-letter language code).
In a few cases, the content was created first in a target language (in a language copy folder) and needs to be translated into English. Using the REST API, a site like this is treated as source language content.
<code>{
  "_SPIsTranslation": "No",
  "_SPIsTranslation.value": "0",
  "_SPTranslatedLanguages": ["nl-nl", "fi-fi", "de-de", "fr-fr"],
  "_SPTranslationLanguage": "",
  "_SPTranslationSourceItemId": ""
}
</code>
Is there a way to change these metadata, in order to have the specific page as a language copy?
Or any other options so that the translated page is recognized as a translation (and it can be selected in the language selection dropdown)?
Answer: I think this blog post answers my question:
https://www.eliostruyf.com/linking-unlinking-multilingual-pages-sharepoint/

How to mark a page as a language copy?


Difference between Let me go / Let me off

Question: What's the difference between the two or are they the same? are there any other similar words in terms of meaning? In the context where you're pleading someone, which is better?
Comment: You should add some actual examples using the phrases.
Answer: "Let me off" has a informal meaning of "don't punish me".

(student to teacher) Please sir, let me off. I won't do it again. You let Hopkins off with just a telling off when you found him smoking behind the bike sheds.

It is also used for "allow to disembark". "He stopped the bus to let the lady off."
"Let me go" means "release me".  So it is used when someone is physically captured, whether for punishment or not:

After checking the bird for disease we let the bird go and it flew up into the tree.

So the expressions have a different meaning.


Read user's email on android gtalk

Question: i am trying to make an application for android that actually needs to reads users email with users permission. Is it possible to read the email from user's inbox from gtalk or the inbuilt email app and get the text in the body and subject with intents or anything?Any help will be appreciated.
Answer: Querying the Google Email App is not supported and is locked down. 3rd party apps can't access it.

Read user's email on android gtalk


What's wrong with my method for this integral?

Question: So I have to solve
$$\int_0^1\frac{1}{x^{2/3}(1-x)^{1/3}}dx.$$
To do this I made a branch cut from $z=0$ to $z=1$ and took the bone-shaped contour that straddles the real axis, going clockwise. Now on the line above the real axis, I took the angle with respect to $z=0$ to be $0$ and that with $z=1$ to be $\pi$.  Then the corresponding line integral comes out to $e^{-\frac{i\pi}{3}}I$ and so the one below comes out to $-e^{\frac{i\pi}{3}}I$ with the second angle $-\pi$. But this gives me the wrong answer. Most places I found online seem to take the first angle to be $0$ and the second one to go from $0$ to $2\pi$. But why should this make a difference? Why is my way of taking the angles wrong?
Comment: Your angle (branch of arg) has to be continuous along your contours.
Comment: @user10354138 could you please explain what you mean by that?
Comment: Just to add to what @user10354138 wrote: your function has to be single-valued in all complex plane, as soon as you do not cross the cut (relating points 0 and 1) - you should get the same value after a full turn around the cut. If you define, for instance,  real function value on the upper bank of the cut $(0,1)$, then making a full turn clockwise around 1 (to move to the lower bank) your function gets the factor $\exp(+\frac{2i\pi}{3})$ -because you turning clockwise (one minus) and negative power ($-\frac{1}{3}$) - another minus.Turning around zero you get a zero phase on the upper bank.
Answer: Note that your integrand here is discontinuous at $x = 0$ and $x=1$.
Thus, if you take the argument for your contour from $ - \pi $ to $ \pi$, then the arc will pass through a discontinuity and your answer may be incorrect by a constant residue.
This problem is not present when taking the angles $0$ to $ 2 \pi$ as there will not be any integration along a discontinuity.


How do i check if a user logged into salesforce from javascript? Either through api or reading cookie value

Question: We want to allow users who are already logged into salesforce and have access to our application to continue to our application home page without going through the login flow , if not we want to take them through login flow where we use Web Server OAuth Authentication Flow to log them in, It will be of great help if you could please guide on how we could go about achieving this
Answer: There are several means of doing this. The easiest, which is the one I'd recommend, would be to create a link to your application as a Connected App from Salesforce. In addition to that link, see Defining Connected App in the REST API Docs.
You don't say whether you have SSO enabled and if so, who your idP is. If you do, you'll have other options including Oauth protocols using JS and REST.
EDIT
In response to comments...
This is my understanding of how it should work:
When you created your Connected App, there should have been a clientId and a consumerSecret. Using Base64Encoding, these are combined to generate a refresh token by Salesforce for the Connected App. The OAuth flow is an idS initiated flow (I say that because the call to the connected app is generally initiated by by the Salesforce org/instance with Salesforce (all of Salesforce.com) acting as the idP). The expiration of the refresh token is also configured in the Connected App settings. See Edit Connected App Behavior in Salesforce Help.
Your app should have these two things:

Start URL—For connected apps that use single sign-on. Set the URL to the page where the user starts the authentication process.
Mobile Start URL—For mobile connected apps to direct users to a specific location when the app is accessed from a mobile device.

Using OAuth, you should be able to check for the refresh token of a user who's visiting your app. What's below is part of what you'll find in the documentation.

The Refresh Token policy determines whether a refresh token is provided during authorization to get a new access token. If refresh tokens are provided, users can continue to access the OAuth-enabled connected app without having to reauthorize when the access token expires. Admins limit the lifetime of access tokens with the session timeout value. The connected app exchanges the refresh token with an access token to start a new session. A Salesforce admin can choose one of the following refresh token policies.

Refresh token is valid until revoked—Default. The refresh token is used indefinitely, unless revoked by the user or Salesforce admin. You revoke tokens on a user's detail page under OAuth Connected Apps or on the OAuth Connected Apps Usage Setup page.
Immediately expire refresh token—The refresh token is invalid immediately. The user can use the current session (access token) already issued, but can't obtain a new session when the access token expires.
Expire refresh token if not used for n—The refresh token is valid as long as it's been used within a specified amount of time. For example, if set to seven days, and the refresh token isn't exchanged for a new session within seven days, the next attempt to use the token fails. The expired token can't generate new sessions. If the refresh token is exchanged within seven days, the token is valid for another seven days. The monitoring period of inactivity also resets.
Expire refresh token after n—The refresh token is valid for a fixed amount of time. For example, if th
  e policy states one day, the user can obtain new sessions only for 24 hours.
Comment: Thank you for your answer ! our app is on-boarded on to salesforce as a connected app, but we are not sure how would be able to see if the user is already logged into salesforce before visiting our saas application if you could please guide us how to achieve that would be of great help
Comment: @user2359997 See my edited answer. I hope this answers your question on how to proceed with your OAuth implementation.


How Often Do Windows Servers Need to be Restarted?

Question: Our system team said that they recommended restarting all servers at least once a month. I found this old thread on serverfault and I wanted to learn your opinions. Should I restart SharePoint servers monthly or not? Any pros and cons?
Comment: I believe that IT also have a server restart for us, though I believe it is once a week.  I'm no expert on servers though, see what some others say about it.
Answer: There is no guidance on it but as per my experience, We never rebooted the server in regular intervals.  There are times when a reboot required.

install a update for SharePoint or windows which required reboot
install any add-on on the server which required reboot
if there is an issue with Server which required reboot...memory usage out of control, Http throttling issue etc.

their is no hard rule, the reason why we dont do the reboot

Our environment is 24/7 and there are services & 3rd party tool installed on the server which cause the outage.
Sometime after reboot, our services take too much time to come back normal. i.e build cache will take time (depending the farm utilization).

again their is no hard and fast rule. reboot it if required or if you think it will not cause outage.
Answer: As you asked for opinion, i would say, atleast once in a wee just to keep systems in check.
But when you apply updates/Patches etc, which anyways comes monthly now a days mostly, you have to restart it anyways monthly. But just to keep systems in check i would recommend you to restart it weekly or alternate weeks atleast


Fail uploading any sketch to ATtiny85 USB

Question: I have a Digistump's ATtiny85 (probably a clone ), which fails uploading any sketch, saying: Warning: device with unknown new version of Micronucleus detected. This tool doesn't know how to upload to this new device. Updates may be available. I'm using Ubuntu 20.04 and Arduino IDE 1.8.13.
I used these guides:

Digistump's troubleshooting for linux

Kovo's blog

After using these guides, finally I stop getting this error, but when trying to upload the firmware ( last line at Kovo's ), I get this error:
`guy@desktop:~/tmp/micronucleus/upgrade$ ~/.arduino15/packages/digistump/tools/micronucleus/2.0a4/launcher -cdigispark  --timeout 60 -Uflash:w:~/tmp/micronucleus/upgrade/t85_default.hex:i
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device (will time out in 60 seconds) ...
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.4
> Device signature: 0x1e930b
> Available space for user applications: 6522 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 102  page size: 64
> Erase function sleep duration: 714ms
parsing: 50% complete
> Program file is 1594 bytes too big for the bootloader!

Did someone encounter this ?
Comment: I'd probably start here: https://github.com/micronucleus/micronucleus/issues/148
Answer: from Daves Comment
need to download upgrade-t85.hex (which is not t85_default.hex) from link


What is the "endgame" of Rick's group in the Walking Dead?

Question: They obviously lived awhile in the prison but is there an overall plan, such as finding an ultimately safe haven to live? Rejoining other members of society? Finding an island or something to isolate themselves and wait out the zombies if possible? I have not heard of any ultimate plan for a permanent new way of life. Surely they want something permanent without having to deal with walkers at all.
Comment: Not bad or good, just the etiquette here. When in Rome... :)
Comment: Hey Gelfamat! Your question is good, but there is no need to end every question with "Well, lemme know" :) (just as you should avoid signing your name, or saying "thanks", or similar things)
Comment: Is it bad if I do though? It's something that has become a valuable part of my online persona. If it's bad form I'll stop...and of course, lemme know.
Comment: Their only endgame is death.  Zombies: The only winning move is not to play.
Answer: There is no "ideal" plan in sight. The TV series is nowhere near caught up with the comic, and nothing has been anywhere near an endgame there either.
I would go into more detail, but that would only be spoilers. They are panicked, hungry, scared and sometimes irrational. There is no endgame at this point in the TV series or the comic. There are merely reposes that the group hopes may be an endgame.
As creator Robert Kirkman said in the comic, it's not the zombies who are "The Walking
 Dead."
Comment: Interesting. It seems like their time at the prison would have allowed them some respite and they could have thought ahead about such things. Then again if it became a zombieless version of Woodberry, no one would watch.
Comment: They've nary had any respite. There is no getting comfortable. Between the Governor and the walkers and any OTHER threats, there is not enough time to do anything but concentrate on the more immediate problems like pregnancies, birth, wounds, starvation, guarding the place, supplies (medical, etc). Woodbury was only one problem.
Answer: The latest episode (S04E09 "After") seems to be a rumination on just this very question.
Following the aftermath of the Governer's abortive retaliation on the Prison, the episode follows both Michonne and Rick/Carl respectively, and has been referred to as Walking Dead back in 'Survival Mode'.
The survivors wander aimlessly, attempting to find somewhere to recuperate and possibly re-unite, but without any plan/strategy other than staying alive.
The end of the Episode features a sequence in which Rick explains that he never had much hope for their 'prison of solace' plan to work out, and he believes the life they once had (domesticity, security and abundance) can never be salvaged:

I know we'll never get things back to the way things used to be [...] I only clung to that for you. For Judith.

It seems the whole point in the walking dead is a representation of what Survival would be like without that very endgame that you discuss: Whether people try to create safe havens, travel nomadically, attempt to rebuild part of their lives or lose hope entirely.
It seems at this point Rick believes that the notion of finding somewhere to grow crops, create safety and live out the rest of their days in peace is a hopeless one, particularily when day to day survival is hard enough to accomplish.
Answer: Well, when there are flesh eating monsters chasing you, the first thing on your mind would be to protect yourself against them rather than rebuilding society and repopulating the earth.
That's why the protagonists of the show (and the comic) at first try to find a normal place to hide from the zombies and end up at the prison that seemed to be okay.
When they found the prison and set down, Rick suggested getting Hershel so that they can harvest the earth. That was a plan that would help them in the future, and did up to a point.


Is PowerShell a strongly-typed language?

Question: PowerShell is definitely in the category of dynamic languages, but would it be considered strongly typed?
Comment: The term "strongly typed" is not defined. Could you please define it, so that your question can be answered objectively? Otherwise everybody will just substitute their *own* definition and we will end up in a massive flamefest.
Comment: You mean: is PowerShell *statically* typed?
Answer: There is a certain amount of confusion around the terminlogy. This article explains a useful taxonomy of type systems.
PowerShell is dynamically, implicit typed:
> $x=100
> $x=dir

No type errors - a variable can change its type at runtime. This is like Python, Perl, JavaScript but different from C++, Java, C#, etc.
However:
> [int]$x = 100
> $x = dir
Cannot convert "scripts-2.5" to "System.Int32".

So it also supports explicit typing of variables if you want. However, the type checking is done at runtime rather than compile time, so it's not statically typed.
I have seen some say that PowerShell uses type inference (because you don't have to declare the type of a variable), but I think that is the wrong words. Type inference is a feature of systems that does type-checking at compile time (like "var" in C#). PowerShell only checks types at runtime, so it can check the actual value rather than do inference.
However, there is some amount of automatic type-conversion going on:
> [int]$a = 1
> [string]$b = $a
> $b
1
> $b.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     String                                   System.Object

So some types are converted on the fly. This will by most definitions make PowerShell a weakly typed language. It is certainly more weak than e.g. Python which (almost?) never convert types on the fly. But probably not at weak as Perl which will convert almost anything as needed.
Comment: It is worth mentioning that *dynamic typed* languages like PowerShell generally get worse error messages and more run-time death versus something *statically typed* like Java. However, even with *static typing* you can have run-time death with null pointer exceptions and such, you just get better error messages and debugging with *static typed* languages.
Comment: @KolobCanyon That's because it's a **scripting** language and typing `$obj.SetFlag("None")` in the console with an implicit convert is way easier than `$obj.SetFlag([Company.Example.Product.Data.Transfer.Enums.Flags]::None)`
Answer: It can be if you need it to be.
Like so:
[1] » [int]$x = 5
[2] » $x
5
[3] » $x = 'haha'
Cannot convert value "haha" to type "System.Int32". Error: "Input string was not in a correct format."
At line:1 char:3
+ $x  <<<< = 'haha'
[4] »

Use the [type] notation to indicate if you care about variables being strongly typed.
EDIT:
As edg pointed out, this doesn't prevent PowerShell from interpreting "5" as an integer, when executing (5 + "5"). I dug a little more, and according to Bruce Payette in Windows PowerShell in Action, PowerShell is actually a "type-promiscuous language." So, I guess, my answer is "sort of."
Comment: Sort of both, thus the "promiscuous" part. :)
Comment: Nope. You can add a string to an integer and get a numeric result. If you reverse the order of addition you get concatenation.
Comment: I think this shows that it *can* be statically typed which does not mean that it *must* be strongly typed.
Comment: So, it's weakly and statically typed?
Answer: Technically it is a strongly typed language.
You can decline to declare types in the shell, allowing it to behave like a dynamic typed scripting language, but it will wrap weakly-typed objects in a wrapper of type "PsObject".   By declaring objects using the "New-Object" syntax, objects are strongly typed and not wrappered.
$compilerParameters = New-Object System.CodeDom.Compiler.CompilerParameters

Answer: I think you will need to define what you mean by "Strongly Typed":

In computer science and computer programming, the term strong typing is used to describe those situations where programming languages specify one or more restrictions on how operations involving values having different datatypes can be intermixed. The antonym is weak typing. However, these terms have been given such a wide variety of meanings over the short history of computing that it is often difficult to know, out of context, what an individual writer means when using them.

--Wikipedia
Answer: I think looking at the adding a String to an Int example further would provide more grist for the discussion mill. What is considered to be dynamic type casting? Someone in one of the comments said that in this case:
4 + "4"

The "4" becomes an Int32. I don't believe that is the case at all. I believe instead that an intermediate step happens where the command is changed to:
4 + [System.Convert]::ToInt32("4")

Note that this means that "4" stays a String through the entire process. To demonstrate this, consider this example:
19# $foo = "4"
20# $foo.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     String                                   System.Object

21# 4 + $foo
8
22# $foo.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     String                                   System.Object

Comment: You can however change the type of a variable through assignment. If you do $foo="4" and then $foo = 8 + $foo, then the type of $foo will change from string to int. Values are immutable, though.
Comment: Obviously 4 + $foo isn't going to modify the variable $foo. It's going to read the variable, get a String, and convert that to an Int32. This happens dynamically based on the runtime type (not the static type) of $foo.
Answer: PowerShell is dynamically typed, plain and simple. It is described as such by its creator, Bruce Payette.
Additionally, if anyone has taken a basic programming language theory class they would know this. Just because there is a type annotation system doesn't mean it is strongly typed. Even the type annotated variables behave dynamically during a cast. Any language that allows you to assign a string to a variable and print it out and then assign a number to the same variable and do calculations with it is dynamically typed.
Additionally, PowerShell is dynamically scoped (if anyone here knows what that means).
Answer: I retract my previous answer -- quoted below. I should have said something more nuanced like:
PowerShell has a strong type system with robust type inference and is dynamically typed.
It seems to me that there are several issues at work here, so the answers asking for a better definition of what was meant by a "strongly-typed language" were probably more wise in their approach to the question.
Since PowerShell crosses many boundaries, the answer to where PowerShell lies probably exists in a Venn diagram consisting of the following areas:

Static vs. dynamic type checking
Strong vs. weak typing
Safe vs. unsafe typing
Explicit vs. implicit declaration and inference
Structural vs. nominative type systems

"PowerShell is a strongly typed language.
However, it only requires you to declare the type where there is ambiguity.
If it is able to infer a type, it does not require you to specify it."


Should the noun be singular or plural in the expression "...one of, if not the, [superlative] [noun]..."?

Question: A common English expression takes the form of "It was one of, if not the, best experience[s] of my life." In this expression, what is the correct number for "experience[s]"?
Comment: Singular sounds right, but don't ask me why! Perhaps it is because the singular subject directly precedes the verb.
Answer: This can't really have a correct answer. To take your example:
"It was one of, if not the, best experience[s] of my life."
'It was one of' requires one of a number, so calls for: 'best experiences', however, the alternative: 'if not the' only calls for a singular, which would be: 'best experience', and thus we have a contradiction.  Which do we choose?
Doing a quick search online, the choices seem pretty evenly spread:
Gain Weight...Lose Your Mate by Carla Tuner

"...it was one of if not the happiest and most promising day of our lives."

USC has faced its share of adversity this season by Michael Vega

"...it was one of, if not the best job in America."

Is this the best own goal you'll ever see in your lifetime? Step forward Milan Gajic... by John Drayton

"...it was one of, if not the sweetest strike the 27-year-old has hit during his career."

However, as is seen in these two, the 'if not the' is actually rather appended:
Team Louisiana Lacrosse: Player Bio - Donald Davis

"It was one of (if not) the first tournaments we competed in..."

Wimp2Warrior: Testimonials - Adam Helmrich

"...it was one of (if not THE most) rewarding things I have ever done."

This would suggest to me that one should opt for the plural, but I feel the best construction here is the one presented by Donald Davis in his team bio.
Answer: It should be singular since the phrase 'if not the' is closer to the object (experience[s]) than the phrase 'one of'.
Comment: There are conflicting rules, and I doubt you've come across a rule prioritising proximity agreement over 'the parentheticals never inform the grammar of the matrix sentence' mantra. Read the first line of the accepted answer.
Answer: Usually, with the usage of two commas to connote an "interruptive" set of words in the sentence, the sentence should also make sense with the interruptive phrase separated by the commas out of the sentence completely. By this notion, the word "experience" should be plural, as the word "of" should be matched with "experiences."
Comment: There are conflicting rules, and I doubt you've come across a rule licensing parentheticals that link syntactically to the matrix sentence but thus give rise to ungrammaticality. Read the first line of the accepted answer.


Would it be possible to embed CDF files to posts?

Question: It would be nice to be able to manipulate dynamic content directly from the browser: everything is given on the Mathematica-side (CDF, deployment, browser-plugin), and the site would certainly benefit from it: imagine, that new users who just installed Mathematica but have no idea how to use it could immediately try out small programs without copypasting/evaluating them.
I realize that SE does not allow the attachment of files to posts (would be useful though in many cases). Perhaps this can be done sometimes?
Answer: While I totally support the idea, I have very strong doubts this would ever be possible on SE. Just put yourself in place of SE developers / management: if I were one of them, here are some things that would be a complete no-go:

Security: since this is based on a plugin, this can affect the client computer in a variety of ways, and SE has no control over it, while full responsibility for it.
Dependency on external technology, over which SE has no control: the idea is that the posts can stay here for an indefinitely long time and be accessed by new users without problems. If there are some breaking changes introduced in future versions of CDF, this would make older posts broken

I am sure there are other considerations as well.
Comment: Then it is quite obvious that there should be a dedicated site for such things. Of course there is the Demonstrations site, but there you cannot post problems, and cannot have discussions. I am aware that there is a movement to set up a github repository, which is somewhat similar to this question in the sense that it looks for a way to have files on a server that many can access. Maybe there is a general solution for both of these?
Comment: @Istvan I have been thinking about this, but can not offer a fully staisfactory and general solution at the moment. Meanwhile, we can use GitHub for code, and some file-sharing service like 4shared for other files (they have a restriction that you have to visit your account once per half a year, but in the short-term this may be ok).


Questions about network protocols

Question: Are questions about application level network protocols, not connected with network infrastructure (e.g. HTTP, FTP, email protocols) ok here?
Answer: From the What topics can I ask about here? in the Help Center, under Off-Topic:

protocols above L4 in the OSI model (e.g. HTTP, FTP, etc)

This is something that may possibly be discussed in chat (for questions which are off-topic on Network Engineering), but you are probably better off asking on ServerFault.
Answer: There is no single answer to this question as this would depend on the protocol and the actual nature of the question.
If you are talking about routing protocols or the use of tools commonly used by network engineers (for example, SNMP), then this is likely on topic.
If you are talking about historic protocols that are irrelevant to modern networking these may be off topic.
If you are talking about protocols such as HTTP or FTP, then they are likely off topic.

Questions about network protocols


Service application cannot be deleted

Question: I am working on project server , I created PWA application service, and I can't delete it due to existing project sites. How do I delete the service?
Answer: You should be aware of you can't delete Project Server application service if it's associated with PWA site collections. So you can't delete it until delete all related project sites instances as the following:

Open Central Administration > Below Application management > Mange Service application > Click on your Project server application service > and delete all instances.

After you delete all instances ,  try to delete the PS application service , that should be deleted successfully .

You can also do this via PowerShell as mentioned at Service application cannot be deleted due to existing project sites
Answer:
Backup all your project sites.
Delete all your project sites.
In all your farm servers, open the Services.msc snap-in, and restart the
following services:

SharePoint 2013 Administration
SharePoint 2013 Timer
SharePoint 2013 Tracing
SharePoint 2013 User Code Host
SharePoint 2013 VSS Writer
World Wide Web Publishing
Service SharePoint Server Search

On the server that is running the SharePoint Central Administration
website, at a command prompt, type iisreset.
Then try to delete the Service Application again
Comment: you're welcome, good to know that you found a solution for your issue.
Answer: Possibly there will be orphan PWA instance which is causing this issue. You can run below PowerhSell Commands to find out orphan PWA Instance.
 $serviceapp = get-spserviceapplication | ? {$_.TypeName –like "*Project*"}
 $pwainstances = $serviceapp.Sitecollection
 $pwainstances

To delete the Orphan instance use below command without closing PowerShell Window.
$toberemoved = $pwainstances | ? {$_.Id –eq "<Id of the instance to delete>"}
$toberemoved
$toberemoved.Delete()

Service application cannot be deleted


Is there a WMI Redistributable Package?

Question: I've been working on a project that accesses the WMI to get information about the software installed on a user's machine. We've been querying Win32_Product only to find that it doesn't exist in 64-bit versions of Windows because it's an "optional component".
I know there are a lot of really good alternatives to querying the WMI for this information, but I've got a bit of a vested interest in finding out how well this is going to work out.
What I want to know is if there's some kind of redistributable that can be packaged with our software to allow 64-bit users to get the WMI Installer Provider put onto their machines? Right now, they have to install it manually and the installation requires they have their Windows disc handy.
Edit:

You didn't mention for what OS, but the WMI Redistributable Components version 1.0 definitely exists.

For Operation System, we've been using .NET 3.5 so we need packages that will work on XP64 and 64bit versions of Windows Vista.
Answer: You didn't mention for what OS, but the WMI Redistributable Components version 1.0 definitely exists.
For Windows Server 2003, the WMI SDK and redistributables are part of the Server SDK
I believe that the same is true for the Server 2008 SDK
Answer: Wouldn't the normal approach for a Windows component be that the administrators of a set of servers use whatever their local software push technology (i.e. SMS) to ensure that component is installed? This is not that uncommon of a requirement for the remote management of servers via WMI.
By the way, the WMI Installer Provider is not provided in the Standard Edition of the server products, but it is in the Enterprise Edition. So, Windows 2003 Server will not have this installed by default, but Windows 2003 Server Enterprise (and DataCenter) will.
This answer does imply that you are putting the burden of installation back on your user base, but for Windows administrators this should not be any issue.

Is there a WMI Redistributable Package?


How to limit access to wp-admin in case of a dynamic IP address?

Question: I have dynamic IP address and I am trying to find the solution to limit the access to wp-admin. It seems that the only option is to block the access by domain name by using a Dynamic DNS Manager instead of IP address. Are there any alternatives?
Comment: What has the dynamic IP? The client or the server?
Comment: I have dynamic IP address and I would like to limit access to wp-admin. The website is hosted on shared server.
Comment: "I have" -- my question is who the "I" is. The server or the client?
Answer: What about using client certificates for the particular URI?
eg: Access to https://example.com/ is allowed, but for https://example.com/wp-admin the client needs to provide a valid certificate.
https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html#accesscontrol
https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_client_certificate
Comment: You can also use a basic HTTP authentication for this location.
Comment: Thats true, but most people would use the same as the wp admin password, so when you got one you can login to wp.


Can the Books app be automated or scripted?

Question: I don't know much about AppleScript or Automator. I use Catalina, up to date as of today, 2020 Jan 06.
Today I was trying to use Automator to change the Category of multiple books in my Books Library, which inexplicably Apple does not support.  There are no actions that seem to take a selection and operate on the items in the selection in Books.  I looked at AppleScript and there does not appear to be a Books dictionary.
Can the Books app be automated or scripted?  Or am I out of luck?
If so, how?
Thanks!
Comment: No. Yes.
Comment: I'm not familiar with UI scripting method on OSX.  Is this a third party solution?  I looked in Automator and tried to use the Record feature and it ignored everything except bringing Books to the foreground.
Comment: I'm not on Catalina, but can you use UI scripting? That's generally the way to script apps without dictionaries. It's a bit painful though.
Answer: Since there are no dictionaries, the answer seems to be no, you can't Apple Script them. You can always try to use UI scripting (simulate user clicks) but the functionality must be available inside the app. Which is not the case here. Anyway the category seems to have been abandoned in last versions.


What does "Relates with understanding to manifestations of turbulent emotions in others" mean?

Question: I'm trying to translate sociotypes' description, and I saw this sentence and couldn't understand clearly what does it mean..
this is as it came: "  CHARACTER: This individual is very interested in relations between people. Values understanding, tolerance, capacity for compromise for the sake of harmony in relations. Attempts to be helpful, responsive, and attentive towards everyone. Accepts people as they are; forgives their weaknesses and does not seek to change them by force. Tries to adhere to the principles of fairness and compassion. Predisposes others towards trust. Can patiently listen out his conversation partner. Relates with understanding to manifestations of turbulent emotions in others; tries to calm the person down, give some useful advice. If this does not help, knows how to wait patiently until the person calms down on his or her own. Does not need verbal confirmation of feelings himself - he understands everything without words. Stable and persistent in his sympathies and affections. Cherishes soulful harmony, his own and that of others. If his partner does not fully satisfy him, he departs without much commotion and sorting out the relationship."
Answer: Relates with understanding to manifestations of turbulent emotions in others basically means this person is able to be sympathetic or understanding towards people who are overly emotional and, for example, cannot control their temper or get easily offended ("turbulent emotions").
To relate to someone means to identify with this person, to sympathize with them, to understand the way they feel.

relate to someone/something: to be able to understand a situation or
  the way that someone feels and thinks
Martin had always found it easier to relate to women.
The programme deals with scientific subjects that ordinary people can
  relate to.

http://www.macmillandictionary.com/dictionary/british/relate-to


May I connect peer of another network?

Question: Geth has functions addPeer() and addTrustedPeer(). And I wonder is it possible to connect peer of another network? Does Geth have some security restrictions for such scenario? For example, comparing ids of networks?
Answer: I don't think it is possible and this are my thoughts on this:

nodes works as servers for chain: get a reference to the last block, resolve a function to mine a new block, reach consensus\get confirmations from the rest nodes
each chain has their own set of configuration parameters and it is unique in this way
that's why they are not mutually exclusive and can not be connected to each other directly, however there are 3rd party solutions which connect them (possible via proxy)
Answer: Technically you can do it, it will behave exactly the same as a single-chain client.
Block-chain is called so for a reason. Each block's execution depends on the previous ending state of a block.
So what is state:

Ethereum defines itself as a distributed state machine.
So…what is a state machine?
Every Ethereum clients keep the holistic information of the whole
chain. This information includes:

The account addresses
Other information that is related to the account

Balance
Nonce
storageRoot – for smart contract code
Hash – for smart contract

This information is known as the global state. The global
state represents the condition that every Ethereum account is in at a
specific time. It is consistently updated whenever a new block is
generated. Ideally, all Ethereum nodes are synced to have the same
state at all times.
[source]

Blocks are bundles of transactions.
When a block is received, the Geth client runs these transactions and updates the state, block by block. To ensure correctness, each block has an attribute parentBlock, which ensures all blocks are processed in the right order. You can learn how block works in detail here.
You may have an answer to your question by now.
When blocks from two chains are trying to apply changes to the same state, only one of them will be successful, because it has the right parent.
The other ones will be classified as bad block -meaning the block can't be applied to the current state- will be saved to a bad block entry.
Hope this helps. Happy coding.
Comment: Are you sure? You haven't mentioned anything about the p2p protocol, which is the part responsible for the communication between clients.
Answer: It is possible to connect to a peer from another network with Geth, but there are some security considerations to keep in mind.
Geth uses a network ID to identify and separate different Ethereum networks, so if you try to connect to a peer from a different network, you may encounter compatibility issues. To prevent connecting to peers from an unintended network, Geth compares the network ID of the peer with the local node's network ID before establishing a connection.
Additionally, Geth has a security mechanism to prevent malicious peers from exploiting vulnerabilities in the network. When connecting to a new peer, Geth verifies the peer's identity using an encrypted and authenticated handshake. This process helps to ensure that the peer is genuine and can be trusted.
Comment: Did you try connecting with other network to see if it works?
Answer: Yes, it is possible to connect to a peer from another network using the addPeer or addTrustedPeer functions in Geth.
Geth does not enforce any restrictions on connecting to peers from different networks. However, it is important to keep in mind that connecting to a peer from a different network can lead to potential security risks, as well as compatibility issues.
In a decentralized network like Ethereum, each node operates on its own copy of the blockchain. When connecting to a peer from a different network, the node may receive a different version of the blockchain, leading to a fork in the network.
Therefore, it is recommended to only connect to trusted peers and to validate the network ID of the peer before connecting. This can be achieved by comparing the network ID, which is a unique identifier for each Ethereum network. However, the network ID comparison is not built into Geth and needs to be implemented manually.
Comment: Did you try connecting with other network to see if it works?

May I connect peer of another network?


How to make paint stick to a stud screw?

Question: Around my house, I have a places on my walls where the paint has fallen off of stud screws. They are not popped screws. Rather, they are still depressed into the wall, so I don't know how why this happening. This time around, how should I prepare the wall so that my paint sticks onto the screw for a longer time? I have access to both spackle and joint compound, but I don't know which one to use. I use Behr Premium Ultra paint, which is self-priming.
Answer: These types of screws have been used for decades with no rust issue created by the drywall mud. I don't mean to step on any toes, my apologies, but there has never been an issue with mud popping off screw heads in my experience from rust. There is no sign of rust on the screw head, nor rust "bleed" on the drywall. Although I have seen it happen in extreme cases, BUT the mud was still intact.
The issue that I think is going on is there movement of the drywall off the stud allowing the screw to push the mud off the screw head. Check this by pushing on the face of the drywall to see if the drywall screw pops out a little when pushing on the drywall. If so it will require a few more screws to keep it from happening again. The added screws will need to be placed 2" away from the screw above and below the one that is there now. Push on the drywall to get the drywall to meet the stud before you add the extra screws. Two screws may be enough, depending how far the space is between the drywall and stud. Careful when adding screws, the screws need to stop JUST BELOW the surface, any deeper and if you break through the outer paper layer, the screw looses its hold, add another screw...
The picture you have looks like the screw is just so barely past the outer paper layer. I see the paint layer, the texture layer and the "roll" of the paper as the screw drew in, it looks a little much, so be careful how deep the screws are set, or you will have the same problem again, only now 3 screws. By the way, good pic, it shows good detail.
With the textured surface on the wall, a little latex caulk can be carefully placed over the screw head and the excess wiped off with a damp sponge or cloth, leaving the rest of the surface around the screw original. Let that dry, say a couple of hours or longer, it will shrink, and maybe apply a second coat to build it up a little more. Cleaning around it may be tedious, but it should result in a surface after painting that will blend in well enough to make the issue disappear.
Touch up the paint only at the spots repaired with a small brush. You have a paint that has a sheen to it and to use a wide brush or roller will show up different in the paint. Small brush, touch up ONLY the dry caulk. Or maybe you will be lucky and the way the paint goes on will not be a concern. But in my experience, the paint will "flash" (not the same sheen) where the new paint meets the old. If it is flat paint this will not happen.
Answer: The problem is that the screw heads corrode from moisture in the plaster†. This corrosion pushes the plaster away resulting in a small crater where the plaster has been pushed out.
You should use a suitable metal primer on the screw head before filling the hole and repainting the plaster surface. You can get metal primer that can be applied to already corroded metal.
† i.e. "mud" in the US.
Answer: These are called 'drywall screws'.

Get a screwdriver, screw each head deeper.
Apply some mud, and wipe excess off the textured wall nearby. You can use joint compound, patching plaster, or whatever is handy.
Wait for mud to dry.
Prime, preferably with a dedicated primer.
Wait 24hrs.
Paint.
Done.


How to disable scrollbars in node editor?

Question: In 2.82 scrollbars in node editor is not only useless, but annoying, it's also pop-up, which is very bad. How do I disable them enterely?
Answer: I don't think you can disable scrollbars.
But you can make them transparent.

Go to Preferences > Themes > User Interface > Scroll Bars
Set Item alpha value to 0
And Outline to some less intrusive color (it can't be made transparent)
Comment: Thank you, but that doesn't solve the problem. It still pops up and hinders window size changing. It works fine in 2.79. It doesn't even make any sense... why pop-up? That area of a screen still can't be used for anything.


Configuring Lets Encrypt with Traefik using Helm

Question: I'm deploying taefik to my kubernetes cluster using helm.  Here's what I have at the moment:
helm upgrade --install load-balancer --wait --set ssl.enabled=true,ssl.enforced=true,acme.enabled=true,firstname.lastname@example.com stable/traefik

I'm trying to configure letsencrypt. According to this documentation - you add the domains to the bottom of the .toml file.
Looking at the code for the helm chart, there's no provision for such configuration.
Is there another way to do this or do I need to fork the chart to create my own variation of the .toml file?
Answer: Turns out this is the chicken and the egg problem, described here.
For the helm chart, if acme.enabled is set to true, then Treafik will automatically generate and serve certificates for domains configured in Kubernetes ingress rules. This is the purpose of the onHostRule = true line in the yaml file (referenced above).
To use Traefik with Let's Encrypt, we have to create an A record in our DNS server that points to the ip address of our load balancer. Which we can't do until Traefik is up and running. However, this configuration needs to exist before Traefik starts.
The only solution (at this stage) is to kill the first Pod after the A record configuration has propagated.
Answer: Note that the stable/traefik chart now supports the ACME DNS-01 protocol.   By using DNS it avoids the chicken and egg problem.
See: https://github.com/kubernetes/charts/tree/master/stable/traefik#example-aws-route-53


Do all non-empty sets of natural numbers contain a smallest number?

Question: I'm currently self-studying a book in real analysis and in it the authors wrote that all non-empty sets of natural numbers contain a smallest number. While that statement initially seemed intuitive i quickly thought of an example that this does not necessarally apply for. Consider a set of natural numbers, whose elements are so large that there exists no notation for describing their size as of now, there ought to be such numbers no? How can we be so sure that such a set has a smallest number? Is my example perhaps too vague to be considered a set? If that is the case, then why?
Comment: We have notation for describing *any* natural number. We can do it all with the symbols '0,1,2,3,4,5,7,8,9'!
Comment: Related: http://matheducators.stackexchange.com/questions/10021/why-are-induction-proofs-so-challenging-for-students/10057#10057
Answer: This is referred to as the Well-Ordering Principle. You might think of it this way. Given a set $A\subset\mathbb{N}$, ask yourself the following:
Is $1\in A$? If so, then $1$ is the smallest element in $A$.
Otherwise, is $2\in A$? If so, ...
If you continue in this way and find that $n\notin A$ for any $n\in\mathbb{N}$, it must be that $A$ has no elements at all. Thus, every $A\not=\emptyset$ should have a smallest element.
Answer: The problem with your example is that there is no number for which "there exists no notation for describing their size as of now". The decimal representation of that number is such a notation.
Note 1: If a set is finite it has a minimum.
Note 2: If a set $A$ is non-empty, then it has some element $n \in A$. Then, since all numbers are positive integers, the subset
$$B:= \{ m| m \in A, m \leq n \}$$
is finite.
Answer: Intuitive explanation ...
If the principle does not hold, this means that :

(*) there exists a non-empty sets of natural numbers $A$ without a smallest element.

This in turn implies that, for every $n \in A$ ($A$ is not empty: thus we have it) we may find in $A$ a smaller number, i.e. a number, call it $m_0$, such that :

$m_0 < n$.

But now we may repeat the argument above, finding an $m_1 < m_0 < n$, and so on.
If the above principle holds, we can go on ad infinitum producing an infinite "descending sequence" of natural numbers belonging to $A$ :

$\ldots < m_2 < m_1 < m_0 < n$.

But $n$ is a natural number and - however large it is - from $0$ to $n$ we have only a finite "number" of numbers : contradiction !
Thus, the above principle (*) is false, and thus - by contradiction - we have proved its negation :

every non-empty sets of natural numbers has a smallest element.

See Proof by infinite descent, a method of proof by contradiction used in Euclid's Elements and much later developed by Fermat : based on Mathematical induction or equivalently on the Least integer principle.
Answer: I think it's worth writing a proof that tries to minimize appeals to intuition since personally I doubt anyone has very good intuition when it comes to large numbers. Already at numbers the size of Graham's number our intuition tends to fail us (just try and decide how much bigger $G_{64}$ is than $G_{63}$. Also the appeal to the fact that there are no infinite descending sequences is quite confusing when you consider you can have models of Peano arithmetic of order type $\omega+(\omega^\star+\omega)\times \mathbb{Q}$. Obviously the model doesn't know about the broken sets but this is far from intuitive.
All we really need for a reasonably rigorous proof of the fact that all subsets of the natural numbers have a least element is the induction axiom.
Consider a set $K\subset\mathbb{N}$ such that $K$ has no least element and $K\neq\emptyset$. Thus $\exists\; m\in K$. Now let us define $\phi(n)$ to be true if $\forall\; (i\leq n)$ $i\notin K$. Since $0$ is the least element of $\mathbb{N}$,  $\phi(0)$ must hold, otherwise $0$ is the least element of $K$. Now suppose $\phi(n)$ holds for $n$. If $n+1\in K$ then $n+1$ is the least element of $K$ ($\phi(n)$ holds) so $n+1\not\in K$. Thus by induction $\{n|\phi(n)\}=\mathbb{N}$ and $\phi(m)$ holds giving us a contradiction since $m\in K$ and thus $\exists\; (i\leq m) (i\in K)$ namely $m$.
Answer: It doesn't matter whether or not you can write the numbers down, there'll always be a smallest element. This is the principle of well ordering.
Answer: The base-10 system is sufficient to denote any natural number, given a sufficiently large amount of space in which to do it. So the set you've specified is simply nonempty.
You could specify, for example, the set of all natural numbers $n$ so that $n$ has no notation expressible in base 10 using fewer than (say) $10^{100}$ symbols. Since there are finitely many symbols, there are only finitely many numbers that can be expressed in only that many symbols; therefore this set is nonempty. On the other hand, it does have a least element; that least element is $10^{10^{100} + 1}$.
Another common variation is a paradox: consider the set of natural numbers not describable in English using fewer than ten thousand symbols. This is nonempty for the same reason: there's only finitely many English symbols, so only finitely many combinations of ten thousand of them. On the other hand, its least element $N$ could be described as "the least number not describable in English using fewer than ten thousand symbols", which is a description that takes a whole lot less than ten thousand symbols. This isn't a contradiction, though - the secret is that my condition "describable in English" wasn't well-formed. In order to completely specify what I mean, I would have to completely describe English and unambiguously explain the meaning of English words, which is not possible to do in English.


Areas where DGPS with post processing (not RTK) is still required

Question: I am wondering in which domains or countries where Differential GPS (DGPS) with post processing (not Real Time Kinematic [RTK]) is still required? It's known that RTK has been rapidly adopted by cadastral services in several countries, but I wonder if DGPS with post processing is still required? And why we still need it when we can accomplish the same task using RTK?
Answer: First, RTK stations are not always available. There are some countries where there are no or little stations, and according to this source even in the US you have states without public RTK. So you then need your own base station and if you want to make you own RTK you need an emitter in addition to the GPS receiver, so this i more expensive.
EDIT: for the centimetric level accuracy, you need a phase correction on L1/L2. Therefore you need at least one other station located at maximum 15-20 km for your receiver for the best accuracy. You can of course have your second station equiped for RTK, but in addition to being more expensive hardware, you might also loose some time because you'll need to know the exact location of your base station (if you are lucky, you know it but otherwise you need to take the average position over a long period of time). With post-processing you can compute this position at the end of your day, so you didn't loost the time to initialize.
Second, RTK signal is sometimes difficult to obtain. This is less true now, but sometimes in deep forested valleys you don't get the RTK signal even if you were supposed to. In this case post processing is necessary.
As a final remark, DGPS is used in different context, but it is primarily the fact of correcting the position captured by a GPS using information from another receiver located at a known position. DGPS can refer to any type of ground based augmentation system, including post-processing and RTK  which are just two possible technical solutions to get the information for the correction. In terms of accuracy, it is the fact that you use the carrier phase information that allows you to go below the 10 cm (so DGPS is sometimes less accuracte). Not all receivers are equiped for L1/L2 carrier phase measurements, but I guess that cadastral services are.
Comment: so for eg (cadastral services) in countries with no RTK coverage like thrid world countries, still requires DGPS because there is no official RTK coverage ? i'm sorry for this question , but i'm trying to understand the reason why some administrations still require  DGPS only.
Comment: I've edited my answer. Not only in third world countries can you find locations without RTK. And RTK is only one type of DGPS correction (its real time, but you do not need real time if you survey a parcel for the first time, you need real time if you want to come back to a specific place)
Answer: One example is if you are setting up an RTK survey, but don't have any permanent marks.
In this situation, you set up a base station and observe for 6+ hours while you undertake your field work with a radio-connected rover (you might be able to do this disconnected?), then you  can post-process to identify the coordinates of your base station. Post-processing gives you mm precision with long observation times.


how do i rename the video file after i export it?

Question: I downloaded some videos to my android tablet from drop box. I then edited the videos together as one file and am ready to upload to a business site which the files are required to be named a specific way.  I cannot figure out how to rename the the completed file and meet the requirements of the site. When I click on the file in my video folder the only option I get is to delete the file. Can anyone help?
Comment: Use another file manager application like ES file explorer.
Answer: either try another file explorer if you are not familiar with the default one (usually either a "right click" or long hold to get the file rename option).
my personal favorite since it is double-windowed is total commander or you can try that ES file explorer (ad-supported maybe)...


Is it possible to cast multiple spells per turn?

Question: Never had an issue with spellcaster scaling until today.
A player in the group claims he can cast Eldrich Blast twice on his turn. Once as an action, and a second time as a bonus action since it is a cantrip. Allowing him to shoot 4 beams for a d10 each (he's 5th level so 2 beams per cast). This seems vastly stronger than anyone else's max 2 attacks.
After the session which ended early with many players angry this player ruined all encounters, there was much talk of re-rolling into all caster party. One wanting to do the same with a wizards Firebolt spell as a bonus every turn, others still browsing.
So, is it possible for a caster to cast multiple spells in 1 turn? From what I was quoted from the PHB, it's possible to cast any spell as an action, then cast a second spell; as long as the bonus action spell was a cantrip with a cast time of 1 action? So 99% of all cantrips? Please tell me this is wrong, because I feel that if anyone else does this our melee characters will never see a fight again before the casters nuke them down.
Comment: @MarkCogan Not necessarily - they could have taken the spell sniper or magic initiate feats, or multi-classed. This is slightly important, as a sorcerer could cast eldritch blast as an action and a bonus action if they spent sorcery points to apply 'quickened spell'.
Comment: level 5, what class, by the way?
Comment: Eldritch Blast is only on the warlock cantrip list, so the character must have been a warlock.
Comment: Related: [Casting multiple spells in a single round](https://rpg.stackexchange.com/questions/49532/casting-multiple-spells-in-a-single-round)
Comment: Well, looks like Viva La Dirt League created an episode to illustrate that very discussion: https://www.youtube.com/watch?v=2ONqZ8Mxweo
Answer: You were quoted the rules incorrectly.
First, Eldritch Blast has a casting time of 1 action (PHB p.237). You've only got one action on your turn, so you can only cast Eldritch Blast once. ("Off the shelf," that is. There are features, like the Sorceror's Quickened Spell, Action Surge, or even time stop that might change this.)
Boom. That's it. They can't cast a second eldritch blast as a bonus action, because the casting time of eldritch blast isn't "1 bonus action." (Compare with, say, healing word.)

But that's understandable.
It is possible for a caster to cast a spell as a bonus action and another as an action in one turn; the conditions are described exactly on PHB p.202:

one spell has casting time of 1 bonus action,
you've not used a bonus action for anything else this turn (because you can only take one bonus action per turn),
the other spell is a cantrip,
the other spell has a casting time of 1 action.

D&D is a great game in many ways. It has never, in my experience, been presented in its published materials in a way that makes sense to someone who doesn't already know the game. One player misunderstood something, and no other players nor the GM knew the rule well enough to course-correct mid-session.
That's fine. You now know. Alert your group as soon as possible and be ready for  a group conversation about whether this should now be a table-rule, or will this just have been one shining moment in 'Lock's career. "Hey, guys, remember that one day when I was in beast-mode? My patron must have been having me on!"
Comment: @Quentin I think that's right. Specifically: assume you casts *Eldritch Blast* with your action. That satisfies bullets 3 & 4. Assume you haven't used a bonus action for anything else yet: check for bullet 2. But bullet 1 fails, because *Eldritch Blast* has a casting time of 1 action, not 1 bonus action. (With Sorcerous Metamagic: Quickened Spell you could change the casting time of a second *EB*, at the cost of sorcery points. But not all day....)
Comment: Where are you seeing a rule that a cantrip can't both be the bonus action and action?
Comment: Just to make things crystal clear, am I right in reading this as "You can't cast Eldritch Blast twice because of the 4 conditions for casting two spells on one turn, you only fulfil 3 of them"?
Comment: @BenjaminOlson I don't understand why you say that quickening "doesn't work", there is no rule that prevents a caster from casting a cantrip on both action and bonus action? Its only level 1+ spells that have any such restriction. The original questioner is asking about casting the same cantrip in both but as the casting time for one would not fit the action being used to cast it this cannot be done without the use of quicken in order to bring a 1 action into a 1 bonus action speed.
Comment: Making a cantrip a bonus action still doesn't get around not being allowed to have cantrips used on both bonus action and action, so quickened spell doesn't work for doubling up. Action surge does as it gives a second, unrestricted action and there are no rules about the same spell/cantrip on two actions in the same turn (which is almost an impossible thing to have, and haste, the other major source, excludes spells from the second action).
Answer: It appears the player has garbled the rules on Bonus Action casting time spells (PHB p.203):

Bonus Action
  A spell cast with a bonus action is especially swift. You
  must use a bonus action on your turn to cast the spell,
  provided that you haven't already taken a bonus action
  this turn. You can't cast another spell during the same
  turn, except for a cantrip with a casting time of 1 action.

The spell cast using the Bonus Action must have a casting time of 1 Bonus Action. There are very few of these and Eldrich Blast is not one of them.
A sorcerer can use metamagic to Quicken a 1 action spell to a 1 bonus action casting time and this would allow the double combo the player wants: just not to Warlocks.
Answer: No. You can only cast a spell as a bonus action if the casting time in the spell description says "1 bonus action." Eldritch blast does not. If you cast a bonus action spell, the only other spell you can cast that turn is a cantrip. So, if he casts Hex, he can still cast Eldritch Blast that same turn, but not another leveled spell. This is the rule to which your player was referring (and misinterpreted).
There are features of other classes that can affect casting times, but not in the warlock class.
Answer: Let's start with the PHB definition of a bonus action (pg. 189):

Various class features, spells, and other abilities let
  you take an additional action on your turn called a bonus action.

So you can only use a bonus action when something says that is a bonus action.
Let's have a look at the bonus action description under "Casting Time":

A spell cast with a bonus action is especially swift. You must use a
  bonus action on your turn to cast the spell, provided that you haven't
  already taken a bonus action this turn. You can't cast another spell
  during the same turn, except for a cantrip with a casting time of 1
  action.

So only spells with a casting time of "bonus actions" can be used as a bonus action (healing word, sanctuary and spiritual weapon are examples of this). But if you cast one of this spells, you can only cast a cantrip with your standard action.
So you can't cast a spell with a casting time of "1 action" as a bonus action, unless special circumstances reduce the casting time to a "bonus action", like the sorcerer Quickened Spell metamagic option.
Answer: I believe you are misreading what the rules say about casting spells with a bonus action. From the SRD:

A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven't already taken a bonus action this turn. You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.

It do not say that you can cast a cantrip with a bonus action on your turn. It says that if you cast a spell that has a cast time of a bonus action (eg, Healing Word), you can only cast another spell with your action if it is a cantrip.
Answer: No. Here is what the Sage Advice Compendium (2019) has to say:
(For those unaware, the SAC is list of rules clarifications written by the D&D game designers. As sometimes the Rules as Written are unclear, the SAC provides the developer's Rules as Intended.)

Can a bonus action be used as an action or vice versa? For example, can a bard use a bonus action to grant a Bardic Inspiration die and an action to cast healing word?
No. Actions and bonus actions aren't interchangeable. In the example, the bard could use Bardic Inspiration or healing word on a turn, not both.

As Eldritch Blast has the casting time of one action, it can not be cast as a bonus action. As stated above, actions and bonus actions aren't interchangeable, the player could only cast Eldritch Blast with their action.
However, the Sage Advice Compendium also says this:

Is there a limit on the number of spells you can cast on your turn?
There's no rule that says you can cast only X number of spells on your turn, but there are some practical limits. The main limiting factor is your action. Most spells require an action to cast, and unless you use a feature like the fighter's Action Surge, you have only one action on your turn.
If you cast a spell, such as healing word, with a bonus action, you can cast another spell with your action, but that other spell must be a cantrip. Keep in mind that this particular limit is specific to spells that use a bonus action. For instance, if you cast a second spell using Action Surge, you aren't limited to casting a cantrip with it.

Firstly, this further confirms that Eldritch Blast can not be used twice, though you can cast it and a spell with a casting time of a bonus action as Eldritch Blast is a cantrip. Secondly, this states that you could cast Eldritch Blast twice per turn if you had two actions per turn.
Finally, there is a section about casting reaction spells:

Can you cast a reaction spell on your turn?
You sure can! Here's a common way for it to happen: Cornelius the wizard is casting fireball on his turn, and his foe casts counterspell on him. Cornelius also has counterspell prepared, so he uses his reaction to cast it and break his foe's counterspell before it can stop fireball.

Now, whilst Eldritch Blast does not have any reactions attached to it in it's description, the War Caster feat says:

when a hostile creature's movement provokes an opportunity attack from you, you can use your reaction to cast a spell at that creature, rather than making an opportunity attack. The spell must have a casting time of 1 action and must only target that creature.

Theoretically, this means you could cast Eldritch Blast using your action then, if the creature moves, you could use it again, but only on the creature that moved. In this way, you could fire 4 Eldritch Blast beams at 5th level in a single turn (or 8 in one turn at 17th level), but half of them can only hit a single target, and only if their movement provokes an opportunity attack from you and you have the War Caster feat.
It's even possible that, by multi-classing and using feats, you could use Eldritch Blast even more times per turn. For example, combining Action Surge and the War Caster feat, you could: use an action to cast Eldritch Blast, Action Surge, use your second action to cast Eldritch Blast, opportunity attack is provoked, use your reaction to cast Eldritch Blast. A character who was a 5th-level Warlock and 2nd-level Fighter could fire 6 beams in a single turn this way; a 17th-level Warlock and 2nd-level Fighter could fire 12 beams a turn using this method.
Comment: Ah, i appear to have confused myself when writing that. Whilst yes, under most circumstances, you would wouldn't be able to trigger it on your turn, there is a small handful of ways an opportunity attack *could* be triggered on your turn. For example, a reaction from the enemy may cause them to move, triggering an opportunity attack, as would a Readied Action which states "if i take damage, i will move away". So there are possible, though unlikely, ways a reaction could be triggered on your turn.
Comment: For your last paragraph: How would an enemy provoke an opportunity attack on your turn?
Answer: You can:

Cast a spell as an action as well as a reaction spell during your turn.

or

Cast a cantrip as an action, and either a bonus action spell or a reaction spell during your turn.

The rules on bonus action spells state:

A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven't already taken a bonus action this turn. You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.

The rules for bonus action spells, which lack any explicit exception, explicitly prohibit the casting of any other spell in the same turn as a bonus action spell except for a cantrip with a casting time of 1 action. Thus, reaction spells and bonus action spells are mutually exclusive during your own turn this way; you can't cast 3 spells on your own turn. You cannot cast Shocking Grasp, miss, cast Expeditious Retreat, move, and cast Shield in response to an opportunity attack, as this violates the bonus action rule, because it's still the same turn.
Traditionally, this isn't an issue as most are familiar with the cantrip + bonus action spell option, but using a reaction to cast a spell on your own turn can't be done if you've already cast a bonus action spell first, or prohibits the use of a bonus action spell for the rest of your turn. This also means you cannot counter-Counterspell to protect any bonus action spell (such as Quickened spells), as this invokes the same bonus-action restriction.
Comment: @Zourin - my point was they still have to be cast *as a reaction.*  Someone could infer otherwise from your statement, "There are no RAW restrictions on using reaction spells on your turn in conjunction with other full spells"
Comment: You can't just choose to cast a spell on your turn as a reaction, there has to be a triggering effect giving you the reaction.  Ex: having the War Caster Feat and casting a spell in place of an Opportunity Attack.
Comment: There's at least two scenarios where you could trigger a reaction on your own turn: Absorb Elements. Hit yourself with a fire spell, cantrip (Bonfire), or environmental effect and you can trigger Absorb Elements (likely upcast) in order to 'supercharge' a follow-up strike.  You can also trigger Shield on your own turn by provoking an AoO (and it lasts until your next turn)
Comment: Adding rules support and citations to your ideas would help improve this answer.
Comment: @sirjonsnow I have rephrased everything to be more clear about reaction spells that fall under the 'your turn' umbrella.