I have a rule "9-10am very Monday morning from Sept 08 2013 to Oct 30, 2013 except Oct 14, 2013)". How could I code it into EKRecurrenceRule? Thanks!
Well. After some researches, my conclusion is, one could not do that. Hope iOS7 is better.
Related
I am trying to generate a list of users but I get different values depending on which dimension I use.
The data source is a GA4 property, but it also occurs with UA.
This is my example: https://datastudio.google.com/reporting/f75c1478-e738-45ad-8a23-97c51b69c374
For the attached table, if I use the "Month" dimension, it returns a different value that I use the dimension "Date (Year Month).
Could someone explain me the difference and how I could fix it?
Thank you very much in advance!
Date (Year Month)
Users
New users
1
Aug 2022
70,469
52,103
2
Jul 2022
71,939
54,837
3
Jun 2022
75,868
57,613
4
May 2022
85,273
67,462
5
Apr 2022
82,099
63,977
Month
Users
New users
1
Aug 2022
58,674
52,025
2
Jul 2022
60,150
54,748
3
Jun 2022
62,643
57,498
4
May 2022
73,172
67,398
5
Apr 2022
69,164
63,893
At the point of running some code I want to be able to return the next 31st of March.
So if run today tye date returned would be 31st March 2023. But if the same code was run back on say the 1st of March 2022 then the 31st of March would be returned....not sure of the best way to achieve this.
A little date arithmetic should work here:
DATEFROMPARTS(YEAR(DATEADD(MONTH,-3,GETDATE())+1),3,31)
Hi thanks for getting me on the right track. I went with this very similar code -
DATEFROMPARTS (YEAR(DATEADD(MONTH,-3,GETDATE())+1), 3, 31 )
I am using React as a front-end framework, python as a back-end language.
Python returns UTC datetime to React. Somehow, react+moment shows wrong local datetime (Berlin timezone). May I know, what to fix this issue ?
Case 1 is correct, but case 2 is wrong
Case 1:
Python returns to React: "2019-10-02T22:00:00Z"
React+Moment returns: Thu Oct 03 2019 00:00:00 GMT+0200 (Central European Summer Time) {}
moment('2019-10-02T22:00:00Z').toDate()
Thu Oct 03 2019 00:00:00 GMT+0200 (Central European Summer Time)
Case 2:
Python returns to React: "2019-10-30T22:00:00Z"
React+Moment returns: Wed Oct 30 2019 23:00:00 GMT+0100 (Central European Standard Time) {}
moment('2019-10-30T22:00:00Z').toDate()
Wed Oct 30 2019 23:00:00 GMT+0100 (Central European Standard Time)
Python is using utc while moment.js is using an extra offset of +1 or whatever (your local time). If you want moment.js to use utc too, do this:
const m = moment.utc('2019-10-30T22:00:00Z')
console.log(m.toDate())
I want to create a categorical variable for the semester column in my dataset. I have other additional variables with the target-not shown in the table.
Training set: include 2016-2017
Test set or validation set: include only 2018
My Concern is when I make the predictive model I will have categorical variables (factors) that do not exist in the training set (i.e SPRING 2018, SUMMER 2018–First SESSION,...etc). Is this will be a problem theoretically? How to deal with that?
Start End Semester
Jan 19,2016 May 6,2016 SPRING 2016
May 16,2016 Jun 25,2016 SUMMER 2016-FIRST SESSION
Jun 27,2016 Aug 6,2016 SUMMER 2016-SECOND SESSION
Aug 24,2016 Dec 16,2016 FALL 2016
Jan 17,2017 May 5,2017 SPRING 2017
May 15,2017 Jun 24,2017 SUMMER 2017–First SESSION
Jun 26,2017 Aug 5,2017 SUMMER 2017-SECOND SESSION
Aug 23,2017 Dec 15,2017 FALL 2017
Jan 16,2018 May 4,2018 SPRING 2018
May 14,2018 June 23,2018 SUMMER 2018–First SESSION
Jun 25,2018 Aug 4,2018 SUMMER 2018-SECOND SESSION
Aug 22,2018 Dec 14,2018 Fall 2018
The machine learning algorithms learn patterns in data, if we do not have any repeated pattern then with high probability they failed to provide adequate answer. I think you need to transform adequate information to your model for getting a rational output. Regarding to your research question, it can be different:
For instance, If you want to answer the question of when is the starting and ending time of semester x in year y?
You can convert the semester column into 4 ordinal categorical variables of 1 to 4 for Spring to Fall. In addition you should provide a year column in your data and DD,MM for ending and starting time.
I've got half a C class and maybe one or two shell scripts I've written to draw from as experience. I'm trying to parse data from a schedule in order to upload it to Google Calendar from a terminal. I receive the schedule in a block of text like this:
Sat Sep 01 2012 00:00:00 GMT-0700 (PDT) Saturday 2:00PM 11:00PM
Sun Sep 02 2012 00:00:00 GMT-0700 (PDT) Sunday 00:00AM 00:00AM
Mon Sep 03 2012 00:00:00 GMT-0700 (PDT) Monday 9:00AM 6:00PM
Tue Sep 04 2012 00:00:00 GMT-0700 (PDT) Tuesday 9:00AM 6:00PM
Wed Sep 05 2012 00:00:00 GMT-0700 (PDT) Wednesday 00:00AM 00:00AM
Thu Sep 06 2012 00:00:00 GMT-0700 (PDT) Thursday 8:00AM 4:00PM
Fri Sep 07 2012 00:00:00 GMT-0700 (PDT) Friday 10:00AM 7:00PM
And I've figured out that with googlecl I can type this into my terminal:
$ google calendar add "Sep 3 Work 9 to 6"
And I'll get a calendar event I can then have automagically synced to my phone.
I've read through some of the documentation on sed and awk figuring I could just use these to grab say the 5th through 10th (ie Sep 01) characters of each line and the time the shifts start and end, add the "Work" title, and pipe this directly to googlecl. I haven't gotten it down yet though.
I've also tried researching file i/o in C, as I could export my schedule as seen above to a text file and then maybe use C to pipe the schedule in plain-er English to Google Calendar.
Is sed and awk the preferred way of doing this? (I guess doing it with just common *nix commands is my first choice if I can figure it out) Should I instead write a little program in C to do this? Any help (even if it's just linking me to your favorite tutorials on either so I can do some more reading) would be appreciated, as many of the pages I've found Googling were both very long and a little over my head. Thanks.
awk '{ if ($9 != $10) {print "google calendar add \"" $2, $3, "Work", $9, "to", $10"\""}}' cal
Result:
google calendar add "Sep 01 Work 2:00PM to 11:00PM"
google calendar add "Sep 03 Work 9:00AM to 6:00PM"
google calendar add "Sep 04 Work 9:00AM to 6:00PM"
google calendar add "Sep 06 Work 8:00AM to 4:00PM"
google calendar add "Sep 07 Work 10:00AM to 7:00PM"
Explanation:
if ($9 != $10) {...}
If they are the same it looks like you don't need to enter them in your calendar. Also, implicitly checks for non-empty lines.
print "google calendar add \"" $2, $3, "Work", $9, "to", $10"\""
Print the string with relevant fields, escaping the quotes.
edit: As for executing it automatically, there is quite some delicate quoting issues going on, so putting this line in a for-loop is not trivial (for me!). One easy way out is to store the results in "file", and then "sh file".