Search Results

Search found 1348 results on 54 pages for 'floating accuracy'.

Page 38/54 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • How to force a line break after each image in Safari Reader?

    - by futlib
    I was unable to activate Safari Reader in a local HTML file, so I cannot give you a running example but only describe my problem: The markup of my blog posts is basically this: <div class="post"> <div class="post-header">Hello, World</div> <div class="post-body"> <p>Look at this picture:</p> <p><img src="http://37prime.com/news/wp-content/uploads/2008/03/safari_icon.png"/></p> <p>Isn't that a nice picture?</p> </div> </div> This looks as expected in all browsers, including Safari. In Safari Reader however, the third paragraph "Isn't that a nice picture?" is floating around the image, instead of being on a paragraph of it's own. Has anybody experienced a similar problem?

    Read the article

  • Speed up math code in C# by writing a C dll?

    - by Projectile Fish
    I have a very large nested for loop in which some multiplications and additions are performed on floating point numbers. for (int i = 0; i < length1; i++) { s = GetS(i); c = GetC(i); for(int j = 0; j < length2; j++) { double oldU = u[j]; u[j] = c * oldU + s * omega[i][j]; omega[i][j] = c * omega[i][j] - s * oldU; } } This loop is taking up the majority of my processing time and is a bottleneck. Would I be likely to see any speed improvements if I rewrite this loop in C and interface to it from C#?

    Read the article

  • Qt: Styling QTabWidget

    - by Martin
    I'm using Qt and I have a QTabWidget setup in the Qt Designer Editor, you can see it in picture 1. As you can see after Tab4 there is an empty space all the way to the right edge, in someway I need to fill that space with a color, like in picture 2. Or another solution would be that the tabs float out to cover the whole screen. I use the following stylesheet right now: QTabWidget::tab-bar { } QTabBar::tab { background: gray; color: white; padding: 10px; } QTabBar::tab:selected { background: lightgray; } Is there a way to set the background color of the QTabBar using Qt stylesheets? Or can I get the tabs floating out to the edge using Qt stylesheets? Thanks!

    Read the article

  • How to pop Toolwindow in a defined position

    - by Enmanuel
    Hi everyone. Im trying to integrate a toolwindow in a Winforms application, it will be a tiny floating window to display element details in a listbox. What I need is pop the window in a relative position to the control that triggers the action, so here is the thing: the Location property gives me the relative position of the control from its container (the main form in this case) so this is the workaround im using: public void Show(kTextBox source) { Point absCoord = source.PointToScreen(source.Location); this.Location = this.PointToClient(absCoord); base.Show(); } Basically this is: get the absolute control position and set this position (previously converted into owner relative) to the toolwindow. I think it should work just fine but is missing for a certain degree, and it varies depending what control i use. Its kinda confusing. Been there anyone?? Thanks in advance.

    Read the article

  • GUI design techniques to enhance user experience

    - by aku
    What techniques do you know\use to create user-friendly GUI ? I can name following techniques that I find especially useful: Non-blocking notifications (floating dialogs like in Firefox3 or Vista's pop-up messages in tray area) Absence of "Save" button MS OneNote as an example. IM clients can save conversation history automatically Integrated search Search not only through help files but rather make UI elements searchable. Vista made a good step toward such GUI. Scout addin Microsoft Office was a really great idea. Context oriented UI (Ribbon bar in MS Office 2007) Do you implement something like listed techniques in your software? Edit: As Ryan P mentioned, one of the best way to create usable app is to put yourself in user's place. I totally agree with it, but what I want to see in this topic is specific techniques (like those I mentioned above) rather than general recommendations.

    Read the article

  • C# public partial struct methods for more System.Windows.Media.Color

    - by dr d b karron
    How can I put in additional methods for manipulating color ? Best would be to overload the struct System.Windows.Media.Color. It is NOT a class (in c#). Now i'm tinkering with putting (in the same file for testing or must i put it in a different file) an namespace (Silverlight Application36 or System.Windows.Media ?) and a partial struct Color Normalize (double R, ...). I should see MyColor.Normalize() start being recognized by intellisense ? I'm not. I'm looking to put in a suite of overloaded color manipulations using floating and double numbers instead of unsigned byte integers. Any hints while I wack at it ? Cheers! dr.K

    Read the article

  • How to position a span inside a headline tag?

    - by citronas
    I'm forced to find a solution for the following situation: I have a h1 tag, like this: <h1 style="text-align: left">FOO FOO FOO<span class="h1subSpan">FOO 1 Foo 2</span></h1> The result should be like the following: FOO FOO FOO this space is invisible and achived through floating Foo1 Foo 2 This solution works with FF, Opera and IE8. How can I adapt this, to work with IE 7 as well? .h1subSpan { font-size:small; float:right; padding-right:19px; padding-top:5px; }

    Read the article

  • UIImageView is clipping a pixel of the bottom of my UIImage...?

    - by akaii
    I'm not sure what might be causing this, but UIImageView occasionally clips off about a pixel or 2 from the bottom of some square/rectangular UIImages I'm using as subviews for UITableViewCells. These UIImageViews are well within the borders of the cell, so it shouldn't be due to cliptobounds. There seems to be no consistency or pattern to which images are being clipped, nor when they're clipped, other than that it only happens to (or is only noticable in) square/rectangular icons, and only ones that are parented to UITableViewCells (or their subclasses). I'm having trouble reproducing the problem consistently, which is why I haven't posted any code this time. Has anyone encountered something similar to this before? I've encountered a similar bug that involved floating point values for origin/size being interpreted weirdly... but that doesn't seem to be the cause of this particular problem. I don't need a specific solution at this point, I'm just making sure I haven't missed any well-known bugs or documented problems that involve UIImageView.

    Read the article

  • Need help in translating code from C to Java.

    - by Vuntic
    From this article. Here's the code: float InvSqrt(float x){ // line 0 float xhalf = 0.5f * x; int i = *(int*)&x; // store floating-point bits in integer i = 0x5f3759d5 - (i >> 1); // initial guess for Newton's method x = *(float*)&i; // convert new bits into float x = x*(1.5f - xhalf*x*x); // One round of Newton's method return x; } ...I can't even tell if that's C or C++. [okay apparently it's C, thanks] Could someone translate it to Java for me, please? It's (only, I hope) lines 2 and 4 that are confusing me.

    Read the article

  • Can't get images to go under each other

    - by Thomas Pen
    ello I'm new to html and css and tried to display a images that are floating right. Now I want to get the images under each other but is doesn't work. Can someone help me? this my css code for the images: .imagesLeft{ float: left; margin: 5px; } .imagesRight{ float: right; margin: 5px; } this my html code for the images: <div class="imagesRight"> <img src="../images/medewerkers.jpg"> </div> <div class="imagesRight"> <img src="../images/medewerkers1.jpg"> </div> <div class="imagesRight"> <img src="../images/medewerkers2.jpg"> </div> Thanks in advance !

    Read the article

  • Looking for Info on a Javascript Testing framework

    - by DaveDev
    Hi Can somebody fill me in on JavaScript Testing Frameworks? I'm working on a project now and as the JS (Mostly jQuery) libraries grow, it's getting more and more difficult to introduce change or refactor, because I have no way of guaranteeing the accuracy of the code without manually testing everything. I don't really know anything about JavaScript Testing Frameworks, or how they integrate/operate in a .Net project, so I thought I'd ask here. What would a good testing framework be for .Net? What does a JavaScript test look like? (e.g. with NUnit, I have [TestFixture] classes & [Test] methods in a ProjectTests assembly) How do I run a javascript test? What are the conceptual differences between testing JS & testing C#? Is there anything else that would be worth knowing? Thanks Dave

    Read the article

  • Approximate Number of CPU Cycles for Various Operations

    - by colordot
    I am trying to find a reference for approximately how many CPU cycles various operations require. I don't need exact numbers (as this is going to vary between CPUs) but I'd like something relatively credible that gives ballpark figures that I could cite in discussion with friends. As an example, we all know that floating point division takes more CPU cycles than say doing a bitshift. I'd guess that the difference is that the division is around 100 cycles, where as a shift is 1 but I'm looking for something to cite to back that up. Can anyone recommend such a resource?

    Read the article

  • Inheritance vs specific types in Financial Modelling for cashflows

    - by BlueTrin
    Hello, I have to program some financial applications where I have to represent a schedule of flows. The flows can be of 3 types: - fee flow (just a lump payment at some date) - floating rate flow (the flow is dependant of an interest rate to be determined at a later date) - fixed rate flow (the flow is dependant of an interest rate determined when the deal is done) I need to keep the whole information and I need to represent a schedule of these flows. Originally I wanted to use inheritance and create three classes FeeFlow, FloatingFlow, FixedFlow all inheriting from ICashFlow and implement some method GetFlowType() returning an enum then I could dynamic_cast the object to the correct type. That would allow me to have only one vector to represent my schedule. What do you think of this design, should I rather use three vectors vector, vector and vector to avoid the dynamic casts ?

    Read the article

  • Efficiently remove points with same slope

    - by Ram
    Hi, In one of mine applications I am dealing with graphics objects. I am using open source GPC library to clip/merge two shapes. To improve accuracy I am sampling (adding multiple points between two edges) existing shapes. But before displaying back the merged shape I need to remove all the points between two edges. But I am not able to find an efficient algorithm that will remove all points between two edges which has same slope with minimum CPU utilization. Currently all points are of type PointF Any pointer on this will be a great help.

    Read the article

  • Format attribute of <bean:write> tag in Struts

    - by Sushant Taneja
    Hello All, I am developing a web application using Struts 1.2.7 I want to print a list of integers using the tag. I searched and found that the format attribute is used to print the desired result but was unsuccessful. What should I pass as the value in format to print 3 digit integers/floating point numbers. The code sample is as follows: <logic:iterate name="intList" id="integer" > <bean:write name="integer" /> <logic:iterate /> Here intList is a List of int(s) passed as a request attribute to the jsp page under consideration.

    Read the article

  • Pushing app to heroku error

    - by Ryan Max
    Hello, I am getting the following error when I try to push my app to heroku. I saw a similar thread on here, but the issues seemed related to OSX. I am running windows 7 $ git push heroku master Counting objects: 1652, done. Delta compression using up to 4 threads. fatal: object 91f5d3ee9e2edcd42e961ed2eb254d5181cbc734 inconsistent object lengt h (476 vs 8985) error: pack-objects died with strange error error: failed to push some refs to '[email protected]:floating-stone-94.git I'm not sure what this means. I can't find any consistent answers on the internet. I tried re-creating my ssh public key but still the same.

    Read the article

  • how to make a tableview to be grouped style without indenting cells

    - by Ying
    Hi, I want a tableview without floating headers and footers, but in the UITableViewStylePlain style. When I used a grouped style tableview, it draws this rounded rectangle around my cells, and it is annoying!! Is there a setting to turn this off? I have tried tableView.backgroundView = nil; tableView.separatorStyle = UITableViewCellSeparatorStyleNone; tableView.autoresizingMask = UIViewAutoresizingNone; All don't work. Does anyone have any idea how to do this? Thanks

    Read the article

  • Real-Time Data Streaming to Multiple Clients

    - by AriX
    Hi all, I would like to write an application which will stream data at 2400 baud over the internet from a server to multiple clients. The data will be the same for each client, and it would probably be fine to send it as a UDP stream, since exact data accuracy is not a 100% necessity, as there are checksums built-in to the data format and the data will be sent repeatedly on a loop. What is the best way to do this? I would want to write the server in C, but I don't know how to best multicast this data to the different clients that would be receiving it all over the country. I'm sure this seems like a pretty draconian way to go about my project, as opposed to just using some sort of fetch command, but I'd prefer to do it this way if possible.

    Read the article

  • Unit testing a controller in ASP.NET MVC 3

    - by Abdullah Al- Mansur
    public Double Invert(Double? id) { return (Double)(id / id); } I have done this for this test but fails please can anyone help with this cos just started with unit testing /* HINT: Remember that you are passing Invert an *integer* so * the value of 1 / input is calculated using integer arithmetic. * */ //Arrange var controller = new UrlParameterController(); int input = 7; Double expected = 0.143d; Double marginOfError = 0.001d; //Act var result = controller.Invert(input); //Assert Assert.AreEqual(expected, result, marginOfError); /* NOTE This time we use a different Assert.AreEqual() method, which * checks whether or not two Double values are within a specified * distance of one another. This is a good way to deal with rounding * errors from floating point arithmetic. Without the marginOfError * parameter the assertion fails. * */

    Read the article

  • jQuery Dialog theme not being applied

    - by Tim
    I'm using jquery-1.4.2.min.js and jquery-ui-1.8.1.custom.min.js. According to Firebug, both minimized scripts have been loaded. They both appear in the dropdown list on Firebug's Scripts tab. The dialog is launching, but there's no background and so the text below it shows through, and there's no "window" stuff at all, no titlebar, no X button. Just the floating/draggable text with a -close- link at the top left corner. I was under the impression from reading these pages http://jqueryui.com/demos/dialog/ http://jqueryui.com/themeroller/ that the UI theme-driven appearance would be automatically applied to the dialog when it was invoked using this barebones call: $('#dialog').dialog() I would be grateful for suggestions on how to troubleshoot this. Thanks

    Read the article

  • Python: How to write data in file in specific format?

    - by sasha
    i have an array called MAC1_Val: MAC1_Val array([ 1.00000000e+00, -1.00000000e+01, -2.06306600e+02, 2.22635749e+02, 1.00000000e+00, 1.00000000e+01, 1.00000000e+01, -2.06306600e+02, 2.22635749e+02, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00, -1.08892735e+01, 1.88607749e+01, 1.03153300e+01, -1.78666757e+01, 3.33333333e-07, -3.33333333e-07, -4.21637021e-05, 4.21637021e-05, 9.98844400e-01, -1.73973001e-03, 1.20938900e-03, 1.87742948e-03, -3.33333333e-03, 6.66666667e-03, -3.33333333e-03, -2.64911064e-01, -2.60959501e+01, 2.81614422e+01, 3.33333333e-03, -6.66666667e-03, 3.33333333e-03, 0.00000000e+00, 0.00000000e+00]) and i want to write in file (.txt) values in specific format like this: 1.000000e+00 -1.000000e+01 -2.063066e+02 2.226357e+02 1.000000e+00 1.000000e+01 ....... note that are 6 digits behind floating point any suggestions how to do this? thanks in advance!

    Read the article

  • How can I take eclipse out of MDI mode?

    - by user51189
    Does anyone know of a way to make Eclipse an SDI application rather than an MDI one? SDI - Single document interface, each pane is its own window MDI - Multiple document interface, all of the panes are stuck inside one "master" window. Eclipse is an MDI application. All of the little panes (like the call stack, variable viewer, ect) are part of the one master Eclipse window. Rather than having all of the windows stuck inside one master "eclipse" window, I'd like them to all be their own free-floating windows.

    Read the article

  • Auto height and the float issue.

    - by William Hand
    I have had this issue before and can't remember if and how I fixed it. I have to create a scenario where I have 2 DIV's floated left and right inside a parent DIV. The 2 floating DIV's have height:auto, but the parent ignores them (perfectly logical) and the background of the parent DIV can't be seen. I know what the issue is, but are there any suggestions of how to solve it? Or any alternatives, I am willing to try a new approach. Thanks in advance for any help.

    Read the article

  • Bouncing a ball off a surface

    - by Sagekilla
    Hi all, I'm currently in the middle of writing a game like Breakout, and I was wondering how I could properly bounce a ball off a surface. I went with the naive way of rotating the velocity by 180 degrees, which was: [vx, vy] -> [-vy, vx] Which (unsurprisingly) didn't work so well. If I know the position and veocity of the ball, as well as the point the ball would hit (but is going to instead bounce off of) how can I bounce it off that point? I don't need any language specific code. If anyone could provide a small, mathematical formula on how to properly do this that would work fine for me. I also need this to work with integer positions and velocity (I can't use floating point anywhere). Thanks!

    Read the article

  • getting the value of a filter at an arbitrary time

    - by Andiih
    Context: I'm trying to improve the values returned by the iPhone CLLocationManager, although this is a more generally applicable problem. The key is that CLLocationManger returns data on current velocity as and when it feels like it, rather than at a fixed sample rate. I'd like to use a feedback equation to improve accuracy v=(k*v)+(1-k)*currentVelocity where currentVelocity is the speed returned by didUpdateToLocation:fromLocation: and v is the output velocity (and also used for the feedback element). Because of the "as and when" nature of didUpdateToLocation:fromLocation: I could calculate the time interval since it was last called, and do something like for (i=0;i<timeintervalsincelastcalled;i++) v=(k*v)+(1-k)*currentVelocity which would work, but is wasteful of cycles. Especially as I probably want timeintervalsincelastcalled to be measured as 10ths of a second. Is there a way to solve this without the loop ? i.e. rework (integrate?) the formula so I put an interval into the equation and get the same answer as I would have by iteration ?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >