Where does xcode 4 get the user name for file templates - xcode

When I create a new file in xcode, the file template emits the following line:
// Created by ANONYMOUS ANONYMOUS on 11/2/11.
According to the docs, this should be using the full user name of the currently logged in user, but it's substituting ANONYMOUS ANONYMOUS instead. Anyone know why it's not using my user name? The variable it's substituting for is ___FULLUSERNAME___

I think it pulls information for the "me" card in your AddressBook to replace the ___FULLUSERNAME___ and __MyCompanyName__ values. (In AddressBook.app "Card" menu, select "Go to My Card" and see if you have any data entered. You can set any card in your address book to be your "me" card and the basis for those values.)
I've also seen developers use the defaults command line tool to set those values explicitly rather than using the variables above when they wanted to swap details without changing their address book identity. For example when writing code on behalf of multiple companies.
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "My organization";}'
http://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW10

Related

Dialogflow CX $param not showing in agent text

I am getting into CX and have a simple agent going but I cannot get the agent to respond with my filled parameter.
I have a page that asks for #DrinkFrequency and #DrinkChoice, I see both get filled correctly when I test the agent and $page.params.status = FINAL takes me to my next page that says
So you drink $session.params.DrinkFrequency and prefer to drink $session.params.DrinkChoice
But the agent says exactly that, it does not replace $session.params.DrinkFrequency or $session.params.DrinkChoice with the values the user gave. I know it must be a simple issue but I have tried to write $session.params.DrinkFrequency in a few different ways and I looked at the existing tutorial bots and they also have it with just the $ sign. Am I not saving the user given value?
The page that gets the values has the two parameters and they ask for the value in their "Initial prompt fulfillment" field.
You're referring to the entity type, while the display name is the name of your parameter.
If you replace $session.params.DrinkFrequency with $session.params.frequency and $session.params.DrinkChoice with $session.params.preference it should work.

How to use IBM Watson Context variables without entities?

Hi all Watson Developers!
I have a question, exposing that I need to know a bit more about context variables!
A user enters "Who owns the boat DUO ?" and my Dialog then uses the Intent "#owner_of_boatname" That works!
I then want to store the boatname in a variable $boatname, to pass it on to my webhook, as the value "$boatname".
If I create an entity with a list containing all possible boatnames, then it works, but what if I do not have all boatnames, and just want to pick up the $boatname from the user, and pass in on to the weebhook ? How do I fill out the handler then ?
I've tried to just put in "DUO" as value to my webhook, and that works fine, so the webhook itself works - I just need to be able to transfer variables to it!
How ?
Thanks a lot
Lars ;-) enter image description here
The ideal solution for this question should use A.I model created in Watson Knowledge Studio to identify names in user's text and deploy it to Natural Language Understanding instance which you would use the extract the name.
However, we can make a simpler solution, we must assume that the name of the boat will always be at the end of user's input and we can use a regular expression on Watson Assistant to extrat the name. You have to create a node before you pass to the webhook just to identify that user will pass the name of the boat, for example:
Assistant: What is the name of your boat?
User: The name of my boat is boatname
The node that return "What is the name of your boat?" should jump to a node and wait to user request and the condition of this node should always be true. When the user says "The name of my boat is boatname" the node with the condition always true should have context variable with the following regex expression in value context area:
"<? input.text.extract('\s\"?(\w+)\"?$',0) ?>"
This regex rule identify the last word of a phrase with double quotes or not.
Once you have extracted the boat's name you can make the node request you webhook.
Here we are using the SpeL language to access the assistant payload to extrat the last word of a phrase. You can find more information about functions on context variables here here.

Watson Assistant Slots: how to allow the user to re-enter data using non-dictionary entities?

I want to capture the following input from the user and am using these entities:
First and last names: use sys-person (I extract first and last names later using a cloud action).
Email address: use pattern entity, name #contactEmail and value "email" pattern \b[A-Za-z0-9._%+-]+#([A-Za-z0-9-]+.)+[A-Za-z]{2,}\b
Mobile Number: use pattern entity, name #contactPhone and value "mobileNumber" pattern ^[1-9][0-9]{7}[0-9]+$
Slots
I created a node with slots:
The setup is as follows:
Check for:
Check for: #sys-person.literal Save it as $person If not present: Type your name
Check for: #contactEmail.literal Save it as $email If not present: Type your email
Check for: #contactPhone.literal Save it as $contactPhone If not present: Type your mobile.
This all works perfectly and I get the name, email address and Phone number.
The Challenge
But I want the user to be able to confirm that the details are correct.
So I have an intent called #response_yes which is activated by things like "yes", "yep", etc.
And I have a fourth slot that checks for #response_yes.
Check for #response_yes, store the value in $confirmed, if not present ask "Got $person, $contactEmail, $contactPhone is that correct?"
If #response_yes is not found, then it displays the values already typed and asks if they are correct and waits for user input.
After the user has responded, then if the #reponse_yes intent is still not found, then:
Respond with, "Let's start again".
Also, we need to clear the values already typed:
Here's where it goes wrong
When I try the chatbot, the node collects the input correctly and displays the values correctly and asks if they are correct. I type "no", the #response_no intent is correctly divined and I would expect the prompt for the first slot to show again, but it doesn't.
No matter what I type at that point, the assistant bypasses the top three slots and drops to the fourth one again. It's as if I need to clear the entities, not the variables.
What am I doing wrong? How do I make the top slot work again?!
Aaaaargh.
For anyone who's interested, I simply didn't reset the values to null.
I guess I assumed that leaving the value blank was the same as null. Not so. Once I did this, the system worked perfectly:

InstallShield: Get the organization name during installation

I'm creating an installation with instalshield.
In the "Installation Interview", (which is part of the "Project Assistant") I set the option "to prompt users to enter their Company Name".
My question is: how can I interact with the value they entered? I mean how can I get it? I need to take this value and insert it to my app config file , during the installation process.
In a more general way, I would love to know how can I add text fields of my own and interact with the values the customers insert?
Thank you,
Noam
Look at the installation Wizard Noam. Anywhere you see an edit control, you will notice that it has a property associated with it. The property is a 'variable' that will have a value assigned to it. You can use the property to populate a registry, an XML file, etc.
I would look through the help documentation for InstallShield relating to Properties.
http://helpnet.flexerasoftware.com/isxhelp19/helplibrary/IHelpISXPropertiesUse.htm
The link above goes over the difference between Public and Private properties and how you can use them.
Ok, so I sort of solved it, I didn't use any built in dialog boxes, but simply created my own public property and dialog, then added an event to dialog and finally read the property value with powershell script, in more details (for future noobies) :
Create new property in Property Manager (under "Behavior and Logic"), give it a name and default value.
Create new dialog (under "User Interface").
At the behavior section of your dialog go to "Next" control (for example).
Add event (by pressing the tiny green plus sign at the line of the "Events")
Choose "SetProperty"
At the SetProperty line you can specify a condition, for example ApplicationUsers = "AllUsers"
At the "Property" field enter the property name (from first instruction)
At the "Value" field enter the value you wish for.
For getting the property value from powershell, create powershell script with the following: $value = Get-Property -Name PROPERTY_NAME
That's it.
This is not exactly what I asked for in the question but I believe this answer is more general and so also contains the answer to my original question.

Get a list of Active Directory Users along with their Full Name and Email

I need to retrieve a list of Active Directory users and their attributes using Delphi 2010.
I've seen a few similar questions on SO (e.g. Delphi - Find primary email address for an Active Directory user), but they all seem to require the user name before any additional information can be retrieved.
I had written an article for [The Delphi Magazine] way back when..... if you have access to a backlog of those magazines, it's in issue no. 62 (October 2000) - unfortunately, it seems those back issues aren't available for purchase anymore :-(
It's too long of an article and a code sample to post here.... basically it's about wrapping the IDirectorySearch interface in a nicer Delphi-like shell. You pass in a base container where to search, you define an LDAP filter, and you define a set of attributes you're interested in - then you search and get back basically an enumerator for the results, which you can get one by one.
In the end, I discovered TJvObjectPickerDialog, part of JVCL. It wraps the Windows Select Object dialog and does everything I need with very little coding. Just set the required properties and call execute. The selected user objects are returned along with the attributes that you set in the 'Attributes' property.

Resources