1, first to the system preferences, add an administrator rights account.
2, then to the system hard disk/system (System)/library (resource pool)/expansion/path.
3, will expand the folder press Introduction (cmd + i) in the lower right corner after
Modify the/etc/sysconfig/network corresponding network card, append:
The code is as follows
Copy Code
Networking_ipv6=no
2. Modify the/etc/hosts, the IPv6 of the local host name resolution also commented out:
not OK?
Try not to socket_close//close the connection in the loop, but still can't receive the second message from the client, related code:
do {if ($msgsock = socket_accept ($sock) = = = = False) {//Get a link echo "socket received failed because:". Socket_strerror (Socket_last_error ($ Sock)). "\ n"; Echo ' read client message \ n '; $buf = strlen (Socket_read ($msgsock, 8192)); $talkback = "client says: $buf \ n"; $
Disable CentOS unnecessary default serviceMethods for CentOS Shutdown service:Graphical interface, running NTSYSV
Chkconfig–level 2345 Service Name off
Service Name
Suggestions
Explain
Acpid
Deactivate
Advanced Configuration and Power Interface Source advanced, commonly used on Laptop
Apmd
Deactivate
Adventage
following command:It was my test result, but I felt that the accuracy was poor:4. Playing voice now robots can follow what we have said. It would be better if robots can talk to us. ROS has already integrated such a package. Let's try it.Run the following command:
$ rosrun sound_play soundplay_node.py$ rosrun sound_play say.py "Greetings Humans. Take me to your leader."
Have you heard the sound! ROS allows the robot to read the input text. The speaker is kal_diphone. If you don't like it, you c
screen, and try to complete the main tasks in the application with only the direction keys. Use the keyboard and steering wheel in the simulator, or use gesture navigation on devices above 4.1. Note: gestures allow users to get the focus of almost any content on the screen, while the keyboard and steering wheel can only get the focus of the input area and button.
2. Dialog voice prompt: Make sure that the UI control that provides information or allows users to operate has a clear and accurate v
the use of the application. For example, we have a imageview inside to put a color complex picture, perhaps some blindness colour-blind people, can not tell the picture of what is painted. If a user installs a secondary Browse tool such as talkback,talkback, it will read aloud what the user is currently browsing. TextView control talkback can read the contents d
via Uiautomatorviewer or Appium Inspector accessibility ID on Android is equivalent to ContentDescription, this property is convenient for some of the physiological functions of the people who have a flaw in the use of the application. For example, we have a imageview inside to put a color complex picture, perhaps some blindness colour-blind people, can not tell the picture of what is painted. If a user installs a secondary Browse tool such as talkback
target device's API level is below 18, Uiautomatorviewer cannot get the corresponding resource ID, only if it is greater than 18.5. findElementByAccessibilityId5.1 example?
12
el = driver.findElementByAccessibilityId("menu_add_note_description");assertThat(el.getText(),equalTo("node"));
5.2 How to get Accessibilityidcan be obtained by uiautomatorviewer or Appium inspector5.3 NotesAccessibility ID on Android is equivalent to ContentDescription, this property is co
Application Example of PHP socket (fsockopen) function
Using the Fsockopen function, the first thing to do is to open the allow_url_open=on in php.ini;
Fsockopen is the encapsulation of the socket client code, which encapsulates the socket_create (), Socket_connect ().
Server-side code: server.php
"; Socket_write ($msgsock, $msg, strlen ($msg)); Returns the message to the client echo "read client message\n"; $buf = Socket_read ($msgsock, 8192); Gets the message sent by the client $
, strlen ($msg)); Return information to the client
Echo ' read client message\n ';
$buf = Socket_read ($msgsock, 8192); Get the information that the client sent over
$talkback = "2.received message: $buf \ n";
Echo $talkback;
if (false = = = Socket_write ($msgsock, $talkback, strlen ($talkback)) {//return informat
Tip: Open the talkback function, if you want to turn the page need double finger hold screen slide, if you want to enter the program to click the selection program and then double-click Enter.1. Under the Standby page, click "Application", select and then double-click "Application".2. Double Finger sliding screen, select "Set", select and then double-click "Set".3. Click on "My Device", select and then double-click "My Device".4. Double pointing on th
clientEcho ' read client message\n ';$buf = Socket_read ($msgsock, 8192); Get the information that the client sent over$talkback = "2.received message: $buf \ n";Echo $talkback;if (false = = = Socket_write ($msgsock, $talkback, strlen ($talkback))) {//return information to the clientecho "Socket_write () failed reason
;}// Send welcome to the client$ Msg = "1. server send: welcome";Socket_write ($ msgsock, $ msg, strlen ($ msg); // return information to the clientEcho 'read client message \ n ';$ Buf = socket_read ($ msgsock, 8192); // obtain the information sent from the client.$ Talkback = "2. received message: $ buf \ n ";Echo $ talkback;If (false === socket_write ($ msgsock, $ ta
). "\ n ";
Break;
}
// Send welcome to the client
$ Msg = "1. server send: welcome
";
Socket_write ($ msgsock, $ msg, strlen ($ msg); // return information to the client
Echo 'read client message \ n ';
$ Buf = socket_read ($ msgsock, 8192); // obtain the information sent from the client.
$ Talkback = "2. received message: $ buf \ n ";
Echo $ talkback;
If (false === socket_write ($ msgsock, $
, $msg, strlen ($msg)); Return information to the client
Echo ' read client message\n ';
$buf = Socket_read ($msgsock, 8192); Get the information that the client sent over
$talkback = "2.received message: $buf \ n";
Echo $talkback;
if (false = = = Socket_write ($msgsock, $talkback, strlen ($talkback))) {//return inform
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.