如何比较2个阵列?
例如我有,array("a", "b", "c")并且array("a", "c", "b")当它们被比较时它将返回true.但如果其中一个字母中没有找到其中一个字母就会返回false.订单并不重要.
出于某种原因,当请求通过非标准地址发送到HttpListener时,它返回
<h1>Bad Request (Invalid Hostname)</h1>
Run Code Online (Sandbox Code Playgroud)
示例包:
GET /index HTTP/1.1
Host: ::ffff:88.118.32.126:2548
Accept: */*
HTTP/1.1 400 Bad Request
Content-Type: text/html
Server: Microsoft-HTTPAPI/1.0
Date: Wed, 02 Feb 2011 19:05:18 GMT
Connection: close
Content-Length: 39
<h1>Bad Request (Invalid Hostname)</h1>
Run Code Online (Sandbox Code Playgroud)
我怎么能解决这个问题?
编辑: 这是我的代码
public class Server
{
private HttpListener Listener;
private Log Log;
public int Port = 1555;
public Server(Log _log)
{
Log = _log;
}
public void Start()
{
Listener = new HttpListener();
Listener.Prefixes.Add(string.Format("http://{0}:{1}/",
"88.118.32.126", Port));
Listener.Prefixes.Add(
string.Format("http://{0}:{1}/",
"*", Port)); //added these for …Run Code Online (Sandbox Code Playgroud) 我在"wave"中返回控制台输出时遇到问题.例如,控制台每秒输出一些东西,例如事件每分钟触发60次(同时所有事件).
我的代码:
Process Proc = new Process();
Proc.StartInfo.FileName = SSMS.BinaryDir + "HldsUpdateTool.exe";
Proc.StartInfo.Arguments = "-command update -game tf -dir " + SSMS.RootDir + Key;
Proc.StartInfo.UseShellExecute = false;
Proc.StartInfo.RedirectStandardOutput = true;
Proc.StartInfo.RedirectStandardError = true;
Proc.EnableRaisingEvents = true;
Proc.StartInfo.CreateNoWindow = false;
Proc.ErrorDataReceived += new DataReceivedEventHandler(Proc_ErrorDataReceived);
Proc.OutputDataReceived += new DataReceivedEventHandler(Proc_OutputDataReceived);
Proc.Exited += new EventHandler(Proc_Exited);
Proc.Start();
Proc.BeginErrorReadLine();
Proc.BeginOutputReadLine();
Run Code Online (Sandbox Code Playgroud)
我可能怀疑更新工具有问题.其他带控制台输出的程序运行正常.
触发事件时的时间线:( =什么都没发生; |事件被触发)
Should be: ==|==|==|==|==|==|==
Is: ========|||||||=========||||||=====
Run Code Online (Sandbox Code Playgroud) 你好可以将"0评论和0反应"改为"0评论"或只改为"0".
我想知道是否有可能让人们通过apache和'dav_svn'模块访问subversion根目录.现在我只能访问比根目录("svn/game""svn/something"而不是"svn /")1级别的情人的存储库.
我的httpd.conf:
<Location /svn>
DAV svn
SVNParentPath C:/SVN
AuthzSVNAccessFile C:/SVN/users
Satisfy Any
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile C:/SVN/svn-auth-file
</Location>
Run Code Online (Sandbox Code Playgroud)
现在,当我尝试访问根目录时,它会询问我是否有用户名和密码.
帮助将不胜感激.
谢谢.
我想知道如何选择在程序运行时创建的对象.每个对象都有其唯一的名称.我怎么能用它的名字选择那个对象?
示例名称:
"mapPart_0_0"
"mapPart_0_1"
"mapPart_0_2"
等
这是一个Windows窗体项目.在c#中.
创建这些对象:
private void addBoxes()
{
for (int a = 0; a < 25; a++)
{
for (int b = 0; b < 10; b++)
{
MyCustomPictureBox box = new MyCustomPictureBox();
box.Location = new Point(b * 23 + 5, a * 23 + 5);
box.Image = new System.Drawing.Bitmap("tiles/0.png");
box.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
box.Size = new Size(24, 24);
box.Name = "mapPart_" + a + "_" + b;
box.Click += new EventHandler(boxClickAdd);
box.oFile = "0";
panel1.Controls.Add(box);
} …Run Code Online (Sandbox Code Playgroud)