我正在使用带有RHash的 C#来计算文件的btih哈希值.目前我正在使用3个工具来生成btih哈希:
rhash-1.2.9-src\bindings\mono
用librhash-1.2.9-win
dllrhash-1.2.9-win32
命令行工具 问题是每个工具都为同一个文件生成不同的btih签名(照片是由我拍摄的,它是免费的):
1: 2FF7858CC0A0B216C3676A807D619FA30101E45F
2: E6F07BB3C3B3B67531C84E3452980698AC1B0DAA A:\IMG_0400.JPG
3: D0B96839A14A8C45BB81AD157805AE73425998E5
Run Code Online (Sandbox Code Playgroud)
对于C#哈希生成我使用Hasher.GetHashForFile(f.Name, HashType.BTIH);
,并rhash --bith
在CMD工具.
我究竟做错了什么?还有另一种计算方法吗?
我得到了这条路线:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { id = UrlParameter.Optional }
);
Run Code Online (Sandbox Code Playgroud)
这个动作:
[System.Web.Http.HttpPost]
[System.Web.Http.ActionName("GetLoginSeed")]
public object GetLoginSeed()
[System.Web.Http.HttpPost]
[System.Web.Http.AllowAnonymous]
[System.Web.Http.ActionName("Authenticate")]
public object PerformLogin(JObject jr)
Run Code Online (Sandbox Code Playgroud)
这是帖子请求:
http://localhost:61971/api/Login/GetLoginSeed
Run Code Online (Sandbox Code Playgroud)
为什么我总是得到一个匹配请求错误的多个动作?
我的wpf应用程序的结构如下:
<Scrollviewer>
<Grid>
<Scrollviewer>
<DataGrid>
Run Code Online (Sandbox Code Playgroud)
我的目标是,如果DataGrid超过屏幕的高度,则使用它自己的Scrollviewer.在Moment只使用外部ScrollViewer,所以我必须滚动整个网格.
有人可以告诉我该怎么做?
我正在使用EF 5和c#.
在我的主项目中,我使用CodeFirst来创建我的数据库.我有这个实体:
public class Shift {
public string Name { get; set; }
public TimeSpan StartTime { get; set; }
public TimeSpan EndTime { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
TimeSpan属性创建为time(7),而不是数据库中的null.
在我的MainProject everthing工作正常.
但是当从同一个解决方案中的Windows服务项目(我使用Mainproject中的相同Context和Models)访问数据库时,我收到此错误:
这一行(在Mainproject中多次使用):
context.Shifts.Load();
Run Code Online (Sandbox Code Playgroud)
结果是
There is no store type corresponding to the conceptual side type 'Edm.Time(Nullable=True,DefaultValue=,Precision=)' of primitive type 'Time'.
Run Code Online (Sandbox Code Playgroud)
这个问题的原因是什么?
//编辑
有趣的是我们的主要项目创建了没有我们helo的时间列.
我用我们的mainproject中的配置替换了服务的App.Config文件,现在它有效吗?
我仍然想知道为什么坚韧......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" …
Run Code Online (Sandbox Code Playgroud) 我有一个单元格列表,每个列表都有一个站点列表.
有时我需要获得一个站的父细胞.
我该如何实现这种层次结构?
我的View上有一个TextBox,它有一个验证规则:
public class EmptyStringRule : ValidationRule
{
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
{
if(String.IsNullOrEmpty(value.ToString()))
return new ValidationResult(true,"String Cannot be empty");
return new ValidationResult(true,null);
}
}
Run Code Online (Sandbox Code Playgroud)
输入空字符串时.绑定属性未更新,文本框标记为红色.我需要更新Source但仍然将Marker保留在Textbox周围.(输入稍后由EF再次验证).
我怎么能这样做?
c# ×4
wpf ×2
asp.net-mvc ×1
binding ×1
grid ×1
hash ×1
object ×1
scrollviewer ×1
service ×1
utorrent ×1
validation ×1