I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds.
...
Does anyone know where I can find an algorithm that given a set of values (dates) for an axis I can calculate a reasonable scale and tick interval?
...
In Microsoft Access I have a table called Time Sheet and in this I have Time sheet no. , waiter no. , date and hours worked. I have 10 waiters.
I have another table called Service Charge Distribution. In this table I have Service Charge No. , waiter no. , week no. and distribution amount.
There is a Bill table where the Service charg...
I wanted to know whether we can approximate the power consumption of the PC if we have
1> sum of peak power consumption of all PC components in Watts (P)
2> machine uptime (T)
3> Avg CPU usage (Pcpu - a number between 0 and 1)
4> Power supply power factor (PF - a number between 0 and 1)
I have formulated this equation. Please verify i...
I got a distance field in my database that stores the distance traveled on a specific route.
I need to select all the distance fields and plus them together, then returning the result from my stored procedure.
How can this be done?
...
I am new to Ruby on Rails and have been using Scaffolding. On one of the forms I want to be able to have two fields and then have the difference between the two submitted to the database.
Instead of :pickupamount, I want (Ending Amount - Starting Amount) to be calculated and entered into the pickupamount column of my database.
Thanks ...
Hi everyone,
im looking for some Javascript code to calculate the sum off multiple HTML-input values. The amount off inputs are dynamic so i'm looking for something like "for each" input.
the format off the numbers is 1 000,00 (space as thousand separator and , as decimal separator).
My inputs are in and array so the ID's and NAME's is...
Hi guys,
I decided to try and learn more JQuery and here is what I have come up with.
It should be a simple enough job, but I can't get my head around it. I can add it up, but when I change a package, the price just keeps going up. I know I have to add some logic to decrement the counter, too, but I think a fresh pair of eyes would be...
I have an interesting problem:
My girfriend (painter...) wants to have a web page like this:
first page is just an image, through all screen - with no slider etc. So here is the problem of resizing images for different resolutions.
On this image are some windows, where user can navigate throught the rest of the page.
SOLUTIONS:
So...
Hey everyone,
Simple question, but I can't figure it out.
What is the launcher syntax I need to perform the following function:
<input type="text" id="value1" />
<input type="text" id="value2" />
<input type="text" id="value3" />
<input type="text" id="total" />
I want to perform [(value1 * value2) + value3] and have the result roun...
I've got an IR sensor which writes its current information to a token which I then interpret in a C# application. That's all good -- no problems there, heres my code:
SetLabelText(tokens [1],label_sensorValue);
sensorreading = Int32.Parse(tokens[0]);
sensordistance = (mathfunctionhere);
Great. So the further away the IR sensor is from...
I have two dates in the format below:
Start Date = 30-10-2009
End Date = 30-11-2009
How, with PHP could I calculate the seconds between these two dates?
...
Is there a way to count/calculate the total size of a svn directory if you were to checkout a revision?
I have limited internet downloads so I need to know how big something is before I go and download it.
Thank you.
...
This is what I was given to start with.
int main(){
int a[5] = {0,1,2,3,4};
printf("Sum of elements of a: %d\n", calculate_sum(a,5));
return 0;
}
Here's what I've got, I don't know why it doesn't work, please help me.
#include <stdio.h>
int main()
{
int a[5] = {0,1,2,3,4};
int b;
...
enter time-1 // eg 01:12
enter time-2 // eg 18:59
calculate: time-1 to time-2 / 12
// i.e time between 01:12 to 18:59 divided by 12
How can it be done in Python. I'm a beginner so I really have no clue where to start.
Edited to add: I don't want a timer. Both time-1 and time-2 are entered by the user manually.
Thanks in advance fo...
I've got a minor problem with a database admin page that I use to update values and totals in a MySQL database for generating various figures and data for a website.
A bit of background - the database table in question holds fundraising totals for a charity bookstall, with the table having three columns - id, date, and amountraised. Sum...
I have a small javascript pricing calculation that is not working on a friend's PC, but it works fine on my Mac. I'm guessing it's a semi-colon or something small that's not in the correct spot? Please help if you can?! The full page can be found @ http://procollage.com/pricing/photo-collage-pricing.html. Thank you all, again, in advance...
Hey guys,
Basically I've been trying to make a working hours calculator and I've run into a problem. When the start time's value is greater than the finish time (eg. start is 23 and finish is 19), the result comes up as a negative. So what I want it to do in that scenario is to then multiply the negative number by -1 to make it positi...
I know that the min and values are:
3.362... 10-4932 1.189... 10+4932
and log(2^14)~4932 which gives me the exponential part. But I can't figure out mantissa.
...
Hi.
I want to parse a css file and multiply each pixel value by (2/3). I was wondering if this was possible with sed? I know this is incorrect syntax but i think it'll bring home the explanation of what i want to achieve:
sed -e "s|\([0-9]*\)px|int((\1 * 2)/3)|g" file.css
So basically I want to take \1, multiply it by (2/3) and cas...