Interest compounding starting at a certain date
Hi folks,
I'm working on a small applet, and I was seeking a bit of guidance before I jumped in too deep into it.
In itself, it's pretty simple. I have an initial dollar figure, and it's growing by x every second. It started a few days ago, and I would like the Flash movie to keep up with it live, so when someone accesses that site, it shows the current amount.
I could use getTime, but it shows the actual time, not the time elapsed. And I could use the Date object or setDate, but I'm not sure if it would do any good, either.
I guess what I need is the amount of seconds that have elapsed since the original date. Once I have that, I think the interest-compounding might be easier.
Of course, this might all be crazy talk. Any help would be much appreciated!
Thanks in advance!
Napo
Thanks guys! It makes pretty good sense.
The audience is mostly going to be in a specific timezone, so I don't think that would make a big difference. Otherwise, how would I grab it from a server in, say, Central Time?
I just found out that, fortunately, the dollar figure I need to add has already been compounded for interest and therefore the calculation wouldn't be too hard. It would just be initial figure + (number of seconds * figure per second) and it would stay like that for the duration of the app. No need to compound the daily interest every 24 hours or hourly or (eek!) every second. Whew.
Thanks again!
Napo
Similar Messages
-
I want to open the iTunes library on my new laptop with all the playlists and stuff I built on the old computer. I have all my music on an external drive. I have copied the .itl file from the old computer and opened it on the laptop, and it has all the playlists, but all of the songs that were added to iTunes up to a certain date have broken links. What am I doing wrong?
Moving library files around while leaving the data in the same place usually presents no problems. Moving the data around independently from the library usually breaks things. With Windows machines all you should need to do is make sure that the same drive letter is being used on the new system as with the old. If that is not possible you need to get your library into a portable layout before moving it between systems.
Typical layout of iTunes folders:
When the media folder is inside the main iTunes folder as shown above then the library is portable. Typically with a split library the iTunes Music or iTunes Media folder (everything inside the red outline) is moved to a different drive by choosing a new locaton for it and then consolidating.
To make the library portable again you need to copy the library files and album artwork folder into the parent folder of the media folder so that the nested relationship is recreated. (BTW If your media isn't already inside your designated media folder then you will also need to consolidate the files that are outside of it, before you copy the library files.) You can then use the hold-down-shift-when-starting-iTunes method to open the library file in that parent folder. Once the library has been opened, tested and closed you are most of the way there.
The iTunes window inherits its title from the folder holding the library files so, unless you created a folder called iTunes to hold the media folder, iTunes may now have an unexpected title when you run it. The parent folder can be renamed as iTunes, and the library opened again. Alternatively, if the parent folder is at the root of the drive, or has other data which you wish to leave in place, you can create a new top level folder called iTunes and move the library files, album artwork and media folders into it before opening and testing the library again.
If the library doesn't work after any step simply reverse it by undoing a move or rename or opening the previous set iTunes Library.itl file.
If all has gone well then the library is now portable. Once you've migrated the data to a new system you can copy the library files back to their usual internal location if you find that having them on the external drive affects performance...
tt2 -
Updating a record on a certain date
Hi,
I have a little problem with updating a record on a certain
date specified in the same table.
OK so i have a table called 'users' and in that table i have
the following fields:
AdID
Username
AdStatus
AdStartDate
AdPeriod
(and a few more but i've listed the important ones here)
What i have done is, when a user places an AD, it inserts
into the table the user's username, the ad status (e.g. Active,
Suspended ect), the day on which the advert was placed, the period
the ad has been placed for (e.g 6 months, 1 yr, 2yr ect).
What i would like to do is to create an auntomatic function
that checks the date in the table, and see if it is 6 months, 1yr,
2yr old or whatever and if it is, update the status to suspended.
Problem is, i dont know how :(
I thought about adding a countdown script and when it reaches
Zero, run a stored procedure but i dont know anything about them.
Could somebody PLEASE help me this is driving me mad. I've
been trying all kinds of ways but no luck. Anyone with the 'know
how' that can point me in the right direction would be a BIG start.
I am using ASP.VB and MYSQL 5.
Thankyou in Advance,
Adammuzicmistro wrote:
> What i have done is, when a user places an AD, it
inserts into the table the
> user's username, the ad status (e.g. Active, Suspended
ect), the day on which
> the advert was placed, the period the ad has been placed
for (e.g 6 months, 1
> yr, 2yr ect).
>
> I am using ASP.VB and MYSQL 5.
I can't help you with the ASP side of it, but since you're
using MySQL,
you could simplify your problem by adopting a different
approach. Add an
expiry_date column (DATETIME type) and use the MySQL
DATE_ADD() function
to insert the date on which the ad expires. If your minimum
period is
one month, you can simply use MONTH as the the period in
DATE_ADD, and
use a variable to change the number of months (e.g., 24 for 2
years).
INSERT INTO myTable (expiry_date, other_cols)
VALUES(DATE_ADD(NOW(), INTERVAL x MONTH), other_vals)
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Rather than have an active/expired column, just use the
expiry_date and
compare it with the current date. If it's greater, the ad is
still
active. If it's less, the ad has expired.
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
Can I pick a certain date and time to restore my iphone?
In trying to update my iphone software with this latest update, our internet connectivity was screwy. When it went to sync, my iphone went black and everything on the computer screen quit. I couldn't do a thing with my iphone, it wouldn't even turn on/off so I restored. When it restored, it did not sync with the 10:30 pm time that I synced before I started the update. Instead, it synced with the 12:55 am time when the internet gave out. Which means, that I have nothing on my phone... all is lost. So I tried another restore which tried to sync it with 1:something am. OR I had the option of choosing June 2011. Is there anyway possible that I can choose a certain date and time to restore so not all is lost?
No, you can only restore form backup using the list of dates/times it gives you.
-
How to restore firefox to a certain date?
Hi
My firefox crashed. After that I by mistake closed session restore tab and continue browsing. But know I would like to restore previous session (date 9th October). Is it possible to just restore firefox to a certain date?
RegardsNo. Firefox only keeps a copy of the current session and copies the session data from the previous session (sessionstore.js) when Firefox starts to a sessionstore.bak file to make it possible to restore the previous session via History > Restore Previous Session.
*http://kb.mozillazine.org/Session_Restore
*https://support.mozilla.org/kb/Session+Restore -
How do you restore your iphone from a certain date?
Is there a way to restore your iphone 4s from a certain date (i.e. the last time you synced)? I downloaded a program today that enables me to access work email from my iphone; however, the security restrictions it has put into place on my phone (not my employer's phone) are making me want to remove the program. I have been told by out IT department that I can only restore my iphone & start over from scratch.
Well, if you create iCloud backups, they overwrite one another every night around 1:30 AM, so that may not be so helpful unless of an emergency. The only other way is through an iTunes backup. When an iTunes backup is overwritten, it is sent to the recycling bin. It may take a while to determine which backup you want to open in iTunes, but once you do, you can restore your phone to the backup date of your choice.
Thank you for choosing Apple. -
How to schedule process chains to be run on certain dates contained in DSO
Here is what I am trying to do.
We have a set of objects that need to be loaded with data, however they have to be loaded only on certain dates.
We are using process chains. What I would like to do, is to automate this load.
Essentially, I am thinking that I need to create some kind of event/service on the BW side that will sit and listen by comparing the system date to a set of dates defined in one of the DSOs containing data on Academic Calendar.
For example, the process chain should only start when the system date is = to the beginning of academic subsession date defined in one of the DSOs called Academic Period. Once the execution happens, then the event/service would sit and listen until the next time system date is = one of the dates in that DSO.
I am looking into the detailed steps in how this automation could be accomplished.
Thank youdid this once a long time ago...other kind of requirement but the principle is the same.
create a program_1 that updates table TVARV.
you need a selection screen with a paramter 'run_pc_2' and an input field for 'X' or ' '.
when you need to run chain2, you run this program and put X in the input field and run the program to update TVARV.
after the run of the process chain you run the program again and put ' ' in the input field.
create a second program_2 that reads this entry in table TVARV. If 'run_pc_2' = 'X' then you trigger event1. else you trigger event2.
create two process chains.
1/ PC1PC2PC4
2/ PC1PC3PC4
the first process chain is to be scheduled by event triggering after event1.
the second one is to be scheduled by event triggering after event2.
schedule program_2 to run daily.
the program will now check the entry in table TVARV and will trigger the corresponding process chain.
i hope it's clear what i mean to say.
M. -
Error in Starting Oracle BAM Active Data Cache
I am not able to start "Oracle BAM Active Data Cache" on my machine.
The other two components "Oracle BAM Event Engine" and "Oracle BAM Report Cache" are starting properly.
When I see the event log file of my Computer I could see the details as below:
Event Type: Error
Event Source: Oracle BAM Active Data Cache
Event Category: None
Event ID: 0
Date: 2/7/2007
Time: 3:51:25 PM
User: N/A
Computer: CHNANDA-WXP
Description:
ActiveDataCache: The Oracle BAM Active Data Cache service failed to start. Oracle.BAM.ActiveDataCache.Common.Exceptions.CacheException: ADC Server exception in Startup(). ---> Oracle.DataAccess.Client.OracleException ORA-12541: TNS:no listener at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OracleConnection.Open()
at Oracle.DataAccess.Client.OracleConnection.Open()
at Oracle.BAM.ActiveDataCache.Kernel.StorageEngine.Oracle.OracleStorageEngine.GetServerVersion()
at Oracle.BAM.ActiveDataCache.Kernel.StorageEngine.Oracle.OracleStorageEngine.Startup(IDictionary oParameters)
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.Startup()
--- End of inner exception stack trace ---
at Oracle.BAM.ActiveDataCache.Kernel.Server.DataStoreServer.Startup()
at Oracle.BAM.ActiveDataCache.Kernel.Server.Server.Startup()
at Oracle.BAM.ActiveDataCache.Service.DataServer.Run()
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Could anyone pls help me?
Thanks and Regards,
Chinmaya Nandahi Chinmaya -can yoy tell us your companyname,project ? Your problem is very simple.BAM ADC is notable to reachoracle db.fromyour dos prompt- try tnsping <yrDB> [default is oraclebam or orcl ]/ Also see FAQ pages. there is a requirement on dos prompt setting, with <clientforBAM>as 1st parameter
-
I'm in cycle mode, and 'merge' is clicked in preferences. However, when I record, my previous track data keeps getting overwritten. Does anyone know what I'm doing wrong. Interestingly, I can still see the data in the region.
jamestait wrote:
when I record, my previous track data keeps getting overwritten.
since you didn't specify, are you recording in a single take?
http://www.bulletsandbones.com/GB/GBFAQ.html#multipassrecording
(Let the page FULLY load. The link to your answer is at the top of your screen) -
Report to see parked documents as of a certain date
Hi All,
Is there any report to see list of Paked documents, as of a certain date.
Say for example, document XYZ was parked as on 5th March, but now it is posted.
So if I run the report giving the date as 5th March, it should show me that doc.
Is there any such kind of report existing?
I have checked fbv3, but it gives the parked documents as of todays date. So Please let
me know, if there is any existing report like this, or the feasibility of creating such a report.Hi
Please check the below mentioned link
Parked document table
VBKPF - Document Header for Document Parking
VBSEG - Document Parking Document Segment - General Structure
VBSEGS - Document Segment for Document Parking - G/L Account Database
VBSEGK - Document Segment for Vendor Document Parking
VBSEGD - Document Segment for Customer Document Parking
VBSEGA - Document Segment for Document Parking - Asset Database
hope it will help you
Regards
Praveen
Edited by: Praveen Chirakkel on Mar 28, 2011 9:11 AM -
Interest calculation based on Net Due Date
Hi guys: I want the interest calculation based on net due date and not document date or posting date.
I tried to check the box "ALWAYS CALCULATE INT FROM NET DUE DATE in prepare item interest calculation step, but system gives me message
"Do not select "Calc.intrst from net due date" for this int.calc.type
Message no. F7128"
Here are my questions:
1- how can i make the system to calculate interest only after the item is due for payment - right now its calculating anyday after the document date
2- Is this the correct place in configuration to do this? (ALWAYS CALCULATE INT FROM NET DUE DATE )
3- Also in T code FINT, how can i run interest posting for only one item rather than all that show up in test run? I tried selecting/highlighting only one but it posts all.
thanks much
brianHI,
The system always calculates the interest from the document date of the invoice,
as of my knowledge there is no setting for the interest calculation from the net due date, so
what u need to do is when u are running the open item interest run u specify the period of only the date
from the net due date to required date as of u.
if u want to calculate the interest to paticular invoice and having two invoices
then u can run as per the document date and other thing is u can block the invoice for dunnig.
Regards,
Padma -
Report to show beginning-ending stock on certain dates(as MB5B)
Hello to everybody,
we have this requirement:
MB5B should create a list with the items that are shown on the header part of the list . These items are shown when we tick the field XSUM. This list should be in format of report or alv , in order to be easily transfered to EXCEL.
We can do that with a Z report, by I wonder if there is any other report from which we can derive those totals, meaning the beginning stock on certain date, and the total stock at the end of date. MB51 does not include the beginning stock.
Thanks,
Irenehi,
MB5B and MB51 are std and fullfill report for stock and valuation in SAP. if your requirement is not ful fill with this report then need to take ABAP help and copy MB5B report program and make required Z report as per your requirement. no issue.
regards,
sans -
Stock at a certain date.
Hi,
how can I find the quantity of stock at a certain date ?
Yours trulyHi
Use transaction code MB5B for stock on a posting date.
Thanks & Regards
KK -
Is there a way to make an audio clip not cover the whole project in iMovie? I want to add audio clip or song and let it start at a certain point in the project. Whenever I add audio or song it covers the whole project. I'm working with iMovie on IPad!
Thank you for your reply Karsten but unfortunately this didn't help me so far. Or maybe I'm missing something?
First the link is a tutorial for iMovie on a Mac. I'm using iMovie on iPad so the steps are inapplicable.
Second it is only possible for me to manipulate the end part of the sound clip to whichever duration I want. But I can't do the same with the 'beginning' of the sound clip.
I simply want to place some photos in the beginning of my video with no sound in the background then after like 2 secs I want to start the music clip. For some reason that is not possible! Cause every time I drop the music clip unto my project timeline it automatically place it self along with the first frame in the project! And consequently the photos and music are forced to start together.
Hope I'm making sense... -
Disconnection document status at a certain date
Hello,
I need to know the status of a disconnection document at a certain date (actually, to check if the disconnection document had status '21' - disconnection carried out - during a certain period).
Is there a function or an easy way to find this out? If not, could you suggest me how to do this (check if the disconnection document had status '21' during a certain period)?
Thank you.Hello,
The following may be of some help for you:
Transaction SE37:
Function Module ISU_O_DISCDOC_OPEN in function group ES34.
Transaction SWO1:
Object type DISACTION Diconnection document activity
Method --> DisconnactionAction.ExistenceCheck
Object type DISCONNECT Disconnection
Method --> Disconnection.ExistenceCheck
Regards
Olivia
Maybe you are looking for
-
Updated ipod nano is now not recognised by windows or itunes
Hi, I am sure there would be numerous people who are in the same situation. Being computer illiterate does not help the situation i tell you. Can anyone please help?
-
Adobe Flash CS5 Installation: Error, Exit Code: 7
So I was installing Adobe Flash CS5 and ended up with this error. I've been looking around the forums, and trying several things, but nothing seems to be working. I uninstalled Flash CS4, and used the Adobe CS5 Cleaner Tool. Help and guidance would b
-
Weblogic throwing "null SOAP element Exception" in multi-part SOAP response
Hi All, I'm using weblogic 10. My application is a webservice client generated using '*clientgen*', which is running on weblogic, and is invoking a remotely hosted webservice ( Remotely hoseted webservice may not be running on weblogic). I've the wsd
-
EXIT_SAPLEBND_002 -- user exit for release strategy
Hi, This is regarding help on user exit for release strategy, ref: note no. 365604, however after going through all the config part given in the given note we activate the fm in cmod.... but after activating the release tab goes off from me29n. That
-
Does SPA122 support a custom "From" header in SIP INVITE msg?
Our SIP service provider allows me to specify the calling line identification (CLI) for outgoing calls by placing the appropriate string in the "From" field of the SIP INVITE msg. This is independent of the "User ID" needed to register with the servi