由于某些原因,每当我试图编译这个简单的函数时,都会收到这个错误消息:Test.hx:1: lines 1-7 : Invalid -main : Test has invalid main function
public static function main(a:Int, b:Int){
trace("Calling main function");
return a+b;
}
我不确定为什么会发生这种事。这个函数定义出了什么问题,我怎样才能正确编译它?我试着阅读了,发现它对如何正确设置函数返回类型的解释不清楚。
我试图在Linux服务器上执行PHP文件,并在博客中找到一个很酷的脚本:
NAME=servicename
DESC="Daemon for my magnificent PHP CLI script"
DAEMON="/usr/bin/php"
DAEMON_OPTS="/var/www/html/phpscript.php"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting ${DESC}:
在python3.4中,我试图在Linux中使用vlc打开一个"wav“文件。这是我的代码:
import os,time
os.system("cvlc audio/some.wav")
time.sleep(3) #audio was one and half sec
a = 3+3
print (a)
它播放音频,但之后就不播放了。我该怎么做才能让他们这么做?更确切地说,我应该做什么来关闭vlc程序?
随着问题的解决,它也将非常感激知道是否有更容易的方式来播放音频在代码中,特别是在python3.4中?(平台独立代码将更加感激!)
我试图让Ubuntu直接引导到控制台。我不想完全删除GUI,因为有时我仍然需要它来训练车轮,但是如果我不需要它,我不想处理它。在以前的版本中,我可以很容易地通过编辑/etc/default/grub来实现这一点,但由于某种原因,它无法在15.10上工作。
这是我的/etc/default/grub文件:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this fi
我正在使用Android版本1.2.2,并将api级别更新为23。在使用api 19之前,我可以创建模拟器并运行项目。当更新我的Android中的api级别并尝试创建模拟器时,我得到了这个错误。我正在使用Linux操作系统。
**以下代码**
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option
我用arm-无linux-gnueabi版本4.4.1构建了glibc-2.11。我把二进制文件拷贝到我董事会的根目录上。当我输入"ldconfig“时,会遇到以下错误。
**ldconfig: Can't open configuration file /home/gykim/working/s1cam/gykim/stream/bsp/linux/util/glibc-2.11/_install/etc/ld.so.conf: No such file or directory
ldconfig: Can't create temporary cache file
当从盐主linux盒运行命令时,我总是得到类似于以下结果的结果:
[root@salt-master ~]# salt 'target-server' cmd.run 'date'
target-server:
Fri Jul 24 22:41:44 UTC 2015
怎样才能只得到命令的结果,而不是目标服务器的结果呢?
[root@salt-master ~]# salt 'target-server' cmd.run 'date' --SOMETHING I HAVE TO DO---
Fri Jul 24 22:41
我在Linux下运行Python:
bla:visualization> python
Python 2.1.1 (#18, Nov 1 2001, 11:15:13)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>>
由于某些原因,箭头键和delete键无法工作:
删除:
>>> x^H
试图交叉编译一个android应用程序从linux使用arm-linux-androideabi-g++,我得到一个错误,头文件cstdarg是找不到的。
common.h:27:19: fatal error: cstdarg: No such file or directory
compilation terminated.
如果我查看/usr/arm-linux-androideabi/include/,则头不存在,但存在其他c++头文件。我怎样才能解决这个问题?
我遇到了一些麻烦,让Command /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/bin/i386-ubuntu-linux-gcc failed with exit code 1进入链接阶段。现在,我可能是一个疯狂的人,但我似乎能够在Xcode3中获得更具体的东西?如果我没记错的话,我曾经收到过这样的有用的警告:
warning: libpulse-simple.so.0, needed by /Developer/Cocotron/1.0/Linux/ i386/Frameworks//libSDL-1.2.so, not found (try
假设我想从R启动一个本地服务器,访问它几次进行计算,并在结束时再次关闭它。所以:
## start the server
system2("sleep", "100", wait = FALSE)
## do some work
# Here I want to kill the process started at the beginning
这应该是跨平台的,因为它是包的一部分(Mac、Linux、Windows、.)。
我怎样才能在R中实现这一点?
编辑1
我必须运行的命令是一个java jar,
system2("java",