借助Android 4.4 KitKat,Google正在将Linux内核升级到3.8版,这是Docker所需的内核版本.
我不知道AUFS部分,但有没有办法在Android上使用此更新运行docker容器?
我有一个工作的实时监控程序,但它的类架构太复杂了.这真的让我很烦恼.首先让我解释一下这个程序.
用户交互
这是一个具有用户交互的监控程序.这意味着,用户可以根据用户的决定选择不同的维度,不同的指标,包含它们,排除它们或将它们分组,以及每次实时图表更改.
来自DB的示例日志数据
Req Success OrderFunction 5 60ms WebServer2
Req Failed OrderFunction 2 176ms WebServer5
Resp Success SuggestFunction 8 45ms WebServer2
Run Code Online (Sandbox Code Playgroud)
转换
所以每一行都很重要.它必须像这样在客户端.因为用户可以选择查看成功的OrderFunctions或WebServer2上的所有功能或所有失败的请求等.我需要这些列之间的所有关系来执行这些操作.
另一件事是这些是来自数据库的值.我还查找了这些值,这些值包含用户需要查看的Text.像Req是Request,Resp是Response.
我知道你可以把这个问题视为一般问题.但我正试图找到一种方法.可能是这种类架构在业界有一个名字.我只是在这里寻求一些建议,以正确的方式引导我.
非常感谢
我以前这样做了50次.我真的不知道为什么这次不工作.我有一个WPF应用程序,我唯一的依赖是MahApps.Metro.我在我的Button上使用它的MetroWindow和Dynamic Style.
这是最新的xaml:
<ItemsControl Grid.Column="0" Grid.Row="1" ItemsSource="{Binding ServerList}" Margin="5">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="LightGray">
<StackPanel Orientation="Horizontal">
<Button Style="{DynamicResource MetroCircleButtonStyle}" Content="{StaticResource appbar_monitor}" Command="{Binding VM.ServerSelectedCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Controls:MetroWindow}}" CommandParameter="{Binding .}"></Button>
<Label Content="{Binding .}" HorizontalAlignment="Center" VerticalAlignment="Center"></Label>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Run Code Online (Sandbox Code Playgroud)
这是我的ViewModel中的ServerSelectedCommand:
private ViewModelCommand _ServerSelectedCommand;
public ViewModelCommand ServerSelectedCommand
{
get
{
if (_ServerSelectedCommand == null)
{
_ServerSelectedCommand = new ViewModelCommand(
p => { SelectServer(p); },
p => true
);
}
return _ServerSelectedCommand;
}
set { _ServerSelectedCommand = value; }
}
private void SelectServer(object parameter) …Run Code Online (Sandbox Code Playgroud) 我有一个方法,可以选择最后一个参数.
public static DataTable GetQueryResult<T>(string connectionString, string queryText, Dictionary<string, T> dicParameters = null)
Run Code Online (Sandbox Code Playgroud)
当我尝试调用此方法时:
DBOperations.GetQueryResult(myConnectionString, myQuery);
Run Code Online (Sandbox Code Playgroud)
它说方法'GetQueryResult'没有重载需要2个参数.
本文档解释了我只能将所需的参数传递给这种方法.
问候
我看到如下例子:
var result = this._client.Search(s => s
.Index("my-index")
.Type("my-type")
.Query(q=> ....)
.Filter(f=> ....)
);
Run Code Online (Sandbox Code Playgroud)
但是当我使用它时,我得到:
The type arguments for method 'Nest.ElasticClient.Search<T>(System.Func<Nest.SearchDescriptor<T>,Nest.SearchDescriptor<T>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Run Code Online (Sandbox Code Playgroud)
我有很多不同的类型,我不想为所有类型创建类.我可以使用NEST,它的搜索没有类似的类型Search<MyType>吗?
谢谢
c# ×4
.net ×2
database ×2
android ×1
asp.net ×1
docker ×1
function ×1
javascript ×1
linux ×1
linux-kernel ×1
nest ×1
reflection ×1
silverlight ×1
wpf ×1