|
Ok, I have been posed with this question, but several of us are arguing over the answer....
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1*0
I was thinking due to PEMDAS that the answer would be 16, but others keep telling me this is 0.... Now I am getting confused...
Started by cassi on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at purplemaths):
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1*0
I was thinking due to PEMDAS that the answer would be 16, but others keep telling me this is....
|
|
How does:
1 + 2 + ... + N-1 + N + N + N-1 + ... + 2 + 1 N+1 + N+1 + ... + N+1 + N+1
equal N(N + 1)? Shouldn't it be 4N + 4 or 4(N + 1)?
Started by Brandon on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
There are n columns....
Each column of the first 2 rows adds up to n+1.
I assume your notation means row 1 + row 2 = row 3?
in this case, look at the columns.
Because you have N number of (N+1) terms.
It is N(N + 1).
Represent.
|
|
Having a baby!!!1!11 1 !!!1!1 1
I'm at the spencer hospital n my girl is having contractions! Holy f***n s**t! My balls are in my throat and my freakin heart is red lineng up in this bitch its beating so f***n fast!!! I'm havin a lil girl!!!
Started by La Snoopy on
, 20 posts
by 18 people.
Answer Snippets (Read the full thread at houstonperformancetrucks):
Dammm badass congrats bro hope evrrything....
You currently have 0 posts.
Thats kool congratulations man congrats bro...best feeling in the world when u hold her for the first time!!
To view links or images in signatures your post count must be 10 or greater .
|
Ask your Facebook Friends
|
Int a = 1 << 32; int b = 1 << 31 << 1;
Why does a == 1? b is 0 as I expected.
Started by CookieOfFortune on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It is as if the ....
From section 5.19 of the spec :
If the promoted type of the left-hand operand is int , only the five lowest-order bits of the right-hand operand are used as the shift distance .
All shifts are done mod 32 for ints and mod 64 for longs .
|
|
In an empty dataset, what is more correct to put in the pagination information in the screen?
Page 1 of 0 Page 1 of 1 Page 0 of 0
Started by Daniel Silveira on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
IMO there should not be any pages.
Its gotta be Page 1 of 1 if a page exists at all.
Page 1 of 1"
You are still printing a page out, even if it is to say "There is no data available for your query".
|
|
In Perl, the array index -1 means the last element:
@F=(1,2,3); print $F[-1]; # result: 3
You can also use the $# notation instead, here $#F :
@F=(1,2,3); print $F[$#F]; # result: 3
So why don't -1 and $#F give the same result when I want to specify the...
Answer Snippets (Read the full thread at stackoverflow):
A range of 1..-1 is empty, and that is why it returns subscripts, so as far as it's concerned....
The proper way is $#F.
-1 is accepted as index to mean the index of last element.
The [] operator will accept either a single index or a range .
|
|
Why does (-1 >> 1) result in -1 ? I'm working in C, though I don't think that should matter.
I can not figure out what I'm missing...
Here is an example of a C program that does the calc:
#include <stdio.h> int main() { int num1 = -1; int ...
Started by Frank on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Because signed integers are represented in....
Developer’s Manual, Volume 1); the SAR instruction sets or clears the most significant bit value (see Figure 7-9 in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1).
|
|
Hi,
I have a 1 x N double array and I would like to merge it to become a 1 x 1 array.
E.g. K = [0,1,1,1];
I want K to become K = [0111];
How do I do it?
Started by HH on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
1*4 + 10*3 + 100*2 + 1000*1
in python:
''.join([str(i) for i in k]) '1234'
Here's a cute way of doing it in one line:
>> K = [1 2 3 4]; >> K*10....
You can do this mathematically, based on the position of the number i.e .
|
|
In Postgre, why does
select abc from (select 1) as abc
produces:
(1)
and
select * from (select 1) as abc
produces:
1
That's really strange to me. Is that the case with MySQL, Oracle, etc? I spent hours figuring out why my conditions were failing...
Started by presario on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
To select the INT value, use:
SELECT....
What does
select foo from ( select 1 foo ) as abc
produce?
The rows returned by your queries have abc FROM (SELECT 1, 2) abc
will produce (1, 2) , which is a single column too and has type ROW .
|