How can I get the #sys-person entity to pickup lowercase names?
For example:
Bot:
May I get your first name please?
User:
My name is ben.
The bot doesn't pickup the lowercase name.
Is there a workaround for this?
Update:
I found a way to achieve this by using the string expression.
"<? #sys-person.substring(0, 1).toUpperCase()+ #sys-person.substring(1)?>"
Related
I'm new to perfecto mobile device automation. I came across a name field which returns value in two lines in the application. Like below
School Name : ABCD
INTERNATIONAL
I found the locator which is Xpath as //*[text()="ABCD INTERNATIONAL"], this returns value in two lines which I confirmed when I ran the code and asserted the value. So basically the error is like below
expected [ABCD INTERNATIONAL] but found [ABCD
INTERNATIONAL]
My feature file is like
Feature: Verify the school Details
Scenario : Verify the school Name
Given User logs into Application
When User verifies the school name as "ABCD INTERNATIONAL"
Then user logs of
Step Defenition:
#When("User verifies the school name as {string}")
public void a_User_verifies_the_school_name_as (String Name) throws Exception {
String School_Name = utility.getText(appiumDriver, "//*[text()="ABCD INTERNATIONAL"]);
Assert.assertEquals(School_Name, Name);
}
Your help in sorting out this will mean a lot.
I think you have to modify your actual and expected string by using replaceAll() method.
Like replaceAll("\n",""); and replaceAll(" ",""). then compare both in assertion.
If it is not working then you have to use pattern matching by regular expression.
I want to track a guid value in LogAnalytics, using tracked properties, but I can't get it to be saved as a string (that is with suffix "_s" instead of "_g" for guid).
I've tried to convert it to string and to replace all the hyphens to empty string, but no luck.
It works fine if I concat the guid with another character, but I want to save the guid as it is of course.
Example, this does not work:
trackedProperties": {
"MessageId": "#{string(Outputs('MyAction').MessageId)}"
}
Anyone got an idea of how to solve this?
I think we need to refer to the official document to know the record type and properties.
So could you please check if the "messageId_g" is existed. And if still can't solve it, you can try to use another "Initialize variable" action and put your messageId in it and then tracked the property in "Initialize variable" action, it should be "_s".
Hope it helps~
To identify a property's data type, Azure Monitor adds a suffix to the property name. If a property contains a null value, the property is not included in that record. This table lists the property data type and corresponding suffix:
**RECORD TYPE AND PROPERTIES**
**Property data type Suffix**
String => _s
Boolean => _b
Double => _d
Date/time => _t
GUID (stored as a string) => _g
There's some way that i can possibly read a voice recognition from the dialog in nao ?
For example:
proposal: What is your name
u1:(John Doe) ["Hey John Doe, how are you doing"]
u1:(anything) ["Sorry, i cant hear you, please repeat"] ^previousProposal
What i want is, how can i set the part (John Doe) to a dynamic input given by the user. There's some variable that i can create or a predefined variable for inputs by the user?
you can do that using $.
Here are some example from this documentation
Input selection as variable:
u:(my name is _[david robert]) your name is $1
Assign a variable:
u:(my name is david) i store your name $name=david
Condition
u:(is my name david) [“$name==david yes” “no it is $name”]
If in Yii 1.1.x there is some extension, to create valid file system(linux) name from object title with unique name, like a slug, but with unique name in given directory ?
I mean I want to save file on disk with name based on title of object.
Thanks!
Actually I would like a bit more :
1) In title of object all illigel chars(for Linux/windows OS) and space must be converted to '-'
2) if there is such file add valid counter for it , like "_45"
Maybe that not yii extension, but some php function.
The simplest way - you can add object id to prefix of file. Then your file names always be uniqueness. For example:
1-title-first
2-title-first
3-title-second
you can use php own uniqueid() to generate unique ids!
$title = uniqid('wp_'); // have wp_ prefixed for title
Got this information when I wrote out the DistinguishedName property on UserPrincipal class.
CN=Test Testie, OU=123,OU=Company,OU=Accounts,DC=myServer,DC=local
And im woundering if there is a property to get the nr 123 from OU. Is there any other property to get that or is this the best way to filter out my information?
\No. There is no "Parent" property.
Every object bellow the root has a parent being either an organizational unit (OU=) on a container (CN=). So just parse what is between the first two commas and remove OU= and CN=. That way you have the Name property.
Beware that it is possible to have objects with commas in their names. It then look like this:
Great OU, The
CN=Test Testie,OU=Great OU\,The,OU=Company,OU=Accounts,DC=myServer,DC=local
Testie, Test
CN=Testie\, Test
,OU=123,The,OU=Company,OU=Accounts,DC=myServer,DC=local
So you need to check for a backslah before parsing! If found, you then need to parse, between the first and the third comma.
Here is a link about "special" characters in Distinguished Names.
Ok, it's working but it doesn't feels like the best practice to do like this:
var ctx = new PrincipalContext(ContextType.Domain, "myDomain.local");
var user = UserPrincipal.FindByIdentity(ctx, "myUser");
var auth = user.GetAuthorizationGroups().Any(x => x.Name.Contains("myGroup"));
Because the thing is that I need to use contains because the group could look like this:
myGroup.xxxx.111
Any better way to soulve this?