我在 C# 中创建了一个类库(.net 框架)项目,我想在我的 C++ 客户端项目中使用该 DLL。
我已经在 MSDN 和在线上查看了有关如何制作它的说明。所以我可以在我的 C++ 项目中看到 C# 代码的结果。除了 C# 异步方法。
那里发生了运行时错误。
这是我的 C# dll 代码的一部分。
namespace NethereumDLLTest
{
[Guid("1C3D53B3-54C5-452B-9505-3F58ABEB35BA")]
public interface INethereumDLL
{
void Run();
}
[Guid("C22875F1-B74D-4C99-B446-ED705CE86D3B")]
public class Class1 : INethereumDLL
{
//there are some methods here.
public void Run()
{
Console.WriteLine("NethereumDLLTEST");
RunGeth();
Task task = new Task(ActionMethod);
task.Start();
Console.WriteLine("Main Logic");
GetAccountBalance().Wait();
Console.ReadLine();
}
static async Task GetAccountBalance()
{
for (int i = 10; i > 0; i--)
{
Thread.Sleep(1000);
}
var web3 …Run Code Online (Sandbox Code Playgroud) 我看过这样的代码如下:
embed_word = Embedding(params['word_voc_size'], params['embed_dim'], weights=[word_embed_matrix], input_length = params['word_max_size']
, trainable=False, mask_zero=True)
Run Code Online (Sandbox Code Playgroud)
当我在Keras网站[ https://faroit.github.io/keras-docs/2.1.5/layers/embeddings/][1]中查找文档时
我没有看到重量的争论,
keras.layers.Embedding(input_dim, output_dim, embeddings_initializer='uniform', embeddings_regularizer=None, activity_regularizer=None, embeddings_constraint=None, mask_zero=False, input_length=None)
Run Code Online (Sandbox Code Playgroud)
所以我很困惑,为什么我们可以使用Keras文档中未定义的参数权重?
我的keras版本是2.1.5。希望可以有人帮帮我。
我已经为一个基本上执行数据库连接的登录WPF应用程序创建了一个项目.现在我正在开发一个需要此登录项目启动的应用程序(始终在WPF中).我已将Login.Exe添加到当前项目中的引用中,但我找不到强制启动登录的方法,只有在运行我的MainWindow()之后.
我现在正在尝试这样的事情
namespace Administrator
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Window login = new Login.MainWindow();
login.Show();
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的mainwindow.xaml有空内容,这段代码显示了登录表单,但也是一个空白窗口.我怎样才能实现目标?
我制作了一个 Excel 插件,必须将打印区域导出为图像。如果我从程序中手动设置打印区域(“Excel.Range range =sheet.Range[“A1”,“E5”]”),它工作正常,但我需要在 Excel 中设置打印区域并导出该区域作为图像。有人知道如何获取我在 Excel 中设置的打印区域吗?
public static void Save(RibbonControlEventArgs e)
{
Excel.Window window = e.Control.Context;
Excel.Worksheet sheet = ((Excel.Worksheet)window.Application.ActiveSheet);
Excel.Range range = sheet.Range["A1", "E5"];
range.CopyPicture(Excel.XlPictureAppearance.xlPrinter, Excel.XlCopyPictureFormat.xlPicture);
range.Copy(Type.Missing);
string fileName = @"U:\test.jpg";
if (Clipboard.GetDataObject() != null)
{
IDataObject data = Clipboard.GetDataObject();
Image image = (Image)data.GetData(DataFormats.Bitmap, true);
image.Save(fileName, ImageFormat.Jpeg);
}
MessageBox.Show("Save successful!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
Run Code Online (Sandbox Code Playgroud) c# ×3
.net ×1
async-await ×1
c++ ×1
dllimport ×1
excel ×1
excel-2013 ×1
excel-2016 ×1
keras ×1
login ×1
python ×1
tensorflow ×1
wpf ×1
xaml ×1