Questions tagged [period]

A period of time is an interval, a span of time. You can also use it for questions related to the actual punctuation mark.

508 questions
3
votes
0 answers

How can I generate a valid WCF proxy for a service that has a period in the message types?

I am interfacing with a web service I have no control over and it has messages (input/output) and actions that contain periods (.) When svcutil generates the proxy, it includes: [MessageContractAttribute(WrapperName="The.Request",...)] public…
Jeff Inflection
  • 101
  • 1
  • 3
3
votes
1 answer

Trouble escaping a period inside String.matches() method

I'm getting a compilation error when I use this regular expression inside the String class's matches() method. Anyone know what I'm doing wrong here? Thanks String email = "this@that.com"; System.out.println(email.matches("^(.+@.+\.\\w{2,4})$"));
user1830797
  • 75
  • 2
  • 5
2
votes
2 answers

Joda Time's Period.getMillis returns inaccurate number

I ran into a strange issue with JodaTime's Period class. I come to the point where I've instantiated a Period object, which is being printed as: PT8M19.966S, which clearly says 8 minutes and 19 seconds (this is correct at this point), and I call…
Martin Asenov
  • 1,288
  • 2
  • 20
  • 38
2
votes
1 answer

Binding to fields containing a period in DataTable in C#/WPF

I have a SQL CE database, which is beyond my control, that has fields in the format of ., complete with a period in the column name. The columns will always be different, so I cannot have a strong-typed data field. I've been tasked with displaying…
Locke
  • 1,133
  • 11
  • 32
2
votes
2 answers

mysql date between period

Database structure: activities: id, description, date, time, endDate, endTime, userId So we got an activity, it is required to have a date, the time, endDate and endTime are not required. The problem is, if I want to get all activities of today I…
user1066101
  • 65
  • 3
  • 11
2
votes
0 answers

Unexpected behavior when adding and substracting Periods from Dates

I was experiencing some unexpected behaviors when doing date/time calculations. When it comes to daylight savings or leap years, the order of operations (months/days/hours) does matter, which is rather obvious. But it seems that the operation order…
Florian
  • 21
  • 2
2
votes
1 answer

Period between LocalDates produces wrong results

I see that java.time.Period with java.time.LocalDates works mostly as desired and I can use it to get the duration between two dates in years, months and days but I found an example that is not working (not as I expected it), like following: val…
prom85
  • 16,896
  • 17
  • 122
  • 242
2
votes
1 answer

Split intervals by overlap into all periods and get maximum score

Given two timelines, A and B, where each timeline consist of non-overlapping periods and a score is associated with each period. I want to find all the periods and maximum score for the overlap between the timelines, while keeping the periods that…
Atoqaz
  • 45
  • 4
2
votes
3 answers

collapse consecutive periods if the same

I tried to express my use case in R code as follows: haves <- data.frame( id = c(1,1,1,1) , start = c(as.Date('2022-01-01'), as.Date('2022-02-01'), as.Date('2022-02-01'), as.Date('2022-02-16')) , end =…
cs0815
  • 16,751
  • 45
  • 136
  • 299
2
votes
0 answers

Using pd.resample with PeriodIndex

I have a time series with a resolution of 5 min. The entries represent an amount of energy used in the preceding 5 minutes. I. e. the entry for 00:25 gives the energy usage from 00:20:01-00:25:00. import pandas as pd idx =…
Durtal
  • 1,063
  • 3
  • 11
2
votes
2 answers

Obtain a variable mean for a time period

I am blocked in my analysis I have a dataset like this one: Date Light 2019-02-15 01:00:00 0.134 2019-02-15 02:00:00 0.345 2019-02-15 03:00:00 0.567 2019-02-15 04:00:00 0 2019-02-15 05:00:00 0.100 ... ... 2019-03-10…
user14808606
2
votes
1 answer

Certificate ending on 28/06/21 how to update it?

I'm using mitm on ios to test some app, but since yesterday I can't log in any website, or even use google. It seems that the certificate has expired on the 28/06. I've tried to download a new one on mitm.it, but it's already expired. Do someone…
2
votes
1 answer

Number of days in leap years with IsoChronology

2000 CE is a leap year with 366 days. 2001 CE and 2002 CE do not leap years and have 355 days. Logically, if I ask the number of days between January 1st, 2000 CE and January 1st, 2001 CE, I should get one more day than between January 1st, 2001 CE…
Gzorg
  • 809
  • 4
  • 10
  • 25
2
votes
2 answers

How to group pandas dataframe by custom overlapping periods?

Say I have a list of lists where each nested list has two values: a start date of a range and an end date of a range. So something like this: ranges_list = [ ['2020-03-12', '2020-06-12'], ['2020-03-13', '2020-06-13'], ['2020-03-14',…
sometimesiwritecode
  • 2,993
  • 7
  • 31
  • 69
2
votes
1 answer

How to update retry-after value for ASPNetCoreRateLimit lib?

I have a Asp.Net Core Web Project and implemented ASPNetCoreRateLimit package for DOS and DDOS attacks in middleware as shown below. In "appsetting.json" file IpRateLimiting settings are configured under the middleware method as written below. In…
mkartal
  • 71
  • 10