小编sur*_*van的帖子

坞站面板左右

我对扩展坞面板只了解一点,下面是使用的代码:

<DockPanel LastChildFill="True" >
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" VerticalAlignment="Center" Margin="10" >
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" VerticalAlignment="Center" >
            <TextBlock Height="24" Name="Welcome" Text="Welcome" FontSize="14" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" >
            <TextBlock Height="24" Name="Welcomee" Text="Welcomee" FontSize="14" />
        </StackPanel>
    </StackPanel>
</DockPanel>
Run Code Online (Sandbox Code Playgroud)

结果是这样的:

WelcomeWelcomee
Run Code Online (Sandbox Code Playgroud)

但是,代码必须导致如下所示:

Welcome                                                              Welcomee
Run Code Online (Sandbox Code Playgroud)

所以,请您告诉我我在哪里误解了这个概念。

wpf

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

使用linq而不是每个更新列表

我对linq有点新,我只使用linq来过滤数据.现在,我想为下面写一个查询:

For Each k As String In con.Numbers.Keys
      con.Numbers(k).Primary = False
Next
Run Code Online (Sandbox Code Playgroud)

Con.Numbers是一个字典,但现在我把它转换成一个列表,因此上面的代码不能用于列表,请你告诉我如何用Linq实现它是Con.NUmbers是一个列表.谢谢.

附加信息:类结构是:

Public Class ContactCon
        Property ConId As String
        Property ConRowID As String
        Property Title As String
        Property Mob1 As String
        Property Mob2 As String
        Property Land1 As String
        Property Land2 As String
        Property Email1 As String
        Property Email2 As String
        Property Fax1 As String
        Property Fax2 As String
        Property Primary As Boolean
        Public Sub New()
            ConId = ""
            ConRowID = ""
            Title = "Contact1"
            Mob1 = "" …
Run Code Online (Sandbox Code Playgroud)

linq vb.net foreach

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

意外的关键字参数'缓冲' - python客户端

我收到错误,因为"getresponse()得到了一个意外的关键字参数'缓冲'".完整的错误日志是:

[INFO              ] Kivy v1.8.0
[INFO              ] [Logger      ] Record log in C:\Users\Sudheer\.kivy\logs\kivy_14-08-15_21.txt
[INFO              ] [Factory     ] 157 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG             ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG             ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG             ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG             ] [App         ] …
Run Code Online (Sandbox Code Playgroud)

python rest wcf python-3.x python-requests

6
推荐指数
1
解决办法
5905
查看次数

Docker 应用程序到主机 mysql 连接不起作用(主机操作系统和图像 = windows)

我的容器应用程序想要从主机访问 Mysql,但无法连接。我用谷歌搜索了很多并尝试了很多解决方案,但无法找出错误,你能帮我解决这个问题吗?

  1. 这是一个windows图像
  2. IIS网站正常运行
  3. 使用 DB Connection 的网站页面无法正常工作
  4. Mysql DB安装在本地机器上(安装docker桌面的同一台电脑)
  5. 应用程序中的连接字符串使用“host.docker.internal”和端口 3306。

尝试了 docker 卸载、重新安装、镜像修剪、容器修剪、WSL 停止和启动、主机文件注释以下行:

192.168.1.8 host.docker.internal
192.168.1.8 gateway.docker.internal
Run Code Online (Sandbox Code Playgroud)

以下是容器中的 ipconfig

在此输入图像描述

Nslookup 和 Ping 命令:

在此输入图像描述

网络LS:

在此输入图像描述

码头工人组成:

version: "3.9"
services:
    web:
        container_name: dinesh_server_container
        image: dinesh_server:1
        build: .
        ports:
            - "8000:80"
            - "8001:81"
        volumes:
            - .\rowowcf:c:\rowowcf
            - .\rowowcf_supportfiles:c:\rowowcf_supportfiles
            - .\rowocollectionsite:c:\rowocollectionsite
        environment:
            TZ: Asia/Calcutta
Run Code Online (Sandbox Code Playgroud)

构建映像使用:来自mcr.microsoft.com/dotnet/framework/aspnet:4.8

主机操作系统: Win 10 Pro 10.0.19043 Build 19043

HyperV也已启用。

也尝试了以下方法:

extra_hosts:
    - "host.docker.internal:host-gateway"
Run Code Online (Sandbox Code Playgroud)

由于它在 Windows 操作系统上 - 不支持主机网络模式(根据我的研究)

编辑: MYSQL 绑定地址是 0.0.0.0:在此输入图像描述

docker docker-network

6
推荐指数
1
解决办法
692
查看次数

更新面板不更新内容

我从一段时间开始尝试这个,但我无法绕过它.以下是aspx页面显示的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    Test<br />
    <asp:DropDownList ID="DropDownList1" runat="server">
        <asp:ListItem>1</asp:ListItem>
        <asp:ListItem>2</asp:ListItem>
    </asp:DropDownList>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <br />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

以下是button1单击事件的代码:

Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList1.SelectedIndexChanged
        Label1.Text …
Run Code Online (Sandbox Code Playgroud)

asp.net ajax updatepanel

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

闪亮的 iframe 没有显示任何网站

我正在尝试显示一个带有闪亮网站的 iframe,但它总是显示空白页面。

以下是来自不同问题的代码

代码:

 rm(list = ls())
library(shiny)
members <- data.frame(name=c("Name 1", "Name 2"), nr=c('BCRA1','FITM2'))

ui <- fluidPage(titlePanel("Getting Iframe"), 

                  mainPanel(fluidRow(
                    htmlOutput("my_test")
                  )
                  )
                )

server <- function(input, output) {
  output$my_test <- renderUI({
     tags$iframe(src='https://www.google.co.in/', height=600, width=535)
  })
}

shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)

输出: 在此处输入图片说明 为什么我无法显示任何网站。请帮助我,我谷歌了很多并尝试了很多选项,包括 renderUI;htmloutput 和 uioutput 面板。

iframe r shiny

5
推荐指数
1
解决办法
1940
查看次数

ICommand CanExecuteChanged没有更新

我正在尝试MVVM模式基本级别,并在ICommand CanExecute发生了变化.我有XAML绑定如下:

    <ListBox ItemsSource="{Binding Contact.Addresses}"  x:Name="AddressCollections" Height="152" SelectedValue="{Binding SelectedAddress}"
             DockPanel.Dock="Top" />
    <Button Content="Add" Command="{Binding AddAddressCommand}" DockPanel.Dock="Top" />
    <Button Content="Remove" Command="{Binding DeleteAddressCommand}" DockPanel.Dock="Bottom" />
Run Code Online (Sandbox Code Playgroud)

命令:

Public Class DeleteCommand
Implements ICommand

Private method As Object
Private methodname As String

Public Sub New(ByVal Controlname As String, ByVal mee As Object)
    methodname = Controlname
    method = mee
End Sub

Public Function CanExecute(parameter As Object) As Boolean Implements ICommand.CanExecute
    Select Case methodname
        Case "Address"
            Return TryCast(method, ModelView.Contacts.ContactMV).CanDeleteAddress()
        Case "Numbers"
            Return TryCast(method, ModelView.Contacts.ContactMV).CanDeleteNumbers
        Case Else : …
Run Code Online (Sandbox Code Playgroud)

vb.net wpf mvvm icommand

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

Kivy:App.root中的实例无效

我是Python和Kivy的新手,这是我的第一个小项目,不知道我做错了什么,以下是来自pydev(eclipse)的日志:

[INFO              ] Kivy v1.8.0
[INFO              ] [Logger      ] Record log in C:\Users\Sudheer\.kivy\logs\kivy_14-06-21_10.txt
[INFO              ] [Factory     ] 157 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG             ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG             ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG             ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[INFO              ] [Text        ] …
Run Code Online (Sandbox Code Playgroud)

python pydev python-3.x kivy

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

Kv语言中的变量(kivy)

我的Kivy语言文件有很多font_size属性,都有相同的值,在那里我可以在KV lang中分配一个变量?当前KV文件样本:

#User ID
    Label:
        text: 'User ID'
        font_size: 20
        text_size: self.size

    TextInput:
        id: userid
        font_size: 20


    #User PW
    Label:
        text: 'Password'
        font_size: 20
        text_size: self.size

    TextInput:
        id: password
        password: True
        font_size: 20

    Button:
        text: 'Login'
        font_size: 20
Run Code Online (Sandbox Code Playgroud)

有可能设置它有点像这样:

#User ID
    @fs: 20
    Label:
        text: 'User ID'
        font_size: fs
        text_size: self.size

    TextInput:
    id: userid
    font_size: fs


#User PW
Label:
    text: 'Password'
    font_size: fs
    text_size: self.size

TextInput:
    id: password
    password: True
    font_size: fs

Button:
    text: 'Login'
    font_size: fs
Run Code Online (Sandbox Code Playgroud)

通过这样做,我只能通过更改FS变量值来立即更改字体大小,同样,类似的解决方案可以帮助我更快地创建基于主题的文件.谢谢.

kivy

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

在KV文件中为网格视图插入一条线和颜色到边框

如何在窗口小部件之间插入线(分隔符),以及在KV文件中为网格视图插入颜色边框:

TextBox只是一个功能的TextInput盒子max_chars.

目前的KV档案:

<Label@Label>
    text_size: self.size
    valign: 'middle'

<ContactFrm>
    padding: 5,5
    orientation: 'vertical'
    #row_default_height: '36dp'
    #cols:1 
    #spacing: 0,0

    GridLayout:
        cols: 4     
        row_default_height: '32dp'
        row_force_default: True
        spacing: 10,0
        size_hint_y: None
        #height:34

        Label:
            text: 'Name'
            size_hint_x: 0.5

        TextBox:
            id:name
            max_chars:35

        Label:
            text: 'Contact Name'
            size_hint_x: 0.5

        TextBox:
            id:contactname
            max_chars:35

    GridLayout:
        cols: 4     
        row_default_height: '32dp'
        row_force_default: True
        spacing: 10,0       
        size_hint_y: None
        #height: 36             

        Label:
            text: 'Mobile 1'
            size_hint_x: 0.5
        TextBox:
            id:mob1
            max_chars:35
        Label:
            text: 'Mobile 2'
            size_hint_x: 0.5 …
Run Code Online (Sandbox Code Playgroud)

python kivy

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

我们可以在内联网上使用WCF吗?

我正在尝试使用WPF为大学构建一个小应用程序,它不是一个网络应用程序,我正在使用sql server 2008用于此目的,我很想知道WCF是否可以用于此目的,并且请让我们知道为什么以及为什么不为此目的使用WCF.

DB在包含所有类等的代码库项目中处理.

谢谢你的时间.

wcf

0
推荐指数
1
解决办法
601
查看次数

类被转换为一维数组

我正在尝试编写一个类库,我收到以下错误:"类型'WorkMateLib.Login'的值无法转换为'WorkMateLib.Login'的1维数组'"

类的代码如下:

Public Class Logins
    Public CurrentUser As Login()
    Public Sub New()
        CurrentUser = New Login()
    End Sub
    Public Function Authenticate(ByVal id As String, ByVal pw As String)
        Dim adpt As New WorkMateDataSetTableAdapters.LoginsTableAdapter
        For Each k As WorkMateDataSet.LoginsRow In adpt.GetDataByUserName(id)
            If String.Equals(k.UserPW, pw) Then
                CurrentUser = New Login(k.UserName, k.UserPW, k.UserType)
                Return CurrentUser
                Exit Function
            End If
        Next
        CurrentUser = Nothing
        Return Nothing
    End Function

End Class

Public Class Login
    Private _UserName As String
    Private _UserPW As String
    Private _UserType As …
Run Code Online (Sandbox Code Playgroud)

vb.net

0
推荐指数
1
解决办法
3560
查看次数