The idea is to send a email via PHP mailer to office365 Room email ID with meeting start time and end time, now once the meeting request is accepted by the Microsoft exchange, I need to see that in room calendar in my outlook.
I already tried an approach with Icalendar, here is the ics format which i'm sending through php.
'PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN' . "\r\n" .
'VERSION:2.0' . "\r\n" .
'METHOD:REQUEST' . "\r\n" .
'BEGIN:VTIMEZONE' . "\r\n" .
'TZID:Eastern Time' . "\r\n" .
'BEGIN:STANDARD' . "\r\n" .
'DTSTART:20091101T020000' . "\r\n" .
'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11' . "\r\n" .
'TZOFFSETFROM:-0400' . "\r\n" .
'TZOFFSETTO:-0500' . "\r\n" .
'TZNAME:EST' . "\r\n" .
'DTSTART:20090301T020000' . "\r\n" .
'RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3' . "\r\n" .
'TZOFFSETFROM:-0500' . "\r\n" .
'TZOFFSETTO:-0400' . "\r\n" .
'TZNAME:EDST' . "\r\n" .
'BEGIN:VEVENT' . "\r\n" .
'ORGANIZER;CN="'.$from_name.'":MAILTO:'.$from_address. "\r\n" .
'ATTENDEE;CN="'.$to_name.'";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:'.$to_address. "\r\n" .
'LAST-MODIFIED:' . date("Ymd\TGis") . "\r\n" .
'UID:'.date("Ymd\TGis", strtotime($startTime)).rand()."#".$domain."\r\n" .
'DTSTAMP:'.date("Ymd\TGis"). "\r\n" .
'DTSTART;TZID="Pacific Daylight":'.date("Ymd\THis", strtotime($startTime)). "\r\n" .
'DTEND;TZID="Pacific Daylight":'.date("Ymd\THis", strtotime($endTime)). "\r\n" .
'TRANSP:OPAQUE'. "\r\n" .
'SEQUENCE:1'. "\r\n" .
'SUMMARY:' . $subject . "\r\n" .
'LOCATION:' . $location . "\r\n" .
'CLASS:PUBLIC'. "\r\n" .
'PRIORITY:5'. "\r\n" .
'BEGIN:VALARM' . "\r\n" .
'TRIGGER:-PT15M' . "\r\n" .
'ACTION:DISPLAY' . "\r\n" .
'DESCRIPTION:Reminder' . "\r\n" .
'END:VALARM' . "\r\n" .
'END:VEVENT'. "\r\n" .
'END:VCALENDAR'. "\r\n";
But here the issues is, this is working only with my outlook email ID that means when send the mail it will show on the calendar. if tried to give room (which i created in office 365 admin panel) email ID it is not showing up.
Also I recently cam across with the term called
Exchange Web Services (EWS)
but I don't have a clue how to start with and integrate in PHP.
Please let me know any suggestion or pointers.
Thanks in advance.
I have found the answer for this. basically I need to enable set-caledarProccess settings at exchange online.
Related
Occasionaly we get the following message
from module QQQQUERY in procedure BUILDAP.
MCH1210 Receiver value too small to hold result.
Van module . . . . . . . . : QQQQUERY
Van procedure . . . . . . . : BUILDAP
Instructie . . . . . . . . : 24041
Naar module . . . . . . . . : QQQQUERY
Naar procedure . . . . . . : BUILDAP
Instructie . . . . . . . . : 24041
Bericht . . . . : Receiver value too small to hold result.
Extra log info
MCH1210 Escape 40 11/04/18 10:33:28,661097 QQQQUERY QSYS *STMT QQQQUERY QSYS *STMT
Van module . . . . . . . . : QQQQUERY
Van procedure . . . . . . . : BUILDAP
Instructie . . . . . . . . : 24041
Naar module . . . . . . . . : QQQQUERY
Naar procedure . . . . . . : BUILDAP
Instructie . . . . . . . . : 24041
Bericht . . . . : Receiver value too small to hold result.
CPF4204 Escape 50 11/04/18 10:33:28,697990 QQQQUERY QSYS *STMT LOGGING2 SOARETPGM *STMT
Van module . . . . . . . . : QQQQUERY
Van procedure . . . . . . . : QQQQUERY
Instructie . . . . . . . . : 34332
Naar module . . . . . . . . : LOGGING2
Naar procedure . . . . . . : LOGGING2
Instructie . . . . . . . . : 1000001
Bericht . . . . : Er is een interne storing opgetreden in de queryprocessor.
Oorzaak . . . . : er is een systeemfout opgetreden in het programma van de
queryprocessor. Het nummer van het querydefinitiesjabloon (QDT) is 0.
Recovery . . . : raadpleeg de berichten van lager niveau. Verbeter
eventuele fouten en geef de opdracht opnieuw op. Als het probleem zich
opnieuw voordoet, meldt u het probleem met de opdracht ANZPRB (Problemen
analyseren).
RNX1216 Escape 99 11/04/18 10:33:28,828323 QRNXIE QSYS *STMT LOGGING2 SOARETPGM *STMT
Van module . . . . . . . . : QRNXMSG
Van procedure . . . . . . . : SignalException
Instructie . . . . . . . . : 21
Naar module . . . . . . . . : LOGGING2
Naar procedure . . . . . . : LOGGING2
Instructie . . . . . . . . : 1000001
Bericht . . . . : Error message CPF4204 appeared during OPEN for file
FALOGBL0.
Cause . . . . . : RPG procedure LOGGING2 in program SOARETPGM/LOGGING2
received the message CPF4204 while performing an implicit OPEN operation on
file FALOGBL0. The actual file is FALOGBL0. Recovery . . . : Check the
job log for a complete description of message CPF4204, and contact the
person responsible for program maintenance. If the file has a device type of
SPECIAL, there may be no message in the job log.
RNQ1216 Kopie afzender 99 11/04/18 10:33:28,838222 QRNXIE QSYS *STMT QRNXIE QSYS *STMT
Van module . . . . . . . . : QRNXMSG
Van procedure . . . . . . . : InqMsg
Instructie . . . . . . . . : 8
Naar module . . . . . . . . : QRNXMSG
Naar procedure . . . . . . : InqMsg
Instructie . . . . . . . . : 8
Bericht . . . . : Error message CPF4204 appeared during OPEN for file
FALOGBL0 (C S D F).
Cause . . . . . : RPG procedure LOGGING2 in program SOARETPGM/LOGGING2
received the message CPF4204 while performing an implicit OPEN operation on
file FALOGBL0. The actual file is FALOGBL0. Recovery . . . : Check the
job log for a complete description of message CPF4204, and contact the
person responsible for program maintenance. If the file has a device type of
SPECIAL, there may be no message in the job log. Possible choices for
replying to message . . . . . . . . . . . . . . . : D – Obtain RPG
formatted printout of system storage. S – Obtain printout of system
storage. F – Obtain full formatted printout of system storage. C – Cancel.
And this occurs in a triggerprogram that we use for logging changes.
The triggertime is *after and event is *update & *insert & *delete.
The problem occurs when starting the program and ultimatly gives a CPF4204 msg during opening the logical which contains the logged data.
It has occurred on several files we log.
Any suggestions where to look?
Tx
$download_path = 'admin_theme' . FOLDER_SEPRATOR . 'temp_folder' . FOLDER_SEPRATOR . $folder_name . '/';
$this->load->library('zip');
$this->zip->read_dir($download_path . '/');
$this->zip->download($folder_name . '.zip');
delete_files($new_folder, true, 1);
unlink($filename);
This will delete the file.
See this manual
I'm attempting to do some static analysis on function calls in a Go project using the go/parse, go/token and go/ast modules, but I can't figure out how to determine the type of a given ast.Ident object.
For instance if parse something like this:
textToContain := bytes.NewBuffer([]byte{})
// lots of other code
text := textToContain.String() // <- I care about this function call
(this is parsed from here: file)
EDIT: It took a lot of code to parse this so I didn't post it here, but you can find it as a gist at: https://gist.github.com/EricChiang/6735340c5fa3d2de2b73
I get the following code printed using the ast.Print function
0 *ast.CallExpr {
1 . Fun: *ast.SelectorExpr {
2 . . X: *ast.Ident {
4 . . . Name: "textToContain"
5 . . . Obj: *ast.Object {
6 . . . . Kind: var
7 . . . . Name: "textToContain"
8 . . . . Decl: *ast.AssignStmt {
9 . . . . . Lhs: []ast.Expr (len = 1) {
10 . . . . . . 0: *ast.Ident {
12 . . . . . . . Name: "textToContain"
13 . . . . . . . Obj: *(obj # 5)
14 . . . . . . }
15 . . . . . }
17 . . . . . Tok: :=
18 . . . . . Rhs: []ast.Expr (len = 1) {
19 . . . . . . 0: *ast.CallExpr {
20 . . . . . . . Fun: *ast.SelectorExpr {
21 . . . . . . . . X: *ast.Ident {
23 . . . . . . . . . Name: "bytes"
24 . . . . . . . . }
25 . . . . . . . . Sel: *ast.Ident {
27 . . . . . . . . . Name: "NewBuffer"
28 . . . . . . . . }
29 . . . . . . . }
31 . . . . . . . Args: []ast.Expr (len = 1) {
32 . . . . . . . . 0: *ast.CompositeLit {
33 . . . . . . . . . Type: *ast.ArrayType {
35 . . . . . . . . . . Elt: *ast.Ident {
37 . . . . . . . . . . . Name: "byte"
38 . . . . . . . . . . }
39 . . . . . . . . . }
42 . . . . . . . . }
43 . . . . . . . }
44 . . . . . . . Ellipsis: -
46 . . . . . . }
47 . . . . . }
48 . . . . }
49 . . . }
50 . . }
51 . . Sel: *ast.Ident {
53 . . . Name: "String"
54 . . }
55 . }
57 . Ellipsis: -
59 }
But I can't see where I could infer the type of textToContain
I know a bunch of tools that can do this, for instance this example from the go blog, but I think I'm going in the wrong direction.
3of3 is right; you need the type checker, which is golang.org/x/tools/go/types. In general, the type of an expression depends on type information for the transitive closure of import dependencies, so you will probably want to use the golang.org/x/tools/go/loader package (which I maintain), which takes care of many challenging details for you. Its stdlib_test.go may be a useful starting point.
Once you've identified the expression of interest, you can find its type in one of the mappings within the types.Info structure for the AST's package.
In this case, the expression is a referring identifier (*ast.Ident) so look in the Uses mapping to find the types.Object (named entity) to which it refers---a local variable (*types.Var) in this case. For expressions other than identifiers, the Types mapping will tell you its type.
What I want to do is to copy the output as you would do with a manual copy-paste. That mostly means that unrecognised characters will be saved as ? or however they are displayed, and not as their char codes. Is there any way to do that?
If you want something as manual copy&paste, so using a sort of clipboard, than that is operating system dependent and it is not a bash question.
For example, on MacOS X you can:
echo $filename | pbcopy #pbcopy - save the output from echo to clipboard
find / -name 'pbpaste` #pbpaste - print the clipboard content
Sure here is something like this on Linux too. (xclip or so)
as Erik told you, if you do
some_command > outfile ; cat outfile
it is the same as
some_command #plain output to terminal.
in the file "outfile" you will get exactly the terminal output. (expect some rare cases)
and don't be confused with "less" or some other pagers, who really should change the unprintable characters to something else.
and lastly - if you have problems with codepage or so, try setup your environment variables like LANG, LC_ALL and LESSCHARSET (man less) and so on..
bash config
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off
should help too in some cases. (man bash)
Try formulate you question more precise. :)
If you had examples of what you are trying to solve, I could be more specific.
Right now, I can only point you at
less -SR (show interpreting ANSI escapes)
ansifilter to convert ANSI escaped text to plain text (or HTML etc)
iconv, e.g.
.
cat myfile | iconv -f utf8 -t iso8859-1
Of course with that last one, substitute what ever character sets you have involved
Update
I just worked out the two most likely settings that will do what I think you are describing:
cat position | iconv -t latin1//TRANSLIT
cat position | iconv -t ASCII//TRANSLIT
If you have a UNICODE-heavy file position like this:
--> Applying move 131, ply 262: Q d3 - e2 + Checkmate .
... situation after:
⒏ ┊. . . . . . . .
⒎ ┊. . ♟ . . . . .
⒍ ┊. . ♙ . . . . .
⒌ ┊. . ♙ . ♙ . . ♟
⒋ ┊. . . . ♘ ♜ . ♚
⒊ ┊. . . ▫ . . . .
⒉ ┊. ♜ . . ♛ . . .
⒈ ┊. . . . ♔ . ♗ .
└────────────────
Ⓐ Ⓑ Ⓒ Ⓓ Ⓔ Ⓕ Ⓖ Ⓗ
Will result in this:
--> Applying move 131, ply 262: Q d3 - e2 + Checkmate .
... situation after:
8. ?. . . . . . . .
7. ?. . ? . . . . .
6. ?. . ? . . . . .
5. ?. . ? . ? . . ?
4. ?. . . . ? ? . ?
3. ?. . . ? . . . .
2. ?. ? . . ? . . .
1. ?. . . . ? . ? .
+----------------
(A) (B) (C) (D) (E) (F) (G) (H)
ffmpeg extension is loaded as it is shown at phpinfo(), my file and script are at the same location, but I'm still getting this error.
Warning: Can't open movie file Untitled.avi in C:\xampp\htdocs\skelbiu\fetch.php on line 4
Fatal error: Call to a member function getDuration() on a non-object in C:\xampp\htdocs\skelbiu\fetch.php on line 5
My script:
extension_loaded('ffmpeg') or die('Error in loading ffmpeg');
$ffmpegInstance = new ffmpeg_movie('Untitled.avi');
echo "getDuration: " . $ffmpegInstance->getDuration() .
"getFrameCount: " . $ffmpegInstance->getFrameCount() .
"getFrameRate: " . $ffmpegInstance->getFrameRate() .
"getFilename: " . $ffmpegInstance->getFilename() .
"getComment: " . $ffmpegInstance->getComment() .
"getTitle: " . $ffmpegInstance->getTitle() .
"getAuthor: " . $ffmpegInstance->getAuthor() .
"getCopyright: " . $ffmpegInstance->getCopyright() .
"getArtist: " . $ffmpegInstance->getArtist() .
"getGenre: " . $ffmpegInstance->getGenre() .
"getTrackNumber: " . $ffmpegInstance->getTrackNumber() .
"getYear: " . $ffmpegInstance->getYear() .
"getFrameHeight: " . $ffmpegInstance->getFrameHeight() .
"getFrameWidth: " . $ffmpegInstance->getFrameWidth() .
"getPixelFormat: " . $ffmpegInstance->getPixelFormat() .
"getBitRate: " . $ffmpegInstance->getBitRate() .
"getVideoBitRate: " . $ffmpegInstance->getVideoBitRate() .
"getAudioBitRate: " . $ffmpegInstance->getAudioBitRate() .
"getAudioSampleRate: " . $ffmpegInstance->getAudioSampleRate() .
"getVideoCodec: " . $ffmpegInstance->getVideoCodec() .
"getAudioCodec: " . $ffmpegInstance->getAudioCodec() .
"getAudioChannels: " . $ffmpegInstance->getAudioChannels() .
"hasAudio: " . $ffmpegInstance->hasAudio();
I'm using php 5.2.9 (XAMPP 1.7.1), Windows 7.
Thanks in advance!
Your path to the movie has to be the full path. It doesn't matter where your script resides. Because you are using Win 7 and XAMPP, your path would be for example
$ffmpegInstance = new ffmpeg_movie('C:/xampp/htdocs/yourfolder/Untitled.avi');
I hope that this resolves your problem