float

IE7 issue w/ jQuery site feature

I'm not entirely sure what's breaking here on this page: http://grandoaks.org/floor.html but it seems to only be broken in IE7 (IE8, FF3, Safari, Opera, Chrome, Camino all worked). When you mouseover the names of the suites, it should show a description by removing an 'active' class and applying it to the corresponding div, with the sty...

What's a good way to add a large number of small floats together?

Say you have 100000000 32-bit floating point values in an array, and each of these floats has a value between 0.0 and 1.0. If you tried to sum them all up like this result = 0.0; for (i = 0; i < 100000000; i++) { result += array[i]; } you'd run into problems as result gets much larger than 1.0. So what are some of the ways to mor...

Padding-background of floated div does not show up.

I'm having problems with a div that I need to have padding. Adding padding to it "works" however the padding-part doesn't get the background that the rest of the div has, it's just "invisible". I've stripped out the relevant part of the code. Fire it up and you'll see. If i remove the floating of the inner box then the padding-backgroun...

Can I flow divs down the page instead of across it?

If I have a collection of div elements, I can use CSS to have them flow across the page and overflow onto the next line. Here's a simple example: <html> <head> <title>Flowing Divs</title> <style type="text/css"> .flow { float: left; margin: 4em 8em; } </style> </head> <body> <div class=...

IE7 float and clear on the same element

Hi geeks, Here is my code, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>[your title]</title> <style type="text/css...

How do i convert String to Integer/Float in Haskell

data GroceryItem = CartItem ItemName Price Quantity | StockItem ItemName Price Quantity makeGroceryItem :: String -> Float -> Int -> GroceryItem makeGroceryItem name price quantity = CartItem name price quantity I want to create a GroceryItem when using a String or [String] createGroceryItem :: [String] -> GroceryItem createGrocery...

How to determine the modulus of a Float in Ada 95

I need to determine the amount left of a time cycle. To do that in C I would use fmod. But in ada I can find no reference to a similar function. It needs to be accurate and it needs to return a float for precision. So how do I determine the modulus of a Float in Ada 95? elapsed := time_taken mod 10.348; left := 10.348 - elapsed; del...

Why does (360 / 24) / 60 = 0 ... in Java

I am trying to compute (360 / 24) / 60 I keep getting the answer 0.0 when I should get 0.25 In words: I want to divide 360 by 24 and then divide the result by 60 public class Divide { public static void main(String[] args){ float div = ((360 / 24) / 60); System.out.println(div); } } This prints out: 0.0 Why is that? Am I...

Using CSS how do you move text down when a floated image is above a certain width?

I have a text block with an image floated left. The images can be of variable width. If the image is say greater than 2/3 the width of the block I want the text to drop down below the image but if not I want it beside the image. All of this is in Drupal if that matters. ...

Float Issue in IE

Ok I am making a simulated OS type interface. It should open up windows and have a drag handle. This all works perfectly. Then I added a image for an exit button I floated to the right... this made IE mad and IE screwed with the sizing and positioning =[ I've tried a crap load of things. None of which work. Anyone wana help? website is...

Why is float getting rounded off in this Objective C / Cocoa code

I am doing a simple : float x = 151.185436; printf("x=%f",x); and the result is x=151.185440 Whats wrong here? I want to retain and print my original value of 151.185436 Thanks Amarsh ...

Python mistaking float for string

I receive TypeError: Can't convert 'float' object to str implicitly while using Gambler.pot += round(self.bet + self.money * 0.1) where pot, bet, and money are all doubles (or at least are supposed to be). I'm not sure if this is yet another Eclipse thing, but how do I get the line to compile? Code where bet and money are initiali...

Extra leading zeros when printing float using printf?

I'd like to be able to write a time string that looks like this: 1:04:02.1 hours using printf. When I try to write something like this: printf("%d:%02d:%02.1f hours\n", 1, 4, 2.123456); I get: 1:04:2.1 hours Is it possible to add leading zeros to a float formatting? ...

CLLocationDegrees problem

How do you make a CLLocationDegrees? It's not a float, so what is it? ...

Reducing decimal places in Delphi

I am storing a list of numbers (as Double) in a text file, then reading them out again. When I read them out of the text file however, the numbers are placed into the text box as 1.59993499 for example, instead of 1.6. AssignFile(Pipe, 'EconomicData.data'); Reset(Pipe); For i := 1 to 15 Do ReadLn(Pipe, SavedValue[i]); Close...

Convert.ToInt or String.Split : which is more efficient?

Which way is better for removing float decimals places or is there a more efficient way? Rounding is not important, i am interested in displaying the number Float number; 1- int wholeNumber= Convert.ToInt(number); string display=wholeNumber.ToString(); 2- string [] splitNumber= number.ToString()....

Is it good to use float in table less design?

Is it good to use float in table less design? What is the pros/cons of float in the context of table less cross browser compatible design? Is there any the best practices guidelines for cross browser compatible tableless design? ...

Python float copy question

Hi, I'm puzzled by some behaviour I'm seeing when copying a float array member into another variable - please help! For example data_entry[1] = 9.6850069951 new_value = data_entry[1] <comment> #print both 9.6850069951 9.6850663300 I'm aware of the problem of binary storage of floats but I thought with a direct copy of memor...

Why is FLT_MIN equal to zero?

limits.h specifies limits for non-floating point math types, e.g. INT_MIN and INT_MAX. These values are the most negative and most positive values that you can represent using an int. In float.h, there are definitions for FLT_MIN and FLT_MAX. If you do the following: NSLog(@"%f %f", FLT_MIN, FLT_MAX); You get the following output: F...

css problem with make text in the right

i have this <li><a href="#" >title</a> <span style='text-align:right;'>(0)</span></li> its not working and this <li><a href="#" >title</a> <span style='float:right;'>(0)</span></li> its go to the down line (not working) its appear like that |title (0) | i want it |title (0)| ...