小编ouf*_*lak的帖子

元标记中的 HTML 图像

我正在使用不和谐,我看到很多人都这样做(图中的大方块)。我尝试在带有元标记的 html 中执行此操作,但结果是(图像编号 2)。我真的很想知道该怎么做,有人可以帮助我吗?

第一张图片 | 第二张图片

这是我用来执行此操作的代码:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
  <meta property="og:title" content="An Image By ItsJustOne#9817">
<meta property="og:description" content="Remember always that there is an end in the tunnel ">
<meta property="og:image" content="https://cdn.discordapp.com/banners/907132383814377502/4aca154cd6040b31aacaaf781877f121.png?size=1024">
    <meta name="viewport" content="width=device-width">
    <title>Why You Are Here?</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    Why You Are Here?
    <script src="script.js"></script>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我尝试使用的图像是我的不和谐横幅。

html meta-tags

4
推荐指数
1
解决办法
1万
查看次数

WPF DataGrid行高

我在WPF项目中有一个数据网格.我已经将列宽设置为具有最大限制,
并且我希望数据同样被拉伸以适合行.但这不会发生....内容只是保持相同的大小,并且单元格被截止.有任何想法吗?

这是代码:

<DockPanel>
<DataGrid x:Name="nirGrid" x:Uid="nirGrid" AutoGenerateColumns="False"      AlternationCount="2" SelectionMode="Single" DockPanel.Dock="Top" Margin="10,50,10,50" FlowDirection="RightToLeft" ColumnWidth="SizeToCells" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserReorderColumns="False" GridLinesVisibility="None" HeadersVisibility="None" SelectionUnit="Cell" VerticalAlignment="Stretch" EnableRowVirtualization="False" IsReadOnly="True" RowDetailsVisibilityMode="Visible" MinRowHeight="0" CanUserResizeRows="True" RowHeaderWidth="0">
        <DataGrid.Style>
            <Style>
                <Setter Property="ScrollViewer.CanContentScroll" Value="False" />
            </Style>
        </DataGrid.Style>
        <DataGrid.Columns >
            <DataGridTextColumn Binding="{Binding Path=task_desc}" IsReadOnly="True" Header="test1" Width="SizeToCells" MaxWidth="330" >

            </DataGridTextColumn>
            <DataGridTextColumn Binding="{Binding Path=task_req_date}" IsReadOnly="True" Header="test2" Width="SizeToCells" MaxWidth="70" >

            </DataGridTextColumn>

            <DataGridTemplateColumn Header="delete" >
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Button Content="delete" ToolTip="delete" Opacity="0.8" Click="Button_Click" MouseEnter="Button_MouseEnter" MouseLeave="Button_MouseLeave">
                            <Button.Template>
                                <ControlTemplate>
                                    <Border HorizontalAlignment="Center" VerticalAlignment="Center">
                                        <Image Source="/exhibits;component/Images/exit1.png" Width="15" Height="15" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template> …
Run Code Online (Sandbox Code Playgroud)

.net c# wpf datagrid rows

3
推荐指数
1
解决办法
1万
查看次数

如何检查类型之间是否存在隐式转换?

我需要检查类型之间是否存在隐式转换.对于内置类型,我可以创建一个字典,其中包含相应可用类型的类型和列表.但是对于自定义类型,这是不可能的,因为我不知道将检查哪些代码.有没有通用的方法来做到这一点?

谢谢.

c# casting implicit

3
推荐指数
1
解决办法
1417
查看次数

如何在导航菜单中添加左边框

我想在菜单左侧显示边框.我尝试在菜单中添加另一个边框,但这不能像我预期的那样工作.

边框菜单

我希望它显示在此图像中.我应该将边框添加为列表中的图像还是调整边框属性?如果我添加边框,它将覆盖导航区域的整个高度.这是链接http://codepen.io/anon/pen/EanAx/.请帮忙.

html html5 css3 web

3
推荐指数
1
解决办法
1307
查看次数

DOMPDF with laravel - 无法加载 html 文件中的图像

我正在尝试使用 laravel 和 dompdf lib 生成 pdf 文件。这是我的控制器代码:

public function create(Request $request) {
    $pdf = new Dompdf();
    $html = Storage::disk('local')->get('public/pdf/template.html');
    $pdf->loadHtml($html, 'UTF-8');
    $pdf->setPaper('A4', 'portrait');
    $pdf->render();
    $filename = "Hi!";
    return $pdf->stream($filename, ["Attachment" => false]);
}
Run Code Online (Sandbox Code Playgroud)

template.html得到了一些 html,在某个地方我得到了这样的图像:

<img src="img/logo.png" alt="BTS">

但 dompdf 无法写入此图像:Image not found or type unknown。我的文件系统是:

.pdf ...img ......here is images ...template.html ...*some_fonts_files*

但与此同时,字体加载得很好。我应该怎么做才能在 template.html 中渲染图像?

html php render dompdf laravel

3
推荐指数
1
解决办法
2万
查看次数

如何在Flutter中使用图像资源作为Icon?

我想在 flutter 库中的big_button_example.dart文件AnimatedIconItem中使用图像资源。您可以在pub.dev上找到该库。用于图标。原始代码是:animated_icon_buttonSimpleIcons

AnimatedIconItem(
   icon: Icon(SimpleIcons.nasa, color: color),
   backgroundColor: Colors.white,
),
Run Code Online (Sandbox Code Playgroud)

我想使用图像资源作为图标变量。我尝试过这些:

icon: ImageIcon(
   AssetImage("images/icon.png"),
   color: Color(0xFF3A5A98),
),
Run Code Online (Sandbox Code Playgroud)
icon: Image.asset('assets/icon.png'),
Run Code Online (Sandbox Code Playgroud)
icon: IconButton(
   icon: Image.asset('assets/icon.png'),
),
Run Code Online (Sandbox Code Playgroud)

但我总是遇到类似的错误The argument type 'ImageIcon' can't be assigned to the parameter type 'Icon'。如何使用图标图像?

flutter

3
推荐指数
1
解决办法
4905
查看次数

错误 130 - 以下方法或属性之间的调用不明确

public static class MyExtensions
{
    public static bool TextBoxIsEmpty(TextBox txtControl, ErrorProvider eP)
    {
        if (txtControl.Text == string.Empty)
        {
            eP.SetError(txtControl, "You must Enter something!");
            return true;
        }
        else
        {
            eP.Clear();
            return false;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我在我的项目中使用这个函数来验证一个空文本框。它正常工作,直到我将一个用户控件添加到我的 WinForms 之一。特别是,当 Grid 的数据源更改时,该 User 控件的一个实例会添加到我的表单中,但我收到此错误。


错误 129 调用在以下方法或属性之间不明确:'DominateVehicle.Class.MyExtensions.TextBoxIsEmpty(System.Windows.Forms.TextBox, System.Windows.Forms.ErrorProvider)'和'DominateVehicle.Class.MyExtensions.TextBoxIsEmpty(System .Windows.Forms.TextBox, System.Windows.Forms.ErrorProvider)' D: \Vechel_Dominate\a\DominateVehicle\frmDefectClass.cs 30 41 DominateVehicle


不知道添加用户控件和这个错误有什么关系?如果我删除 UserControl,我的代码将不起作用并且出现错误。我该怎么办?

c# user-controls

2
推荐指数
1
解决办法
2125
查看次数

ScrollViewer - 子元素的指示滚动到视图中

是否有一个事件在孩子滚动进入视图时被提出并指示孩子被实现了什么?

当然有ScrollChanged事件,但它没有向我提供任何关于滚动到视图中的元素的指示.

提前致谢.

编辑:

我曾尝试连接到ScrollViewer的RequestBringIntoView事件,但它永远不会到达.或者我也在包含这些项目的StackPanel上尝试了相同的操作:

XAML :

     <ScrollViewer RequestBringIntoView="ScrollViewer_RequestBringIntoView" >
        <StackPanel RequestBringIntoView="StackPanel_RequestBringIntoView">
            <Button Content="1" Height="20"/>
            <Button Content="2" Height="20"/>
            <Button Content="3" Height="20"/>
            <Button Content="4" Height="20"/>
            <Button Content="5" Height="20"/>
            <Button Content="6" Height="20"/>
            <Button Content="7" Height="20"/>
            <Button Content="8" Height="20"/>
            <Button Content="9" Height="20"/>
            <Button Content="10" Height="20"/>
            <Button Content="11" Height="20"/>
            <Button Content="12" Height="20"/>
            <Button Content="13" Height="20"/>
            <Button Content="14" Height="20"/>
            <Button Content="15" Height="20"/>
            <Button Content="16" Height="20"/>
            <Button Content="17" Height="20"/>
            <Button Content="18" Height="20"/>
            <Button Content="19" Height="20"/>
            <Button Content="20" Height="20"/>
            <Button Content="21" Height="20"/>
            <Button Content="22" Height="20"/>
            <Button Content="23" …
Run Code Online (Sandbox Code Playgroud)

wpf scrollviewer

2
推荐指数
1
解决办法
5752
查看次数

无法将类型UIViewController的值转换为RecordDrawerController

我复制了一个目标和它的架构,我正在尝试运行该项目,但它因任何原因我都不知道失败.

下面我粘贴一个错误的捕获.

在此输入图像描述

对此有何帮助?

谢谢你的建议.

swift xcode8

2
推荐指数
1
解决办法
2485
查看次数

Stripe Basic PaymentIntent On Confirm Payment Error

我已经在我的 ios 应用程序中实现了条带基本集成。我参考了此链接进行集成https://stripe.com/docs/mobile/ios/basic集成。

当我打电话时 STPPaymentHandler.shared().confirmPayment(withParams: paymentIntentParams,authenticationContext: paymentContext)

这是我的代码

// Assemble the PaymentIntent parameters
                let paymentIntentParams = STPPaymentIntentParams(clientSecret: clientSecret)
                paymentIntentParams.paymentMethodId = paymentResult.paymentMethod?.stripeId
                paymentIntentParams.configure(with: paymentResult)

                // Confirm the PaymentIntent
                STPPaymentHandler.shared().confirmPayment(withParams: paymentIntentParams, authenticationContext: paymentContext) { status, paymentIntent, error in
                    switch status {
                    case .succeeded:
                        // Your backend asynchronously fulfills the customer's order, e.g. via webhook
                        completion(.success, nil)
                    case .failed:
                        completion(.error, error) // Report error
                    case .canceled:
                        completion(.userCancellation, nil) // Customer cancelled
                    @unknown default:
                        completion(.error, nil)
                    }
                }

Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Error Domain=com.stripe.lib …
Run Code Online (Sandbox Code Playgroud)

payment ios stripe-payments swift

2
推荐指数
1
解决办法
2281
查看次数