Search Results

Search found 2 results on 1 pages for 'derei'.

Page 1/1 | 1 

  • PHP math gets crazy, need explanation, my brain is melting

    - by derei
    I know that playing with php float can give strange results if you try to add "goats + apples", but please take a look to the following case: $val = 1232.81; $p1 = 1217.16; $p2 = 15.65; $sum = $p1 + $p2; $dif = $val - $sum; echo $dif; It will give you -2.2737367544323E-13 ... yeah, ALMOST zero, but then why it doesn't say 0 ? This freaks me out big time. Please, I need some valid explanation.

    Read the article

  • webpage scrollbar scrolls to top when typing in input box, how to fix?

    - by derei
    I have a HTML table that is scrollable and I'm forcing the scroll bar at the bottom. But every time I type something in a input box situated inside <thead> it scrolls back to top. I have no idea how to stop it to do that... I'm sorry for not explaining it better, if anybody wants to help, I could provide a link. I cannot place it public because is a private project. Thanks, let me know. EDIT -added jsfiddle example (below is the link) click here for jsfiddle example EDIT2 the issue seem to be present only in Chrome, but that it's more than enough (the app is intended to be used in chrome) EDIT3 I found a similar issue here: on webkit browsers typing into edit box causes scrolling , so the problem seem explained: the parent element gets focus on the side where the input-box is. I verified this on a mockup-template and it acts accordingly. *The question is:*how to prevent this to happen? I am forced by situation to have the input-box as child for the scrollable div, but I don't want that scroll to move (somehow to not give focus to the parent element, when I type in the input-box). Any idea?

    Read the article

1