formula

Using Projections on Formula Properties

I have a property in my XML mapping file like <property name="CreatedByLogin" formula="(select x.fst_name || ' ' || x.last_name from sebl_dev.S_CONTACT x where x.ROW_ID=CREATED_BY)" type="String" /> and I want to use a projection on this particular name like .Add(Projections.Property("CreatedByLogin"), "CreatedByLogin") and I do g...

Simple formula for determining date using week of month?

Given a standard piece of scheduling information, such as "the second Tuesday in June 2009" or "the last Friday in July 2009", what's the simplest and most efficient formula to translate that into a date? Inputs: w = Week of month, enumeration (1st, 2nd, 3rd, 4th or Last) d = Day of week, enum Sun through Sat m = Month, integer y = ...

Formula in a database row - Java

Either this requirement is weird or i should be confusing myself too much I have a rule table with 30 columns. Every row from a feed file is compared against some or all conditions based on the type of feed. The domain is banking and the application is for loan reporting (say, reporting the amount of total secured loans and unsecured loa...

How to write Display String formula for each cell in CrossTab?

Formula scenario: Retrieved data has a status column which its values is (-1, 0, 1, 2, 3), I'd like to use formula to display string based on these values. I use Display String, but it doesn't work. How could I write a formula to work for each cell in crosstab? Any suggestions? ...

Simulate string split function in Excel formula

I am trying to split a string in an excel formula, something like I can do in many programming languages, e.g. string words = "some text".split(' '); The problem is that I can't be sure that there is more than one word in the cell. If I try to use the FIND() or SEARCH() functions, they return #VALUE if there is not space. Is there a...

Flesch-Kincaid Readability: Improve PHP function

Hello! I wrote this PHP code to implement the Flesch-Kincaid Readability Score as a function: function readability($text) { $total_sentences = 1; // one full stop = two sentences => start with 1 $punctuation_marks = array('.', '?', '!', ':'); foreach ($punctuation_marks as $punctuation_mark) { $total_sentences += su...

Excel - Looping through data till it finds the right one

I'm pulling data from one Excel table into another using an IF statement. I want it to check two fields and if it is a match I want it to print something and if it doesn't then I want it to continue searching. If there is no absolute match then leave the field blank. I believe I'm running into an syntax issue but after numerous iteratio...

Formula for calculating Exotic wagers such as Trifecta and Superfecta

I am trying to create an application that will calculate the cost of exotic parimutuel wager costs. I have found several for certain types of bets but never one that solves all the scenarios for a single bet type. If I could find an algorithm that could calculate all the possible combinations I could use that formula to solve my other pr...

How to determine a formula for execution time given quantitative data, Excel, trendlines, monte carlo simulation

Hi all, Can I get your help on some Maths and possibly Excel? I have benchmarked my app increasing the number of iterations and number of obligors recording the time taken in seconds with the following result: 200 400 600 800 1000 1200 1400 1600 1800 2000 20000 15.627681 30.0968663 44.7592684 60.9037558 75.8267358 90.3718977...

Calculating formulae in Excel with Python

Hi, I would like to insert a calculation in Excel using Python. Generally it can be done by inserting a formula string into the relevant cell. However, if i need to calculate a formula multiple times for the whole column the formula must be updated for each individual cell. For example, if i need to calculate the sum of two cells, the...

Is there a Java API or built-in function for solving annuity problems?

I was asked by my boss to create a module for calculating reverse compound. The question is: if I want to achieve $1.000.000,00 in 24 months with interest rate 18%/year (or 1.5%/month). how much money do I have to save every month? I searched on the internet, but found nothing except people referring to the Excel formula. Do you know ...

Sharepoint date range formula

Hi, I am creating a holiday request site and need to find the best way to update users holiday entitlements when the date range includes a bank holiday. Currently when users create a new request with a [START TIME] of say 29th Aug and [End TIME] of 4 September the total number of holidays will be incorrect as it will also include the A...

Stacking Algorithm - Stack 3d objects in smallest area possible

I'm trying to solve the problem of stacking objects into the most convenient size for postage. The size and shape of objects will be varied. Length, width and height of all objects is known. For example a customer may order a (length x width x height) 200x100x10cm object (wide, long and flat) along with 2 50x50x50cm objects (cubes). If ...

I want to create a distance formula for 6 degree of freedom??

I have a sensor with 6 degree of freedom 3 axiz x,y,z and 3 angles yaw, pitch and roll. 3 axis distance is simple using distance formula but how to calculate 3 angular distances? Can anyone here please help me ??? ...

What is the difference between a shared formula and an array formula?

Excel defines shared formulas and array formulas. What is the difference? My understanding is that array formulas are now obsolete. Is this true? Is it possible to transform array formulas into shared formulas? ...

Math formulas on a static HTML page

I need to create the below on my page but don't know how to code it. I am not a programmer so please be as specific as possible. Thanks. If you have [ -- USER INPUTS VALUE HERE -- ] referrals and they refer [ -- USER INPUTS VALUE HERE -- ] who refer [ -- USER INPUTS VALUE HERE -- ] more, you will earn [ -- VALUE BASED ON FORMULA* HERE -...

How to calculate a monthly average when the month is not finished

Hello! Let's say I have a 12 cells on column A with the sales for each month last year. To calculate a monthly I can do a simple formula like this in A13 =sum(A1:A12)/12. But in column B I have the sales for this year, not a complete year, and August is not finished, but I have the running amount of sales for this month, so far. What kin...

Delphi, evaluate formula string

Duplicate Best algorithm for evaluating a mathematical expression? mathematical expression parser in Delphi? I need a program in Delphi that get one variable equation from Edit1 such as "F(x)=4*X+2*log(x)+4*power(X,2)"and get X value variable from Edit2 then show the result F(X) in Edit3. Please help me. Thanks. ...

How can I measure volatility?

I am trying to determine the volatility of a rank. More specifically, the rank can be from 1 to 16 over X data points (the number of data points varies with a maximum of 30). I'd like to be able to measure this volatility and then map it to a percentage somehow. I'm not a math geek so please don't spit out complex formulas at me :) I...

What is the function to return the name/address of a cell or range (Spreadsheet)?

I could not find the function that returns the name of the cell referenced. For example, =SOMETHING(A5) that will return A5 as string. So that, I can write ="For more information, see " & SOMETHING(F50) & "." in a cell and the cell will read For more information, see F50., and then, when I move the F50 cell, the text will also change. ...