enter image description here
[
I want to add a new line after "the following things" as \n or other things are not working
]2
here you've used Dialogflow's web demo integration option which DOESN'T support multiple messages(lines) per response. This integration only supports single text responses.
You can use DialogFlow messenger integration if you want to add multiple messages.
To make a line break in the 'Text Response' sector just press 'Shift + Enter'.
Para realizar un salto de linea en el sector de 'Text Response' solo hay que presionar 'Shift + Enter'
Related
After being helped, I finally managed to apply Regex on a text to try to find some patterns.
My project consists of finding dialogues in a text written in Portuguese. In Portuguese, dialogues can be found in some ways: between dashes (- ele disse que sim-), with a dash starting the dialogue (- ele disse que sim), and in between quotation marks ("eu acho que sim").
However, as words in Portuguese can also contain dashes, such as in "viu-me" or "disse-lhe", I had make a code that takes all of this information into account.
The problem I am having is that I am getting dashes when I search for the pattern in a text.
Here is my code:
text = '''
"Para muitos é mais do que isso."
Eles chegarem em casa são e salvos
Viu-se que eles não estavam lá
'''
for d in re.finditer(r'(".+")|(^\s?-\s.+\s|-)', text, re.MULTILINE):
print(d.group())
Here is the current output:
"Para muitos é mais do que isso."
-
Fantastic, the code manages to find the dialogue in quotations, but prints a dash as well. It is as if it found that it is not a dialogue, it is just a word with an embedded dash, but still shows the dash in it.
The desired output:
"Para muitos é mais do que isso."
Just put a $ sign at the last of your regex, to denote the end.
r'(".+")|(^\s?-\s.+\s|-$)'
The reason for this is because in (^\s?-\s.+\s|-) the ending with |- is incorrect. It basically tells the regex to match \s?-\s.+\s OR a dash/hyphen. Which ends up matching the hyphen in Viu-se, since there is no notion of spaces in |-.
You'll probably also need to remove the ^ in the second group because if there are dashes in the middle of a sentence, you won't catch that.
Examples:
import re
text = '''
"Para muitos é mais do que isso."
Eles chegarem em casa são e salvos
Viu-se que eles não estavam lá
hello - More text and example - and stuff
a confusing-example-with-hyphens
Here is something else
- Start with dashes -, "quote me here"
'''
rgx = r'(".+")|(\s?-\s.+\s-)'
for d in re.finditer(rgx, text, re.MULTILINE):
print(d.group())
Gets you:
"Para muitos é mais do que isso."
- More text and example -
- Start with dashes -
"quote me here"
N.B: You could also control the exact number of spaces you want to see in case you don't want to match on multiple spaces after a dash;
rgx = r'(".+")|(\s?-\s{1}.+\s{1}-)'
I'm trying to make a button in IBM Notes that automatically forwards emails with attachments to a specific address.
I have looked at 2 previous examples on this website but none of them are working for me and I get the mail forwarded to myself.
Can anyone help?
The 2 codes I've tried are:
_From := #Text(From);
#Command([MailForward]);
#Command([EditNextField]);
#Command([EditInsertText]; _From);
#Command([EditGotoField]; "Body");
#Command([EditInsertText]; "Your text" + #NewLine + "goes here...")
and
FIELD SendTo:= "person#mail.com" ;
#Command( [MailForwardAsAttachment] )
The IBM Notes version I'm using is # 9.
Thank you
Use the first example and change it to:
#Command([MailForward]);
#Command([EditInsertText]; "person#mail.com");
#Command([EditGotoField]; "Body");
#Command([EditInsertText]; "Your text" + #NewLine + "goes here...")
Replace the email address in second code line with your specific address and adapt the remaining lines too.
I have a comments in cell F4 from a data base in HTML and looks like this (in spanish)
<b>[2020-02-04 12:15:45]:</b> Se aguarda la llegada de materiales. Hoy llega el material a sitio. Mientras, estamos realizando auditoria en BH715.
<br>
<b>[2020-01-31 15:16:58]:</b> COMENTARIO ASIGNACION: Se reasigna a otro supervisor por vacaciones.
So... I want to clean the text deleting (html tags):
"" , ":", ""
and the result will be:
[2020-02-04 12:15:45] Se aguarda la llegada de materiales. Hoy llega
el material a sitio. Mientras, estamos realizando auditoria en BH715.
[2020-01-31 15:16:58] COMENTARIO ASIGNACION: Se reasigna a otro
supervisor por vacaciones.
The two functions nested are using:
=SUBSTITUTE(F4;CHOOSE({1\2\3};"<b>";":</b>";"<br>");"")
But, only work the first number {1... of the range.
The rest of the number it doesn't work.
official Help here:
https://support.office.com/en-us/article/use-array-constants-in-array-formulas-477443ea-5e71-4242-877d-fcae47454eb8
any advice about that ?
I am using Office 2019/265 the delimiter are semicolons in my case.
thanks a lot.
The problem is that I don't know the exact code to find a tab using a variable.
For now my macro create a new tab in another workbook using the Range D26 as the name of my active workbook and is able to copy my form in the other workbooks but not in the right sheets. In fact it just send me to the debug.
Dim Titre As String
Titre = Range("D26").Value
Workbooks.Open "C:\Users\charl\Desktop\Programe comptable projet\Menu automatisé Test\Feuille de projet.xlsx"
Workbooks("Feuille de projet.xlsx").Worksheets(Titre).Range("B2") = Workbooks("Menu Automatisé.xlsm").Sheets("Fiche de création de projet").Range("D8").Value
I expect the program to copy of my form in the other workbooks in the tab I just created using the button. (The tab is created first)
Never mind I just found why it's not working. I was not precise enough for my string variable.
Dim Titre As String
Titre = Workbooks("Menu Automatisé.xlsm").Sheets("Fiche de création de projet").Range("D26").Value
Here's my code to retrieve attachment from Gmail message
Dim attachPart As MessagePartBody = myGMailService.Users.Messages.Attachments.Get(ProfileUsager.GoogleAccountUserName, ID, attachmentID).Execute()
Dim fileByteArray() As Byte = Convert.FromBase64String(attachPart.Data())
My problem is Convert.FromBase64String, this return:
L'entrée n'est pas une chaîne Base 64 valide, car elle contient un caractère non-Base 64, plus de deux caractères de remplissage ou un caractère non conforme parmi les caractères de remplissage.
How I can resolve this? This code is a code block I found on Google API doc.