percentage

multiple 2 decimal place figure by a percentage

Hello A have price data stored like this: 10.25 And percentage data like this 1.1100 (1.00%) I need a function that accurately multiplies the price by the percentage. (in php) Thanks ...

Cross browser (chrome/firefox) trying to get top-pos defined in percentage as pixels

I have a problem whit cross browser output, I'm trying to get the top and left css attribute of a div, but firefox gives me the exact pixel position and Chrome give me the percentage. Example: http://web.cinaird.se/pdf/test.htm CSS #mix{ position:absolute; top: 10px; left: 45%; background-color:#f0f; } jQuery css ...

need more complex index !

I'm sorry if it's not an appropriate question for this site, and if it's necesary I'll close this question. But maybe someone could give me an ideea: I'm trying to find a more complex index to make an hierarchy. For example: 5 votes from 6 = 83% AND 500 votes from 600 = 83%; 10 votes from 600 = 1.66% If I make a hierarchy with the ...

Calculate Percentage help

Hi this code gives me employee salaries and manager salaries. SELECT E.EMP_FNAME AS MANAGER, E.EMP_SALARY, D.DEPT_NO, A.EMP_FNAME AS EMPLOYEE, A.EMP_SALARY FROM EMPLOYEE E, EMPLOYEE A, DEPARTMENT D WHERE E.EMP_NIN = A.EMP_MANAGER AND A.EMP_MANAGER = D.EMP_MANAGER; How can i only show the employees that have a salary within 10% of...

Is there a django template filter to display percentages?

I would like something similar to the string formatting from the standard library. '%' Percentage. Multiplies the number by 100 and displays in fixed ('f') format, followed by a percent sign. ...

SQL Server: Appropriate datatype for holding percent values?

What is the best datatype for holding percent values ranging from 0.00% to 100.00%? ...

How do i break a number down into a percentage (0 - 100%)? Details inside...

I am using a JS progress bar that is set using a percentage: 0 to 100 (percent). I need the progress bar to reach 100% when 160,000 people have signed a certain form. I have the total number of signers set in a PHP variable but am lost on how to do the math to convert that into a percentage that fits within 1 - 100 (so that the progress ...

Easiest way to choose a percentage of an amount of rows from a MySQL table?

I have a script that has a GET variable: $_GET['percentage'] I have a MySQL table of data. Now lets say that there are 100 rows of data in this table. In pseudo-code: SELECT data FROM table Now would it be possible to select $_GET['percentage'] of random data from table? For example (again in pseudo-code): $_GET['percentage'] = 10...

When selecting an amount of rows, how can I select a percentage of a percentage?

Fairly simple question: Say I want to use 30 percent of the rows in the table of my MySQL table. However I also have a user input where they can select a percentage of that percentage For example: $_GET['percentage']% of 30% so we say that $_GET['percentage'] = 30 How would I select 30% (or $_GET['percentage']) of 30% to use in a wh...

How to make a random number generator in matlab that is based on percentages?

I am currently using the built in random number generator. for example nAsp = randi([512, 768],[1,1]); 512 is the lower bound and 768 is the upper bound, the random number generator chooses a number from between these two values. What I want is to have two ranges for nAsp but I want one of them to get called 25% of the time and the...

SQL Scenario of allocating ids to user

I have an sql scenario as follows which I have been trying to improve. There is a table 'Returns' which is having ids of the returned goods against a shop for an item. Its structure is as below. Returns ------------------------- Return ID | Shop | Item ------------------------- 1 Shop1 Item1 2 Shop1 Item1 3 ...

Flex - Binding on width property using percentages in MXML code

Is it possible to set a percentage value for the width property of an UIComponent defined in MXML using data binding? What I try to achieve is something like this (which doesn't work): <s:Button width="{buttonWidth}%"/> I know that using percentage for width or height properties in MXML is kind of a hack in the Flex SDK, since they'...

Percentage difference between different values in the same keys of two different arrays.

Hey. I'm looking for a solution to this problem. I got 2 arrays, like this: array(2) { [20100526]=> array(1) { ["ga:pageviews"]=> string(5) "19088" } [20100527]=> array(1) { ["ga:pageviews"]=> string(5) "15566" } } array(2) { [20100526]=> array(1) { ...

Excel c# convert cell to percentage

Hello. I need to convert a cell with a double to a precentage. I used a macro in excel and it says: Range("B5").Select Selection.Style = "Percent" When I do this in c#, it doesn't work: Excel.Range procentRange = xlWorksheet.get_Range("A1","A1"); procentRange.Style = "Percent"; Anybody knows how to do this? ...

Convert decimal to percent or shift decimal places. How

I have a that is generated from the diference of 2 numbers, but it return for exemple 0,07 for 7% and 0,5 for 50% i just want to fix to reach these goar, like 15,2% 13% and so on. How can I do that? do c# has something embeded on CLR to do that? ...

Generating a random number but with a twist

I need to generate a random number. But the twist is that the % of lower numbers should be greater than the higher. For example. rand > 1 to 100 13, 15, 12, 16, 87, 15, 27, 12, 1, 12, 98, 12, 53, 12, 14.... The bold integers will be the ones return from the 1-100 range. The math should be like so rand = a number lower than max/2 ...

using constraint layout and percentage layout together flex

Hi, I'm trying to use percentage based layout along with contraint based layout to achieve the following layout http://imgur.com/rgoBe.jpg I have 3 canvas set in my app with the correct percentages but I setting things like top=10 left = 10 to create "border margins" has no effect. How can I fix this? EDIT <containers:GradientVB...

How to solve this equation?

Hi I am creating a web shop and have to calculate how much to charge the customer to make sure that the fees are cancelled. The payment system adds the fees and I want the customer to pay them. The fees are 2.45% and € 1.10. This means that if the customer shops for € 100, and I report that value to the payment system, we will only ge...

How to %-sign in php string

Hi i need to remove % sign from file or image name in directory which string i use $oldfile = "../wallpapers/temp-uploaded/".$file ; $newfile = "../wallpapers/temp-uploaded/". trim( str_replace('%', '', $file)); rename("$oldfile","$newfile"); But its not work reply me which string i use ( trim, str_replace not work preg_replace ho...

C#: Storing percentages, 50 or 0.50?

When holding percentage values in variables is there a preference between holding them as whole numbers vs fractions. That is should the variable hold numbers between 0 and 100 or between 0.00 and 1.00? In either case, the variable holding the values is of decimal type. The database I'm interacting with happens to store them as whole n...