Please help me understand how to add binary numbers ?

In Binary ,when adding 1 + 1  it = ’10’ 

In decimal ,when adding 1 + 1 = 2  (The usual addition ) 

So in binary 

100 + 11 = 111

but 

101 + 11 = 1000 

In the units column we have 1 + 1 = 10 

So ‘o’ in the units column , carry ‘1’ in to the ‘tens’ column. 

In the ‘tens’ column we have 1 + 1(carried forward) = 10 

So ‘0’ in the ‘tens’ column , carry ‘1’ in to the ‘hundreds’ column. 

In the ‘hundreds’ column we have ‘1 + 1(carried forward) = 10 

So ‘0’ in the hundreds column , carry ‘1’ in to the ‘thousands’ column. 

Since there are no other numbers in the ‘thousands’column we write ‘1’ .

Hence the answer is ‘1000’. 

NB The binary system is  used in computers because electrical charge, on microchip boards’,  is either ‘on’ or ‘off’ , or the electrical charge is either ‘+’ or ‘-‘

interaction design – How to understand the technical issues while designing?

For instance, I have two designs

Design A like miller columns: Better experience, clear view, no training needed, can play however users want.

Design B like stacked layer or tree view: Best performance, a bit complex design, need to train the users to follow the steps but they can complete the task eventually.

All my team members liked design A, only due to performance issues (as data is collected from different data points) we had to choose the design B.

My questions are:

  1. How to understand the technical abilities/issues of a design before
    presenting it to the engineering team/users?

  2. I learned performance is
    also a primary design principle. Which comes first-
    complex design with the best performance vs simple design with average performance?

Google Analytics: Need to understand some data in user flow

I just started using Google Analytics, for learning purpose, I’m a little obsessed with some data discrepancy, hope someone can explain to me.
I was checking user flow by landing page
enter image description here

Here it shows there are 879 sessions landed on this page,
among them 814 are without any queries
enter image description here

However, on Behavior -> Site Content -> Landing Pages, there are 860 sessions for the URL without any queries, as the below picture shows
enter image description here

Another thing I don’t understand is,
enter image description here

As the above picture shows, the same URL is regarded as different landing page if there are queries, why would GA do this? And, as the below picture shows, among the 860 sessions that landed on the URL without any queries, a lot are actually referred by Facebook. Shouldn’t all Facebook referred URLs have queries like fbcid=xxxx?

enter image description here

algorithms – Cannot understand the relevance of $binom{n-1}{2}$ subarrays in The Maximum Sub-array Problem

I recently came across the sentence in the Book Introduction to Algorithms section 4.1 The maximum sub-array problem:

We still need to check $binom{n-1}{2} = Theta(n^2)$ subarrays for a period of $n$ days.

Here $n$ is the number of days taken as an example to show the changes in price of stock.

We can consider this is the size of an array A.

Where we are provided with an Array A and we need to find the net change is maximum from the first day to the last day.

To explain more specifically it means for an array $A$ of size $n$ we need to check $binom{n-1}{2}$ subarrays.

But, I cannot understand how we need $binom{n-1}{2}$ sub-arrays?

If we take an array of size 5 could someone please explain to me why we need only 6 sub-arrays.
Won’t the sub-arrays be:

(1...5)
(1...4)
(1...3)
(1...2)

(2...4)
(2...5)


(3...5)
(4...5)

Please correct me if I am wrong.
References: Maximum Subarray Problem

The Maximum Sub-array problem
Thank you.

buttons – Would you understand a 3rd state for a “like” action if it’s using the same icon?

We’re having a usability debate: would the user understand what the 3rd state means, without text or tooltips, if all he is presented with is an icon in different color, in a different component?

Could you guys please tell us, for each image, what the “like” state means for you?

Scenario 1

Scenario 2

Scenario 3

Scenario 4

dnd 5e – Can Dragonbait read or write Common, since he is able to understand it?

In D&D 5e, Tomb of Annihilation includes Dragonbait, a saurial. His stat block claims that he can understand Common but not speak it, due to the strange way in which saurials communicate.

Is there any evidence, either in 5e (which I assume is just what’s presented in Tomb of Annihilation) or anything from previous editions of D&D, that suggests that Dragonbait (whether it’s about Dragonbait specifically or saurials generally) can read or write Common, since he can apparently understand it?

[ Politics ] Open Question : I dont understand how you could still support Trump?

Honestly..not trolling i want a serious answer.  From what i have seen the Trump has lost so many USA allies and angered several more.  A trade war with china. and all the little stuff adds up to and now there are Riots and our president does literally nothing but make threats about sending our own troops out against americans…Im baffled how anyone could still support this man…What is it you hope he achieves? yes but im asking what he is doing a good job at though? what policies of his are you happy about this is pointless…like talking to a wall

seo – How to make Google understand that is not self serving reviews?

I run a blog where I write reviews of restaurant and/or pubs, and also user can leave rating (aggregateRating)

For years, my reviewRating was indexed fine.

Some months ago, in serp reviewRating has been replaced in favor of aggregateRating, I think because of this google rule

Ratings must be sourced directly from users. (*)

Now, also aggregateRating was removed, I suppose because of this?

Pages using LocalBusiness or any other type of Organization structured data are ineligible for star review feature if the entity being reviewed controls the reviews about itself. For example, a review about entity A is placed on the website of entity A, either directly in their structured data or >through an embedded third-party widget. (*)

My blog has a lot of reviews of many different places.
How can I make google understand that these are not self serving reviews?

This is an example of my page markup:

{
 "@context": "http://schema.org/",
 "@type": "LocalBusiness",
 "name": "Resturant Name",
 "description": "orem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eu eros sed eros gravida fermentum non sed...",
 "image": {
   "@type": "ImageObject",
   "url": "https://i.picsum.photos/id/310/700/525.jpg",
   "width": 700,
   "height": 525
 },
 "Review": {
   "@type": "Review",
   "name": "Resturant Name",
   "reviewBody": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eu eros sed eros gravida fermentum non sed ante. Maecenas malesuada orci sapien, vitae hendrerit mauris eleifend in. Integer facilisis dignissim scelerisque. Nam quis dictum metus. .",    "author": {
     "@type": "Person",
     "name": "Jhon Doe"
   },
   "datePublished": "2013-11-08T14:41:19+01:00",
   "dateModified": "2020-06-02T21:24:19+02:00",
   "reviewRating": {
     "@type": "Rating",
     "ratingValue": "4.3",
     "bestRating": 5,
     "worstRating": 1
   }
 },
 "aggregateRating": {
   "@type": "AggregateRating",
   "ratingValue": 3.4,
   "ratingCount": 32,
   "bestRating": 5,
   "worstRating": 1
 },
 "address": "Street Address",
 "priceRange": "€€",
 "telephone": "12346789"
}

When tested with Structured Data Testing Tool I’ve no error and the previews shows aggregateRating indeed

What if I also add “publisher” property? Would be it helpful?

(*) from google technical guidelines

combinatorics – I am unable to understand the logic behind the code (I’ve added exact queries as comments in the code)

Our local ninja Naruto is learning to make shadow-clones of himself and is facing a dilemma. He
only has a limited amount of energy (e) to spare that he must entirely distribute among all of his
clones. Moreover, each clone requires at least a certain amount of energy to function (m) . Your job is
to count the number of different ways he can create shadow clones.
Example:

e=7;m=2

ans = 4

The following possibilities occur:
Make 1 clone with 7 energy

Make 2 clones with 2, 5 energy

Make 2 clones with 3, 4 energy

Make 3 clones with 2, 2, 3 energy.

Note: <2, 5> is the same as <5, 2>.
Make sure the ways are not counted multiple times because of different ordering.

Answer

int count(int n, int k){
    if((n<k)||(k<1)) return 0;
    else if ((n==k)||(k==1)) return 1;
    else return count(n-1,k-1)+ count(n-k,k);   // logic behind this?
}

int main()
{
    int e,m;            // e is total energy and m is min energy per clone
    scanf("%d %d", &e, &m);
    int max_clones= e/m;
    int i,ans=0;
    for(i=1;i<=max_clones;i++){
        int available = e - ((m-1)*i);   // why is it (m-1)*i instead of m*i
        ans += count(available, i);
    }
    return 0;
}

calculus and analysis – Understand output of Integration

Could someone help me understand the output of the following Integration in Mathematica?

Specifically,

(a) what is the meaning of “True”?

(b) Why is the answer in two parts which seem to overlap i.e. x >= 1, and x > 0, but one part is still subtracted from the other?

(c) If the evaluated integral is plotted, it’s showing up as a smooth curve, but the result itself doesn’t get any more compact with FullSimplify?

G1=Tanh(Sqrt((x - x1)^2)/Sqrt(2))
G01 = FullSimplify(Integrate(G1*1, {x1, 0, 1}))

Output with Mma 12.0 on Windows 10

Piecewise({{-1 + x + Sqrt(2)*Log(4/(1 + E^(Sqrt(2)*(-1 + x)))), 
 x >= 1}}, 1 - x + Sqrt(2)*
 Log(1 + E^(Sqrt(2)*(-1 + x)))) - Piecewise({{x + Sqrt(2)*Log(4/(1 + E^(Sqrt(2)*x))), x > 0}}, -x + Sqrt(2)*Log(1 + E^(Sqrt(2)*x)))