我刚刚开始研究c#,并且正在摆弄一些我从某个论坛获得的代码示例.
此代码使用的命名空间using system.windows.forms我收到错误:senddown.我也是收到有关未定义功能的一些错误sendup与Forms我认为是在using system.windows.forms名字空间.
我正在使用visual studio 10(使用.net框架工作4.0).知道如何修复此错误吗?
谢谢.
我打算在android上移植脉冲音频.我删除了可选部分(如X依赖,oss支持等)后在ubuntu上编译了它,我能够将声音远程传输到网络服务器(运行windows-7).现在我想把它移植到android.任何关于如何开始的想法都会受到赞赏,或者链接到一些页面,它正在做一些类似的事情,可以让我开始使用基本的Makefile基础设施.
谢谢.
是否可以使用Kinect检测手指运动.我能够检测骨架并做一些鼠标移动并根据OTHER HAND位置执行点击.我想用手指动作实现'鼠标点击'.
是否有可能与Microsoft Kinect sdk或其他开源类似的项目?
谢谢.
在摆弄Naudio时,我发现了这段代码.我正在编译它:
csc.exe /reference:Naudio.dll play.cs
Run Code Online (Sandbox Code Playgroud)
并得到错误:
play.cs(3,14):错误CS0234:类型或命名空间名称"的Linq"不存在命名空间"系统"存在(是否缺少程序集引用?)
csc的版本是:C:\ Windows\Microsoft.NET\Framework\v2.0.50727\csc.EXE
在搜索时,我找到了一个帖子,说我需要添加System.core引用,但是做了类似的事情:/reference:System.core.dll或者/reference:System.core没有解决问题.
我正在尝试使用NAudio在C#中录制音频.看完NAudio Chat Demo之后,我用了一些代码来记录.
这是代码:
using System;
using NAudio.Wave;
public class FOO
{
static WaveIn s_WaveIn;
static void Main(string[] args)
{
init();
while (true) /* Yeah, this is bad, but just for testing.... */
System.Threading.Thread.Sleep(3000);
}
public static void init()
{
s_WaveIn = new WaveIn();
s_WaveIn.WaveFormat = new WaveFormat(44100, 2);
s_WaveIn.BufferMilliseconds = 1000;
s_WaveIn.DataAvailable += new EventHandler<WaveInEventArgs>(SendCaptureSamples);
s_WaveIn.StartRecording();
}
static void SendCaptureSamples(object sender, WaveInEventArgs e)
{
Console.WriteLine("Bytes recorded: {0}", e.BytesRecorded);
}
}
Run Code Online (Sandbox Code Playgroud)
但是,没有调用eventHandler.我正在使用.NET版本'v2.0.50727'并将其编译为:
csc file_name.cs /reference:Naudio.dll /platform:x86
Run Code Online (Sandbox Code Playgroud) #include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
static int __init hello_start(void)
{
struct file* my_fd;
my_fd = filp_open ("/tmp/foobar", O_WRONLY | O_APPEND, 0);
if (IS_ERR (my_fd))
{
printk (KERN_ERR "Failed to open file. err: %d.\n", my_fd);
}
else
{
my_fd->f_op->write (my_fd, "some data", 10, &my_fd->f_pos);
}
printk(KERN_INFO "Loading hello module...\n");
return 0;
}
static void __exit hello_end(void)
{
printk(KERN_INFO "hello_end.\n");
}
module_init(hello_start);
module_exit(hello_end);
Run Code Online (Sandbox Code Playgroud)
上面的代码在文件中写入时给出错误-14.我在这做错了什么?
这是dmesg输出:
[19551.674999] Write returned: -14.
[19551.675004] Loading hello module...
Run Code Online (Sandbox Code Playgroud)