recurring

Grouping the same recurring items that occur in a row from list

不羁岁月 提交于 2019-12-06 08:56:24
For instance, we have a list like this: L = ["item1", "item2", "item3", "item3", "item3", "item1", "item2", "item4", "item4", "item4"] I want to pack them into list of tuples of the form: [("item1", 1), ("item2", 1), ("item3", 3),... ("item1", 1)] I've already developed an algorithm which does something similar, to get: {item1: 2, item2: 2, ...} (it finds all the occurrences and counts them, even if they aren't neighbours...) However, I want it to groups only those items which have the same and are neighbours (i.e. occur in a row together), how could I accomplish this? It's not that I don't

Find recurring date nearest to today - C#

99封情书 提交于 2019-12-06 04:36:13
Sounds like a homework? no it's not. I worked up the logic for this but not such a performant one when dates are span over years. Basically here is how it should work, StartDate: 1/1/2012 FinishDate: 1/10/2012 RecurringInterval: 2 ( In days) Output would be: 1/6/2012 if Todays date ( Date.Now ) is 1/5/2012 ( Assuming format MM/dd/yyyy ). Check would end when finish date is reached. If no dates match within given time period, today's Date must be returned. Dead simple but not a efficient one. What is wrong with this? if (!_isRecurring) return DateTime.UtcNow; DateTime initialDate = _startDate;

express checkout for recurring payments does not work for german payers

大兔子大兔子 提交于 2019-12-06 01:59:52
问题 I am currently developping a PayPal payment transaction with ExpressCheckout and RecurringPayments. Testing the software I get the following message after the ( german ) buyer logged in at paypal for confirming the payment: "Zurzeit können wir Ihre Anfrage leider nicht verarbeiten. Kehren Sie zu facilitator account's Test Store zurück und wählen sie eine andere Option aus." wich means "We cannot procceed the request. Please got back to the store an chose another option". A little bit googling

Creating a looping background animation in jquery

泪湿孤枕 提交于 2019-12-05 18:13:53
What I want is: when the page loads - the background has color red after 10 seconds the bgColor changes to green with a fade in fade out animation... after another 10 seconds it changes to orange....then again to red and so on.. Could someone help Use setinterval with a callback that changes the background: $("document").ready(function() { var colours = [ "blue", "orange", "pink" ]; var counter = 0; function cycleBackground() { $("body").animate({ backgroundColor: colours[counter] }, 500 ); counter++; if(counter == colours.length) { counter = 0; } } setInterval(cycleBackground, 10000); }); You

Algorithm: how to check intersections of recurring events definitions?

杀马特。学长 韩版系。学妹 提交于 2019-12-05 05:42:55
The question comes from MS Outlook calendar behavior. Imagine I have two recurring events (starting from today): "each second Monday" and "every odd date". Is there any way to check intersections and/or find the first intersecting date algorithmically without brute-forcing over each date? Definitions can be made in CRON's notations or ICal notation. I think it doesn't matter. Are there any solutions for this in Gregorian calendar? UPD : It is also interesting to know how MS Outlook Calendar handles these events. I mean how it discovers that ex. today has two events? I guess should be also

How do I change the rate or period of a repeating task using ScheduledExecutorService? [duplicate]

醉酒当歌 提交于 2019-12-04 17:37:35
问题 This question already has answers here : ScheduledExecutorService with variable delay (5 answers) Closed last year . I have a modified version of the bluetooth chat sample app. I have set up a ScheduledExecutorService which sends a command over bluetooth at a predefined rate using scheduleAtFixedRate . I have set up a PreferenceActivity to allow the period to be modified by the user. But I'm unsure how to get the actual recurring tasks to happen with the updated period. Do I need to cancel

mySQL Repeating Events Query

大城市里の小女人 提交于 2019-12-04 17:18:25
There are some solutions, but i don't know how to change that for my table. So i hope someone could help me. I have the following Table ╔═════╦═════════╦════════════╦════════════╦═══════════╗ ║ UID ║ TITLE ║ BEGIN ║ END ║ RECURRING ║ ╠═════╬═════════╬════════════╬════════════╬═══════════╣ ║ 1 ║ event A ║ 1359741600 ║ 1359745200 ║ none ║ ║ 1 ║ event B ║ 1359741600 ║ 0 ║ daily ║ ║ 1 ║ event C ║ 1359741600 ║ 0 ║ weekly ║ ║ 1 ║ event D ║ 1359741600 ║ 0 ║ monthly ║ ║ 1 ║ event E ║ 1359741600 ║ 0 ║ yearly ║ ╚═════╩═════════╩════════════╩════════════╩═══════════╝ How can i now select every event from

Allow end user to modify recurring paypal subscription amount

淺唱寂寞╮ 提交于 2019-12-04 15:02:19
I've read a few responses here regarding the modification of the recurring fee amount but still confused. We have 5 subscriptions levels per month: £10 £15 £20 £30 £50 We want to be able to let customers change their subscription package to any of the other options. It sounds like if they are changing to a package with more than 20% difference from the one they are on - we would have to make them cancel and start a new subscription. Surely there is a way to have the subscriber confirm they are happy to change the amount? thanks User can modify your paypal amount, but some restriction are there

express checkout for recurring payments does not work for german payers

拈花ヽ惹草 提交于 2019-12-04 07:12:03
I am currently developping a PayPal payment transaction with ExpressCheckout and RecurringPayments. Testing the software I get the following message after the ( german ) buyer logged in at paypal for confirming the payment: "Zurzeit können wir Ihre Anfrage leider nicht verarbeiten. Kehren Sie zu facilitator account's Test Store zurück und wählen sie eine andere Option aus." wich means "We cannot procceed the request. Please got back to the store an chose another option". A little bit googling shoes me this answer of the paypal support: Dear xxx, Thank you for contacting PayPal Merchant

How to Modify Properties (Time Zone) of Recurring Appointments in Outlook 2010 VBA

£可爱£侵袭症+ 提交于 2019-12-04 06:10:24
问题 I am writing a new and revised version of a VBA Outlook macro that will go through all appointment's in a user's calendar and change every recurring series' time zone to Central Standard. No matter what I do, however, I cannot seem to get it to access the recurrence properly. At present, when I debug the macro it will fail the first time a call is made to ex.AppointmentItem.Subject (in the Debug.Print statement after the recurrence pattern rPattern is defined). The central question here is: