听到"高度优化的代码"或某些开发人员需要优化他们和诸如此类的东西,这是常见的.然而,作为一个自学成才的新程序员,我从来没有真正理解人们在谈论这些事情时究竟是什么意思.
关心一般的想法呢?此外,推荐一些阅读材料,无论你想在这件事上说什么.随意咆哮和讲道.
我遇到PHP的isset函数问题.这经常是神秘的(对我而言)失误.
例如,当我有一个可以是字符串或错误数组的变量时,我尝试使用isset来查看该变量是否包含该数组的已知索引之一,如下所示:
$a = "72";
if(isset($a["ErrorTable"]))
echo "YES";
else
echo "NO";
Run Code Online (Sandbox Code Playgroud)
这个坏男孩在我的服务器上一直打印YES.我尝试了Ideone(在线翻译的东西.这很酷!)这里:http://ideone.com/r6QKhK ,它打印出NO.
我认为这与我们正在使用的PHP版本有关.有人可以对此有所了解吗?
有一个不错的USB通信API吗?最好是跨平台(如果不是Linux,我猜)
我没有特定的用途,我只是想了解如何将USB端口用于未来的电子项目.我意识到这是非常一般的,我会尝试改进问题,因为答案指出了我正确的方向.
谢谢.
我已经开始开发一个简单的吉他调音器作为音频处理程序的学习项目.
有人可以推荐一个适合你的图书馆吗?这基本上就是我要找的东西:
我正在尝试开始使用FMOD,但我在编写本教程中的示例代码时遇到了一些问题:
http://www.gamedev.net/reference/articles/article2098.asp
我正在使用MinGW,我将libfmodex.a文件放在MinGW的include文件夹中(我也尝试直接链接到文件名),但它不起作用.这是输出.
C:\>g++ -o test1.exe test1.cpp -lfmodex
test1.cpp:4:1: error: 'FSOUND_SAMPLE' does not name a type
test1.cpp: In function 'int main()':
test1.cpp:9:29: error: 'FSOUND_Init' was not declared in this scope
test1.cpp:12:4: error: 'handle' was not declared in this scope
test1.cpp:12:53: error: 'FSOUND_Sample_Load' was not declared in this scope
test1.cpp:13:30: error: 'FSOUND_PlaySound' was not declared in this scope
test1.cpp:21:30: error: 'FSOUND_Sample_Free' was not declared in this scope
test1.cpp:22:17: error: 'FSOUND_Close' was not declared in this scope
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的特定示例:
#include <conio.h>
#include "inc/fmod.h" …
Run Code Online (Sandbox Code Playgroud)