小编Pet*_*ter的帖子

CSS嵌套不按我想要的方式工作!

好吧,让我说我有这个

<table class="infoBox">
    <tr>
        <td>
            test
        </td>
        <td>
            <table>
                <tr>
                    <td>
                        this should not be bold!
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

然后我们得到了一些css

Table.infoBox tr td {font-weight:bold; }

现在我的问题是嵌套表似乎也得到了css当我只想让外表获取这个css我如何定义它以便嵌套表不受css的影响?

html css

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

.NET加密bytearray

有没有办法在不使用流的情况下加密bytearray?

.net c# encryption

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

登录协议

我应该如何设计一个登录协议,以便我现在的方式更加安全

  1. 客户端连接并发送他的用户名
  2. 服务器为用户发送salt(总是相同的)
  3. 客户端将盐添加到密码哈希并将其发送到服务器

这样一来,密码就一直处于隐藏状态,但是如果他能够过来并在收到密码后发送密码,它就不会阻止黑客复制哈希...

.net security login

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

ASP.NET版本控件

如何在asp.net项目上设置版本?因为属性不包含任何东西......

网页所在的文件夹中没有项目文件.

asp.net version-control

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

ASP.NET GridView问题

好吧,我有一个gridview,我已经自己定义了列并关闭自动生成但现在我有问题,我无法访问GridView.SelectedRow.DataItem.

因为它现在变成了null,当它在打开自动生成时有一个值.

编辑:我需要的是一种方法来保存行的ID而不向用户显示ID,所以如果有任何方法可以做到这一点?

asp.net

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

Jquery .Click适用于所有子div?

HTML:

<div id="lowerLayer">
    <div id="positionLayer">
        <div id="imageLayer">
            <div id="imageHolder" style="background-image: url('/Images/Loading/ajax-loader.gif');">

            </div>
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

#lowerLayer
{
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    background-color: Green;
    cursor: help;
}
#positionLayer
{
    position: relative;
    margin-top: 80px;
    width: 100%;
    background-color: Red;
}
#imageLayer
{
    position: relative;
    width: 450px;
    height: 400px;
    margin: auto;
    background-color: Blue;
    background-image: url('../Images/Large-image-holder.png');
}
#imageHolder
{
    position: absolute;
    left: 25px;
    top: 25px;
    width: 400px;
    height: 300px;
    line-height: 300px;
    background-position: center;
    background-repeat: …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

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

c#属性问题

嗯,我需要一些帮助,我不知道如何解决这个问题.

属性的功能是确定函数是否可以运行...

所以我需要的是以下内容:

  1. 属性的使用者应该能够确定它是否可以执行.
  2. 属性的所有者应该能够告诉消费者现在它可以/不能被执行(如事件).
  3. 它必须具有简单的语法.

这是我到目前为止,但它只实现了第1,3点.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class ExecuteMethodAttribute : Attribute
{
    private Func<object, bool> canExecute;
    public Func<object, bool> CanExecute
    {
        get
        {
            return canExecute;
        }
    }


    public ExecuteMethodAttribute()
    {

    }

    public ExecuteMethodAttribute(Func<object, bool> canExecute)
    {
        this.canExecute = canExecute;
    }
}
Run Code Online (Sandbox Code Playgroud)

c# oop attributes design-patterns

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

Mono.Cecil将.exe转换为dll?

有没有办法使用Mono.Cecil将exe转换为DLL,(删除图标和其他不需要的数据,删除EntryPoint)

    AssemblyDefinition sourceAssembly = AssemblyDefinition.ReadAssembly(file);
    sourceAssembly.EntryPoint = null;
    sourceAssembly.Write(outputFile);
Run Code Online (Sandbox Code Playgroud)

似乎没有任何影响..

.net mono.cecil

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

.NET Graphics是什么SmoothingMode?

在.net中使用Graphics对象时,"SmoothingMode"值会产生最佳结果HighQuality还是AntiAlias?

.net graphics

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

IE9不支持css选择器>?

好吧,我有以下HTML:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Gallery</title>
        <link href="style.css" rel="stylesheet" />
    </head>
        <body>
        <div>
            <ul class="Boxes">
                <li>
                    <span>Nature</span>
                </li>
                <li class="Add">
                    <div></div>
                </li>
            </ul>
        </div>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

和以下css:

body {
    background: black;
    color: white;
}
body .Boxes li {
    width: 192px;
    height: 192px;
    font-size: 2.5em;
    background: rgb(27, 161, 226);
}
body .Boxes li.Add div {
    background-position: 0px -352px;
    width: 192px;
    height: 192px;
    background-image: url("Sprites.png");
    background-repeat: no-repeat;
    background-color: transparent;
}
.Boxes {
    list-style-type: none;
    float: left;

}
.Boxes li {
    margin: 10px; border: …
Run Code Online (Sandbox Code Playgroud)

css css-selectors internet-explorer-9

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

定制钩子:虚拟功能或事件?

性能和设计明智的优点和缺点

使用密封类和事件或使用具有虚函数的抽象类?

事件中只会有一个听众......

c# performance

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

WPF DataGridCheckBoxColumn自定义样式?

有没有办法在那里设置复选框的样式?iv尝试为复选框定义样式但不起作用.

使用鼹鼠之后,似乎复选框控件中没有ToggleButton,而是使用BulleDecorator,我不确定第一次使用鼹鼠..

我想要实现的是,我想要一个红色或绿色圆圈,而不是一个复选框.

<Style TargetType="{x:Type CheckBox}">
    <Setter Property="IsHitTestVisible" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="HorizontalAlignment" Value="Center"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
    <Setter Property="Template"> 
        <Setter.Value> 
            <ControlTemplate TargetType="{x:Type ToggleButton}"> 
                <Border x:Name="innerBorder"> 
                   <Ellipse Fill="#FFFF0000" Stroke="#FF000000" Stretch="Fill" x:Name="statusLight" Width="15" Height="15" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                </Border> 
                <ControlTemplate.Triggers> 
                    <Trigger Property="IsChecked" Value="True"> 
                    <Setter TargetName="statusLight" Property="Fill" Value="#FF00FF00" />
                    </Trigger> 
                     <Trigger Property="IsChecked" Value="False"> 
                    <Setter TargetName="statusLight" Property="Fill" Value="#FFFF0000" />
                    </Trigger> 
                </ControlTemplate.Triggers> 
            </ControlTemplate> 
        </Setter.Value> 
    </Setter>
</Style>
Run Code Online (Sandbox Code Playgroud)

wpf datagrid styles

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

VB.net Overridable属性与c#虚拟属性不一样?

那么它很简单,你有我的vb.net代码:

Public Class Class1
    Public Overridable ReadOnly Property Name() As String
        Get
            Return Nothing
        End Get
    End Property
End Class

Public Class Class2
    Inherits Class1
    Public Overloads ReadOnly Property Name() As String
        Get
            Return "Class2"
        End Get
    End Property
End Class

Module Module1
    Sub Main()
        Dim c2 As New Class2()
        Console.WriteLine(c2.Name)
        Dim c1 As Class1 = CType(c2, Class1)
        Console.WriteLine(c1.Name)
    End Sub
End Module
Run Code Online (Sandbox Code Playgroud)

这里是c#代码:

class Class1
{
    public virtual string Name
    {
        get
        {
            return null;
        }
    }
}

class …
Run Code Online (Sandbox Code Playgroud)

c# vb.net inheritance

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