最近遇到一个奇怪现象,直接往Android的SD卡根目录写入文件,报异常:open failed EACCES:permission denied. 已经在manifest.xml中加入android.permission.WRITE_EXTERNAL_STORAGE.权限 查询资料后才发现是由于A ...
分类:
移动开发 时间:
2016-06-14 15:59:53
阅读次数:
176
#!/usr/bin/expect -fset tvgwRecordChannel [lindex $argv 0]set tvldFlag [lindex $argv 1]spawn su expect "Password: " send "hello123\r"expect "]#"send " ...
分类:
系统相关 时间:
2016-06-08 18:36:24
阅读次数:
711
/usr/bin/expect<<EOF
settimeout50
spawn$SCP_LOG_TO_GATHER_SERVER
expect{
"*yes/no)?"
{
send"yes\n"
"*password:*"{send"GatherServerPassword\n"}
}
"*password:"
{
send"$GatherServerPassword\n"
}
}
expect"*password:"{send"$GatherServerPassword\n"}
expect"..
分类:
其他好文 时间:
2016-05-26 06:26:04
阅读次数:
170
执行系统命令 可以执行shell命令的相关模块和函数有: os.system os.spawn* os.popen* --废弃 popen2.* --废弃 commands.* --废弃,3.x中被移除 1 import commands 2 3 result = commands.getoutpu ...
分类:
编程语言 时间:
2016-05-23 21:08:22
阅读次数:
333
继续《nova boot代码流程分析(三):nova与neutron的交互(1)》的分析。
#/nova/virt/libvirt/driver.py:LibvirtDriver
# NOTE(ilyaalekseyev): Implementation like in multinics
# for xenapi(tr3buchet)
def spawn(self, c...
分类:
其他好文 时间:
2016-05-18 19:20:04
阅读次数:
217
本文是《Erlang程序设计》中的示例,因为C语言基础薄弱,理解这节花了一些时间,示例中的C程序分为三个文件,为了便于调试,我合并成了一个文”c.c”,而Erlang代码则叫”e.erl”,在代码中加入了一些便于理解的注释。主要用到的Erlang函数为:open_port(PortName,[Opt])参数其中PortName可以是下列选项中的一个:
{spawn,Command}
启动一个外部...
分类:
其他好文 时间:
2016-05-12 18:35:05
阅读次数:
197
原文转自:http://chenzhenianqing.cn/articles/936.html spawn-fcgi是一个小程序,作用是管理fast-cgi进程,功能和php-fpm类似,简单小巧,原先是属于lighttpd的一部分,后来由于使用比较广泛,所以就迁移出来作为独立项目了,本文介绍的是 ...
分类:
其他好文 时间:
2016-05-07 13:18:25
阅读次数:
195
##/bin/bashpassword=‘Aa123456‘foruserin$(cat./user_id)do/usr/bin/expect<<Eofsettimeout10expect"*#"spawn/usr/sbin/useradd${user}expect"*#"spawn/usr/bin/passwd${user}expect{"*password:"{send"$password\r";exp_continue}"*password:"{send"$password\r"}}Eofdone
分类:
其他好文 时间:
2016-05-07 01:17:42
阅读次数:
178
#!/usr/bin/expectset user [lindex $argv 0]set pass [lindex $argv 1]spawn useradd -s /bin/sh -d /home/$user $userexpect "*#"spawn passwd $userexpect "* ...
分类:
其他好文 时间:
2016-05-05 17:40:54
阅读次数:
127
??SettingupaMultiplayerProjectfromScratch由零开始设置一个多人项目Thisdocumentdescribesstepstosetupanewmultiplayerprojectfromnothingusingthenewnetworkingsystem.Thisstep-by-stepprocessisgeneric,butcanbecustomizedformanytypesofmultiplayergamesonceitisstarted.T..
分类:
编程语言 时间:
2016-04-28 18:25:10
阅读次数:
406