how do the X-APPLE extensions work in icalendars? - icalendar

Currently I'm working on a icalendar for the calendar app of apple. When i dived deeper in the icalendars i found some X- extensions. Does someone know how the X-APPLE-STRUCTURED-LOCATION , X-APPLE-TRAVEL-DURATION AND X-APPLE-TRAVEL-START work?
Here are some exemples:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME:test 2
X-WR-TIMEZONE:Europe/Amsterdam
X-APPLE-CALENDAR-COLOR:#FF2968
BEGIN:VEVENT
TRANSP:OPAQUE
DTEND:20150617T193000Z
UID:test#webscoding.nl
DTSTAMP:20150617T183000Z
LOCATION:Olympus 1\n3524 WB Utrecht\nThe Netherlands
DESCRIPTION:Paulien Prent en Danielle Roumen vs. Rosa van Heesch en Lari
ssa Nijholt
SEQUENCE:0
X-APPLE-TRAVEL-START;ROUTING=CAR;VALUE=URI;X-ADDRESS=Bingerdenallee 1\\n
6921 JN Duiven\\nNederland;X-TITLE=Home:
TRIGGER:
X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT45M
SUMMARY:[Tennis wedstrijd] DD 17+ A
DTSTART:20150617T183000Z
CREATED:20150616T223112Z
X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Olympus 1\\n3524 WB Utre
cht\\nThe Netherlands;X-APPLE-RADIUS=49.91307222863458;X-TITLE=Olympus 1
:geo:52.063921,5.128511
BEGIN:VALARM
X-WR-ALARMUID:CDABC4A5-8430-48C7-8AF4-4F031DD57C6A
UID:CDABC4A5-8430-48C7-8AF4-4F031DD57C6A
TRIGGER;X-APPLE-RELATED-TRAVEL=-PT30M:-PT1H15M
DESCRIPTION:Event reminder
ACTION:DISPLAY
END:VALARM
END:VEVENT
END:VCALENDAR

Related

Extract date from string with another numbers from R

I need to extract the date from this text:
Mellisoni 2014 Malbec (Columbia Valley (WA))
Okapi 2013 Estate Cabernet Sauvignon (Napa Valley)
Podere dal Nespoli 2015 Prugneto Sangiovese (Romagna)
Simonnet-Febvre 2015 Chablis
Lagler 2012 1000 Eimerberg Smaragd Neuburger (Wachau)
I use this code:
vino<-mutate(vino, year1=sub("^.*([0-9]{4}).*", "\\1", vino$title))
It works, but I have the last value extract on 1000 instead of 2012, how can I fix it if have another numbers?

drupal 8 date are very long

enter image description here
Hello in drupal 8.0.0 when I created a new content the date is too long:
11/23/2015 - 20:54 America/Bogota11 2015-11-23T20:54:19-05:0020151130America/Bogotax302015: f2015Mon, 23 Nov 2015 20:54:19 -050011pm302015 23America/Bogota fAmerica/Bogota2015-11-23T20:54:19-05:0008pm -05:0020-05:00
the problem is in the translation to spanish:
If you have in spanish this is the answer:
Inicio->Administración->Configuración->Regional e idioma->Formato de fecha y hora
And find the text "m/d/Y - H:i"
Click in "Filtro"
Appear two translations, the first is brong,
change "D, m/d/Y - H:i
en contexto: formato de fecha PHP"
And put "D, m/d/Y - H:i"
And save,
If the problem persists
Go to:
Inicio->Administración->Configuración->Regional e idioma->Formato de fecha y hora
And
change "D, m/d/Y - H:i
en contexto: formato de fecha PHP"
And put "D, m/d/Y - H:i"

how to change data such that graph is interrupted

I'd like to construct a graph like the following which is done with excel:
I've entered my data into matlab using the following lines:
year = [1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
]
fix_No = [-9.449167466 -11.19432509 -8.500517848 -5.644813211 -2.608063866 2.614370892 6.461752833 7.035549084 8.542521755 12.11070577 6.476900841 8.029225388 4.315820526 4.165349512 5.34593031 7.510812752 -2.629044124 -5.713139529 -8.626773532 -11.83226415 . -8.821345246 -6.396197293 -5.187823611 -1.79008821 3.34099288 5.545228048 7.013763711 6.580524638 4.256524275
]
fix_No_and_mean = [11.1610424 5.437315474 5.833032482 4.591658232 1.578021362 -1.572756298 -1.03351595 -2.250991302 -3.222969261 -5.734621837 . 12.96685642 10.95095066 10.2207684 5.654017602 1.753259697 -2.596143576 -7.155087995 -9.687001589 -8.700979283 -4.290434459 . 2.299711172 1.640802028 1.714407543 0.8360893 -0.425484303 -1.160053823 -0.858530711 0.123787867 0.782208621
]
In 1985 and 1996 the lines should be interrupted as in the excel graph. But how can I do this using Matlab? I've put a "." (point) where the interruptions should be but matlab doesn't accept points.
The lines for the construction of the graph look like this:
plot(year,fix_No, 'color', 'k', 'LineWidth',2, 'LineSmoothing','on')
line(year,fix_No_and_mean, 'color', 'r', 'LineWidth',2, 'LineSmoothing','on')
xlabel('year')
legend('fixed number', 'fixed number')
You Should put "NaN" instead of '.' ,i.e. in the places on the vectors fix_No_and_mean and fix_No that correspond to 1985 and 1996, put NaN.
This will plot different lines as in the figure you attached from excel.

Insert missing comma (perl)

Line:
výkonná produkce: Martin Scorsese, Timothy Van Patten střih: Kate Sanford, Tim Streeto herec(s): Hong Eun Hee (Mi Geum (soţia lui Sang Ok)) Han Hee (Jang Mi Ryung) Kim Yoo Mi (Yoon Chae Yeon) Jae-ho Song (Im Bong Hoek (tatăl lui Sang Ok))
I want insert, with perl, missing comma like this:
výkonná produkce: Martin Scorsese, Timothy Van Patten střih: Kate Sanford, Tim Streeto herec(s): Hong Eun Hee (Mi Geum (soţia lui Sang Ok)), Han Hee (Jang Mi Ryung), Kim Yoo Mi (Yoon Chae Yeon), Jae-ho Song (Im Bong Hoek (tatăl lui Sang Ok))
Thanks.
Without any details on constraints, we have to guess what you need. I'm guessing this:
s/\) /), /g

How to extract the image source from an rss string

This is the yahoo news rss feed
<p><img src="http://d.yimg.com/a/p/ap/20110520/capt.53a8af4c675f421c8b7cba014c589d29-53a8af4c675f421c8b7cba014c589d29-0.jpg?x=130&y=97&q=85&sig=iOyBvkyg0rEKSK3hjlSsNA--" align="left" height="97" width="130" alt="First lady Michelle Obama, left, and Lt. Gen. David Huntoon, superintendent at the U.S. Military Academy, arrive in Washington Hall for a graduation banquet, Friday, May 20, 2011, in West Point, N.Y. (AP Photo/Mike Groll)" border="0" />AP - First lady Michelle Obama urged more than 1,000 cadets Friday night on the brink of graduating to keep in mind the families of the soldiers they will lead.</p><br clear="all"/>
how can i extract the image source (http://d.yimg.com/a/p/ap/20110520/capt.53a8af4c675f421c8b7cba014c589d29-53a8af4c675f421c8b7cba014c589d29-0.jpg) from this string.
You can use NSScanner. Something like this:
NSString *src = nil;
NSString *newsRSSFeed = #"<p><img src=\"http://d.yimg.com/a/p/ap/20110520/capt.53a8af4c675f421c8b7cba014c589d29-53a8af4c675f421c8b7cba014c589d29-0.jpg?x=130&y=97&q=85&sig=iOyBvkyg0rEKSK3hjlSsNA--\" align=\"left\" height=\"97\" width=\"130\" alt=\"First lady Michelle Obama, left, and Lt. Gen. David Huntoon, superintendent at the U.S. Military Academy, arrive in Washington Hall for a graduation banquet, Friday, May 20, 2011, in West Point, N.Y. (AP Photo/Mike Groll)\" border=\"0\" />AP - First lady Michelle Obama urged more than 1,000 cadets Friday night on the brink of graduating to keep in mind the families of the soldiers they will lead.</p><br clear=\"all\"/>";
NSScanner *theScanner = [NSScanner scannerWithString:newsRSSFeed];
// find start of IMG tag
[theScanner scanUpToString:#"<img" intoString:nil];
if (![theScanner isAtEnd]) {
[theScanner scanUpToString:#"src" intoString:nil];
NSCharacterSet *charset = [NSCharacterSet characterSetWithCharactersInString:#"\"'"];
[theScanner scanUpToCharactersFromSet:charset intoString:nil];
[theScanner scanCharactersFromSet:charset intoString:nil];
[theScanner scanUpToCharactersFromSet:charset intoString:&src];
// src now contains the URL of the img
}
NSLog(#"%#",src);
// --> http://d.yimg.com/a/p/ap/20110520/capt.53a8af4c675f421c8b7cba014c589d29-53a8af4c675f421c8b7cba014c589d29-0.jpg?x=130&y=97&q=85&sig=iOyBvkyg0rEKSK3hjlSsNA--