RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-408040

Boris's questions

Martin Hope
Boris
Asked: 2025-02-10 21:52:21 +0000 UTC

EF 表之间的关系

  • 6
 public class User : IdentityUser<int>
 {
     public string FullName { get; set; }

     [Required]
     public int DepartmentId { get; set; }
     public Department Department { get; set; }

     [Required]
     public int PositionId { get; set; }
     public Position Position { get; set; }
 }


 public class Department
 {
     public int Id { get; set; }
     public string Name { get; set; }
     public string? UniqueNumber { get; set; }
 }

public class Position
{
    public int Id { get; set; }
    public string Title { get; set; }
}

现在,如果我删除与用户相关联的部门,该部门也会与用户或职位一起被删除。

这种情况该怎么办?如果职位或部门与用户有关联,则禁止删除,或者建立多对多关系。请告诉我解决这个问题的最佳方法。

c#
  • 1 个回答
  • 16 Views
Martin Hope
Boris
Asked: 2022-06-25 22:18:21 +0000 UTC

在视图上获取颜色

  • 0

大家好。默认颜色为“initialColor”:“#8e44ad”。是否可以做一些事情,如果数据库已经有颜色 @Model.Color !="" 那么它是从那里获取的,否则默认设置为 '#8e44ad' 视图

    @using (Html.BeginForm("SaveUploadedFiles", "TrainingType", FormMethod.Post, new
    { enctype = "multipart/form-data" }))
    {
        @Html.AntiForgeryToken()
        <div class="container">
            <div class="row">
                <div class="col-sm-4">
                    @*pic*@
    
                    @Html.DisplayNameFor(model => model.Color)
                    <input type="hidden" class="form-control" value="@Model.Id" 
                    name="Picker1">
                    <div class="picker" id="picker1"></div>
                    <input type="hidden" id="colorType" name="color" value="#8E44AD" />
                    @*pic*@
    
                    <script>
                        $("#picker1").colorPick({
                            'initialColor': '#8e44ad',
                            'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1"],
                            'onColorSelected': function () {
                                console.log("The user has selected the color: " + this.color);
                                this.element.css({ 'backgroundColor': this.color, 'color': this.color });
                            }
                        });
                    </script>
                    <button type="submit" class="btn btn-primary">Сохранить</button>
                    @Html.ActionLink("Назад", "Index", "", new { @class = "btn btn-primary" })
                </div>
            </div>
        </div>
    }

js

$("#picker1").colorPick({
  'initialColor': '#8e44ad',
  'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1"],
  'onColorSelected': function() {
    console.log("The user has selected the color: " + this.color);
    this.element.css({
      'backgroundColor': this.color,
      'color': this.color
    });
  }
});

试图这样做

var initialColor = @Model.Color;
$("#picker1").colorPick({
  get initialColor() {
    return initialColor;
  },
  set initialColor(value) {
    initialColor = value;
  },
  'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1"],
  'onColorSelected': function() {
    console.log("The user has selected the color: " + this.color);
    this.element.css({
      'backgroundColor': this.color,
      'color': this.color
    });
  }
});

不工作。有人可以提出解决方法吗?

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-06-24 19:23:29 +0000 UTC

颜色选择器 C# 将颜色传递给控制器

  • 0

大家好。如何将颜色代码传递给控制器​​?我想将颜色存储在数据库中,然后以某种方式使用它,从数据库中获取指定的颜色。存储在字符串中的决定可能不太正确,如果有人告诉我更好的解决方案,我将不胜感激

(function( $ ) {

    $.fn.colorPick = function(config) {

        return this.each(function() {
            new $.colorPick(this, config || {});
        });

    };

    $.colorPick = function (element, options) {
        options = options || {};
        this.options = $.extend({}, $.fn.colorPick.defaults, options);
        if(options.str) {
            this.options.str = $.extend({}, $.fn.colorPick.defaults.str, options.str);
        }
        $.fn.colorPick.defaults = this.options;
        this.color   = this.options.initialColor.toUpperCase();
        this.element = $(element);

        var dataInitialColor = this.element.data('initialcolor');
        if (dataInitialColor) {
            this.color = dataInitialColor;
            this.appendToStorage(this.color);
        }

        var uniquePalette = [];
        $.each($.fn.colorPick.defaults.palette.map(function(x){ return x.toUpperCase() }), function(i, el){
            if($.inArray(el, uniquePalette) === -1) uniquePalette.push(el);
        });

        this.palette = uniquePalette;

        return this.element.hasClass(this.options.pickrclass) ? this : this.init();
    };

    $.fn.colorPick.defaults = {
        'initialColor': '#3498db',
        'paletteLabel': 'Цвета:',
        'allowRecent': true,
        'recentMax': 5,
        'allowCustomColor': false,
        'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1", "#bdc3c7", "#95a5a6", "#7f8c8d"],
        'onColorSelected': function() {
            this.element.css({'backgroundColor': this.color, 'color': this.color});
        }
    };

    $.colorPick.prototype = {

        init : function(){

            var self = this;
            var o = this.options;

            $.proxy($.fn.colorPick.defaults.onColorSelected, this)();

            this.element.click(function(event) {
                if (event.target != event.currentTarget){
                    return;
                }

                var offset = $(self.element).offset();

                event.preventDefault();
                self.show(self.element, event.pageX - offset.left, event.pageY - offset.top);

                $('.customColorHash').val(self.color);

                $('.colorPickButton').click(function(event) {
                    self.color = $(event.target).attr('hexValue');
                    self.appendToStorage($(event.target).attr('hexValue'));
                    self.hide();
                    $.proxy(self.options.onColorSelected, self)();
                    return false;
                });
                $('.customColorHash').click(function(event) {
                    return false;
                }).keyup(function (event) {
                    var hash = $(this).val();
                    if (hash.indexOf('#') !== 0) {
                        hash = "#"+hash;
                    }
                    if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hash)) {
                        self.color = hash;
                        self.appendToStorage(hash);
                        $.proxy(self.options.onColorSelected, self)();
                        $(this).removeClass('error');
                    } else {
                        $(this).addClass('error');
                    }
                });

                return false;
            }).blur(function() {
                self.element.val(self.color);
                $.proxy(self.options.onColorSelected, self)();
                self.hide();
                return false;
            });

            $(document).on('click', function(event) {
                if ($.contains(self.element[0], event.target)){
                    return;
                }
                self.hide();
                return true;
            });

            return this;
        },

        appendToStorage: function(color) {
            if ($.fn.colorPick.defaults.allowRecent === true) {
                var storedColors = JSON.parse(localStorage.getItem("colorPickRecentItems"));
                if (storedColors == null) {
                    storedColors = [];
                }
                if ($.inArray(color, storedColors) == -1) {
                    storedColors.unshift(color);
                    storedColors = storedColors.slice(0, $.fn.colorPick.defaults.recentMax)
                    localStorage.setItem("colorPickRecentItems", JSON.stringify(storedColors));
                }
            }
        },

        show: function(element, left, top) {

            $(".colorPickWrapper").remove();

            $(element).prepend('<div class="colorPickWrapper"><div id="colorPick" style="display:none;top:' + top + 'px;left:' + left + 'px"><span>'+$.fn.colorPick.defaults.paletteLabel+'</span></div></div>');

            jQuery.each(this.palette, function (index, item) {
                $("#colorPick").append('<div class="colorPickButton" hexValue="' + item + '" style="background:' + item + '"></div>');
            });
            if ($.fn.colorPick.defaults.allowCustomColor === true) {
                $("#colorPick").append('<input type="text" style="margin-top:5px" class="customColorHash" />');
            }
            if ($.fn.colorPick.defaults.allowRecent === true) {
                $("#colorPick").append('<span style="margin-top:5px">Recent:</span>');
                if (JSON.parse(localStorage.getItem("colorPickRecentItems")) == null || JSON.parse(localStorage.getItem("colorPickRecentItems")) == []) {
                    $("#colorPick").append('<div class="colorPickButton colorPickDummy"></div>');
                } else {
                    jQuery.each(JSON.parse(localStorage.getItem("colorPickRecentItems")), function (index, item) {
                        $("#colorPick").append('<div class="colorPickButton" hexValue="' + item + '" style="background:' + item + '"></div>');
                        if (index == $.fn.colorPick.defaults.recentMax-1) {
                            return false;
                        }
                    });
                }
            }
            $("#colorPick").fadeIn(200);
        },

        hide: function() {
            $( ".colorPickWrapper" ).fadeOut(200, function() {
                $(".colorPickWrapper").remove();
                return this;
            });
        },

    };

}( jQuery ));

创建视图

@using (Html.BeginForm("SaveUploadedFiles", "TrainingType", FormMethod.Post, new
{ enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    <div class="container">
        <div class="row">
            <div class="col-sm-6">
                @*ColorPic*@
                @Html.DisplayNameFor(model => model.Picker1)
                <input type="hidden" class="form-control" value="@Model.Id" name="Picker1">
                <div class="picker" id="picker1"></div>
                @*ColorPic*@
            </div>
        </div>       
        <script>
            $("#picker1").colorPick({
                'initialColor': '#8e44ad',
                'palette': ["#1abc9c", "#16a085", "#2ecc71", "#27ae60", "#3498db", "#2980b9", "#9b59b6", "#8e44ad", "#34495e", "#2c3e50", "#f1c40f", "#f39c12", "#e67e22", "#d35400", "#e74c3c", "#c0392b", "#ecf0f1"],
                'onColorSelected': function () {
                    console.log("The user has selected the color: " + this.color);
                    this.element.css({ 'backgroundColor': this.color, 'color': this.color });
                }
            });
        </script>
        <br />
        <div class="row">
            <div class="col-12">
                <button type="submit" class="btn btn-primary">Сохранить</button>
                @Html.ActionLink("Назад", "Index", "", new { @class = "btn btn-primary" })
            </div>
        </div>
    </div>
}

模型

 public class TrainingTypeViewModel : IEntityBase
    {

        [Display(Name = "Цвет")]
        public string Collor { get; set; }

    }

控制器

 [HttpPost]
        [ValidateAntiForgeryToken]
        public override ActionResult Create(TraningViewModel traningModel)
        {
            traningModel.UserId = User.Identity.GetUserId<int>();
            TraningViewModel model = _traningService.getUrl(traningModel);
            if (ModelState.IsValid)
            {
                return base.Create(model);
            }
            return base.Create(traningModel);
        }
javascript
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-05-02 16:28:52 +0000 UTC

将 JS 结果传递给控制器

  • 1

大家好。用户输入屏幕上提供的硬币的数量。1.2.5.10。当您点击 1 时,输入的金额会增加 1。点击 2 时,存款金额增加 2,以此类推,如果金额超过成本,用户收到找零。用户输入金额,购买选择的饮料。我如何转移用户贡献的金额。我做了什么:查看

<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
@foreach (var entity in Model)
{
     var idButton+=1;
     var buttonIncrease = increase + idButton;
    <button id="buttonIncrease" name="increase" type="button" class="btn btn-primary">@entity.Cost</button>
}

@*test*@
<h2>внесенная сумма</h2>
<input type="text" name="field" value="0" />
@*test*@

模型:

        [Column(TypeName = "decimal(18, 2)")]
        private decimal _cost;
        private int _quantity;

        public int Id { get; set; }

        [Column(TypeName = "decimal(18, 2)")]
        public decimal Cost
        {
            get=>_cost;
            set
            {
                if (value >= 0)
                {
                    _cost = value;
                }
                else
                {
                    throw new ArgumentException("Количество денег не может быть меньше 0");
                }
            }
        }
        public int Quantity { get; set; }
        public bool IsBlocked { get; set; }

控制器

[HttpGet]
public IActionResult Purchase(int result, IFormCollection colletion)
{
    string ss = ViewBag.SumMoney;
    return Ok(result);
}

Array.prototype.forEach.call(document.querySelectorAll('.increase'), function(v) {
  v.addEventListener('click', inc);
});

function inc() {
  var div = this.parentElement;
  var input = div.children.item(1);
  input.setAttribute('value', (parseInt(input.getAttribute('value')) + 5).toString());
}
<div>
  <button class="decrease" type="button">-</button>
  <input type="text" name="field" value="0" />
  <button class="increase" type="button">+</button>
</div>

тут уже не работает
<input type="text" name="field" value="0" />
тут уже не работает

我写了这段代码,它似乎工作。视图上的值已更改。那只是在div的过道后面,它不起作用。我需要一个字段和 4 个按钮来更改金额。如何将此Js代码挂在按钮上

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-07-26 10:51:09 +0000 UTC

从 C# 创建 XML

  • 0

大家好。我创建 XML。

错误:System.ArgumentException:“不能作为子节点插入这个节点和它的祖先。”

/*<?xml version="1.0" encoding="utf-8" ?> */
            //создание объявления (декларации) документа
            XmlDeclaration XmlDec = XmlDoc.CreateXmlDeclaration("1.0", "utf-8", null);
            //добавляем в документ
            XmlDoc.AppendChild(XmlDec);
            //создание корневого элемента 
            XmlElement GetInform = XmlDoc.CreateElement("GetInform");

            XmlElement elem_getReferenceSPV4664 = XmlDoc.CreateElement("ns0:getReferenceSPV4664");
            elem_getReferenceSPV4664.SetAttribute("xmlns:ns0", "http://service.siw.pktbcki.rzd/");
            elem_getReferenceSPV4664.AppendChild(elem_getReferenceSPV4664); //Тут ошибка

            XmlElement elem_ReferenceSPV4664Request = XmlDoc.CreateElement("ns0:ReferenceSPV4664Request");
            GetInform.AppendChild(elem_ReferenceSPV4664Request);

            XmlElement elem_idUser = XmlDoc.CreateElement("idUser");
            elem_ReferenceSPV4664Request.AppendChild(elem_idUser);
            elem_idUser.AppendChild(XmlDoc.CreateTextNode("0"));


            XmlElement elem_vagons = XmlDoc.CreateElement("vagons");
            elem_ReferenceSPV4664Request.AppendChild(elem_vagons);

            XmlElement elem_vagon = XmlDoc.CreateElement("vagon");
            elem_vagons.AppendChild(elem_vagon);

            elem_vagon.AppendChild(XmlDoc.CreateTextNode("75142901"));

选项 2:

XDocument xdoc = new XDocument();
            // создаем первый элемент
            XElement Request = new XElement("GetInform");
            // создаем атрибут
            XAttribute getReferenceSPV4664 = new XAttribute("ns0:" + "getReferenceSPV4664 xmlns:ns0", "http://service.siw.pktbcki.rzd/"); //Тут ошибка
            XElement ReferenceSPV4664Request = new XElement("ReferenceSPV4664Request");
            XElement idUser = new XElement("idUser", "0");
            XElement vagons = new XElement("vagons");

            // добавляем атрибут и элементы в первый элемент
            Request.Add(getReferenceSPV4664);
            Request.Add(ReferenceSPV4664Request);
            Request.Add(idUser);

System.Xml.XmlException:“符号”:“,十六进制值 0x3A,不能在名称中使用。”

XML 本身必须是格式。

<GetInform>
<ns0:getReferenceSPV4664 xmlns:ns0="http://service.siw.pktbcki.rzd/">
<ns0:ReferenceSPV4664Request>
<idUser>0</idUser>
<vagons>
<vagon>50032382</vagon>
</vagons>
</ns0:ReferenceSPV4664Request>
</ns0:getReferenceSPV4664>
</GetInform>
c#
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-07-22 12:47:51 +0000 UTC

编辑 tempdb 数据库

  • 1

大家好你们好。我正在设置sql server。但它已经有了一个基础。

文档描述了如何设置model和tempdb数据库,现在的值是:

https://isstatic.askoverflow.dev/zrtJn.png

需要 在此处输入图像描述

我可以在 tempdb 中进行这些更改吗?主基地会不会有问题?主基地 500gb

Select session_id,
wait_type,
wait_duration_ms,
blocking_session_id,
resource_description,
        ResourceType = Case
When Cast(Right(resource_description, Len(resource_description) - Charindex(':', resource_description, 3)) As Int) - 1 % 8088 = 0 Then 'Is PFS Page'
            When Cast(Right(resource_description, Len(resource_description) - Charindex(':', resource_description, 3)) As Int) - 2 % 511232 = 0 Then 'Is GAM Page'
            When Cast(Right(resource_description, Len(resource_description) - Charindex(':', resource_description, 3)) As Int) - 3 % 511232 = 0 Then 'Is SGAM Page'
            Else 'Is Not PFS, GAM, or SGAM page'
            End
From sys.dm_os_waiting_tasks
Where wait_type Like 'PAGE%LATCH_%'
And resource_description Like '2:%' 

什么都没给,也许你不需要改变什么?

sql
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-05-24 14:05:22 +0000 UTC

如何将 XSD 转换为 XML?

  • 0

我无法处理 XSD 模式,尽管一切似乎都像教科书中的那样。

<xs:complexType name="getTN_EO_DIC_OBJECTS">
<xs:sequence>
<xs:element name="TN_EO_DIC_OBJECTSRequest" type="tns:tnEODICOBJECTSRequest" form="qualified"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="tnEODICOBJECTSRequest">
<xs:sequence>
<xs:element name="objectId" type="xs:int" nillable="true">
<xs:annotation>
<xs:documentation>Id объекта</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="classId" type="xs:int" nillable="true">
<xs:annotation>
<xs:documentation>Id класса (спраочника)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="objectKod" type="xs:int" nillable="true">
<xs:annotation>
<xs:documentation>Код символьный</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>

我的 xml 变体

<ns0:getTN_EO_DIC_OBJECTS xmlns:ns0="http://service.siw.getcode.go/">
    <ns0:TN_EO_DIC_OBJECTSRequest>
        <ns0:tnEODICOBJECTSRequest>     
           <objectId>574</objectId>     
           <classId>4000</classId>
           </ns0:tnEODICOBJECTSRequest>         
     </ns0:TN_EO_DIC_OBJECTSRequest>
</ns0:getTN_EO_DIC_OBJECTS>

我的版本抛出错误。请告诉我怎么了?这里有点不清楚

<xs:element name="TN_EO_DIC_OBJECTSRequest" type="tns:tnEODICOBJECTSRequest" form="qualified"

方案

xml
  • 2 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-04-23 19:54:08 +0000 UTC

代码优先不生成迁移

  • 0

代表

移民

namespace MVSStore.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class New : DbMigration
    {
        public override void Up()
        {
        }
        
        public override void Down()
        {
        }
    }
}

连接的:

using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace MVSStore.Models.Data
{
    public class Db : DbContext
    {
        public DbSet<PagesDTO> Pages { get; set; }
    }
}

模型数据库

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace MVSStore.Models.Data
{
    [Table("MVCStore")]
    public class PagesDTO
    {
        [Key]
        public int Id { get; set; }
        public string Title { get; set; }
        public string Slug { get; set; }
        public string Body { get; set; }
        public int Sorting { get; set; }
        public bool HasSidebar { get; set; }

    }
}

为什么迁移是空的?为什么没有创建字段?

第一次一切似乎都很好,然后我钝化了一些东西并删除了迁移文件夹。让我们创建新的,它们是空的

PM> get-migrations
Retrieving migrations that have been applied to the target database.
202104231114090_thr
202104231102309_sec
202104231041067_first
c#
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-04-05 15:28:48 +0000 UTC

密码中的“<”<connectionStrings> C#

  • 2

大家好你们好。

  <connectionStrings>
    <add name="DataContext" connectionString="Server=RDA-1; User ID=sa; Password=XNj<kz; Database = TestBase;"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

Password=XNj<kz 包含字符“<”,C# 表示关闭标签。但我没有打开它。在此标记中写入密码的正确方法是什么?

c#
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-04-02 19:59:45 +0000 UTC

导航到另一个页面 MVC C#

  • 0

大家好。请告诉我该怎么做

  <button class="login100-form-btn" id="btn">
      <!-- <a href="~/Home/Register" class="txt1">
          123
      </a>-->
      @Html.ActionLink("More information", "Register")
   </button>

页面上的按钮。我想点击按钮进入注册页面。

<script type="text/javascript">
        $(document).ready(function () {
            $('#btn').on('click', function () {
                var btn = $(this);
                btn.button('loading');
                $.ajax({
                    type: 'POST',
                    async: true,
                    cache: false,
                    url: '@Html.ActionLink("register", "Register")',
                    success: function (data) {
                        btn.button('reset');
                        $('.alert').css('display', 'block').text(data.title);
                    }
                });
            });
        });
</script>

由于某种原因,它不起作用。我一试。

<!-- <a href="~/Home/Register" class="txt1">
              123
</a>-->

这就是它的工作原理。但是你必须戳链接而不是按钮。你很容易错过。选项不太好

javascript
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-03-31 12:44:55 +0000 UTC

如何使块居中?

  • 2

我不明白为什么授权表没有出现在中心?有什么问题,请告诉我。代码很简单,好吧,我达不到想要的结果

/*Background */

body {
  background: url(/images/bg/bg-6.png)
}


/* Form Style */

.form-horizontal {
  background: #fff;
  padding-bottom: 40px;
  border-radius: 15px;
  text-align: center;
}

.form-horizontal .heading {
  display: block;
  font-size: 35px;
  font-weight: 700;
  padding: 35px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 30px;
}

.form-horizontal .form-group {
  padding: 0 40px;
  margin: 0 0 25px 0;
  position: relative;
}

.form-horizontal .form-control {
  background: #f0f0f0;
  border: none;
  border-radius: 20px;
  box-shadow: none;
  padding: 0 20px 0 45px;
  height: 40px;
  transition: all 0.3s ease 0s;
}

.form-horizontal .form-control:focus {
  background: #e0e0e0;
  box-shadow: none;
  outline: 0 none;
}

.form-horizontal .form-group i {
  position: absolute;
  top: 12px;
  left: 60px;
  font-size: 17px;
  color: #c8c8c8;
  transition: all 0.5s ease 0s;
}

.form-horizontal .form-control:focus+i {
  color: #00b4ef;
}

.form-horizontal .fa-question-circle {
  display: inline-block;
  position: absolute;
  top: 12px;
  right: 60px;
  font-size: 20px;
  color: #808080;
  transition: all 0.5s ease 0s;
}

.form-horizontal .fa-question-circle:hover {
  color: #000;
}

.form-horizontal .main-checkbox {
  float: left;
  width: 20px;
  height: 20px;
  background: #11a3fc;
  border-radius: 50%;
  position: relative;
  margin: 5px 0 0 5px;
  border: 1px solid #11a3fc;
}

.form-horizontal .main-checkbox label {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}

.form-horizontal .main-checkbox label:after {
  content: "";
  width: 10px;
  height: 5px;
  position: absolute;
  top: 5px;
  left: 4px;
  border: 3px solid #fff;
  border-top: none;
  border-right: none;
  background: transparent;
  opacity: 0;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.form-horizontal .main-checkbox input\[type=checkbox\] {
  visibility: hidden;
}

.form-horizontal .main-checkbox input\[type=checkbox\]:checked+label:after {
  opacity: 1;
}

.form-horizontal .text {
  float: left;
  margin-left: 7px;
  line-height: 20px;
  padding-top: 5px;
  text-transform: capitalize;
}

.form-horizontal .btn {
  float: right;
  font-size: 14px;
  color: #fff;
  background: #00b4ef;
  border-radius: 30px;
  padding: 10px 25px;
  border: none;
  text-transform: capitalize;
  transition: all 0.5s ease 0s;
}
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet" />

<div class="container" style="margin-top:10%">
  <div class="row">
    <div class="col-md-offset-6 col-md-6">
      <form class="form-horizontal">
        <span class="heading">АВТОРИЗАЦИЯ</span>
        <div class="form-group">
          <input type="email" class="form-control" id="inputEmail" placeholder="E-mail">
          <i class="fa fa-user"></i>
        </div>
        <div class="form-group help">
          <input type="password" class="form-control" id="inputPassword" placeholder="Password">
          <i class="fa fa-lock"></i>
          <a href="#" class="fa fa-question-circle"></a>
        </div>
        <div class="form-group">
          <div class="main-checkbox">
            <input type="checkbox" value="none" id="checkbox1" name="check" />
            <label for="checkbox1"></label>
          </div>
          <span class="text">Запомнить</span>
          <button type="submit" class="btn btn-default">ВХОД</button>
        </div>
      </form>
    </div>

  </div>
  <!-- /.row -->
</div>
<!-- /.container -->

Bootstrap v3.4.1 包含在项目中

html
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2022-02-23 09:12:48 +0000 UTC

查找素数 C#

  • 0

大家好。我正在寻找从 -100 到 100 的素数。不显示负数。我想在 2 个周期内完成所有没有功能的事情。

using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = -100, b = 100;
            for (int i = a; i < b; i++)
            {
                for (int x = 2; x <= i/2; x++)
                {
      
                     if (i%x!=0)
                    {
                        Console.WriteLine(i);
                        break;
                    }
                }
            }
        }
    }
}
c#
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2021-12-09 08:44:18 +0000 UTC

如何在 Joomla 中找到正确的代码?

  • 3

网站

链接到验证器

在网站上发现错误。

错误:在此上下文中元素样式不允许作为元素 div 的子元素。(抑制来自该子树的更多错误。)

从第 87 行第 1 列开始;至第 87 行第 23 列

包装器">↩#as-me

整个问题是这个代码一般是加载和缓存的。原件出自哪里?我找不到了。请告诉我遇到过类似情况的人如何找到要修复的正确代码。我一直在寻找一个星期,但无法弄清楚。

css3
  • 1 个回答
  • 10 Views
Martin Hope
Boris
Asked: 2021-12-08 16:35:16 +0000 UTC

悬停菜单滑出

  • 0

当您将鼠标悬停在菜单上时,它会向左或向右滑动。我想修复它,我不明白菜单样式或 Js 或 CSS 来自哪里。虽然我检查了所有的 CSS。当悬停在很远的距离时,它全部移出,结果不明白是什么。https://easy-moving.ca在此处输入图像描述在此处输入图像描述

javascript
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5