I have a web page that has a table and inside one of the td is span that uses a smaller font, float right to place it to the far right, and a negative margin-top, so it is aligned with larger text in the td.
With Firefox 3.0 it works fine, but I just updated to Firefox 3.5 and the margin is moving the text up too far.
I have another pa...
I have some strange floating behaviour on opera (IE f's up completely different, but that's for later).
I'm floating the i-icons to the right. It works nicely on Fx and WebKit, but opera shifts the icons down a bit. Anyone got an idea how this happenes?
CSS:
.dataRow {
margin: 5px 0;
clear:right;
}
.dataRow label{
display: block;...
http://dev.dealercontrol.net/dealercontrol/index_comp1.html
on this page I am trying to float a flag to the left of the subtitle
<div>
<div class="flag certified">Certified</div>
<div class="subtitle left">Deal On 09 Black Lamborghini LP560</div>
</div>
I can't seem to get the flag to layout pr...
Can you force a container DIV height to accomodate two floated div children? Is there a fancy trick I can use to do that? I am trying to make two equally sized divs inside the parent div. I would like them to appear side by side with a little whitespace between them. Child2 tends to pop out and go below Child1. Note Child2 contains a tab...
I used the following line to convert float to int, but not as accurate as I'd like :
float a=8.61f;
int b;
b=(int)a;
The result is : 8 [ It should be 9 ]
When a=-7.65f, the result is : -7 [ It should be -8 ]
What's the best way to do it ?
...
How do I prevent String.format("%.2f", doubleValue); from rounding off (round half up algorithm) instead of just truncating it?
e.g.
doubleValue = 123.459
after formatting,
doubleValue = 123.46
I just want to discard the last digit,
123.45
I know there are other ways to do this, I just want to know if this is possible using the...
Hello,
Please help me in this. I need to create a layout using percentage widths. I have a wrapper that is 100% width.
Now I have a DIV (the main wrapper.. I want to keep it at 94% width percentage.. 94% of 100% body).. okay fine
So to make this simple.
-> BODY 100% width set
--> CONTAINER 94% width
---> FIRST CHILD DIV 70% float l...
I have output like this:
1569.3669
15968.3699
41.3878
587.5401
but I want the output like this:
01569.3669
15968.3699
00041.3878
00587.5401
How can I do this in the C language?
...
I am trying to convert a char array to double, but I got some sort of rounding at the last precision of the the decimal. Please see the code below.
#include <stdio.h>
#define INT32MAX 017777777777
#define LIND 0
#define MIND 1
typedef int Int32;
typedef unsigned int UInt32;
typedef short int Int16;
union _talign
{
doub...
Is it possible to use RSpec .should(change(...)).by(...) with float numbers and set the compare precision like this:
lambda { ...}.should change(unit, :price).by(12.151, 10e-5)
Thanks,
...
Hello, I'm making a program that, for reasons not needed to be explained, requires a float to be converted into a string to be counted with len(). However, str(float(x)) results in x being rounded when converted to a string, which throws the entire thing off. Does anyone know of a fix for it?
Here's the code being used if you want to kno...
From my experience I have learn that using an surrogate INT data type column as primary key esp. an IDENTITY key column offers better performance than using GUID or char/varchar data type column as primary key.
I try to use IDENTITY key as primary key wherever possible. But recently I came across a schema where the tables were horizonta...
int is usually 32 bits, but in the standard, int is not guaranteed to have a constant width. So if we want a 32 bit int we include stdint.h and use int32_t.
Is there an equivalent for this for floats? I realize it's a bit more complicated with floats since they aren't stored in a homogeneous fashion, i.e. sign, exponent, significand. ...
I am trying to derive a class from a python primitive, the float, for the purpose of printing a different repr string when it's printed out.
How do I access the underlying data from the derived class when I do this?
Here's a simplified example of what I am trying to do:
class efloat(float):
def __repr__(self):
return "here...
This is unlike anything I've read about and I've been totally scratching my head for the last few hours trying to figure out what's going on.
I have a hand-coded site @ hartbro.com Part of the site is a blog, in which I include pictures. Here's the HTML code around one of the images that's causing trouble.
<a href="blogcontent/090811.j...
How can I round a float (such as 37.777779) to two decimal places (37.78) in C?
...
I use the following lines to sort an array of floats in reverse order, but I got an error message, what's wrong ?
float sortedData[]=new float[100];
...
Arrays.sort(sortedData,Collections.reverseOrder());
Error : cannot find symbol
symbol : method sort(float[],java.util.Comparator)
location: class java.util.Arrays
Arrays.s...
I understand that "2.5" is automatically a double, and to make it a float, I need to do "2.5F" (or should the F be lowercase?), and that I should use a float, say, if I had a constant that only ever needed 2 decimal spaces (like "0.08F" for Ontario PST tax), but I'm not sure whether "12" is an int or a long, but I know "12L" is a long, b...
I have the following formula
float mean = (r+b+g)/3/255.0f;
I want to speed it up. There are the following preconditions
0<= mean <= 1 and 0 <= r,g,b <= 255 and r, g, b are unsigned chars
so if I try to use the fact that >> 8 is like dividing by 256 and I use something like
float mean = (float)(((r+b+g)/3) >> 8);
this will al...
I'm trying to align a list of div blocks by 2 columns that have varying heights by floating them to each other. If every block's size is fix, they will naturally stack with one another neatly, however because this one involves varying heights, for blocks that are taller, the adjacent block will have alot of blank space below, before goin...