Search Results

Search found 22308 results on 893 pages for 'floating point'.

Page 4/893 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Floating DIV's alignment problem.

    - by Rodrigo
    I have a fluid layout with DIV's of different heights and widths, and I'd like them to be aligned by lines, kind of like when you do a search on istockphoto, except aligned to the top: image here--http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1902.png I tried floating all the DIV's to the left, but they are not aligned correctly into lines: image here--http://i207.photobucket.com/albums/bb121/jpbanks/Capturadepantalla2010-06-02alas1900.png See how "Prueba" doesn't go all the way to the left? I thought of the jQuery plugin Masonry but what I want is obviously different. Any solution using either CSS or jQuery would be fine. Any ideas?

    Read the article

  • Wireless Access Point - Can't ping other machines on the wireless network

    - by Surfer513
    I have a wireless access point (Netgear), and I have it setup so that it has an IP address in the current subnet (let's say 192.168.2.0, subnet mask of 255.255.255.0). The machine that it is connected to via ethernet cable has an IP in the same subnet as the AP. The machines that are connected to the AP via the wireless connection also have an IP address in the same subnet as the rest of the network (192.168.2.0). All machines can ping the access point, but they cannot ping each other. I don't totally understand why, because there is connection and all of the machines are in the same subnet. I realize this is a layer 3 device, but is there an issue because of this AP's lack of gateway capabilities? (i.e. no routing table, etc.)

    Read the article

  • Configuring a Genius GW-7200 Access Point

    - by alex
    I came across an access point we had a few years ago. I'm now trying to get it set up to work on our network. here are a couple of pictures: http://twitpic.com/194u06/full http://twitpic.com/194u0v/full I have plugged this into our network via the network port on the back. I set up a DHCP reservation, based on the MAC address on the back of the access point, however I cannot ping it, nor access the web interface. I've held down the reset button for 10 seconds, to see if that would do anything. Google doesn't come up with anything on the matter :-(

    Read the article

  • Using write to print floating point numbers.

    - by Tom
    Hi, As an exercise to achieve something larger, i'm trying to use write to print a floating point number. I haven't done this in a while. I must be doing something wrong because I cant get it to work. Here is my code #include <unistd.h> int main(){ float f = 4.5; write(1,&f,sizeof float); return 0; } However, when running it im getting ?@ Any thoughts? Thanks in advance.

    Read the article

  • Floating point innacuracies

    - by Greg
    While writing a function which will perform some operation with each number in a range I ran into some problems with floating point inaccuracies. The problem can be seen in the code below: #include <iostream> using namespace std; int main() { double start = .99999, end = 1.00001, inc = .000001; int steps = (end - start) / inc; for(int i = 0; i <= steps; ++i) { cout << (start + (inc * i)) << endl; } } The problem is that the numbers the above program outputs look like this: 0.99999 0.999991 0.999992 0.999993 0.999994 0.999995 0.999996 0.999997 0.999998 0.999999 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 They only appear to be correct up to the first 1. What is the proper way to solve this problem?

    Read the article

  • floating point equality in Python and in general

    - by eric.frederich
    I have a piece of code that behaves differently depending on whether I go through a dictionary to get conversion factors or whether I use them directly. The following piece of code will print 1.0 == 1.0 -> False But if you replace factors[units_from] with 10.0 and factors[units_to ] with 1.0 / 2.54 it will print 1.0 == 1.0 -> True #!/usr/bin/env python base = 'cm' factors = { 'cm' : 1.0, 'mm' : 10.0, 'm' : 0.01, 'km' : 1.0e-5, 'in' : 1.0 / 2.54, 'ft' : 1.0 / 2.54 / 12.0, 'yd' : 1.0 / 2.54 / 12.0 / 3.0, 'mile' : 1.0 / 2.54 / 12.0 / 5280, 'lightyear' : 1.0 / 2.54 / 12.0 / 5280 / 5.87849981e12, } # convert 25.4 mm to inches val = 25.4 units_from = 'mm' units_to = 'in' base_value = val / factors[units_from] ret = base_value * factors[units_to ] print ret, '==', 1.0, '->', ret == 1.0 Let me first say that I am pretty sure what is going on here. I have seen it before in C, just never in Python but since Python in implemented in C we're seeing it. I know that floating point numbers will change values going from a CPU register to cache and back. I know that comparing what should be two equal variables will return false if one of them was paged out while the other stayed resident in a register. Questions What is the best way to avoid problems like this?... In Python or in general. Am I doing something completely wrong? Side Note This is obviously part of a stripped down example but what I'm trying to do is come with with classes of length, volume, etc that can compare against other objects of the same class but with different units. Rhetorical Questions If this is a potentially dangerous problem since it makes programs behave in an undetermanistic matter, should compilers warn or error when they detect that you're checking equality of floats Should compilers support an option to replace all float equality checks with a 'close enough' function? Do compilers already do this and I just can't find the information.

    Read the article

  • Make floating element "maximally wide"

    - by bobobobo
    I have some floating elements on a page. What I want is the div that is floated left to be "maximally wide" so that it is as wide as it possibly can be without causing the red div ("I go at the right") to spill over onto the next line. An example is here: The width:100%; doesn't produce the desired effect! ** I don't want the green element ("I want to be as wide as possible") to go "under" the red element. Its very important that they both stay separate i.e. .. I think they must both be floated! <div class="container"> <div class="a1">i go at the right</div> <div class="a2">i want to be as wide as possible,</div> <div class="clear"></div> </div> <style> div { border: solid 2px #000; background-color: #eee; margin: 8px; padding: 8px; } div.a1 { float:right; background-color: #a00; border: solid 2px #f00; margin: 12px; padding: 6px; } div.a2 { float: left; /*width: 100%;*/ /*this doens't produce desired effect!*/ background-color: #0b0; border: solid 2px #0f0; margin: 12px; padding: 14px; } .clear { border: none; padding: 0 ; margin: 0; clear:both; } </style>

    Read the article

  • c++ floating point precision loss: 3015/0.00025298219406977296

    - by SigTerm
    The problem. Microsoft Visual C++ 2005 compiler, 32bit windows xp sp3, amd 64 x2 cpu. Code: double a = 3015.0; double b = 0.00025298219406977296; //*((unsigned __int64*)(&a)) == 0x40a78e0000000000 //*((unsigned __int64*)(&b)) == 0x3f30945640000000 double f = a/b;//3015/0.00025298219406977296; the result of calculation (i.e. "f") is 11917835.000000000 (*((unsigned __int64*)(&f)) == 0x4166bb4160000000) although it should be 11917834.814763514 (i.e. *((unsigned __int64*)(&f)) == 0x4166bb415a128aef). I.e. fractional part is lost. Unfortunately, I need fractional part to be correct. Questions: 1) Why does this happen? 2) How can I fix the problem? Additional info: 0) The result is taken directly from "watch" window (it wasn't printed, and I didn't forget to set printing precision). I also provided hex dump of floating point variable, so I'm absolutely sure about calculation result. 1) The disassembly of f = a/b is: fld qword ptr [a] fdiv qword ptr [b] fstp qword ptr [f] 2) f = 3015/0.00025298219406977296; yields correct result (f == 11917834.814763514 , *((unsigned __int64*)(&f)) == 0x4166bb415a128aef ), but it looks like in this case result is simply calculated during compile-time: fld qword ptr [__real@4166bb415a128aef (828EA0h)] fstp qword ptr [f] So, how can I fix this problem? P.S. I've found a temporary workaround (i need only fractional part of division, so I simply use f = fmod(a/b)/b at the moment), but I still would like to know how to fix this problem properly - double precision is supposed to be 16 decimal digits, so such calculation isn't supposed to cause problems.

    Read the article

  • Is there a way to setup a hotspot with a domain name rather than IP address?

    - by WagnerMatosUK
    Basically I've setup a hotspot and its currently being accessed through an IP address. I'd like to use a hostname instead. This is for internal use only, meaning the ODROID device which is being used to as Access Point is connected to the internet via ethernet and only a few devices will access the AP. My setup details: Arch Linux on an ODROID U3 device, using hostapd and dhcp server. PS: I'm quite inexperienced with network so I might be missing something obvious here. Thanks in advance

    Read the article

  • Displaying Multimedia Content In A Floating Window Using FancyBox

    While surfing the web you may have come across websites with images and other multimedia content that, when clicked, were displayed in a floating window that hovered above the web page. Perhaps it was a page that showed a series of thumbnail images of products for sale, where clicking on a thumbnail displayed the full sized image in a floating window, dimming out the web page behind it. Have you ever wondered how this was accomplished or whether you could add such functionality to your ASP.NET website? In years past, adding such rich client-side functionality to a website required a solid understanding of JavaScript and the "eccentricities" of various web browsers. Today, thanks to powerful JavaScript libraries like jQuery, along with an active developer community creating plugins and tools that integrate with jQuery, it's possible to add snazzy client-side behaviors without being a JavaScript whiz. This article shows how to display text, images, and other multimedia content in a floating window using FancyBox, a free client-side library. You'll learn how it works, see what steps to take to get started using it, and explore a number of FancyBox demos. There's also a demo available for download that shows using FancyBox to display both text and images in a floating window in an ASP.NET website. Read on to learn more! Read More >

    Read the article

  • Displaying Multimedia Content In A Floating Window Using FancyBox

    While surfing the web you may have come across websites with images and other multimedia content that, when clicked, were displayed in a floating window that hovered above the web page. Perhaps it was a page that showed a series of thumbnail images of products for sale, where clicking on a thumbnail displayed the full sized image in a floating window, dimming out the web page behind it. Have you ever wondered how this was accomplished or whether you could add such functionality to your ASP.NET website? In years past, adding such rich client-side functionality to a website required a solid understanding of JavaScript and the "eccentricities" of various web browsers. Today, thanks to powerful JavaScript libraries like jQuery, along with an active developer community creating plugins and tools that integrate with jQuery, it's possible to add snazzy client-side behaviors without being a JavaScript whiz. This article shows how to display text, images, and other multimedia content in a floating window using FancyBox, a free client-side library. You'll learn how it works, see what steps to take to get started using it, and explore a number of FancyBox demos. There's also a demo available for download that shows using FancyBox to display both text and images in a floating window in an ASP.NET website. Read on to learn more! Read More >Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to setup a Wireless Access-Point using my laptop's WiFi card?

    - by Abdul Karim Memon
    want to share my Laptops (running Ubuntu 10.10) Broadband with my Android (Galaxy Mini) running 2.2.1. Since Androids currently do not support ad-hoc networks so the "Create new wireless network.." won't help. Q1) How do i setup a Wireless Access Point using my Laptops WiFi card? Q2) What is the difference between an "ad-hoc" network and an "access point"? **abdulkarim@aK-laptop**:~$ lspci | grep ireless 03:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (PCI-Express) (rev 01) iw list Wiphy phy0 Band 1: Capabilities: 0x11ce HT20/HT40 SM Power Save disabled RX HT40 SGI TX STBC RX STBC 1-stream Max AMSDU length: 7935 bytes DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 8 usec (0x06) HT TX/RX MCS rate indexes supported: 0-15 Frequencies: * 2412 MHz [1] (20.0 dBm) * 2417 MHz [2] (20.0 dBm) * 2422 MHz [3] (20.0 dBm) * 2427 MHz [4] (20.0 dBm) * 2432 MHz [5] (20.0 dBm) * 2437 MHz [6] (20.0 dBm) * 2442 MHz [7] (20.0 dBm) * 2447 MHz [8] (20.0 dBm) * 2452 MHz [9] (20.0 dBm) * 2457 MHz [10] (20.0 dBm) * 2462 MHz [11] (20.0 dBm) * 2467 MHz [12] (20.0 dBm) (passive scanning) * 2472 MHz [13] (20.0 dBm) (passive scanning) * 2484 MHz [14] (disabled) Bitrates (non-HT): * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps max # scan SSIDs: 4 Supported interface modes: * IBSS * managed * ** AP * AP/VLAN** * monitor * mesh point Supported commands: * new_interface * set_interface * new_key * new_beacon * new_station * new_mpath * set_mesh_params * set_bss * authenticate * associate * deauthenticate * disassociate * join_ibss * Unknown command (55) * Unknown command (57) * Unknown command (59) * set_wiphy_netns * Unknown command (65) * connect * disconnect

    Read the article

  • Setting up a wireless access point with Ubuntu server

    - by Solignis
    I am trying to setup a wifi access point with my Ubuntu server, everything "seems" to be good since I got a better wifi radio (long story). But now I am a little confused, when my Android phone tries to associate with the AP it is able to with no problem but then it cannot get an IP address from my DHCP server. I have tried messing with firewall rules, nothing... I tried making a bridge interface as per what I am told I had to do. ( Not sure if i did it right though). What I am trying to do if make the wireless interface an extention of my eth0 network. Am I on the right track or am I going about the wrong way?

    Read the article

  • wireless network with cable modem and access point

    - by hayri
    I have a Scientific Atlanta EPC2203 cable modem and a TP-Link TL-WA500G access point. When I connect my computer directly to modem with a CAT5e cable I have internet connection on my laptop (when i type ipconfig i see my external ip there, provided by isp). So I decided to have wireless network in the flat, allowing other devices to connect as well. I bought this wireless ap (TL-WA500G) configured Wireless security stuff, and connected it to my modem. With that configuration (by default AP has static ip of 192.168.1.254) only my computer can connect to internet over wifi, but not any other device. When I set the IP of AP to Dynamic IP (DHCP) it is the same. How should I change my configuration to enable all wifi devices to connect to internet?

    Read the article

  • Find max integer size that a floating point type can handle without loss of precision

    - by Checkers
    Double has range more than a 64-bit integer, but its precision is less dues to its representation (since double is 64-bit as well, it can't fit more actual values). So, when representing larger integers, you start to lose precision in the integer part. #include <boost/cstdint.hpp> #include <limits> template<typename T, typename TFloat> void maxint_to_double() { T i = std::numeric_limits<T>::max(); TFloat d = i; std::cout << std::fixed << i << std::endl << d << std::endl; } int main() { maxint_to_double<int, double>(); maxint_to_double<boost::intmax_t, double>(); maxint_to_double<int, float>(); return 0; } This prints: 2147483647 2147483647.000000 9223372036854775807 9223372036854775800.000000 2147483647 2147483648.000000 Note how max int can fit into a double without loss of precision and boost::intmax_t (64-bit in this case) cannot. float can't even hold an int. Now, the question: is there a way in C++ to check if the entire range of a given integer type can fit into a loating point type without loss of precision? Preferably, it would be a compile-time check that can be used in a static assertion, and would not involve enumerating the constants the compiler should know or can compute.

    Read the article

  • Exact textual representation of an IEEE "double"

    - by CyberShadow
    I need to represent an IEEE 754-1985 double (64-bit) floating point number in a human-readable textual form, with the condition that the textual form can be parsed back into exactly the same (bit-wise) number. Is this possible/practical to do without just printing the raw bytes? If yes, code to do this would be much appreciated.

    Read the article

  • Why does 99.99 / 100 = 0.9998999999999999

    - by the-locster
    Whereas 99.99 * 0.01 = 0.99 Clearly this is the age old floating point rounding issue, however the rounding error in this case seems quite large to me; what I mean is I might have expected a result of 0.99990000001 or some similar 'close' result. And for the record I got the same answer in a JavaVM and in a .Net environment.

    Read the article

  • Wireless Access Point stopped working

    - by Alex Pritchard
    I have a simple LAN set up at home using a Linksys WRT54GSV4 as my primary router and an Encore ENHWI-2AN3 as an access point. I connect the Encore to the Linksys by running a cable from one of the Linksys LAN ports into the Encore WAN input. I originally configured this using the Encore setup wizard, setting the device up in AP Router Mode. It detected the input network and worked about as expected, creating a second network that used my primary network to connect to the internet. It worked fine for about 2 weeks, then abruptly cut out today. I checked to make sure the network was still live through the cable going into the Encore (provides internet when connected to a laptop directly) and that devices are still able to connect to the network being broadcast by the Encore. When I try to rerun the connection wizard on the Encore, I receive the message "No Services found in WAN port." The WAN Settings is no longer retrieving a dynamic ip from the line. I tried providing a static IP, assigning an IP address within the subnet range of my primary router that wasn't being used and pointing the Default Gateway to the Linksys IP, but this did not work either. When I plug the cable into the WAN port, an internet light comes on that is not lit when a live network is not connected. I've tried doing a hard reset on the Encore (held down the rest button until the lights flashed, reconfigured from scratch), but the WAN settings are still not detected. Also tried powering off and on the modem, linksys, and encore. Any suggestions would be appreciated!

    Read the article

  • C++ fixed point library?

    - by uj2
    I am looking for a free C++ fixed point library (Mainly for use with embedded devices, not for arbitrary precision math). Basically, the requirements are: No unnecessary runtime overhead: whatever can be done at compile time, should be done at compile time. Ability to transparently switch code between fixed and floating point, with no inherent overhead. Fixed point math functions. There's no much point using fixed point if you need to cast back and forth in order to take a square root. Small footprint. Any suggestions?

    Read the article

  • CPU Architecture and floating-point math

    - by Jo-Herman Haugholt
    I'm trying to wrap my head around some details about how floating point math is performed on the CPU, trying to better understand what data types to use etc. I think I have a fairly good understanding of how integer math is performed. If I've understood correctly, and disregarding SIMD, a 32-bit CPU will generally perform integer math at at least 32-bit precision etc. Is it correct that floating-point math is dependent on the presence of a FPU? And that the FPU on the x86 is 80-bit, so floating point math is performed at this precision unless using SIMD? What about ARM?

    Read the article

  • About floating point precision and why do we still use it

    - by system_is_b0rken
    Floating point has always been troublesome for precision on large worlds. This article explains behind-the-scenes and offers the obvious alternative - fixed point numbers. Some facts are really impressive, like: "Well 64 bits of precision gets you to the furthest distance of Pluto from the Sun (7.4 billion km) with sub-micrometer precision. " Well sub-micrometer precision is more than any fps needs (for positions and even velocities), and it would enable you to build really big worlds. My question is, why do we still use floating point if fixed point has such advantages? Most rendering APIs and physics libraries use floating point (and suffer it's disadvantages, so developers need to get around them). Are they so much slower? Additionally, how do you think scalable planetary engines like outerra or infinity handle the large scale? Do they use fixed point for positions or do they have some space dividing algorithm?

    Read the article

  • understanding floating point variables

    - by Syom
    There is some problem, i can't understand anyway. look at this code please <script type="text/javascript"> function math(x) { var y; y = x*10; alert(y); } </script> <input type="button" onclick="math(0.011)"> What must be alerted after i click on button? i think 0.11, but no, it alerts 0.10999999999999999 explain please this behavior. thanks in advance

    Read the article

  • how IEEE-754 floating point numbers work

    - by hatorade
    Let's say I have this: float i = 1.5 in binary, this float is represented as: 0 01111111 10000000000000000000000 I broke up the binary to represent the 'signed', 'exponent' and 'fraction' chunks. What I don't understand is how this represents 1.5. The exponent is 0 once you subtract the bias (127 - 127), and the fraction part with the implicit leading one is 1.1. How does 1.1 scaled by nothing = 1.5???

    Read the article

  • floating point precision in ruby on rails model validations

    - by Chris Allison
    Hello I am trying to validate a dollar amount using a regex: ^[0-9]+\.[0-9]{2}$ This works fine, but whenever a user submits the form and the dollar amount ends in 0(zero), ruby(or rails?) chops the 0 off. So 500.00 turns into 500.0 thus failing the regex validation. Is there any way to make ruby/rails keep the format entered by the user, regardless of trailing zeros?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >