我刚刚发现了MacRuby/HotCocoa,并且非常喜欢他们正在做的事情的声音.
我基本上打消了自己制作Cocoa GUI应用程序的前景,因为我厌倦了花时间和精力学习另一种基于C语言的Objective-C.我不是说这很糟糕,只是不适合我.
现在或者在可能的未来,是否能够单独使用MacRuby/HotCocoa制作具有实质性和一流性的Cocoa GUI应用程序而完全忽略Objective-C?
(编辑:桌面Mac,而不是iPhone)
我使用我的ubuntu的synaptic包管理器安装了vim-latex软件包.我按照这里的说明编辑我的.vimrc文件.但是,当我在vim中打开一个.tex文件时,出现了新的菜单选项,我似乎无法使用\ ll编译文档.我做错了什么?
我创建了一个谷歌应用引擎项目.我刚刚成功将其映射到一个新域.我的项目名称是"葡萄".因此,默认情况下,它发布在http://www.grape.appspot.com.我把它映射到http://www.grape.com,这太棒了.
现在我想创建一个新的app引擎项目,并将其映射到:
http://api.grape.com
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?我认为这是可能的,我只是不确定我会在哪里进行这种映射?由于我拥有grape.com,我希望我可以将一个新项目映射到t.
基本的想法是有一个项目负责UI的东西,然后第二个项目负责公共API,这将是伟大的.
可以在宏的c ++中放一个宏吗?
就像是:
#define Something\
#ifdef SomethingElse\ //do stuff \
#endif\
Run Code Online (Sandbox Code Playgroud)
我尝试过它没有用,所以我的猜测它不起作用,除非有某种语法可以解决它?
我有一个if声明
if (int1 < int2)
{}
else
{}
Run Code Online (Sandbox Code Playgroud)
如果int1和int2都为0,我希望运行else语句.
我正在尝试创建一些可以在 Mono+C# 中播放声音和音乐的东西,但我不确定最好的事情是什么。
我正在尝试使其可用于 Ogg Vorbis、MP3 和波形文件等。
我的主要平台是 Linux,不过跨平台解决方案会更好。
有人对播放音频文件的库有什么建议吗?
如何让java.util.concurrent.Executor或CompletionService在Google AppEngine上运行?这些类都正式列入白名单,但在尝试提交异步任务时遇到运行时安全性错误.
码:
// uses the async API but this factory makes it so that tasks really
// happen sequentially
Executor executor = java.util.concurrent.Executors.newSingleThreadExecutor();
// wrap Executor in CompletionService
CompletionService<String> completionService =
new ExecutorCompletionService<String>(executor);
final SomeTask someTask = new SomeTask();
// this line throws exception
completionService.submit(new Callable<String>(){
public String call() {
return someTask.doNothing("blah");
}
});
// alternately, send Runnable task directly to Executor,
// which also throws an exception
executor.execute(new Runnable(){
public void run() {
someTask.doNothing("blah");
}
}); …Run Code Online (Sandbox Code Playgroud) 在进行方法调用时,我收到一个非常奇怪的错误:
/* input.cpp */
#include <ncurses/ncurses.h>
#include "input.h"
#include "command.h"
Input::Input ()
{
raw ();
noecho ();
}
Command Input::next ()
{
char input = getch ();
Command nextCommand;
switch (input)
{
case 'h':
nextCommand.setAction (ACTION_MOVELEFT);
break;
case 'j':
nextCommand.setAction (ACTION_MOVEDOWN);
break;
case 'k':
nextCommand.setAction (ACTION_MOVEUP);
break;
case 'l':
nextCommand.setAction (ACTION_MOVERIGHT);
break;
case 'y':
nextCommand.setAction (ACTION_MOVEUPLEFT);
break;
case 'u':
nextCommand.setAction (ACTION_MOVEUPRIGHT);
break;
case 'n':
nextCommand.setAction (ACTION_MOVEDOWNLEFT);
break;
case 'm':
nextCommand.setAction (ACTION_MOVEDOWNRIGHT);
break;
case '.':
nextCommand.setAction (ACTION_WAIT);
break;
}
return nextCommand; …Run Code Online (Sandbox Code Playgroud) 给定这样的文件名:
/the/path/foo.txt
bar.txt
Run Code Online (Sandbox Code Playgroud)
我希望得到:
foo
bar
Run Code Online (Sandbox Code Playgroud)
为什么这不起作用?
#!/bin/bash
fullfile=$1
fname=$(basename $fullfile)
fbname=${fname%.*}
echo $fbname
Run Code Online (Sandbox Code Playgroud)
什么是正确的方法呢?
依靠预处理器和预定义的编译器宏来实现可移植性似乎很难管理.什么是实现C项目可移植性的更好方法?我想将特定于环境的代码放在标题中,行为方式相同.有没有办法让构建环境选择要包含哪些标头?
我以为我会将特定于环境的标头放入特定环境的目录中.然后,构建环境只是将标头从平台的目录复制到根目录,构建项目,然后删除副本.