我正在使用python并想要创建一个全屏窗口.我知道pygame.FULLSCREEN标志,但是当我使用它时,屏幕周围会出现黑色区域.有没有办法使用python获取显示器大小,所以我可以使窗口正确的大小?
我按照此处的说明进行交叉编译 GCC。我在Mac上。当我从 gcc 源文件夹运行此命令时:./configure --target=i586-elf --prefix=/usr/local/cross --disable-nls --without-headers --enable-languages=c,ada,c++,fortran,java,objc,obj-c++,treelang我收到此错误:configure: error: GMP 4.1 and MPFR 2.2.1 or newer versions required by fortran。当我将命令更改为此(我无法编译 GMP)时:./configure --target=i586-elf --prefix=/usr/local/cross --disable-nls --without-headers --enable-languages=c,ada,c++,java,objc,obj-c++,treelang我收到此错误:
The following requested languages could not be built: ada
Recognised languages are: c,ada,c++,fortran,java,objc,obj-c++,treelang
Run Code Online (Sandbox Code Playgroud)
这对我来说没有意义,因为它说 ada 被认可。启用语言设置的所有其他配置(当设置未更改且使用默认值时)都会出现以下错误:
/usr/local/cross/i586-elf/bin/ranlib ./libgcov.a
_error_not_here_yet - havent even thought about it - it may even work
make[1]: _error_not_here_yet: Command not found
make[1]: *** [treelang.all.cross] Error 127
make: *** [all-gcc] Error 2
Run Code Online (Sandbox Code Playgroud)
如何交叉编译 …
我有一个用于收集函数参数的野牛语法。到目前为止,情况是这样的:
args: arg {$$ = intArray($1);} //pseudo-code function
| args arg {$$ = $1 + $2;} //pseudo-code array addition
arg : NUM {$$ = $1;}
| exp {$$ = $1;}
Run Code Online (Sandbox Code Playgroud)
如何创建一个没有固定长度的整数数组,可以像 Bison 中的普通 C 数组一样使用?
当我想测试一个Android应用程序时,我创建一个新的AVD,在模拟器中启动它,等待模拟器完成启动,然后使用ADB安装应用程序,当我完成后删除AVD.是否有任何工具可以自动执行所有这些步骤?我尝试编写自己的,但我找不到一种方法来判断模拟器是否完全启动,因为Android SDK网站说不使用"adb wait-for-device install file.apk".
我正在使用wxPython制作一个python树可视化工具.它会像这样使用:
show_tree([ 'A node with no children', ('A node with children', 'A child node', ('A child node with children', 'Another child')) ])
Run Code Online (Sandbox Code Playgroud)
它运行正常但它显示了一个值为"Tree"的根.我这样做是为了创造多个根,但后来才知道我不允许这样做.我恢复了原来的代码,但是用它改变了它:self.tree = wx.TreeCtrl(self)对此:self.tree = wx.TreeCtrl(self, style=wx.TR_HIDE_ROOT).它工作但它没有显示侧面的小箭头,所以你不知道哪些节点有孩子.有没有办法隐藏根节点但保留箭头.注意:我在使用Python 2.5版和wxPython版本2.8.4.0的Mac上.
我正在制作一个自定义操作系统.我有两个nasm文件:
boot.asm:
[BITS 16] ;tell the assembler that its a 16 bit code
[ORG 0x7C00] ;Origin, tell the assembler that where the code will
;be in memory after it is been loaded
INT 0x13
JMP $ ;infinite loop
TIMES 510 - ($ - $$) db 0 ;fill the rest of sector with 0
DW 0xAA55 ; add boot signature
Run Code Online (Sandbox Code Playgroud)
start.asm:
[BITS 16]
MOV AL, 72
CALL PrintCharacter
MOV AL, 101
CALL PrintCharacter
MOV AL, 108
CALL PrintCharacter
MOV AL, 108 …Run Code Online (Sandbox Code Playgroud) 如何在Mac OSX Leopard上安装JDK 1.6?
在今天的软件更新中,我更新了Java,并从它升级1.5.0_26到1.5.0_28(这不是1.6!).我安装了Xcode Tools,版本3.0.在下载站点上,它没有列出Mac.
使用内置或可从内核访问的python解释器来构建Linux内核是否可能并且并不难以置信,它可以运行python文件作为init进程?
我在Mac OS X中安装了mono.我在mono网站上按照这些说明操作.第一个控制台应用程序工作,因为它没有使用任何包.但是,当我跑的时候gmcs hello.cs -pkg:gtk-sharp-2.0,它告诉我我没有安装pkg-config.所以我安装了pkg-config.现在我收到此错误,因为pkg-config不知道单声道包路径:
Perhaps you should add the directory containing `gtk-sharp-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-sharp-2.0' found
error CS8027: Error running pkg-config. Check the above output.
Run Code Online (Sandbox Code Playgroud)
单声道包路径在哪里以及我需要添加什么.bash_profile才能使Mono能够找到包?
我正在制作一个Qt应用程序,我有一个按钮来打开一个连接到自定义插槽的文件.这是到目前为止的插槽代码:
void MainWindow::file_dialog() {
const QFileDialog *fd;
const QString filename = fd->getOpenFileName();
}
Run Code Online (Sandbox Code Playgroud)
我怎么能拥有它然后将文件名转换为a const char *,打开文件,读取它并将文本存储在QString中,然后关闭文件.我正在使用Qt4.
我正在用pygame在python中制作一个蛇游戏,并且为了移动角色,我有一个整数,它应该是它应该移动的角度.我有什么方法可以根据度数来改变x和y的变化吗?例如:func(90) # [0, 5]或func(0) # [5, 0]
我有这个功能:
void myFunc(NSString* data) {
NSMutableArray *instrs = [[NSMutableArray alloc] initWithCapacity:[data length]];
for (int i=0; i < [data length]; i++) {
unichar c = [data characterAtIndex:i];
[instrs addObject:c];
}
NSEnumerator *e = [instrs objectEnumerator];
id inst;
while (inst = [e nextObject]) {
NSLog("%i\n", inst);
}
}
Run Code Online (Sandbox Code Playgroud)
我认为它失败了[instrs addObject:c].它的目的是遍历NSString的十六进制数.导致此代码失败的原因是什么?
python ×4
c ×2
c++ ×2
kernel ×2
macos ×2
pygame ×2
adb ×1
android ×1
arrays ×1
bison ×1
bootloader ×1
c# ×1
coordinates ×1
degrees ×1
editor ×1
file-io ×1
flex-lexer ×1
fullscreen ×1
gcc ×1
gtk# ×1
ide ×1
init ×1
iteration ×1
java ×1
jdk1.6 ×1
linux ×1
makefile ×1
mercury ×1
monitor ×1
mono ×1
mutable ×1
nasm ×1
nsenumerator ×1
objective-c ×1
osdev ×1
osx-leopard ×1
pkg-config ×1
qfiledialog ×1
qstring ×1
qt4 ×1
root-node ×1
tree ×1
treecontrol ×1
wxwidgets ×1
x86 ×1