float

float animated ImageView on top of other elements within LinearLayout - android

I have an extended ImageView that I'm reusing 7 times horizontally (within a LinearLayout) across my screen. Directly above and below this ImageView are other extended ImageViews that are within their own LinearLayouts. I'm spacing these all evenly by using the weight property within the LinearLayout so they space evenly across the scr...

haskell floating point precision

I wrote a little program to find the position of a point(x,y) in relation to a line defined by a point(px,py) and an angle(deg) to the x-axis (in a cartesian coordinate system). toRadian deg = deg * (pi / 180) lineSlope deg = tan $ toRadian deg lineYintercept (x,y) deg = y - (x * lineSlope deg) relativePointPosition (px,py) deg (x,y)...

CSS: on floating divs and negative margins

So I wanted a centered, constant width, three-column layout that was compatible with IE and whose columns would stretch to all be of equal height (equal to the height of whichever column had the tallest content). I know- keep dreaming, right? Well I almost figured it out. After combining the techniques I found here on Stack Overflow wit...

C++ / C# differences with float and double

We are converting a C++ math library to C#. The library mixes the use of floats and doubles (casting between them sometimes) and we are trying to do the same, in order to get the exact same results in C# that we had in C++ but it is proving to be very difficult if not impossible. I think the problem is one or more of the following, but ...

Number of floats between two floats

Say I have two Python floats a and b, is there an easy way to find out how many representable real numbers are between the two in IEEE-754 representation (or whatever representation the machine used is using)? ...

[C#] Get only the first 10 number of a X lenght digit.

Hello all. I have a method , that calculates distance between two xyz cords, and return me a nice long double number like 10,12345678963235. But I only need 10,12345 , that would be enought for me. How can I do this? This is the method that returns me the value: public static double Distance(Vector3 v1, Vector3 v2) { return ...

Why Floating point numbers cant be compared?

Possible Duplicate: strange output in comparision of float with float literal #include<stdio.h> int main() { float me = 1.7; if(me==1.7) printf("C"); else printf("C++"); } Output: C++ Now the reason for this behaviour is said that many floating point numbers cant be represented with absolute precision in binary. My...

How would you fix this uncommon example of the common IE Z-index bug?

This may appear to be a common question that has already been answered because it refers to the well-known z-index bug in IE7 and lower. However, this situation is somewhat unique; I am using a CSS dropdown menu that uses nested lists for sub menus. I have used this many times on other sites, but usually with the first level being horiz...

can't multiply sequence by non-int of type 'float'

level: beginner why do i get error "can't multiply sequence by non-int of type 'float'"? def nestEgVariable(salary, save, growthRates): SavingsRecord = [] fund = 0 depositPerYear = salary * save * 0.01 for i in growthRates: fund = fund * (1 + 0.01 * growthRates) + depositPerYear SavingsRecord += [fund...

Float for 2 column layout ?

Ok so I thought it would be best to work on individual parts then pull them all together in the end. I have run into a problem when I am trying to apply all the pieces. I have a this is going to control the entire page padding, ect. Then I decided to make div class="nav" to contain the nav and image. I wanted these side by side. us...

Div side by side without float

How can I make div 'left' and 'right' look like columns side by side? I know I can use float:left on them and that will work... but on step 5 and 6 in here http://www.barelyfitz.com/screencast...s/positioning/ the guy says it is possible, I can't get it work though... Code: <style> div.left { background:blue; height:200px; ...

Textview wrap around View

Hi, I'm trying to make my horizontal layouts take advantage of the room available. In an info showing activity I have a 'fact box' followed by a large box of text. I'd like the infobox to float right, similar to the following picture. Is this possible using the android TextView api? ...

CSS Floating Divs with different height are aligned with space between them

Hi, i am using left floating DIVs to simulate a two column layout (each div contains textfield to edit different data, like name, hobbies,...). So it should look like this 1 2 3 4 5 6 Now my div-boxes aren't always the same, since some DIVs have more elements than the other ones. Now my layout looks likes this 1 2 2 3 4 ...

Scheme: Using only R6RS, how do I determine a flonum's mantissa and exponent

Is this possible to extract mantissa and exponent from a float in major R6RS Scheme implementations so that: v = f x b^e f - mantissa b - base e - exponent For example: 3.14 = 0.785 x 2^2 If it's not supported, I'd like to have access to flonum's (IEEE 754) bits directly to approach the problem of extracting the above values, but I'v...

Create a "floating" control in C# (WinForm app) without WPF

Hi, I want to create a "floating" control - like Visual Studio's ones (The solution explorer, for example). How can I implement such thing? Thank you. ...

With three divs, how to make one float to the right?

I have three divs: <div class="A">A</div> <div class="B">B</div> <div class="C">C</div> I want them to be positioned like this: A C B Where C should always be in the top right corner of the container they're in. How do I go about this in CSS using only the three divs and in that order? I've tried a lot of different combination...

css float issue in IE.

Link to Source of CSS Issue On that page there is a carfax link towards the bottom of the page "View Full Report" I can't get it to display relative to the parent div in IE for some reason and suggestions? ...

Why use Float.floatToIntBits() in Java float comparisons?

In JBox2d, there exists the following code for Vec2.equals(): @Override public boolean equals(Object obj) { //automatically generated by Eclipse if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Vec2 other = (Vec2) obj; if (Float.float...

53 * .01 = .531250

I'm converting a string date/time to a numerical time value. In my case I'm only using it to determine if something is newer/older than something else, so this little decimal problem is not a real problem. It doesn't need to be seconds precise. But still it has me scratching my head and I'd like to know why.. My date comes in a strin...

What's the least (negative) integer value that can be exactly represented by Double type in all major x86 systems?

What's the least (negative) integer value that can be exactly represented by Double type in all major x86 systems? Especially in (simultaneously) JVM, MySQL, MS SQL Server, .Net, PHP, Python and JavaScript (whatever corresponding type it uses). The reason why I ask about this is because I'd like to choose a value to use to represent an ...