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
1 answer

Pandas is a Timestamp within a Period

I have a timestamp tstamp = pd.to_datetime('01/11/2017') tstamp ->> Timestamp('2017-01-11 00:00:00') and I have a period per = pd.Period('01/03/2017', 'M') per ->> Period('2017-01', 'M') I want to know if my timestamp is within my period. Eg is…
RSHAP
  • 2,337
  • 3
  • 28
  • 39
3
votes
1 answer

Joda-time Period doesn't seem to calculate days correctly

I am seeing some strange behavior around the Joda-time Period class -- specifically the days processing. In the following example code, I am specifying a period of 26 hours as milliseconds. // 26 hour duration long durationMillis = 26 * 3600 *…
Gray
  • 115,027
  • 24
  • 293
  • 354
3
votes
1 answer

Joda-Time: Strange behavior for leap year in Period calculation

The result of Period for the following 2 cases (starting from 2016 Feb 28/29 to 2017 Mar 1) are same as each other. Could you please help to explain this strange behavior? Case 1: 2016 Feb 28 to 2017 Mar 1 Calendar start1 =…
7gooo6
  • 33
  • 5
3
votes
3 answers

What does perf record -P do?

I have tried the command perf record and then perf record -P, which is supposed to allow me to specify the sample period, but it does not work. The result of perf record -P is the same as the one obtained from perf record. So what does perf record…
AN00
  • 325
  • 4
  • 13
3
votes
1 answer

Haskell: Execute IO action only if a certain time has passed since it's last execution

I have a media stream with associated named pipe to it. The program reads data from pipe and processes frames with processFrame. module Main where import Codec.FFmpeg import Codec.FFmpeg.Decode import Control.Monad.Except (runExceptT) main :: IO…
AleXoundOS
  • 341
  • 1
  • 4
  • 13
3
votes
2 answers

Iphone accelerometer sampling frequency

Some applications are available for measuring frequencies of alternating currents up to 200 Hz using magnetometers and designed for iPhones. I collected data from Iphone 5s magnetometers and the minimum average value of the acquisition period I…
Jeff 974
  • 69
  • 1
  • 4
3
votes
2 answers

How to create a delay for a command in c#?

I want to insert delay for changing color of button for 2000 milisecond in my game App in c# ... what command should I use for it ?? ( I want to changes color of button for 2 sec and then come back to normal state ) thank you switch…
Ali.Ghzd
  • 319
  • 1
  • 4
  • 12
3
votes
1 answer

Joda Period not converting all minutes to hours "8h, 132m"

I am storing two DateTimes (Joda) in an object and then I get a Period from the object by new Period(dateTime1, dateTime2). I then want to add all the periods from different objects together. I am both adding all the periods together in a variable…
Yokich
  • 1,247
  • 1
  • 17
  • 31
3
votes
2 answers

Display relative time with one number with Joda time [Java]

So I'm using Joda time and want it to display only one number (I know how to handle pluralisation in Joda, just a quick example at the end). Example: 2 years 2 months 2 weeks ago should just show 2 years ago 2 days 2 hours 2 minutes ago should just…
Anders
  • 9,988
  • 7
  • 30
  • 36
3
votes
1 answer

Jodatime Period to Jadira Usertype PersistentPeriodAsString. Giving custom format?

I need to store delta time I'm receiving in the format: yyyy-MM-ddTHH:mm in database. For that I'm using Joda-Time Period class. Now, I've to do the mapping from Period to DB column. I'm using Hibernate Framework, and found out Jadira UserType…
Rohit Jain
  • 209,639
  • 45
  • 409
  • 525
3
votes
2 answers

Creating a timer with CreateTimerQueueTimer, Visual Studio 2012 ,C++ , running periodically

I am trying to use CreateTimerQueueTimer(...) to run a function every so often. I am using an example from MSDN and mainly this line concerns me : CreateTimerQueueTimer( &hTimer, hTimerQueue,(WAITORTIMERCALLBACK)TimerRoutine, &arg , 50,100,…
user3463936
  • 31
  • 1
  • 3
3
votes
1 answer

Codility Binary Period

This is a problem Codility exam, I think there must be a more efficient way to do it. (And also I know there is a way to convert Binary number directly without going through the BinaryString, but I dont know how). This is the problem: A non-empty…
Fingolricks
  • 1,196
  • 2
  • 14
  • 30
3
votes
2 answers

running with Java.exe when period exists in directory name

I am trying to run the java prog I've built, but I want to run it from a specific directory. When specifying the relative path to the class file I want to run, that path contains a directory with a period in it, and it seems to be tripping java up;…
lomilomi26
  • 33
  • 3
3
votes
3 answers

Calc period of function in R

There is any R packages for calculation period of some function? I am looking for r-function like this: x <- seq(0, 50, by = 0.05) y <- sin(x) p <- calcPeriod(x, y) # result = 2pi
AndreyAkinshin
  • 18,603
  • 29
  • 96
  • 155
3
votes
2 answers

What does a period with a name before a function mean when calling it in Arduino code (C/C++)?

What does a period with a name before a function mean when calling it in Arduino code (C/C++)? For example, I am using an OLED display library and one function is called like this: display.setTextSize(1); I know what this function does, but what…
ltkenbo
  • 71
  • 2
  • 5