The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Mar 13, 2017 03:12
@Maltysen I suppose you can checkout Facebook's oAuth and what length they use
Mar 13, 2017 03:06
@Maltysen CSPRNG generated? Or does it contain something like token = AES(user id)?
Mar 13, 2017 03:04
@Maltysen What's this session token for?
Mar 13, 2017 02:59
AWS has a year of free usage for some services which IIRC should suffice
Mar 13, 2017 02:57
I think it would be good to host it on AWS or elsewhere so people can live test it easily
Mar 13, 2017 02:54
ytho
 
Mar 10, 2014 16:08
Hi there
Mar 10, 2014 16:07
There was a typo in your question - The second root should be $3-2i$
Mar 10, 2014 16:07
Glad I could help!
Mar 10, 2014 16:07
You might want to try expanding it out again. Hold on, I'll improve my answer to show you a shortcut.
Mar 10, 2014 16:07
I believe the answer sheet is incorrect. WolframAlpha verifies : wolframalpha.com/input/?i=x%5E2+-+5x+%2B+7+%2B+i
Mar 10, 2014 16:07
If you took $(x+a)(x+b) = 0$, then the roots would be $x=-a$ and $x=-b$ instead. This is because if you substitute (either of ) these two values in, you will observe that the LHS really resolves into $0$.
Mar 10, 2014 16:07
Then that will be the quadratic equation you were looking for. :)
Mar 10, 2014 16:07
Substitute in $a$ into LHS. Then it becomes $(a-a)(a-b) = 0\cdot(a-b) = 0$.
 
Feb 3, 2014 13:30
vectors are fun! I've recently completed a high school project whereby we have to write an interactive 3D sphere. You really learn a lot from it. Thanks and see you too!
Feb 3, 2014 13:27
that is, if you ever need it^^
Feb 3, 2014 13:27
in* 3d*
Feb 3, 2014 13:27
inn 3d*
Feb 3, 2014 13:27
but the link in my answer in the man thread has some goodies on rotation transforms in 3ds
Feb 3, 2014 13:27
for describing 3d orientation, yes
Feb 3, 2014 13:21
the other 3 (euler angles) for orientation. its in the link i gave.
Feb 3, 2014 13:20
1 for 3d cartesian coordinates (the position)
Feb 3, 2014 13:20
basically, you need 4 parameters instead of just 3
Feb 3, 2014 13:20
see this
Feb 3, 2014 13:20
the flaw of your positioning system is that it does not have enough parameters
Feb 3, 2014 13:19
i think i understand
Feb 3, 2014 13:16
hmm.. alright
Feb 3, 2014 13:16
whats the position, direction and angle for?
Feb 3, 2014 13:14
to only compute the rotation angle from the initial and final vector, or to rotate a vector about some axis by some angle?
Feb 3, 2014 13:13
so what's the aim of your program?
Feb 3, 2014 13:13
wait
Feb 3, 2014 13:11
feel free to use programming jargon, i'm a programmer as well
Feb 3, 2014 13:11
sorry, the final vector should be (1/sqrt(2), 1/sqrt(2), 0)
Feb 3, 2014 13:10
thats awesome
Feb 3, 2014 13:09
sqrt(2) = cos(t)
Feb 3, 2014 13:09
since |A| = |B| = 1, this simplifies to
Feb 3, 2014 13:08
A dot B = |A||B|cos(t)
Feb 3, 2014 13:08
but what we know is that the dot product of the initial vector, A, and the final vector, B, gives
Feb 3, 2014 13:08
we assume that we dont know that t is 45 degrees
Feb 3, 2014 13:08
let the rotation angle (45 degrees in this case) be, say, t
Feb 3, 2014 13:07
the result will be (sqrt(2), sqrt(2), 0)
Feb 3, 2014 13:07
we consider rotating the (1, 0, 0) about (0, 0, 1) by 45 degrees
Feb 3, 2014 13:06
lets take a simpler case
Feb 3, 2014 13:06
yes, it will!
Feb 3, 2014 13:06
if you rotate (1, 0, 0) about Z-axis by 40 degrees
Feb 3, 2014 13:05
the final vector has to be different from the initial vector, or else one can say that nothing has changed
Feb 3, 2014 13:05
as long as you are rotating a vector about ANOTHER vector, you will be able to compute the angle
Feb 3, 2014 13:03
because the vector wont have rotated t all
Feb 3, 2014 13:03
unfortunately it's impossible if you are rotating an axis by itself
Feb 3, 2014 13:02
yep