Is there a way to change the name that the NAO-robot uses in the Basic channel? - nao-robot

I want that my NAO-robot (Version 6) uses another name than NAO, when someone asks "What is your name?". I already changed it's name in the settings, but it doesnt use it by the voice recognition.

The basic channel's content is probably generic and might not adapt to your robot's actual name. But by making a small app reacting on the same trigger sentence, you might be able to override the current behavior.

Related

Twilio sample react app trying to pass a room name in the URL and put it into a hidden field?

I know this sounds like a big ask, but I'm assuming someone else has already done this and has a simple answer because it seems like an obvious use case.
Twilio has a sample app available on GitHub for their video service. Unfortunately, I don't know much about react, so I was able to make a couple of little changes, but this one has me stumped.
The code is called: Twilio / twilio-video-app-react
https://github.com/twilio/twilio-video-app-react
When you launch the code to enter a video room, you are presented with a form to enter your name and the name of a video room. I need to remove that room name input field and replace it with a hidden variable that was provided in the URL. In other words:
Get a room name variable that was passed as a query parameter on the URL
Make sure the room name is "safe" (alphanumeric) and then put it into a hidden variable in the form
Remove the visible input field (room name) from the form
That would take me two minutes in PHP, and it's probably really easy in react as well, but I can't figure it out. Hope someone can point me in the right direction.

Is there a way to change what Pepper says in Autonomous Life?

I would like to change what Pepper the robot says when it is in "default mode", i.e. without having any application launched; thus enabling it to answer some questions the manufacturer didn't include, or to change its answer.
I have already tried —to no avail— looking for a solution on Aldebaran's documentation, google researches proved fruitless too.
The kind of questions that the robot can be asked are here: http://doc.aldebaran.com/2-5/family/pepper_user_guide/basic_channel_conversation_pep.html it doesn't say how to change the content though.
I'm basically expecting the robot to be able to deliver some information without needing to get into application; I'm aware that there are collaborative speeches but this isn't what I am looking for.
Option 1:
You can find the dialoges from Pepper at:
/data/home/nao/.local/share/PackageManager/apps/dialog_*
e.g.
/data/home/nao/.local/share/PackageManager/apps/dialog_goodbye/dlg_goodbye/dlg_goodbye_enu.top
You could edit or extend those.
Option 2:
You could copy the content, edit them as you like and merge it into your own dialog.
But you would have to "get into application".
If you just want to add something to the default dialoges. Then you could activate your own custom topic in default mode.
Given your topic file is named myTopic.top and is placed in /data/home/nao/:
import naoqi
from naoqi import ALProxy
ald = ALProxy("ALDialog", "pepper.local", 9559)
myTopic = ald.loadTopic("/data/home/nao/myTopic.top")
ald.activateTopic(myTopic)
ald.getLoadedTopics("English")
Then your custom topic should be listed among the other topics activated in defaut mode.
Option 3:
Make your own application with your own dialog and just activate all the other topics too.

angular translate, how to get all the translate of one specific word in controller

I know that in controller I can use $translate.instant('HELLO_WORLD'), to get the translate to the 'current' set language.
What if the current is french, and I want to get english of 'HELLO_WORLD' too, but not changing the user's current preferred language.
The reason I want this is casue my app let user switch between french and english at any time. Everything works except for a directive that uses a $rootScope.object, the words inside doesnt get updated when user change the language.
The way Im trying to do it by is, I use a listener on this rootScope.object, when it get change, I manually change the item inside. However I need to know both french and english translate of each word to make the comparison and change.
The $translate.instant() API has a force language parameter. If you know your supported languages ahead of time you could query them all using separate calls to .instant().
instant(translationId, interpolateParams, interpolationId, forceLanguage, sanitizeStrategy)

How to protect files(docs) form being downloaded

I have some documents on a subdirectory for example www.example.com/documents, inside the document folder i have files(e.g. File1.doc, file2.docx, and So on). I want users to view the files But not to download it.
How can i do this?
In order to view the file the user need to download them... Maybe I don't fully get your point but I think this is not an option
(Programmer's Lore-Keepers) forgive my suggestions here...
This is a bit of a 'grey-area-programming'.
Have you considered perhaps using a technology of your choice javascript/jQuery to capture the "known" ways of copying while on your page?
Positive test : suppose the user clicks enter on a textbox and you're using jQuery to trap the enter command to then set off your trigger that is a default action to a control of your choice.
Think about this as a negative test... if the user uses key combinations such as Ctrl+A or Ctrl+P or Ctrl+S then you intercept it and interrupt their action in theory...
Other factors to consider would be how to capture the mouse drags and perhaps even right-click actions.
Hope this helps.

WinForms name chooser

I have a set of names (first, last, salutation) and need a control to allow users to select a single name using WinForms. A ComboBox works fine if the there are ~20 names, but not so well when there are >100 names.
Can anyone recommend a name picker? Perhaps an address book control that I could customize? It's not too hard to write my own, but I have other wheels to invent.
I'm giving you an answer that seems more like a feature request... :-) It can be very easy to use if you implement a control which behaviour is similar to the auto-completion feature of Google: foreach char inserted by the user, a window appears with only the names that match with the string inserted.
I think that it isn't so hard to implement, but I'm sorry, I can't give you a recommendation, only an advice :-)
I agree with Maurizio. To add to his answer:
The most commonly used interface which does exactly this is in email clients, where they auto-complete names (and/or email addresses) as you type them. Thunderbird is a pretty good example. These usually either auto-complete if there is only one match, or show a drop-down list of possible autocompletions you can pick from. In addition, a button next to the field usually allows you to browse the address book as a list.
I'd also suggest filtering the autocompletions available in the most useful ways: e.g. As you type "wi", you could filter it down to names like "[WI]lson, John", "Amery, [WI]lliam", and "[I]ving, [W]alter", making it easy to find people by their initials as well as first and surnames.

Resources