我有一个派生表,其中包含外键(ID)的相对秒数列表:
CREATE TABLE Times (
ID INT
, TimeFrom INT
, TimeTo INT
);
Run Code Online (Sandbox Code Playgroud)
该表主要包含非重叠数据,但有时候我有另一条记录的TimeTo <TimeFrom:
+----+----------+--------+
| ID | TimeFrom | TimeTo |
+----+----------+--------+
| 10 | 10 | 30 |
| 10 | 50 | 70 |
| 10 | 60 | 150 |
| 10 | 75 | 150 |
| .. | ... | ... |
+----+----------+--------+
Run Code Online (Sandbox Code Playgroud)
结果集是一个扁平的线性空闲报告,但由于这些重叠太多,我最终会使用负时间.即如果上面的窗口ID = 10是150秒长,并且我总结了从窗口大小中减去的相对秒的差异,我会结束150-(20+20+90+75)=-55.我尝试过这种方法,这也是让我意识到需要平整的重叠的原因.
所以,我正在寻找的解决方案是将重叠压缩成一组:
+----+----------+--------+
| ID | TimeFrom | TimeTo |
+----+----------+--------+
| 10 …Run Code Online (Sandbox Code Playgroud) 在ASP.NET项目上使用Visual Studio 2015.一切正常,但现在我有一个代码块(一个常见的AD实用程序功能),我希望所有页面都能访问.原始语言(继承的项目)是VB.NET,但它应该可以正常工作.
我创建了一个类文件,命名为CommonADFunctions.vb.该文件使用System.DirectoryServices,项目中有一个对该程序集的引用.但是,有两个问题:
这似乎是一个微不足道的问题,但我错过了什么?
我正在使用 Unity 的输入系统,并根据控制方案定义了我的控件(
)
我的播放器上有播放器输入组件,还有我的角色输入,用于处理播放器输入。我想实现 SendMessages 形式的输入,所以这是配置:
最后,我在同一个对象上有我的 CharacterInput 类,代码如下:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
[RequireComponent(typeof(Rigidbody2D))]
public class CharacterInput : MonoBehaviour
{
[SerializeField] private float speed;
private Rigidbody2D rb;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
void Update()
{
}
public void OnMove(InputValue input)
{
Debug.Log("aha");
Vector2 inputVec = input.Get<Vector2>();
HandleMove(inputVec);
}
private void HandleMove(Vector2 fromInupt)
{
transform.position += new Vector3(fromInupt.x * speed * Time.deltaTime, 0, fromInupt.y * speed * Time.deltaTime);
}
}
Run Code Online (Sandbox Code Playgroud)
所以我的问题是WASD的输入不输出调试消息。所以我的问题是,在让 PlayerInput …