我正在尝试执行入门说明:http://mahapps.com/MahApps.Metro/guides/quick-start.html.
我已经获得了最新的预发行版(也尝试了稳定版),我没有得到导游正在制作的窗口.我得到一个透明的窗口和标题栏,所以它看起来像一个浮动的标题栏,并最小化,最大化和关闭按钮.
当我添加样式时,我得到一个带有蓝色标题栏的白色背景,但没有阴影.我在这里做错了还是有其他人经历过这个?
谢谢.
编辑:这是XAML
主窗口
<Controls:MetroWindow x:Class="Metro.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="MainWindow" Height="900" Width="1600">
</Controls:MetroWindow>
Run Code Online (Sandbox Code Playgroud)
App.xaml中
<Application x:Class="Metro.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Run Code Online (Sandbox Code Playgroud)
正如我所提到的,我遵循了入门指令,我复制并粘贴了完全相同的代码,并获得了不同的结果.
遵循文档中的部署示例。我正在尝试部署示例 nginx。使用以下配置:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
Run Code Online (Sandbox Code Playgroud)
到目前为止,部署总是挂起。我试图查看是否出于任何原因需要部署一个名为 nginx 的 pod。那并没有解决问题。
$ sudo kubectl get deployments
NAME UPDATEDREPLICAS AGE
nginx-deployment 0/3 34m
$ sudo kubectl describe deployments
Name: nginx-deployment
Namespace: default
CreationTimestamp: Sat, 30 Jan 2016 06:03:47 +0000
Labels: app=nginx
Selector: app=nginx
Replicas: 0 updated / 3 total
StrategyType: RollingUpdate
RollingUpdateStrategy: 1 max unavailable, 1 max surge, 0 min …
Run Code Online (Sandbox Code Playgroud) 我一直试图让EF 6和SQLite在WinForms应用程序中播放超过一周.我似乎遇到了多个随机异常 - 这让我相信我没有正确地做某事.我似乎无法找到合适的设置指南或教程.
我直接从Nuget使用SQLite 1.0.93和EF 6.1.0.
这是我的Context类.我不相信DbSet类有问题.
public class MyDbContext: DbContext
{
public MyDbContext() : base("name=dbConnection")
{
System.Data.Entity.Database.SetInitializer<MyDbContext>(null);
}
public DbSet<Object1> Objects1 { get; set; }
public DbSet<Object2> Objects2 { get; set; }
public DbSet<Object3> Objects3 { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions
.Remove<PluralizingTableNameConvention>();
}
}
Run Code Online (Sandbox Code Playgroud)
有了这个,我还试图用Db数据填充两个单独的DataGridViews.
public static BindingList<Objects1> Objects1BindingList
{
get
{
return MyDbContext.Objects1.Local.ToBindingList();
}
}
public static BindingList<Objects3> Objects3BindingList
{
get { return MyDbContext.Objects3.Local.ToBindingList(); }
}
private static MyDbContext _data;
public static …
Run Code Online (Sandbox Code Playgroud) 我一直在尝试使用为 Inception 模型设置的服务工具来设置重新训练的 Inception 模型。我一直在关注这里的教程。我设法使用重新训练的模型设置了服务器。我将以下代码添加到 retrain.py 文件的末尾以导出它。
export_path = "/tmp/export"
export_version = "1"
# Export inference model.
init_op = tf.group(tf.initialize_all_tables(), name='init_op')
saver = tf.train.Saver(sharded=True)
model_exporter = exporter.Exporter(saver)
signature = exporter.classification_signature(input_tensor=jpeg_data_tensor, scores_tensor=final_tensor)
model_exporter.init(sess.graph.as_graph_def(), default_graph_signature=signature)
model_exporter.export(FLAGS.export_dir, tf.constant(export_version), sess)
print('Successfully exported model to %s' % export_path)
Run Code Online (Sandbox Code Playgroud)
不过目前我只有 4 节课。我已经使用 Tensorflow 工具(不提供服务)创建了模型,我设法验证了我的模型是否适用于测试图像。现在我正在努力为它服务。我使用以下命令在模型上设置了一个服务器:
bazel-bin/tensorflow_serving/example/inception_inference --port=9000 /tmp/export/ &> retrain.log &
Run Code Online (Sandbox Code Playgroud)
我得到以下输出,它连续打印最后两行。
I tensorflow_serving/core/basic_manager.cc:189] Using InlineExecutor for BasicManager.
I tensorflow_serving/example/inception_inference.cc:383] Waiting for models to be loaded...
I tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:147] Aspiring version for servable default from path: …
Run Code Online (Sandbox Code Playgroud)