Search Results

Search found 1065 results on 43 pages for 'calculation'.

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

  • Excel 2010 - more than 1 calculation within an IF() statement

    - by Da Bajan
    I have a situation where I need to calculate shipping values based on the length of the supply chain. Easy, however I need to have instances where an increased amount is required based on specific date criteria. My example is as follows: Shipvalue = 100 Date1 = 1/1/2013 (Jan) - ship 50% more than usual Date2 = 2/1/2013 (Feb) - ship 25% more than usual Date3 = 3/1/2013 (Mar) - ship 25% more than usual Supply chain length is: June - October 100 days November - March 140 days April - June 100 days The issue I have is that as there is an increase in the number of days, my formula: IF( Date1-(Supply chain length + any extra days)=today's date, shipvalue+(shipvalue X 50%), IF( Date2-(Supply chain length + any extra days)=today's date, shipvalue+(shipvalue x 50%) IF( Date2-(Supply chain length + any extra days)=today's date, shipvalue+(shipvalue x 50%), IF( preceding cell<>0,shipvalue, 0) ) ) ) Now the problem with this is that if the length of the supply chain increases then the formula misses all but the 1st increase. So, I thought of adding a variable that would be incremented and checked every time you made an increased shipping amount. So, how do I do both the calculation for the increased shipping value, and set the variable in one part of the IF statement?

    Read the article

  • Timestamps and Intervals: NUMTOYMINTERVAL SYSTDATE CALCULATION SQL QUERY

    - by MeachamRob
    I am working on a homework problem, I'm close but need some help with a data conversion I think. Or sysdate - start_date calculation The question is: Using the EX schema, write a SELECT statement that retrieves the date_id and start_date from the Date_Sample table (format below), followed by a column named Years_and_Months_Since_Start that uses an interval function to retrieve the number of years and months that have elapsed between the start_date and the sysdate. (Your values will vary based on the date you do this lab.) Display only the records with start dates having the month and day equal to Feb 28 (of any year). DATE_ID START_DATE YEARS_AND_MONTHS_SINCE_START 2 Sunday , February 28, 1999 13-8 4 Monday , February 28, 2005 7-8 5 Tuesday , February 28, 2006 6-8 Our EX schema that refers to this question is simply a Date_Sample Table with two columns: DATE_ID NUMBER NOT Null START_DATE DATE I Have written this code: SELECT date_id, TO_CHAR(start_date, 'Day, MONTH DD, YYYY') AS start_date , NUMTOYMINTERVAL((SYSDATE - start_date), 'YEAR') AS years_and_months_since_start FROM date_sample WHERE TO_CHAR(start_date, 'MM/DD') = '02/28'; But my Years and months since start column is not working properly. It's getting very high numbers for years and months when the date calculated is from 1999-ish. ie, it should be 13-8 and I'm getting 5027-2 so I know it's not correct. I used NUMTOYMINTERVAL, which should be correct, but don't think the sysdate-start_date is working. Data Type for start_date is simply date. I tried ROUND but maybe need some help to get it right. Something is wrong with my calculation and trying to figure out how to get the correct interval there. Not sure if I have provided enough information to everyone but I will let you know if I figure it out before you do. It's a question from Murach's Oracle and SQL/PL book, chapter 17 if anyone else is trying to learn that chapter. Page 559.

    Read the article

  • Ninety-Fifth Percentile Calculation for Bandwidth

    - by Kyle Brandt
    I am trying to calculate the bandwidth of my current internet connection. I am pulling the current input and output transfer rate via snmp. If the argument to the following function is a sorted ascending list of the the some of each input and output sample, is this the right way to calculate 95th percentile? sub ninetyFifth { #Expects Sorted Data my $ninetyFifthLine = (@_ * .95) - 1; return $_[$ninetyFifthLine]; }

    Read the article

  • how to offer subdomain hosting with bandwidth calculation per user

    - by Ke
    Hi, Im a php developer and I would like to offer subdomain hosting,but need also to be able to calculate bandwidth for each subdomain. For the subdomains creation I will use catch-all and wildcards etc to easily set these up. The one thing im a bit stumped on is how to calculate bandwidth for each subdomain, is this possible within php? or are there better solutions for this perhaps using folders or something? Also a script will be loaded under the subdomain, this will vary per user. Is it worth giving each user a new folder and their own script, or more easy to manage one script for all users? Any considerations here? Cheers Ke

    Read the article

  • What is the formula for HughesNet FAP calculation?

    - by JohnFx
    I am somewhat frustrated with the only FAP monitor I have found on the net and discovered because it relies on a running count of bandwidth usage which (1) requires a service in the background; and (2) Tends to get inaccurate over time. Given that there is a diagnostics page on the firmware of the modem that tells the exact usage per hour, I was planning on writing a more accurate version with a better UI. However, it appears that HughesNet keeps the exact formula for calculating whether you are in FAP a secret. I have no idea why they wouldn't be more forthcoming with this information. Wondering if anyone out in SU-land had done some trial and error testing to reverse engineer the formula or had some inside knowledge to share.

    Read the article

  • openssl CRC32 calculation

    - by sthustfo
    Hi all, I have seen some of the other questions here about the CRC 32 calculation. But none were satisfactory for me, hence this. Does openssl libraries have any api support for calculating the CRC32? I am already using openssl for SHA1, so would prefer to use it than link in one more library for CRC32(my implementation is in C). Thanks.

    Read the article

  • Improper integral calculation using numerical intergration

    - by Andrei Taptunov
    I'm interested in calculation of Improper Integral for a function. Particularly it's a Gauss Integral. Using a numerical integration does make sense for a definite integrals but how should I deal with improper integrals ? Is there any was to extrapolate the function "around" negative infinity or should I just remove this part and start integration from some particular value because cumulative sum near "negative infinity" is almost non-existent for Gauss integral? Perhaps there are some algorithms that I'm not aware about.

    Read the article

  • Modifying multiplying calculation to use delta time

    - by Bart van Heukelom
    function(deltaTime) { x = x * 0.9; } This function is called in a game loop. First assume that it's running at a constant 30 FPS, so deltaTime is always 1/30. Now the game is changed so deltaTime isn't always 1/30 but becomes variable. How can I incorporate deltaTime in the calculation of x to keep the "effect per second" the same?

    Read the article

  • Silverlight 4: Binding to a calculation of control properties

    - by Rich.Carpenter
    What I would like to do is pretty simple. Given textboxes for ItemPrice, Tax and Total, I need the text value for Total to be bound to ItemPrice + Tax and the Tax value to display ItemPrice * taxRate. Could someone offer a brief explanation as to how this would be accomplished or point me to an appropriate example? I see property binding examples all over the place, but none that show binding to a calculation of the properties of two controls.

    Read the article

  • Is there a way to insert a formatted calculation into Excel 2010 without using an image?

    - by Ryan Taylor
    I am maintaining a list of database column names, notes, and their calculations in an Excel 2010 spreadsheet. The calculations are included so as to document how to derive the values for the various columns and not for calculations within the spreadsheet. I have been entering the calculations into the cells simply as unformatted text like so: 100 - ((FiscalYearRegionConsumption - BaselineRegionConsumption) / (GoalRegionConsumption - BaselineRegionConsumption)) * 100 However, for long and/or complex calculations this could become rather unreadable. To improve readability and comprehension I would like to "pretty" print the calculation in an Excel cell. This would result in formatting that would like like this: The only solution I have come up with is to: Write the calculation in another application such as Word Take a screenshot of said calculation Past the screenshot into Excel The primary concern with this approach is maintenance. Should the calculation change or need correction I have to update two different sources of information. Is there a better way included a formatted calculation into an Excel cell?

    Read the article

  • MessageBox doesn't show on mdi form after a long calculation

    - by Rekreativc
    Hello This is a very similar problem to This one, sadly that one was never answered either. I have a MDI Main forum that hosts several children forms. One of them does a long calculation and throws an exception if an error occurs (all work is done on the same thread). I then try to inform the user of an error with an messagebox, however it doesn't appear (but steals focus from the MDI Main, so the application is completely unresponsive). The beheviour changes slightly if I call Application.DoEvents() (evil I know, but this is a last resort thing). Then the forms remain completely active and the messagebox only appears after I change active application (Alt+Tab) to something else and then back again. What can I do to make sure the messagebox will be visible? I have already tried passing both, active child and MDI Main as parameter to the MessageBox.Show method. It doesn't change the behaviour.

    Read the article

  • Methods for content uniqueness calculation on C#

    - by sashaeve
    I have a set of text files. I want to calculate a content uniqueness for different subsets. E.g. we have 10 documents (A1 - A10) and want to calculate the uniqueness for subset of documents A1 and A2. So the result must be some value from 0 to 1 (1 - absolutely unique content, 0 - absolutely dublicated content). What methods for content uniqueness calculation do you know? Please suggest these methods with .NET implementations. Thanks.

    Read the article

  • Polygon area calculation using Latitude and Longitude generated from Cartesian space and a world fil

    - by Heath
    Given a series of GPS coordinate pairs, I need to calculate the area of a polygon (n-gon). This is relatively small (not larger than 50,000 sqft). The geocodes are created by applying an affine transform with data from a world file. I have tried to use a two step approach by doing converting the geocodes to cartesian coordinates: double xPos = (lon-lonAnchor)*( Math.toRadians( 6378137 ) )*Math.cos( latAnchor ); double yPos = (lat-latAnchor)*( Math.toRadians( 6378137 ) ); then I use a cross product calculation to determine the area. The issue is that the results are a bit off in accuracy (around 1%). Is there anything I can look into to improve this? Thanks.

    Read the article

  • Sql Calculation And Sort By Date

    - by mahesh
    I have Confusion against utilize If,Else Statement against calculation of stock By date. And sort the same by date. There is real challenge to calculate running total between equal date: If date is equal If date is greater than If date is less than My Table Schema Is: TransID int, Auto Increment Date datetime, Inwards decimal(12,2) Outward decimal(12,2) Suppose If I have Records as Below: TransID Date(DD/MM/YYYY) Inward Outward 1 03/02/2011 100 2 12/04/2010 200 3 03/02/2011 400 Than Result Should be: TransID Date(DD/MM/YYYY) Inward Outward Balance 1 03/02/2011 100 -100 2 12/04/2010 200 -300 3 03/02/2011 400 100 I wants to calculate Inward - outwards = Balance and Balance count as running total as above. but the condition that it should be as per date order How to sort and calculate it by date and transID? What is transact SQL IN SQL_SERVER-2000**?.

    Read the article

  • Calculation of derived field in sql

    - by Matt
    Taking Sql this quarter and not having any luck with the following question: The height of players in feet (inches/12). Include their name. Hint: Calculation or derived field. Be sure to give the calculated field a column header. We're learning the basic Select statment and didn't find any reference on how to make custom data at w3schools. I'm using Microsoft SQL server Management Express Here's my statment so far: select nameLast, nameFirst, height from Master where height (I assume its something like 'Player_Height' = height/12) order by nameLast, nameFirst, height Thanks for the help

    Read the article

  • Per Process Memory Calculation Alogrithm in Linux (say kernel 2.6 and above)

    - by Vaibhav Singh
    How do you calculate the linux process's Acutal Memory Usage and Not Virtual Memory Usage through the information supplied by /proc//smaps or maps or status or stat. To be more precise I need the heap usage only. I need to do this on an PowerPc based embedded system and hence I do not have utilities like exmap, valgrind etc. I understand the concepts of shared/non shared memory. I have read through the other topics given in this forum about the same but they talk more using the tools mentioned. What I need is the native way of calculation done by the same tools so that I may write a shell script for the same.

    Read the article

  • Font advance calculation problem on Blackberry OS 5.0

    - by John
    I am currently working on my own implementation of a tab bar for a BlackBerry app, where each tab bar has a title that is right aligned (i.e. the last character in each should be the same distance from the right hand side of the screen). To work out where to draw the text I am using the following calculation: screen width - advance of title - indent. The font I am using is 'BBAlpha Sans' (height 28). Using BlackBerry OS 4.6 everything seems to be calculated properly and the text is aligned when I move between tabs, however I am finding that when I use OS 5.0 it doesn't calculate the advance properly and as a result the alignment is off by maybe 5 pixels or so. With the default font (also BBAlpha Sans, but height 24 - for OS 5.0 at least) it works fine in both versions.. but I don't necessarily always want to use the default font/size, so any ideas what could be going wrong? Is this a bug in the 5.0 API? Thanks. Code: public class TitleBarBackground extends Background { .. public void draw(Graphics graphics, XYRect rect) { graphics.pushRegion(rect); .. Font titleBarFont = FontFamily.forName("BBAlpha Sans").getFont(Font.PLAIN, 28); ... int textWidth = titleBarFont.getAdvance(title); graphics.drawText(title, rect.width - textWidth - TITLE_OFFSET, textYOffset); graphics.popContext(); } .. }

    Read the article

  • Rails - Scalable calculation model

    - by H O
    I currently have a calculation structure in my rails app that has models metric, operand and operation_type. Presently, the metric model has many operands, and can perform calculations based on the operation_type (e.g. sum, multiply, etc.), and each operand is defined as being right or left (i.e. so that if the operation is division, the numerator and denominator can be identified). Presently, an operand is always an attribute of some model, e.g. @customer.sales.selling_price.sum. In order to make this scalable, in need to allow an operand to be either an attribute of some kind, or the results of a previous operation, i.e. an operand can be a metric. I have included a diagram of how my models currently look: Can anyone assist me with the most elegant way of allowing an operand to be an actual operand, or another metric? Thanks! EDIT: It seems based on the only answer so far that perhaps polymorphic associations are the way to go on this, but the answer is so brief I have no idea how they could be used in this way - can anyone elaborate? EDIT 2: OK, I think I'm getting somewhere - essentially i presently have a metric, which has_many operands, and an operand has_many metrics. I need a polymorphic self join, where a metric can also have many metrics - do I need to call this something else, perhaps calculated_metrics, so that the metric model can use itself? That would leave me with a situation where a metric has_many operands, and a metric has many calculated_metrics.

    Read the article

  • Median calculation in ActionScript 3

    - by Gabor Kako
    I have a number array and I'd like to calculate the median. When the array is odd, the calculation is OK, when it's even strange number comes up. private var numbers:String = "2,5,3,4,6,1"; private var array:Array = numbers.split(","); private function getMedian(array:Array):Number { var sortnums:Array = array.sort(Array.NUMERIC); var length:Number = sortnums.length; var mid1:Number; var mid2:Number; var median:Number; if(length % 2 == 0){ mid1 = length / 2; trace("mid1: "+mid1); mid2= ((length - 1) / 2)-0.5; trace("mid2: "+mid2); trace ("mid1: "+sortnums[mid1]+", mid2: "+sortnums[mid2]); median = (sortnums[mid1] + sortnums[mid2]) / 2; }else{ mid1 = (length / 2)-0.5 median = sortnums[mid1] } trace (median); return median; } The result is 21.5, but should be 3.5 mid1 and mid2 are a position in the array. Could somebody help?

    Read the article

  • Problem with mathamatical calculation in JQUERY

    - by Param-Ganak
    Hello friends! I have two text boxes. I enter number in one textbox. I write following JQUERY for that textbox which get executed when the focus out from first text box. The JQUERY code takes the entered value from first text box and multiply it by a decimal number 34.95 and display the answer in second text box. The code is doing the calculation little bit ok because when I enter the value 1000 in first text box it gives answer 34950 in second textbox and when I enter the value 100 in first text box it gives answer 3495.0000000000005 in second text box. **Please any one tell me what is the problem. is problem is in my JQUERY code. I also want to show the answer always in decimal point. Answer should always dislply only two digits after decimal point. so How to achieve this too.** This is my JQUERY code. $("#id_pvalue").focusout(function() { q=$("#id_pvalue").val(); var ans=q*34.95; $("#id_tvalue").val(ans); }); Please guide me friends! Thank You!

    Read the article

  • Variable from block is put into a calculation but throws off wrong reading

    - by user2926620
    I am having troubles with trying to retrieve a double variable that is already established outside the block and called inside but I want to return the value of the same variable so that I can apply it to a calculation. the variable that I want returned is: double quarter = 0; but when I plug it into quarter in my first else/if statement, it plugs in 0 and not the value in my switch block. What can I do to retrieve the value? double quarter = 0; //Date entry will be calculated by how much KW user enters switch (input) { case "2/15/13": quarter = kwUsed * 0.10; break; case "4/15/13": quarter = kwUsed * 0.12; break; case "8/15/13": quarter = kwUsed * 0.15; break; case "11/15/13": quarter = kwUsed * 0.15; break; default: System.out.println("Invalid date"); } //Declaring variables for calculations double base = 0; double over = 0; double excess = 0; double math1 = 0; double math2 = 0; //KW Calculations if (kwUsed <= 350) { base = quarter; }else if (kwUsed <= 500) { math1 = ((kwUsed - 350) * quarter); base = ((kwUsed * quarter) - math1); over = ((math1 * 0.1) + math1); }else if (kwUsed > 500) { math2 = ((kwUsed - 350) * 0.1); base = ((kwUsed * 0.1) - math2); math2 = ((kwUsed -350) - 50); over = ((math2 * 0.1) + (15 * 0.1)); double math3 =((kwUsed - 500) * 0.1); excess = ((math3 * 0.25) + math3); } Edited to clarify question.

    Read the article

  • Javascript drop down menu calculation

    - by Janis Yee
    I'm having a bit of an issue with me code. I'm trying to do a calculation from a drop down menu and then it will onChange to a textbox. I've been at it for days trying to figure it out and Googling ways to code the function. Can anyone please help or give me advice on how to approach this? function numGuest() { var a = document.getElementById("guests"); if(a.options[a.selectedIndex].value == "0") { registration.banq.value = "0"; } else if(a.options[a.selectedIndex].value == "1") { registration.banq.value = "30"; } } <select id="guests" name="guests"> <option value="0">0</option> <option value="1">1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <input type="text" id="banq" name="banq" onChange="numGuest()" disabled />

    Read the article

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