问题列表 - 第18299页

通过TCP/IP进行语音通信

我目前正在使用DirectSound开发应用程序,以便在Intranet上进行通信.我有使用UDP的工作解决方案,但后来我的老板告诉我他想出于某种原因使用TCP/IP.我尝试以与UDP几乎相同的方式实现它,但收效甚微.我得到的基本上只是噪音.其中20%是录制的声音,其余的只是奇怪的噪音.

我猜的原因是TCP需要多次读取所有接受的数据,直到它能够播放我能播放的最终声音.

现在有两个问题:

  • 我在正确的轨道上吗?将TCP/IP用于此类应用(各种语音会议)是否是个好主意?
  • 我在C#中这样做,但我不认为这是特定于语言的.

language-agnostic networking voip udp tcp

8
推荐指数
2
解决办法
6178
查看次数

停止申请被终止,而无需输入正确的密码?C#

我只是想知道无论如何在没有输入密码的情况下终止应用程序终止.它甚至可能吗?我已经看到net nanny类型的应用程序这样做,以便用户无法在没有输入密码的情况下在任务管理器中终止它.

谁能帮我??

谢谢MAtt

c# winapi

1
推荐指数
1
解决办法
403
查看次数

90
推荐指数
7
解决办法
4万
查看次数

选择一列(jQuery)

$('.table tbody td:eq(3)').addClass('col4');
Run Code Online (Sandbox Code Playgroud)

..works,但只选择第一个单元格,而不是列中的所有单元格.

javascript css jquery css-selectors jquery-selectors

3
推荐指数
1
解决办法
859
查看次数

Python:如何更改十六进制字符串int整数?

可能重复:
在Python中将十六进制字符串转换为int

您好,我想使用“ 0xFF123456”之类的字符串作为32位无符号整数。请给我一些建议。谢谢。

python

2
推荐指数
1
解决办法
4408
查看次数

删除字符串中的类似字符

是否有任何内置方法可以删除字符串中的类似字符?
例子:

aaaabbbccc ->  abc
aabbccaa -> abc
Run Code Online (Sandbox Code Playgroud)

谢谢

c# string

0
推荐指数
2
解决办法
264
查看次数

C++中的多维可变大小数组

嗨,我想做这样的事情:

int op(string s1, string s2){
    int x = s1.size();
    int y = s2.size();
    int matrix = new int[x][y]
    /* do stuff with matrix */
}
Run Code Online (Sandbox Code Playgroud)

出于某种原因,我收到以下错误:

SuperString.cpp(69) : error C2540: non-constant expression as array bound
SuperString.cpp(69) : error C2440: 'initializing' : cannot convert from 'int (*)[1]' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
SuperString.cpp(71) : error C2109: subscript requires array or pointer type
Run Code Online (Sandbox Code Playgroud)

谢谢!

c++ arrays

4
推荐指数
2
解决办法
3万
查看次数

无法在子查询上执行聚合函数

有人可以帮我解决这个问题吗?

SELECT p.OwnerName, SUM(ru.MonthlyRent) AS PotentinalRent,  SUM(
    (SELECT COUNT(t.ID) * ru.MonthlyRent FROM tblTenant t 
      WHERE t.UnitID = ru.ID)
    ) AS ExpectedRent
 FROM tblRentalUnit ru
LEFT JOIN tblProperty p ON p.ID = ru.PropertyID
GROUP BY p.OwnerName
Run Code Online (Sandbox Code Playgroud)

我遇到了第二笔钱的问题,它不会让我这样做.显然,SUM不会对子查询起作用,但是我需要计算预期的租金(如果有租户分配给RentalUnit的id,则为MonthlyRent,其中0不是).我怎样才能做到这一点?

t-sql aggregate subquery

5
推荐指数
1
解决办法
2264
查看次数

获取java.rmi.UnmarshalException:无法识别的方法哈希:远程对象不支持的方法

我是RMI技术的新手.

当我运行rmi客户端程序时,我得到异常:java.rmi.UnmarshalException:无法识别的方法hash:远程对象不支持的方法.我使用的是jdk1.5

远程方法的参数是Serialized对象.

这些是服务器代码......

这是远程接口

package interfacepackage;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface ServerInterface extends Remote{

     public void getOrder(Order order) throws RemoteException;
}
Run Code Online (Sandbox Code Playgroud)

这是服务器实现类

public class ServerImplementation implements ServerInterface {
    public ServerImplementation() throws RemoteException {
    }

    public void getOrderFromCash(Order order) throws RemoteException {
        System.out.println("WORKED");
    }
public static void main(String[] args) 

        try {
            java.rmi.registry.LocateRegistry.createRegistry(1234);
            ServerImplementation service = new ServerImplementation();
            ServerInterface myRemoteObject = (ServerInterface) UnicastRemoteObject
                    .exportObject(service, 0);
            java.rmi.registry.Registry registry = java.rmi.registry.LocateRegistry
                    .getRegistry("localhost", 1234);
            registry.rebind("ServerImplementation", myRemoteObject);


        } catch (Exception ex) {
            ex.printStackTrace();

        } …
Run Code Online (Sandbox Code Playgroud)

java rmi exception unmarshalling

7
推荐指数
1
解决办法
2万
查看次数

模型内部属性的自定义模型绑定器

我的模特是这样的

public class MyModel
{
   string ID {get;set;}
   string Title {get;set;}
   MyOtherModel Meta {get;set;}
}
Run Code Online (Sandbox Code Playgroud)

如何为类型(MyOtherModel)定义自定义模型绑定器,因此当默认绑定器绑定MyModel时,它会调用"Meta"属性的自定义模型绑定器.我在App start中注册了它:

 ModelBinders.Binders[typeof(MyOtherModel)] = new MyCustomBinder();
Run Code Online (Sandbox Code Playgroud)

但这不起作用.有关模型粘合剂的更多信息的任何想法或任何好文章?

asp.net-mvc

7
推荐指数
1
解决办法
1443
查看次数