我有两个网络板在我的电脑:

主服务器的本地ip为-> 192.168.1.111 从端ip为本端ip -> 192.168.0.200

主要的一个有互联网连接,第二个连接到一个IP为192.168.0.33的设备,它在80端口有一个http服务器。

我在主连接(端口4422)中有一个apache-server,我可以从任何地方访问,我现在想要的是当我检测到来自4422的连接时,我想将此连接重定向到192.168.2.33:80

我怎么用窗户来做呢?

我如何添加一个触摸事件到一个UIView? 我试一试:

UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, nextY)] autorelease];
[headerView addTarget:self action:@selector(myEvent:) forControlEvents:UIControlEventTouchDown];
// ERROR MESSAGE: UIView may not respond to '-addTarget:action:forControlEvents:'

我不想创建一个子类然后重写

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

是否有一种方法可以让gcc/g++从命令行转储其默认的预处理器定义? 我的意思是像__GNUC__, __STDC__,等等。

我想把Kinect 2的动作捕捉数据存储为BVH文件。我找到了Kinect 1的代码,可以在这里找到。我检查了代码,发现了一些我不能理解的东西。 例如,在提到的代码中,我试图理解在代码中的几个地方发现的Skeleton skkel对象究竟是什么。如果不是,是否有任何已知的应用程序可以完成预期的目标?

编辑:我试图改变骷髅的skel身体的skel,我认为是对应的对象kinect SDK 2.0。然而,当我试图获得身体的位置时,我有一个错误:

tempMotionVektor[0] = -Math.Round( skel.Position.X * 100,2);
tempMotionVektor[1] = Math.Round( skel.Position.Y * 100,2) + 120;
tempMotionVektor[2] = 300 - Math.Round( skel.Position.Z * 100,2);

我在调用Body skel的函数位置时出错。我怎么能检索X, Y, Z的骨架在sdk 2.0??我试着把上面的三行改为:

tempMotionVektor[0] = -Math.Round(skel.Joints[0].Position.X * 100, 2);
tempMotionVektor[1] = Math.Round(skel.Joints[0].Position.Y * 100, 2) + 120;
tempMotionVektor[2] = 300 - Math.Round(skel.Joints[0].Position.Z * 100, 2);

EDIT: Basically I managed to store the a bvh file after combining bodyBasicsWPF and kinect2bvh. However, it seems that the skeleton I am storing is not efficient. There are strange movements in the elbows. I am trying to understand if I have to change something in the file kinectSkeletonBVH.cp. More specifically, what are the changes in the joint axis orientation for the kinect 2 version. How can I change the following line: skel.BoneOrientations[JointType.ShoulderCenter].AbsoluteRotation.Quaternion; I tried to change that line with skel.JointOrientations[JointType.ShoulderCenter].Orientation. Am I right? I am using the following code to add the joint to BVHBone objects:

BVHBone hipCenter = new BVHBone(null, JointType.SpineBase.ToString(), 6, TransAxis.None, true);
BVHBone hipCenter2 = new BVHBone(hipCenter, "HipCenter2", 3, TransAxis.Y, false);
BVHBone spine = new BVHBone(hipCenter2, JointType.SpineMid.ToString(), 3, TransAxis.Y, true);
BVHBone shoulderCenter = new BVHBone(spine, JointType.SpineShoulder.ToString(), 3, TransAxis.Y, true);

BVHBone collarLeft = new BVHBone(shoulderCenter, "CollarLeft", 3, TransAxis.X, false);
BVHBone shoulderLeft = new BVHBone(collarLeft, JointType.ShoulderLeft.ToString(), 3, TransAxis.X, true);
BVHBone elbowLeft = new BVHBone(shoulderLeft, JointType.ElbowLeft.ToString(), 3, TransAxis.X, true);
BVHBone wristLeft = new BVHBone(elbowLeft, JointType.WristLeft.ToString(), 3, TransAxis.X, true);
BVHBone handLeft = new BVHBone(wristLeft, JointType.HandLeft.ToString(), 0, TransAxis.X, true);

BVHBone neck = new BVHBone(shoulderCenter, "Neck", 3, TransAxis.Y, false);
BVHBone head = new BVHBone(neck, JointType.Head.ToString(), 3, TransAxis.Y, true);
BVHBone headtop = new BVHBone(head, "Headtop", 0, TransAxis.None, false);

我无法理解代码中每个关节的轴是在哪里计算的。

我已经安装了Mountain Lion (Mac OS X 10.8),现在gcc似乎不再可用了。我还安装了Xcode 4.4,这样就没有/Developer目录了。

我需要gcc的mac端口和红宝石宝石(有本机扩展)。

Xcode 4.4包含gcc吗?或者有安装gcc的方法吗?

我试图读取一个大的csv文件(aprox。6 GB)在熊猫和我得到一个内存错误:

MemoryError                               Traceback (most recent call last)
<ipython-input-58-67a72687871b> in <module>()
----> 1 data=pd.read_csv('aphro.csv',sep=';')

...

MemoryError: 

有什么帮助吗?

我有一个自定义容器类,我想为它写iterator类和const_iterator类。

我以前从来没有这样做过,我也没有找到合适的操作方法。关于创建迭代器的指导原则是什么?我应该注意什么?

我还希望避免代码重复(我觉得const_iterator和iterator共享很多东西;一个应该子类化另一个吗?)

脚注:我很确定Boost有一些东西可以缓解这个问题,但由于许多愚蠢的原因,我不能在这里使用它。

我的客户端如何在没有安装git的情况下应用git diff创建的补丁? 我已经尝试使用补丁命令,但它总是要求文件名补丁。

虽然我发现了类似的问题,但我没有找到问题的答案

当我尝试重命名目录从FOO到FOO通过git mv FOO FOO我得到

fatal: renaming 'FOO' failed: Invalid argument

好的。我试试gitmv FOO foo2 && gitmv foo2 FOO

但当我尝试通过git commit提交时。我得到

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# foo
nothing added to commit but untracked files present (use "git add" to track)

当我通过git添加目录时,添加foo没有任何变化,git提交。又给了我同样的信息。

我做错了什么?我认为我正在使用区分大小写的系统(OSX),为什么我不能简单地重命名目录?

我在CustomHttp中读过类似访问EventEmitter Service的问题 用户在他的服务中使用EventEmitter,但他在这个评论中被建议 不使用它,而是直接在他的服务中使用Observables。

我也读过这个 问题 解决方案建议将EventEmitter传递给子进程并订阅它。

我的问题是:我是否应该手动订阅EventEmitter?我该如何使用它?