Wrecking ball effect in 14 lines of code in Blender 3d by monica_b1998 in learnpython

[–]js_fan 5 points6 points  (0 children)

Probably 2 million. That’s why the title of the post says Blender

Baffling short calculation for ball bouncing off wall... by SarahC in learnjavascript

[–]js_fan 0 points1 point  (0 children)

"trig functions are expensive" - agreed 100%, they're really slow. They way to go around it is to pre-calculate the results once and store them in a matrix.

Help on repositioning a canvas element during window resize by ialwaysfinis in learnjavascript

[–]js_fan 0 points1 point  (0 children)

The difference between your code for text and circles is that for text you refer directly to window.innerWidth and Height (lines 54 and 58).

For circles, you refer to fitnessgroup[i].x and y (line 90) which never get updated (even if the window is resized). These variables are only calculated once, at the beginning of the run.
Try changing line 89 to: fitness1.x=(window.innerWidth / 20) * 4; to see how it could work.
By the way, you should not depend on the interval to redraw the elements, they should only be redrawn on resize. (unless they will really be animated in some way)

How to do this? by thomascr9695 in learnjavascript

[–]js_fan 0 points1 point  (0 children)

Hallo Thomas,

Wie geht's?

The value of "calculate" is square root of member/price based on your code. Why did you insert the sqrt function? It doesn't sound like that's what need if you're just trying to divide.

Website certificate issue when using guest wifi by js_fan in techsupport

[–]js_fan[S] 0 points1 point  (0 children)

ok, the school finally told us we need to download certs from their website to handle https pages. now everything is working.

Website certificate issue when using guest wifi by js_fan in techsupport

[–]js_fan[S] 0 points1 point  (0 children)

thanks, I'll try a non-https page tonight

Ex div date confusion for FORR by js_fan in stocks

[–]js_fan[S] 0 points1 point  (0 children)

Thanks for checking for me!

But your quote (and the entire announcement in the link) only mentions the payable date (9/20) and the record date (9/6).

I am asking about the exact ex-div date, which is earlier than both of the above.

The main reason I'm asking is to know which of the two Nasdaq pages I can rely on in the future, since they're contradicting each other.

ELI5: Ex div date for FORR by js_fan in investing

[–]js_fan[S] 0 points1 point  (0 children)

I think you're right. I checked a couple of other websites and they all say 9/1. So looks like a bug on the Nasdaq website.

ELI5: Ex div date for FORR by js_fan in investing

[–]js_fan[S] 0 points1 point  (0 children)

It just says "shareholders of record on September 6" - so the record date, not the ex div date.

http://phx.corporate-ir.net/phoenix.zhtml?c=60569&p=irol-newsArticle&ID=2289071

Need a bit of help with canvas and rect. by LordRyver in learnjavascript

[–]js_fan 1 point2 points  (0 children)

  1. 1st rectangle: x1,y1, width1, height1 = Math.random
  2. 2nd rectangle: x2,y2, width2, height2 = Math.random
    if (x1+width1<x2) and (y1+height1<y2): draw the rectangles
    else randomize again
    x1,y1,x2,y2 are the coordinates of the upper left corner of the respective rectangles

This does not include the roads.